Download presentation
Presentation is loading. Please wait.
Published byDelilah Gibbs Modified over 6 years ago
1
RC Car Hack Jam Feb 2017 Temecula Murrieta Software Developers Meetup
Murrieta Temecula Hardware Innovators Meetup
2
Grand Challenge Hack an off the shelf RC car – get control of drive and steering Implement a Cypress PSoC brain to control the car Figure out how to drive the car in a square pattern
3
1. Hack the RC Car hack-to-smart-car-cf9ffa
4
2. Insert the Cypres PSoC brain to control the car
5
3. Figure out how to drive the car in a square pattern
Options: Guess at the distance travelled Estimate by empirical measurements Use Math to calculate We are going to do all three
6
Steps to drive the car in a square pattern
Implement a PSoC program to drive forward for time t and measure the distance travelled Drive various time units and graph velocity and acceleration Use the linear velocity and acceleration values to calculate angular velocity of the wheels Measure the time it takes to make a 90 degree turn Use everything above to implement a state machine in the PSoC to drive the car in a square pattern
7
Implement a PSoC program to drive forward for time t and measure the distance travelled
Use the existing design to figure out how to drive the car forward for 500ms Measure the distance travelled Repeat for five or six increasing intervals (1sec, 1.5sec, etc.) Graph the measurements to obtain linear velocity and acceleration estimates x = distance vl = linear velocity = x/t t = time a = acceleration = 2x/t2
8
Example: Time (t) sec Distance (x) ft Velocity (x/t) ft/sec
Acceleration (2x/t2) (ft/sec)2 1 3 6 2 9 4.5 15 5 3.3 4 24 30 6 (terminal velocity) 2.4 Average 4.9 3.8
9
Worksheet for actuals:
Time (t) sec Distance (x) ft Velocity (x/t) ft/sec Acceleration (2x/t2) (ft/sec)2 Average
10
Graph the actual measurements
X t
11
How to calculate the distance traveled
12
How to travel a specific distance knowing velocity and acceleration
The formula for distance as a function of v&a x = vlt + ½a2 Use algebra to isolate the time required to travel a specific distance vlt = x – ½a2 t = (x – ½a2 ) / vl Code this formula into the PSoC and test Travel 4 feet (x = 4)
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.