Difference between revisions of "F12: Evil Watchdog"

From Embedded Systems Learning Academy
Jump to: navigation, search
(Testing and Technical Challenges)
(Parts List and Costs)
Line 130: Line 130:
 
==Parts List and Costs==
 
==Parts List and Costs==
 
<table class="wikitable">
 
<table class="wikitable">
<th>Item</th><th>Source</th>
+
<th>Item</th><th>Details</th>
 +
<th>Source</th>
 
<th>Cost Ea.</th>
 
<th>Cost Ea.</th>
 
<th>Qty.</th>
 
<th>Qty.</th>
 
<th>Total</th>
 
<th>Total</th>
 
<tr>
 
<tr>
<td>ARM7 NXP LPC2148 Microcontroller</td>
+
<td>Batteries</td>
<td align="left">SJValley Engineering</td>
+
<td align="left">Duracell 1.5V Size AA</td>
<td align="right">$60.00</td>
 
<td align="center">x1</td>
 
<td align="right">$60.00</td>
 
</tr>
 
<tr>
 
<td>Batteries - 1.5V Size AA</td>
 
 
<td align="left">Costco</td>
 
<td align="left">Costco</td>
 
<td align="right">$1.33</td>
 
<td align="right">$1.33</td>
Line 149: Line 144:
 
</tr>
 
</tr>
 
<tr>
 
<tr>
<td>Distance Sensor*</td>
+
<td>Distance Sensors</td>
<td align="left">SJValley Engineering</td>
+
<td align="left">SRF02 Ultrasonic Range Finder</td>
 +
<td align="left">Preet Kang</td>
 
<td align="right">$25.00</td>
 
<td align="right">$25.00</td>
 
<td align="center">x3</td>
 
<td align="center">x3</td>
Line 157: Line 153:
 
<tr>
 
<tr>
 
<td>LEDs</td>
 
<td>LEDs</td>
 +
<td align="left">Blue and Green LEDs</td>
 
<td align="left">HSC Electronics</td>
 
<td align="left">HSC Electronics</td>
 
<td align="right">$0.35</td>
 
<td align="right">$0.35</td>
Line 163: Line 160:
 
</tr>
 
</tr>
 
<tr>
 
<tr>
<td>Motion Sensor*</td>
+
<td>Microcontroller</td>
 +
<td align="left">ARM7 NXP LPC2148</td>
 +
<td align="left">Preet Kang</td>
 +
<td align="right">$60.00</td>
 +
<td align="center">x1</td>
 +
<td align="right">$60.00</td>
 +
</tr>
 +
<tr>
 +
<td>Motion Sensor</td>
 +
<td align="left">PIR Motion Sensor SEN-08630</td>
 
<td align="left">Preet Kang</td>
 
<td align="left">Preet Kang</td>
 
<td align="right">$9.95</td>
 
<td align="right">$9.95</td>
Line 170: Line 176:
 
</tr>
 
</tr>
 
<tr>
 
<tr>
<td>Motor Controller - 5A*</td>
+
<td>Motor Controllers</td>
<td align="left">SJValley Engineering</td>
+
<td align="left">SJValley Engineering 5A Motor Controller</td>
 +
<td align="left">Dr. Özemek</td>
 
<td align="right">$17.99</td>
 
<td align="right">$17.99</td>
 
<td align="center">x2</td>
 
<td align="center">x2</td>
Line 177: Line 184:
 
</tr>
 
</tr>
 
<tr>
 
<tr>
<td>New Bright Land Rover RC Car</td>
+
<td>Piezo Buzzer</td>
 +
<td align="left">75dB 6VDC Piezo Buzzer</td>
 +
<td align="left">RadioShack</td>
 +
<td align="right">$3.89</td>
 +
<td align="center">x1</td>
 +
<td align="right">$3.89</td>
 +
</tr>
 +
<tr>
 +
<td>RC Car</td>
 +
<td align="left">New Bright Land Rover Mud Slinger</td>
 
<td align="left">Fry's Electronics</td>
 
<td align="left">Fry's Electronics</td>
 
<td align="right">$15.34</td>
 
<td align="right">$15.34</td>
Line 184: Line 200:
 
</tr>
 
</tr>
 
<tr>
 
<tr>
<td>Piezo Buzzer - 75dB</td>
+
<td>Voltage Regulator</td>
<td align="left">RadioShack</td>
+
<td align="left">LM7805CV Voltage Regulator</td>
<td align="right">$3.89</td>
 
<td align="center">x1</td>
 
<td align="right">$3.89</td>
 
</tr>
 
<tr>
 
<td>Voltage Regulator - LM7805CV</td>
 
 
<td align="left">HSC Electronics</td>
 
<td align="left">HSC Electronics</td>
 
<td align="right">$2.00</td>
 
<td align="right">$2.00</td>
Line 198: Line 208:
 
</tr>
 
</tr>
 
</table>
 
</table>
<p>*provided by Dr. Ozemek and Preet Kang</p>
 
  
 
==Design and Implementation==
 
==Design and Implementation==

Revision as of 17:59, 1 December 2012

Abstract

The Evil Watchdog takes the responsibilities of a pet guarding a house. It will roam around a predefined environment, avoid obstacles, and sound an alarm whenever foreign motion is detected.

CMPE 146 F12 EWD Evil Watchdog.jpg

Introduction

The objective of this project is to design a vehicle to imitate a guard dog. The following items will be incorporated to accomplish this goal :

  • Motor driven chassis
  • Vehicle will move in a random path detecting motion
  • Vehicle will sound an alarm when motion is detected

Technology used

  • Motion sensor
  • Distance sensor

Team Members and Roles & Responsibilities

  • Waymond Chen: Front motor control and distance sensor programming
  • Hung Vuong: Distance and motion sensor programming
  • Erik Montoya: Backside motor control and programming

Schedule

Starting Ending Planned Activities Actual
Oct 26, 2012 Nov 1, 2012
  • Acquire parts
  • Identify interfaces to be used
  • Identify pin selections
  • Review datasheets
  • Received distance sensors
  • Received motion sensors
Nov 2, 2012 Nov 8, 2012
  • Build chassis
  • Build motors and wheels
  • Test motors and wheels
  • Prepared chassis and wheels
  • Tested motors and steering
Nov 9, 2012 Nov 15, 2012
  • Write PWM driver
  • Control rear wheels
  • Program and test distance sensors
  • Created PWM driver
  • Began controlling rear wheels
  • Successfully tested distance sensors
Nov 16, 2012 Nov 22, 2012
  • Integrate motion sensor
  • Test motion sensor
  • Control/steer front wheels
  • Successfully tested motion sensor
  • Integrated motion sensor
  • Completed steering control
Nov 23, 2012 Nov 29, 2012
  • Integrate alarm system
  • Unite all parts
  • Added piezo buzzer alarm
  • United all parts
Nov 30, 2012 Dec 6, 2012
  • Testing and design final product
  • Complete and revise project report
 
Dec 7, 2012 Dec 13, 2012
  • Finalize and deliver project
 
Dec 19, 2012 Dec 19, 2012
  • Demo project
 

Parts List and Costs

ItemDetails Source Cost Ea. Qty. Total
Batteries Duracell 1.5V Size AA Costco $1.33 x5 $6.65
Distance Sensors SRF02 Ultrasonic Range Finder Preet Kang $25.00 x3 $75.00
LEDs Blue and Green LEDs HSC Electronics $0.35 x2 $0.70
Microcontroller ARM7 NXP LPC2148 Preet Kang $60.00 x1 $60.00
Motion Sensor PIR Motion Sensor SEN-08630 Preet Kang $9.95 x1 $9.95
Motor Controllers SJValley Engineering 5A Motor Controller Dr. Özemek $17.99 x2 $35.98
Piezo Buzzer 75dB 6VDC Piezo Buzzer RadioShack $3.89 x1 $3.89
RC Car New Bright Land Rover Mud Slinger Fry's Electronics $15.34 x1 $15.34
Voltage Regulator LM7805CV Voltage Regulator HSC Electronics $2.00 x1 $2.00

Design and Implementation

Hardware Design

Frame and Inner Placement

Original toy car prior to disassembly.
For convenience, a New Bright toy RC car was purchased and disassembled. The motors and wheels were already pre-mounted onto the chassis, allowing electronic parts to control the car. On the chassis, slots above the wheel wells were large enough to house motor controllers while the center of the chassis provided enough room to include a small breadboard and the microcontroller. All wires were shortened to the shortest length possible to reduce clutter.

Sensor Placement

The sensors, which guided car control, were strategically mounted in front and above the car. This increased visibility of the sensors. Three distance sensors were used to detect obstacles: a left-, a center-, and a right-side sensor was used to determine steering of the vehicle. A front-mounted sensor would seek motion as the car was stopped. Should motion be seen, the piezo buzzer sitting at the front of the car would promptly be sounded.

Power Supply

The battery box beneath the car provided additional convenience. It housed five 1.5-volt AA batteries that supplied up to 7.5 volts in series. This power supply provided enough power to run all of the components of this project. Whenever existing batteries began to run low on power, new batteries could be swapped into place easily. The following list describes the power requirements of each part used:

PartVoltage Range Source
Distance Sensors (Parallel) +5V Microcontroller Pin
LPC2148 Microcontroller +7V to +20V Battery Pack
Motion Sensors +5V to +12V Battery Pack
Motor Controllers +7V to +30V Battery Pack
Piezo Buzzer +3V to +6V Microcontroller Pin

Hardware Implementation

Software Design

Software Implementation

Testing and Technical Challenges

Battery Life

By far, the battery pack is the most vulnerable component in keeping the Evil Watchdog alive. Only five 1.5-volt AA batteries power the entire system. Possible solutions to this problem are to either use batteries with longer lifespans or to use rechargeable batteries to avoid wasting single-use cells. During testing, a variable-voltage DC power supply, grabbing power from a wall outlet, was used to power the project. This saved battery power later needed for demoing.

Vehicle Weight

The original toy car was designed to carry a lightweight circuit board that received RF signals to control the motors. When the car is torn apart and new components are added for this project, the amount of weight placed on the wheels rapidly increases. Additional weight requires extra torque from the wheels to move the carried load, which can drain the batteries much more quickly. The best way to alleviate this problem is to eliminate excess weight and to select the lightest available parts to be placed on the vehicle.

Conclusion

References

Thanks To...

  • Dr. Haluk Özemek
  • Preet Kang, TA

Appendix

  • Project Code: (FIXME)
  • Project Video: (FIXME)