470 likes | 649 Views
SPIRIT-C Solar Powered Image Response Infrared Tracking Camcorder. Justin Eiler Jeff Morroni Adeel Baig Andy Crahan Jim Patterson. Overview. Design an infrared tracking camcorder All components solar powered Stepper Motors control camera movement Pyro-electric sensors detect IR emission
E N D
SPIRIT-CSolar Powered Image Response Infrared Tracking Camcorder Justin Eiler Jeff Morroni Adeel Baig Andy Crahan Jim Patterson
Overview • Design an infrared tracking camcorder • All components solar powered • Stepper Motors control camera movement • Pyro-electric sensors detect IR emission • Spartan-3 + PicoBlaze provides system control
Presentation Outline • System Components • Manual Control – Adeel Baig • Solar Power System – Jeff Morroni • Stepper Motor Controllers – Jeff Morroni • Infrared Sensors – Andy Crahan and Adeel Baig • System Integration – Jim Patterson • Software – Justin Eiler, Jim Patterson, Andy Crahan • System Mounting – Justin Eiler • Parts List, Schedule, and Milestones
System Block Diagram Solar Panel Spartan-3 Peak Power Tracker Voltage/Current Sensors Data Deep Cycle Battery IR Sensor PCB with A/D Converters Power Mechanical LED Motor Controller PCB Digital Camcorder Computer Stepper Motors
Manual Control • Genesis controller has a DB-9 interface • The controller is active low • When a switch is pressed, the output is shorted to ground
74HC157 • Quad 2 line to 1 line multiplexer • 2 inputs for every output • 1 select signal for the chip
Solar Power System Solar Panel Spartan-3 Peak Power Tracker Voltage/Current Sensors Deep Cycle Battery IR Sensor PCB with A/D Converters Motor Controller Digital Camcorder Stepper Motors
Flyback Converter and Current/Voltage Sensors • FPGA controls Peak Power and Converter Shutoff • Uses voltage and current sensors to compute peak power point and determine if battery is charged
Current and Voltage Sensors • LMP8270 uses common mode voltage to sense current • Simple Voltage Divider Senses Voltage • FPGA computes peak power point and battery charge state
Solar Panel • Sharp NE-80EJE donated from Namaste Solar Electric • 80W, 17.1 Vmax, 4.67 Imax • Length of 4.0’ • Width of 1.8’
Deep Cycle Battery • 105 Amp Hours • 12.5V nominal output
Solar Power System Status • Flyback converter built and tested • Deep Cycle battery integrated with flyback converter • Solar cells modeled with resistor in series with a voltage source
L297 Stepper Motor Controller • Half/Full Step Capability • Direction Input • Enable Input • Clock Input
L298 Dual Full-Bridge Driver • Capable of Driving Motors up to 2A • Current Sensing Capability allows for quick current decay when windings are turned off
Stepper Motor • 0.8A Winding Current • 0.9 degree step sizes
Pyro-electric IR Sensors • Only pyro-electric sensors have the rapid motion detection we require for high speed filming • These operate like current sources with output proportional to the rate of change in temperature • Extremely fast responses set them apart • They are also insensitive to external DC effects
Current PIR Status • Successful testing of PIR directional signal generation • Amplification and filtering circuit performs as desired, railing the right and left movement signals to 5V • This is dropped to 3.3V for direct signal interpretation on the FPGA
Gain stage 1 sets amplifier gain and DC operating point • Also creates band-pass filter to amplify only signals above DC yet below 10Hz
Gain stage 1 feeds stage 2 through a RC high pass filter • Stage 2 output (pin 14) is biased to 2.5V under no detection
Gain stage 2 feeds a window comparator of 2 op-amps to rail the PIR signal • Comparator provides a small voltage window for PIR signal to avoid noise of minor sensor fluctuations
Resistors bias comparator references to 175mV above and below 2.5V for left and right detections respectively • Thus the window comparator provides 350mV dead zone centered at 2.5V to ignore noise
Circuit Timing Issues: Multivibrator • The second gain stage feeds the CD4538 dual single shot multi-vibrator. • The CD4538 is re-triggerable and re-settable for continuous motion detection. • Dual chip enables left versus right signal processing.
Each single shot has an active high output feeding the left and right signal outputs. • With cross coupling of the trigger inputs, the first single shot triggered will inhibit the others trigger
Re-triggering occurs under two successive valid triggers (3) and (4) prior to the output Q falling low. • A re-trigger as timing node T2 increases from Vref1 to Vref2 causes an increase in output pulse width. • Thus, continued motion during timeout will re-trigger the timing circuit and extend the pulse period until motion is no longer detected.
Motion Sensitivity • This window comparator enables accurate motion sensing for a valid trigger: skateboarder, intruder, small child, etc. • The PIR with a Fresnel lens mounted 0.6 inches off the sensor produces accurate motion detection in two directions (left and right or up and down) • The Fresnel lens enables motion detection of up to 90 feet • For the design expo we are optimizing the PIR sensitivity for approximately 8 feet
PicoBlaze Features • 16 byte-wide general-purpose data registers • 1K instructions of programmable on-chip program store, automatically loaded during FPGA configuration • ALU: CARRY and ZERO indicator flags • 64-byte internal scratchpad RAM • Automatic 31-location CALL/RETURN stack • 2 clock cycles per instruction • Fast interrupt response; worst-case 5 clock cycles
Why PicoBlaze? • 8-bit micro-controller • Excellent for control and state machine applications • Re-uses logic resources • Interrupt handling
System Block Diagram Solar Panel Spartan-3 Peak Power Tracker Voltage/Current Sensors Data Deep Cycle Battery IR Sensor PCB with A/D Converters Power Mechanical LED Motor Controller PCB Digital Camcorder Computer Stepper Motors
System Integration • PicoBlaze - send control signals to ADC, DAC, and MUXes for receiving IR sensor information and converter information • MUXes - continuously polled at 50MHz for information, scrolling through each of 15 sensors and saving current state information • ADC - synchronized to 25 MHz clock signal receive output voltage and current from converter • DAC – synchronized to 25 MHz clock signal send PWM signal to gate drive converter MOSFET • FPGA state machines Input - IR signal, converter voltage and current Outputs - motor control signal, converter PWM signal
IR Sensors and Converter Control Converter control Voltage Regulator Output IR signal processing
IR signal processing • Header – IR sensors separately connected • IR Network – separate gain stages, filtering and latching • MUXes – MAX306CPI left and right channels MUXes 15 IR networks Header
Converter Control Level Shifters ADC • ADC – 0808CCN converter V and I digital signal • DAC – 0830LCN digital signal PWM voltage • Level Shifters – HCF40109 digital signals from 5V3.3V DAC
State Machine Pad_start = 1 Start_up Reset = 0 Manual Automatic Reset = 1 Pad_start = 0 Pad_up = 0 Pad_right = 0 Pad_down = 0 Pad_left = 0 Move_Left Move_Down Move_Up Move_Right *All 4 Move_x states return to previous state after one cycle
Verilog HDL (State Machine) Manual control IR signal flow Motor control PicoBlaze Assembly Language Serial communication Sensor polling Converter control Software
case (state) MANUAL: begin automode = 0; if(pad_up == 1) begin state = MOVE_UP; if(pad_left == 1) begin state = MOVE_UP_LEFT; end else if(pad_right == 1) begin state = MOVE_UP_RIGHT; end end else if (pad_down ==1) begin state = MOVE_DOWN; if(pad_left == 1) begin state = MOVE_DOWN_LEFT; end else if(pad_right == 1) begin state = MOVE_DOWN_RIGHT; end end Example Code for Manual Control else if(pad_left == 1) begin state = MOVE_LEFT; if(pad_down != 1) begin state = MOVE_DOWN_LEFT; end else if(pad_up != 1) begin state = MOVE_UP_LEFT; end • end *Verilog HDL used to code FPGA
cold_start: LOAD s0, 00 OUTPUT s0, FF send_prompt: LOAD s1,ascii_X send_to_UART: INPUT s0, buffer_full TEST s0, b_full JUMP Z, UART_write JUMP rs232_echo UART_write: OUTPUT s1, uart_data_tx LOAD s1, 00 rs232_echo: INPUT s0, data_present TEST s0, b_full JUMP Z, led_echo UART_read: INPUT s1, uart_data_rx led_echo: INPUT s0, switch_in OUTPUT s0, leds_out finish: JUMP send_to_UART PicoBlaze has own assembly language Code tests UART, LED’s, switches, and serial port Assembler converts this to Verilog HDL code Test Code for Micro-controller
System Mounting Tripod mount Solar Panel independently supported but attached to tripod Pan stepper motor (possibly geared) Tilt stepper motor attached to yoke IR sensors mounted on array below top of tripod
Milestones • Milestone 1 • - Hardware assembled and software written • - Minimal system integration • Milestone 2 • - Hardware and software fully integrated • - System mounting completed