Boy Scout Pinewood Derby Track Detection System

69
Boy Scout Pinewood Derby Track Detection System GROUP 19 MOHAMMAD REHAWI MIKE REYES RODNEY BREWER JULIA WILLIAMS

description

Boy Scout Pinewood Derby Track Detection System. Group 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 - PowerPoint PPT Presentation

Transcript of Boy Scout Pinewood Derby Track Detection System

Page 1: Boy Scout Pinewood Derby Track Detection System

Boy Scout Pinewood DerbyTrack Detection SystemGROUP 19 MOHAMMAD REHAWI MIKE REYES RODNEY BREWER JULIA WILLIAMS

Page 2: Boy Scout Pinewood Derby Track Detection System

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!!!

Page 3: Boy Scout Pinewood Derby Track Detection System

• 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

Page 4: Boy Scout Pinewood Derby Track Detection System

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

Page 5: Boy Scout Pinewood Derby Track Detection System

Project Design Overview

Boy Scouts Pinewood DerbyTrack Detection System

Software

Sensor& ServoSoftware

ApplicationSoftware

DisplaySoftware

Hardware

Start Gate Assembly

Finish Gate

AssemblySensors Displays

SystemsPower Supply

Page 6: Boy Scout Pinewood Derby Track Detection System

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

Page 7: Boy Scout Pinewood Derby Track Detection System

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

Page 8: Boy Scout Pinewood Derby Track Detection System

Project Design Overview (Hardware)• Start Gate Assembly

• Bluetooth Enabled Comms• Automated Start and Reset

• PWM Servo Controller• Referenced Level Shifter

Page 9: Boy Scout Pinewood Derby Track Detection System

Servo Motor Installation

Page 10: Boy Scout Pinewood Derby Track Detection System

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 ]

Page 11: Boy Scout Pinewood Derby Track Detection System

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

Page 12: Boy Scout Pinewood Derby Track Detection System

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

Page 13: Boy Scout Pinewood Derby Track Detection System

Starting Gate Schematic

Page 14: Boy Scout Pinewood Derby Track Detection System

Project Design Overview

Boy Scouts Pinewood DerbyTrack Detection System

Software

Sensor& ServoSoftware

ApplicationSoftware

DisplaySoftware

Hardware

Start Gate Assembly

Finish Gate

AssemblySensors Displays

SystemsPower Supply

Page 15: Boy Scout Pinewood Derby Track Detection System

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

Page 16: Boy Scout Pinewood Derby Track Detection System

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

Page 17: Boy Scout Pinewood Derby Track Detection System

Pole Tree Light Animation

Page 18: Boy Scout Pinewood Derby Track Detection System

Pole Tree Light Animation

Page 19: Boy Scout Pinewood Derby Track Detection System

Pole Tree Light Animation

Page 20: Boy Scout Pinewood Derby Track Detection System

Pole Tree Light Animation

Page 21: Boy Scout Pinewood Derby Track Detection System

Pole Tree Light Animation

Page 22: Boy Scout Pinewood Derby Track Detection System

Pole Tree Light Animation

Page 23: Boy Scout Pinewood Derby Track Detection System

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

Page 24: Boy Scout Pinewood Derby Track Detection System

Poll Tree Light Schematic

Page 25: Boy Scout Pinewood Derby Track Detection System

Starting Gate Signal Path

Main Application

Finish GateController

(Bluetooth)

Starting GateController

(Bluetooth)

Poll Tree Light(LED Driver)

Page 26: Boy Scout Pinewood Derby Track Detection System

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

Page 27: Boy Scout Pinewood Derby Track Detection System

Sensors Options• Ambient Light Sensors

• Sensitive to changes in room light

• Hall Effect Sensors• Additional hardware required

• Infrared Sensors• Better Choice

Page 28: Boy Scout Pinewood Derby Track Detection System

IR Sensor Options• Photo-Transistor

• Response Time: Microseconds

• Photo-Diode• Response Time: Nanoseconds

• Photo-Resistor• Response Time: Milliseconds

Page 29: Boy Scout Pinewood Derby Track Detection System

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

Page 30: Boy Scout Pinewood Derby Track Detection System

Complete Photo DetectionSchematic

Page 31: Boy Scout Pinewood Derby Track Detection System

IR Driver Circuit

Page 32: Boy Scout Pinewood Derby Track Detection System

Speed Sensor Design Concept

Page 33: Boy Scout Pinewood Derby Track Detection System

Mounting of Speed Sensors

Page 34: Boy Scout Pinewood Derby Track Detection System

Mounting of Position Sensors

Page 35: Boy Scout Pinewood Derby Track Detection System

Mounting of Finish Gate Sensors

Page 36: Boy Scout Pinewood Derby Track Detection System

Finish Gate Sensors Design Concept

Page 37: Boy Scout Pinewood Derby Track Detection System

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

Page 38: Boy Scout Pinewood Derby Track Detection System

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

Page 39: Boy Scout Pinewood Derby Track Detection System

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.

Page 40: Boy Scout Pinewood Derby Track Detection System

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

Page 41: Boy Scout Pinewood Derby Track Detection System

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

Page 42: Boy Scout Pinewood Derby Track Detection System

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.

Page 43: Boy Scout Pinewood Derby Track Detection System

Finish Gate Display Block Diagram

Page 44: Boy Scout Pinewood Derby Track Detection System

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.

Page 45: Boy Scout Pinewood Derby Track Detection System

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.

Page 46: Boy Scout Pinewood Derby Track Detection System

Finish Gate Display Driver Schematic

Page 47: Boy Scout Pinewood Derby Track Detection System

Chasing Lights

Page 48: Boy Scout Pinewood Derby Track Detection System

Project Design Overview

Boy Scouts Pinewood DerbyTrack Detection System

SoftwareSensor& ServoSoftware

ApplicationSoftware

DisplaySoftware

HardwareStart Gate Assembly

Finish Gate Assembly Sensors Displays

SystemsPower Supply

Page 49: Boy Scout Pinewood Derby Track Detection System

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.

Page 50: Boy Scout Pinewood Derby Track Detection System

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.

Page 51: Boy Scout Pinewood Derby Track Detection System

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

Page 52: Boy Scout Pinewood Derby Track Detection System

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)

Page 53: Boy Scout Pinewood Derby Track Detection System

Project Design Overview

Boy Scouts Pinewood DerbyTrack Detection System

SoftwareSensor

& ServoSoftware

ApplicationSoftware

DisplaySoftware

HardwareStart Gate Assembly

Finish Gate Assembly

DisplaysSystems

Power Supply

Page 54: Boy Scout Pinewood Derby Track Detection System

Project Design Overview

Boy Scouts Pinewood DerbyTrack Detection System

SoftwareSensor

& ServoSoftware

ApplicationSoftware

DisplaySoftware

HardwareStart Gate Assembly

Finish Gate Assembly Sensors Displays

SystemsPower Supply

Page 55: Boy Scout Pinewood Derby Track Detection System

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

Page 56: Boy Scout Pinewood Derby Track Detection System

Speed Sensor SoftwarePower

Upand Cal.

Wait for Trigger 1 Start Timer Wait for

Trigger 2Compute Velocity

Transmit Velocity

Reset Sensor

Received Received

NotReceived

NotReceived

Page 57: Boy Scout Pinewood Derby Track Detection System

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

Page 58: Boy Scout Pinewood Derby Track Detection System

Project Design Overview

Boy Scouts Pinewood DerbyTrack Detection System

SoftwareSensor& ServoSoftware

ApplicationSoftware

DisplaySoftware

HardwareStart Gate Assembly

Finish Gate Assembly Sensors Displays

SystemsPower Supply

Page 59: Boy Scout Pinewood Derby Track Detection System

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

Page 60: Boy Scout Pinewood Derby Track Detection System

Project Design Overview

Boy Scouts Pinewood DerbyTrack Detection System

SoftwareSensor& ServoSoftware

ApplicationSoftware

DisplaySoftware

HardwareStart Gate Assembly

Finish Gate Assembly Sensors Displays

SystemsPower Supply

Page 61: Boy Scout Pinewood Derby Track Detection System

Display and Lane Indication Software• Utilize the SPI Bus to receive

the following data:• Lane Ranking• Lane Race Elapsed Time• Average Speed• Maximum Speed

Page 62: Boy Scout Pinewood Derby Track Detection System

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

Page 63: Boy Scout Pinewood Derby Track Detection System

Progress

Page 64: Boy Scout Pinewood Derby Track Detection System

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.

Page 65: Boy Scout Pinewood Derby Track Detection System

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

Page 66: Boy Scout Pinewood Derby Track Detection System

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.

Page 67: Boy Scout Pinewood Derby Track Detection System

Current Progress

Research

Design

Prototyping

Testing

fabrication

Assembly

Integration

0 10 20 30 40 50 60 70 80 90 100

% CompleteTo Do

Page 68: Boy Scout Pinewood Derby Track Detection System

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%

Page 69: Boy Scout Pinewood Derby Track Detection System

Questions?