Presentation on theme: "Liz Lyons Mike Scherban Oscar Orihuela"— Presentation transcript:
1Liz Lyons Mike Scherban Oscar Orihuela Knightro KartLiz LyonsMike ScherbanOscar Orihuela
2What Is Knightro Kart?An interactive, Android controlled vehicle race system consisting of two independent cars and controllers.Vehicles are controlled by Android powered mobile devices or tabletsConsists of two independent vehicles, a track utilizing infrared, and two independent remote controls
5System Specifications Bluetooth Communication Range<30 mVehicle Speed20 MPH maxBattery Life>1 hrNumber of Users2
6Remote ControlMobile device is used in landscape mode. It utilizes hardware level sensor data, and interprets it to tell the MSP430 how to direct the vehicle.
7Why Android?Essentially free – No new hardware costs, free SDK, familiar languagesOpen source platform, easy to learnProgramming LanguageDevices Readily Available?FamiliarityCost to DevelopAndroidJava/XMLYesHighFreeiOSObjective-CNoMedium$99/yearWindows Phone.NET framework/ Visual C++/XNALow
8Target APIs 10 (Android 2.3.3 Gingerbread and higher), approximately 94.2% of Android market Ice Cream SandwichJelly BeanEclairHoneycombFroyoGingerbread
9Target APIs 10 (Android 2.3.3 Gingerbread and higher), approximately 94.2% of Android market Ice Cream SandwichJelly BeanEclairHoneycombFroyoGingerbread
10Wireless Communication Choices Bluetooth(Class 2)Wi-Fi DirectWi-Fi (traditional)ProtocolLMP, L2CAP, SDPIEEE a/g/nIEEECommunication DistanceRadio dependent, ≈ 10 meters min200 meters MAXSpeed3 Mbps MAX250 Mbps MAXAPI Requirement5 or higher14 or higher1 or higherPower2.5 mWVariesVaries, may be 40x BluetoothISM Band2.4 to GHz2.4 GHz or 5 GHzDifficultyLowHigh
11Remote Control Requirements Android device must:Have Bluetooth capabilityContain accelerometer sensorsHave touch screenRun Android Gingerbread or newer OS
12User InterfaceHome screen displays current lap, accelerometer values, and connected devices (if any)Menu allows user to control the state of the remote control applicationConnect A Device – connect to a vehicleStart – send signal to BT module signifying ready to raceReset Remote Control – reset application variables, sever connectionsExit – close the application and disconnect any active Bluetooth connections
13User InterfaceWhen user selects “Connect a Device” from the menu they are presented with a list of paired devices.User can also search for unpaired, discoverable devices in the areaIf connection is successful, the name of the connected device will be displayed on the main remote control screen.
14User InterfaceHome screen displays current lap, accelerometer values, and connected devices (if any)Menu allows user to control the state of the remote control applicationConnect A Device – connect to a vehicleStart – send signal to BT module signifying ready to raceReset Remote Control – reset application variables, sever connectionsExit – close the application and disconnect any active Bluetooth connections
15Handling Accelerometers Accelerometers are seen by the devices relative to an imagined coordinate system.We use the Y (left/right) and Z (forward/back) axis values to control the cars
18Bluetooth Module Roving Networks RN-41 Minimal configuration Baud rateAuto slave, SPPBuilt in antennaAutomatically pushes & pulls data via UART RX/TX pinsRuns own Bluetooth stackLow power3.3V100m range
19Microcontroller MSP430G2553 Atmega168 w/ Arduino 3.3V 5V 16KB flash C, Assembly16MHzUART & PWM supportBluetooth module runs at 3.3V as well2.75”2.75”
20Microcontroller Same voltage as Bluetooth module MSP430G25533.3V16KB flashC, Assembly16MHzUART & PWM supportSame voltage as Bluetooth moduleNo voltage level shiftingMore feature rich IDEViewable registersReal time setting/variable adjustmentDisassemblySW breakpointsG2553 variantHW UART supportBluetooth module runs at 3.3V as well
21Microcontroller MSP430G2553 (28 pin TSSOP) Surface mount package Function# of PinsUART2Start Line Signal1LEDs5Motors4Start Alert Signal
22Programming and Debugging Code Composer Studio free licenseJTAG used to take advantage of IDE debugging featuresConnect through TI USB FET device to 14 pin header
23Motor Signals LEFT/RIGHT uses digital signals FWD/REV take advantage of hardware PWM supportPWM used to add variable speedSlowFast!
24Microcontroller Comm.MSP430Module: UART, 9600 baud rate, interrupts*TrackVehicle: Port interrupt*, debouncedVehicleVehicle: Watch for port low to high change*Interrupts: To catch events when they happen, opposed to hanging code and waiting to catch themInterrupt code is ran regardless of which code is currently being executed
25Low Power Mode Bluetooth module separate from MSP430 Allows BT pairing while MSP430 is asleepMSP430 goes to sleep at power on and when not in race modeTurns off clocks and CPUCommand from phone will wake the car for useOnly executes code in an interruptExplain how sleep works!
27Printed Circuit BoardMost components will be on a custom printed circuit board designed in Eagle
28Printed Circuit Board Motors LEDs Track signal JTAG Power MSP430 BT Module and status LEDsLEDsTrack signalJTAGPowerMSP430Ready signals
29Infrared Features Each race vehicle contains IR phototransistors Biased by IR lightSTART line consists of an array of IR LEDsTriggers phototransistors on vehicle, enables lap counterInfrared also used for vehicle to vehicle communication
30Race Vehicle 9.6V battery pack required Potential to travel 20 mph 2 D.C. motors1st Motor controlling FWD and REV motion2nd Motor controlling turning left and right17 inches long7 inches wide8 inches tall
31Motor Options Race car requires 2 motors 1st Motor controls – FWD & REV motion – D.C. motor2nd Motor controls – Turning - D.C. or ServoD.C. MotorServo MotorLess ExpensiveMore ExpensiveRequires Less Voltage to functionRequires Higher Voltage to functionSlower Reaction TimeFaster Reaction Time
32H-Bridge MSP430 does not have sufficient voltage to run motors H-bridge directs secondary power supply to motorsHigh/low signals received by H-bridge cause motors to spin in a certain directionEx: Clockwise / Counter-Clockwise / Stand Still
33H-Bridge - Typical Typical H-Bridge configuration Motor represented by innercircleSwitches represent transistorsMotor is at a stand still
34H-Bridge - ClockwiseThe H-bridge is causing the D.C. motor to spin clockwise
35H-Bridge – Counter Clockwise The H-bridge is causing the D.C. motor to spin counter clockwise
36SN754410 vs. L298N SN754410 L298N Max Motors 2 DC motors 2 DC motor Max Continuous Current1 Amp2 AmpVCC1 Supply Voltage Range3.3V - 5.5V4.5V – 7VMax VCC2 Supply Voltage36V46VChange LMD18200 for L298n!
37SN754410 Cost efficient : $2.16 per chip Detailed documentation Manufacturer: Texas Instruments2Chips per car needed due to current restrictionsEach motor takes up to 1 Amp
40Cooling SN754410 includes built in thermal shutdown Generates enough heat to trigger shutdownAluminum heat sinks added to prevent shutdownFans to assist in coolingAdd picture of heat sinks & vector board HERE!!!!!
41Power Supply Input Voltage Voltage Regulator SN754410 9V 5V Race Car Does Not RequireMSP4303.3V
42Testing Had LEDs light up at certain events. Connection successfulByte receivedOnce we knew communication was successful, we tested with LEDs, SW breakpoints, and the register viewer to confirm correct bytes.LEDs were used to confirm the correct motor output from PCB, using the tilt of the phoneTested that the H-bridge received the correct logic and output the correct signals using a multimeter and motorsFinally tested that the car moved in accordance with the orientation of the phone
43LED Notifications MSP430 asleep. Awaiting wake up Ready to race, waiting for other carRacing!
44Issues EncounteredUUID assignment varies based on device receiving connection, had to look for the UUID corresponding to hardware (not android devices)Surface mount devices smaller than anticipatedOverheating of the H-Bridge, heat sinks requiredSyncing vehicles to start at the same time
45RoadblocksApp occasionally takes more than one attempt to make a connectionTrack LED spacing may be too large to trigger phototransistor 100% of the timeCars slow down after continuous usageHeat issue: heatsinks and fans multiplied the usage timeNeeds a few seconds to cool down and run at normal speedUnavoidable infrared light occasionally triggers phototransistors
46What We Would Do Differently For a more successful project we could have combined headers on the PCB to make the wiring easier and less clutteredUse modulated infrared to prevent accidental triggers and allow outside usageUse an H-bridge that supports more current and heat
47Expenses Total: $ 410.00 Include Total To Date Costs Passive Comonents $RC Vehicles$PCBs$Remote Control$MSP430s$Photo Transistors$IR Lights$H-Bridge Chip$Bluetooth Modules$JTAG Programmer$Batteries$Wood For TrackFans$Aluminum HeatsinksWiring and CablingTotal:$Include Total