Boy Scout Pinewood Derby Track Detection System
description
Transcript of Boy Scout Pinewood Derby Track Detection System
Boy Scout Pinewood DerbyTrack Detection SystemGROUP 19 MOHAMMAD REHAWI MIKE REYES RODNEY BREWER JULIA WILLIAMS
Project Motivation• Community Involvement (Boy Scouts of America)
• Technical Problem Solving Challenges
• Utilization of a Wireless Communication Protocol
• Reproducible for other Scout Packs
• Partially funded by the Boy Scouts
• Plain Old Fun!!!
• With the Pinewood Derby Track Detection System project we would like to take a manually operated track and convert it to a fully automated track for the Boy Scouts of America. The track consists of four main components integrated into one: Starting Gate, Sensors, Finish Gate, and Communication. The starting gate is responsible for the initiation of the race that will be achieved using Servo Motors. The sensors will gather a variety of data that will be used by other components. The finish gate will display most of the data gathered during the race using interactive lighting and display systems. The communication consists of a computer controlled software program that transmits and receives information from and to different points on the track using Bluetooth wireless communication and microcontrollers.
Project Description
Project Objectives• Integration of Bluetooth Wireless Communication
• Detection of Instantaneous Velocity
• Automated Starting Gate
• Race Sequencing and Display Automation
• Automated Sensor Calibration
• Power Management
• MCU and Main Application Software
Project Design Overview
Boy Scouts Pinewood DerbyTrack Detection System
Software
Sensor& ServoSoftware
ApplicationSoftware
DisplaySoftware
Hardware
Start Gate Assembly
Finish Gate
AssemblySensors Displays
SystemsPower Supply
Project Design Overview
Boy Scouts Pinewood DerbyTrack Detection System
Software
Sensor& ServoSoftware
ApplicationSoftware
DisplaySoftware
Hardware
Start Gate Assembly
Finish Gate Assembly Sensors Displays
SystemsPower Supply
Gate Mechanism • Push / Pull Solenoids
• High voltage = 12+ V• Low cost
• Stepper Motor• Low voltage = 5+ V• Slow speed • Low cost
• Servomotor [ HS-5055MG ] • Small in size• Low voltage = 5V• Low cost• Easy to mount• Fully automated• High speed
Project Design Overview (Hardware)• Start Gate Assembly
• Bluetooth Enabled Comms• Automated Start and Reset
• PWM Servo Controller• Referenced Level Shifter
Servo Motor Installation
Microcontroller Selection• AT89C51
• 40 Pins• Large Footprint
• PIC16F628A• 18 Pins• Large Footprint
• CC2540 / AT8051• 40 Pin QFPN 6mm x 6mm• 21 I/O Pins – System on a chip• Small Footprint• Less components on the circuit• Bluetooth Communication• PWM [ Timer 1 & 3 ]
Communication Options• RS 232
• Wired• Low cost• Range is about 150 ft
• 433MHz Transceiver • Cost vs # of modules needed• Large in size
• Wireless [ 802.11 ]• Multiple IP addresses for different sensors• A router might be needed• High cost
• Bluetooth [ 3.2 GHz ]• CC2540 [ Sampled via TI ] • System on a chip• TI donated the development kit
to the group• Range is about 50 ft• 21 I/O Pins
Bluetooth Development Kit• Configuration and Setup
• Enable SPI interrupts• Enable PWM Servo Controller• Enable LED Driver and Audio
• Application Synchronization• Main Application (host)• CC2540 MCU’s (clients)
• Data transfer• Received Data is converted and
displayed on 7-Segment Display
Starting Gate Schematic
Project Design Overview
Boy Scouts Pinewood DerbyTrack Detection System
Software
Sensor& ServoSoftware
ApplicationSoftware
DisplaySoftware
Hardware
Start Gate Assembly
Finish Gate
AssemblySensors Displays
SystemsPower Supply
Project Design Overview (Hardware)• Finish Gate Assembly
• Bluetooth Enabled Comms• Lane Detection Interrupts
• IR Curtain System• Lane/Track Lockout Latching
• Poll Tree Light (Starting Tree)• SPI Bus to LED Driver
• Power Supply• Power Switch for track
Poll Tree Light Sequencing
Colors State 0 State 1 State 2 State 3 State 4Red OFF ON
ONON ON
Yellow OFF OFF OFF OFFYellow OFF OFF OFF OFFYellow OFF OFF OFF ON OFFGreen OFF OFF OFF OFF
ONGreen OFF OFF OFF OFF
Pole Tree Light Animation
Pole Tree Light Animation
Pole Tree Light Animation
Pole Tree Light Animation
Pole Tree Light Animation
Pole Tree Light Animation
Poll Tree Light Drivers• 8-bit Shifter Register –
74HC164• 1 LED lights at a time• Resistors required
• CMOS Buffer – CD4049• Resistors required• 6 output pins• Drives up to 20mA
• LED Driver – TLC59281• No resistors required• Sampled via TI• 16 output pins• Drives up to 40mA/output
Poll Tree Light Schematic
Starting Gate Signal Path
Main Application
Finish GateController
(Bluetooth)
Starting GateController
(Bluetooth)
Poll Tree Light(LED Driver)
Project Design Overview
Boy Scouts Pinewood DerbyTrack Detection System
Software
Sensor& ServoSoftware
ApplicationSoftware
DisplaySoftware
Hardware
Start Gate Assembly
Finish Gate Assembly Sensors Displays
SystemsPower Supply
Sensors Options• Ambient Light Sensors
• Sensitive to changes in room light
• Hall Effect Sensors• Additional hardware required
• Infrared Sensors• Better Choice
IR Sensor Options• Photo-Transistor
• Response Time: Microseconds
• Photo-Diode• Response Time: Nanoseconds
• Photo-Resistor• Response Time: Milliseconds
Sensor Types• Speed Sensors
• Instantaneous speed• Start total time• First row of position sensors
• Position Sensors• Track cars down track
• Finish Gate Sensors• Finish total time• Last row of position sensors• Determine winner
Complete Photo DetectionSchematic
IR Driver Circuit
Speed Sensor Design Concept
Mounting of Speed Sensors
Mounting of Position Sensors
Mounting of Finish Gate Sensors
Finish Gate Sensors Design Concept
Sensor SpecsSpecification Amount
Number of IR Emitters 28Number of IR Detectors 36Maximum Emitter Current 50 mAPhoto-Transistor Output Range (Tested) About 4 VMaximum Distance (Tested) 8 InchesWavelength 900nmMaximum Collector-Emitter Voltage 35VHalf Angle 12 degreesResponse Time(Tested) 4µs
Calibration• Ensures optimum readings by the detector.
• Will only be implemented on Speed and Finish Gate Sensors.
• Automatic at every startup.
• May be manually executed.
• No additional sensors necessary.
• Automated calibration process
Calibration Process• A combined amount of IR from the IR Emitter and ambient light
will be recorded by the detector.
• 25% decrease in IR will be calculated.
• This value will be used as the trigger point for the sensors.
Project Design Overview
Boy Scouts Pinewood DerbyTrack Detection System
Software
Sensor& ServoSoftware
ApplicationSoftware
DisplaySoftware
Hardware
Start Gate Assembly
Finish Gate Assembly Sensors Displays
SystemsPower Supply
Project Design Overview (Hardware)• Display System
• SPI Enabled Comms• Display Track Parameters
• Total Race Time• Min, Max, and Avg. Speed• Lane Pole Position• Strobe Lane Lights
Finish Gate Display Overview• The single LED display is the Place standings, 1st, 2nd, 3rd, or fourth.
This is displayed on both the front and back of the finish gate.
• The four digit speed display will only be seen on the front of the finish gate.
• The same display will show the maximum and the average speed, along with the race time, alternating in one second intervals at the end of the race.
• The maximum and average speeds will be shown in centimeters per second.
Finish Gate Display Block Diagram
Finish Gate Display Design Decisions• Displays considered were LED, LCD, and OLED screen displays.
• Chose LED Display because of cost and best visibility at a distance.
• Considered 3 different design approaches for the display data, a port-expander or a secondary processor devoted to display data only or a serial latch that behaves much like a port expander.
• Chose a secondary processor because of the versatility, the ability to test this function independently.
Finish Gate Display Design Decisions (continued)• Processors considered were the MSP430, the ATMELXXX and the
PIC24F series processors.
• Chose PIC processor because of cost and the software team member’s familiarity with the processor.
• The team has prior experience with this microcontroller and access to a development board.
• The design includes an ICSP approach to programming the chip for convenience and expandability.
Finish Gate Display Driver Schematic
Chasing Lights
Project Design Overview
Boy Scouts Pinewood DerbyTrack Detection System
SoftwareSensor& ServoSoftware
ApplicationSoftware
DisplaySoftware
HardwareStart Gate Assembly
Finish Gate Assembly Sensors Displays
SystemsPower Supply
Power Supply• In January, the team decided to utilize an existing power supply to meet our
projects needs.
• The team’s independent testing of this power supply will still be performed to insure quality and will be provided in documentation.
Reasons for Choosing an Existing Power Supply• Team member already had it, no
cost to us.
• The supply is UL listed, with no safety issues, important for use by and around children.
• All output voltages and power ratings are within our project’s requirements.
Project Design Overview (Hardware)• Power Supply
• Input: 120VAC @ 60Hz• Model NPS-180AB-A• Output:
• +12VDC @ 10 Amps• -12VDC @ 0.5 Amps• +5VDC @ 12 Amps• +5VDC Filtered @ 2.0 Amps• +3.3VDC @ 10 Amps
• Fused Inputs and Outputs
Power Supply Requirement Versus What is Provided
PROJECT REQUIREMENTSVoltage Current(Amperes)/Power(watts)
+12V Not Utilized+5V 2.5A 12.5W+5VFP 8A or 4A 40W+3.3V 100mA 330mWTotal Roughly 53W
PROVIDED BY SUPPLYSupplied Current10A12A2A10A >180W (only under 100% efficiency)
Project Design Overview
Boy Scouts Pinewood DerbyTrack Detection System
SoftwareSensor
& ServoSoftware
ApplicationSoftware
DisplaySoftware
HardwareStart Gate Assembly
Finish Gate Assembly
DisplaysSystems
Power Supply
Project Design Overview
Boy Scouts Pinewood DerbyTrack Detection System
SoftwareSensor
& ServoSoftware
ApplicationSoftware
DisplaySoftware
HardwareStart Gate Assembly
Finish Gate Assembly Sensors Displays
SystemsPower Supply
Starting Gate Software (Servo Control)Power
Up and Cal.
Wait for Start Trigger
Actuate ServoTo 90º Wait 3 Sec
Return Servo to
Home
ResetStarting Gate
Registers
Received
NotReceived
Speed Sensor SoftwarePower
Upand Cal.
Wait for Trigger 1 Start Timer Wait for
Trigger 2Compute Velocity
Transmit Velocity
Reset Sensor
Received Received
NotReceived
NotReceived
Finish Gate Sensor SoftwarePower
Upand Cal.
Wait for Trigger A
DetermineTrack
Position Counter ≥ 4
Wait For Race Reset
Clear All Display and Reset
Received
No
NotReceived
Obtain Race Parameters
Update Display& Increment
Position Counter
No
Project Design Overview
Boy Scouts Pinewood DerbyTrack Detection System
SoftwareSensor& ServoSoftware
ApplicationSoftware
DisplaySoftware
HardwareStart Gate Assembly
Finish Gate Assembly Sensors Displays
SystemsPower Supply
Application Software
• Up to 4 Selectable Lanes
• Race Parameter Display
• Stores and Tracks Each Race
• Auto/Manual Calibration of Primary Sensors
• Bluetooth Enabled Communication and Signal RSSI Strength
Project Design Overview
Boy Scouts Pinewood DerbyTrack Detection System
SoftwareSensor& ServoSoftware
ApplicationSoftware
DisplaySoftware
HardwareStart Gate Assembly
Finish Gate Assembly Sensors Displays
SystemsPower Supply
Display and Lane Indication Software• Utilize the SPI Bus to receive
the following data:• Lane Ranking• Lane Race Elapsed Time• Average Speed• Maximum Speed
Display SoftwarePower Up.
Wait for INT
DetermineTrack/Data-type
Race reset?
Clear All Displays and Reset
Received
No
NotReceived
Send to Displays
Update DisplayMemory Location
Yes
Init & Clr
displays
Rx’d All
Data?
No
Yes
Progress
Project Successes and Current EffortsAccomplishments What’s NextSensor prototype complete. Integrate with calibration software.Starting gate prototype and integration with the power supply complete.
Work on Gerber file for fabrication.
Poll tree light driver assembled simulation test complete.
Integration into final assembly.
Place/speed display driver prototype complete.
Begin interfacing with PIC development board.
Chasing light display driver prototype assembled, tested.
Integration
Software: Poll tree light software complete.
Begin Bluetooth system software.
Project ConcernsBiggest Concern: The Bluetooth device:
• Procurement issues, who can solder the chip reliably.
• All team members are unfamiliar with chip, will there be noise issues
• Possible Com issues due to more than 2 transceivers in system.
• Programming restrictions by IDE Vender for non licensed version
Other Issues:
• Display has lots of outputs, need to review board layout carefully before sending to fabrication.
• Need to re-evaluate other servo motors for the starting gate for optimizing operation.
• Lack of familiarity with BLE OS, Stack, and Hardware Layers
Budget• Mainly Self funded project and Boy Scouts will donates $100
• Projected each team member contribute approximately $125.00 to total $600.00.
• Spent so far, $245.59.
• Budget appears to be on target, pc boards, and chassis materials have yet to be purchased.
• Fortunate one of the team members own PIC development board, BLE Development Kit, programmers, and several parts, tools etcetera.
Current Progress
Research
Design
Prototyping
Testing
fabrication
Assembly
Integration
0 10 20 30 40 50 60 70 80 90 100
% CompleteTo Do
Plan for Completion
Description 8 Feb 15 Feb 22 Feb 1 March 8 March 15 March 29 March
Integration 20% 70% 100%Assembly 60% 90% 100%Fabrication 0% 90% 95% 100%Testing 30% 60% 65% 70% 70% 80% 100%Prototyping 80% 70% 90% 100%Design 80% 80% 95% 100%Research 90% 90% 94% 98% 100%
Questions?