ProjectDef_II

advertisement
ETEC471 – Project Definition
Small Garden Deer
Repellent System
(SGDRS)
Project Definition (Final)
Justin A. King
12/6/2012
Table of Contents
Functional Description .................................................................................................................................. 2
Development Plan......................................................................................................................................... 9
Electrical Specifications............................................................................................................................... 11
Preliminary Parts List .................................................................................................................................. 13
1
Functional Description
Introduction
The SGDRS utilizes an infrared motion detector module to monitor a small area in front of the device (510 ft). When the infrared motion detector goes off, it will send a signal to a microcontroller that will be
in sleep mode to conserve power. Once the signal is received, the microcontroller will wake up. To
conserve deer repellent spray, the microcontroller will check to see the last time it sprayed the plants. If
it has sprayed the plants within the past day, it will not spray again and will return to sleep mode. If it
has not sprayed the plants within the past day, it will send a signal to an electronic solenoid module that
will press down on an aerosol and spray the plants. After sending the signal to the solenoid module, the
microcontroller will record the time as the new “last time sprayed”, and it will return to sleep mode to
conserve power. The entire system is designed to run off of battery power, in order to enable the user
to plant the SGDRS in any chosen location.
Project Hardware – The hardware for this project has changed quite a bit along its development. See
Hardware description for details changes.
The project hardware consists of several modules that are controlled by, or used to power the Stellaris
LM4F120.
Microcontroller (pictured in figure 1): This project utilizes the LM4F120H5QR Stellaris Launchpad for all
processing requirements. Max size: 60 x 57 x 11mm.
Figure 1
2
Source (Figure 2): The SGDRS is powered by a 9V battery (V1), which is put through a voltage regulator
circuit using a 5V regulator (LM7805). Max size: 60 x 60 x 30mm.
U1 LM7805C
Vo = 5V
OUT
GND
IN
C1 10u
C2 1u
V1 9
Figure 2
GND
PIR Detector (Pictured in Figure 4): The HC-SR501 PIR detector integrated circuit requires a voltage of 4.5
– 20V. In this project, it will run off of the 9V source and output to an I/O pin on the Stellaris LM4F120.
Max size: 32 x 24 x 10mm.
Functional diagram:
9V
Source
Vi = 9V
HC-SR501
Figure 3
Module:
Figure 4
3
Vo = 3.3V
Stellaris
LM4F120
Solar Panel (pictured in figure 6) and Capacitor bank: The output solenoid circuit will be driven by a 12V
capacitor bank, which is charged with a 12V, 1.5W solar panel (V1) to save battery power. Max size: 155
x 88 x 30mm.
Basic circuit diagram:
D1
1BH62
C2
50000µF
V1
12 V
Figure 5
Solar module:
Figure 6
4
Solenoid circuit (figure 7): The Solenoid circuit takes the output from a Stellaris pin (V1 = 3.3v) and uses
it to drive a MOSFET (T1), which in turns drives the solenoid (CR1). The 12V supply (V2) is a capacitor
bank that is charged by a solar panel. Max size: 60 x 40 x 40mm.
V2 12
D1
R2
CR1
T1
V1 3.3
R1
Figure 7
Additional hardware: In addition to the electronic hardware, the SGDRS also requires a refillable aerosol
spray can to be filled with the selected deer repellent spray. The solenoid in the solenoid circuit (figure
7) will be used to depress the sprayer of the aerosol can.
Detailed Description and Functional Block Diagram
Stellaris LM4F120H5QR modules used:
 A/D
 Timer
 Internal pull up / down resistors
 Internal analog comparator
 Lower power hibernation module
 Stellaris ICDI
Stellaris LM4F120H5QR resources available for use (note: not using 100% of memory space):
 UART
 32-bit ARM cortex (80mHz operation, 100 DMIPS performance)
 256KB single cycle Flash memory
 32KB single cycle S-RAM
 Programmable GPIOs
 PIOSC (16mHz, 1%)
 32.768kHz external oscillator for Hibernation Module
5
Major external peripherals:
 9V to 5V regulator circuit (pg 3)
 PIR detector (pg 3)
 12V solar panel and capacitor bank (pg 3)
 Solenoid output circuit (pg 3)
External interrupts:
 External interrupts are triggered by the output of the PIR detector circuit (pg 3)
Power supply:
 Power provided to the LM4F120 by a 9V battery. Maximum current draw is <50mA.
 Power provided to output solenoid circuit by 12V capacitor bank. Max current draw is <1A.
System functional block diagram (figure 8):
Figure 8
6
Specific LM4F120H5QR block diagram (figure 9, from datasheet):
Figure 9
7
Software requirements
Overall architecture (figure 10):
Sleep
Motion sensor
tripped
Yes
Check “last time
sprayed”
Sprayed within
24 hours?
No
Output to solenoid
circuit
Update last
sprayed time
Figure 10
Development programs used:
 Code Composer Studio
 StellarisWare
 LMFlash Programmer
 Putty
Stellaris software modules used:
 Timer module: Uses the system clock to keep track of time. The Stellaris offers 16 and 32 bit
timer modules.
 Hibernate: Allows the Stellaris to pull only enough power to run the hibernate module. Has a
dedicated pin for using external interrupts to wake the Stellaris.
 External interrupt: The PIR sensor will periodically cause external interrupts, which are handled
by an ISR.
8
Major algorithms and tasks:
 Hibernate cycle: The processor will spend the majority of its time in the hibernate state.
 Input: Checking an I/O pin for the signal from the PIR.
 Output: Outputting a signal to an I/O pin for the solenoid circuit.
OEM software used:
 StellarisWare
 LMFlash Programmer
 Code Composer Studio
User interface
The SGDRS does not include a typical user interface such as an LED or LCD screen display. It is an
automated device that performs its tasks without requiring the user to interact with the software or
hardware.
Communication protocols
USB 2.0 and the UART interface are used to communicate and program the SGDRS. The final prototype
will not require communications, and therefore makes use of no communications protocols.
Sustainability design issues
The SGDRS requires a 9V battery to run. Because of this, the only waste that it creates is drained 9V
batteries. If a 9V rechargeable is used, then it will create no waste. The addition of the solar panel and
capacitor bank reduces the draw on the 9V supply and allows it to sustain itself for longer periods of
time.
Development Plan
Development schedule
Task
Final design of Solar circuit
Final design of Solenoid circuit
Parts ordering
PIR testing and interfacing
Voltage regulator construction
Voltage regulator testing and interfacing
Solar circuit construction
Solar circuit testing and interfacing
Solenoid circuit construction
Solenoid circuit testing and interfacing
Stellaris I/O programming
Stellaris hibernate programming
Prototype construction
Prototype testing
Start
Dec 22nd, 2012
Dec 27th, 2012
January 5th, 2013
January 20th, 2013
January 28th, 2013
January 31st, 2013
February 10th, 2013
February 15th, 2013
February 25th, 2013
March 3rd, 2013
March 15th, 2013
March 28th, 2013
April 13th, 2013
April 15th, 2013
9
Finish
Dec 23rd, 2012
Dec 28th, 2012
January 5th, 2013
January 27th, 2013
January 30th, 2013
February 7th, 2013
February 13th, 2013
February 22nd, 2013
February 28th, 2013
March 10th, 2013
March 25th, 2013
April 10th, 2013
April 14th, 2013
April 30th, 2013
Case design
Case construction
Final prototype construction
May 2nd, 2013
May 3rd, 2013
May 7th, 2013
May 2nd, 2013
May 5th, 2013
May 15th, 2013
Development hardware / software required
Item
Oscilloscope
DMM
Computer
Code Composer Studio
StellarisWare
LMFlashProgrammer
Soldering iron
Carving equipment
Use
Diagnostics / testing
Diagnostics / testing
Design / Analysis
Design / Programming
Programming
Programming
Construction
Construction
Source
EET lab
EET lab
EET lab / Personal netbook
EET lab / Personal netbook
EET lab / Personal netbook
EET lab / Personal netbook
EET lab
Personal supplies
Prototype description
Construction methods
The prototype will consist of the individual circuits and modules coupled together and contained within
a case. The individual circuits and modules will have the components on break out boards and soldered
together. The case will house all of the modules, the Stellaris, and the 9V power supply, as well as an
aerosol can that has been filled with a testing spray (most likely a scented spray or water with dye). The
prototype will contain the entire Stellaris development board, so it will not necessarily be a “standalone”
processor, but it will utilize the Stellaris as a standalone module.
Props
The prototype will be set up in a pot with a plant so it can spray it as it would in its intended
environment. A backboard will also be included with the display, which will contain important data
about the functionality of the SGDRS, such as main programs, module circuits and functionality, and
power calculations.
10
Electrical Specifications
Project specifications
Voltage regulator module:
 1µF Capacitor
o 2% tolerance
o T = -55 to +85°C
 10µF Capacitor
o 2% tolerance
o T = -55 to +85°C
 LM7805, Vo = 5V ± 5%
o T = 0 to +125°C
o IbiasMAX = 8mA
o IoMAX = 2.2A
PIR sensor module (HC-SR501):
 Vin = 5V to 20V
 Iquiescent < 50µA
 Vo = 3.3V high / 0V low
 T = -15 to 70°C
Solar Capacitor bank:
 Solar panel: P0 = 1W ± 5%
o VoMAX = 15V
o Imax = 65mA
o T = -40 to +80°C
o Waterproof
 330µF, 12V Capacitor
o 2% tolerance
o T = -55 to +85°C
 Diode
o With breakdown voltage (VBR) >= 14V.
Solenoid circuit:
 Resistors (value [TBD])
o 1% tolerance
11

Solenoid
o 12V activation
o Rcoil = 40Ω
o 0.5" diameter x 1" long tubular solenoid with 3/8" diameter threaded bushing for
mounting. 1/16" diameter x 1/2" long plunger.

MOSFET
o Depletion mode
o N-Channel
o Vth <= 3.3V
o Vds >= 15V
Diode
o With breakdown voltage (VBR) >= 17V.

Stellaris:
 Vin = 5V (USB standard voltage output)
 GPIO Vo = 3.3V high / 0V low
 IiMAX = 100mA (USB standard maximum current draw per device)
 GPIO IoMAX = 8mA
 T = -40 to +85°C
 80MHz clock / data rate
Power requirements
9V battery:
 500mAh
 Estimated life = 50hrs if constantly powered (not hibernating)
 Worst case P = 100mW
12V Capacitor bank
 Supplies 12V for driving the solenoid
 Recharged by solar panel
12
Special environmental requirements
Based on temperature ranges for individual components and microprocessor, the operating range for
the device is -15 to 70°C. It will be used outdoors, so humidity is a concern. To circumvent, the case will
be water-tight to repel rain and the majority of humidity effects.
Preliminary Parts List
[TBD] = To Be Determined
Module
Steallaris Dev Board
PIR sensor
5V Regulator
9V Battery
15V, 15mF cap
10uF Capacitor
1uF Capacitor
15V, 1W Solar Panel
Resistors
MOSFET
Solenoid
Diode
Part #
LM4F120
HC-SR501
LM7805
Any
Any
Any
Any
Any
Any
Any with Vth <=
3.3V
SOL-102
(on website)
Any with Vbr >=
17V
Quantity
1
1
1
1
1-2
1
1
1
2
1
Cost (total)
$14.78
$3.41
[TBD]
~$2.00
<$0.50
<$0.10
<$0.10
~$10.00
<$0.10
<$1.00
Lead Time
7 days
22 days
[TBD]
0 days
0 days
0 days
0 days
14 days
0 days
0 days
Source
TI
DHGate
[TBD]
Amazon
Lab
Lab
Lab
Ebay
Lab
Lab
[TBD]
Power
[TBD]
<1mW
~54mW
0W ideal
0W ideal
0W ideal
0W ideal
0W ideal
V2 / R
[TBD]
ID2*RFET
3.6W
1
<$10.00
2
<$0.50
0 days
[TBD]
Lab
Allelectronics.com
Case
The case design and components are based on the final dimensions and configuration of the prototype
modules. The case will be constructed with Styrofoam, epoxy, resin, plexiglass, and spray paint, all of
which can be obtained at a local hardware store. The lead time on these pieces is 0 days, but the price
will be determined upon final prototype construction. The price for case construction should not exceed
$20.00.
13
Download