Ultrasonic servo controller forc car

Forums:

Hi i currently drive 1/5 scale petrol cars around a field with my son and am trying to learn how to drive around our local race track but all i can d o is hit one side then the other. My son has a raspberry pi and i was wondering how we could use that with the ultraborg ultrasonic servo controller to keep me say 3-4 inches from the sides. The issue i have is how i get the ultraborg to take control of the steering servo and then cut out handing back control to the transmitter. We run hpi baja 5b's and the servos are 4-7volt. We use 2.4 ghz for the transmitter. I guess we would need utrasonics on both sides of the car.
If this could be done it would be a fantastic training aid.
Thanks in advance.
Bryan

piborg's picture

This is a bit of a challenging problem in truth.

There are two types of approach you can take to making this work:

  1. Using some transistors / logic gates you could have a GPIO signal from the Raspberry Pi determine which device has control
  2. You could attempt to feed the output from the receiver into the Raspberry Pi and always use the UltraBorg to control the servo

Either way I think more than simply the UltraBorg would be required.

I would suggest option 2 myself, however I believe someone else was trying this on the forum and having difficulty getting a Raspberry Pi to time the pulses.
It might be worth getting an Arduino to read in the signal from the receiver as it will be better suited for looking at GPIO signals in real-time.

Thanks for the reply.
My first thought was transistors but i had not thought of option two and i have to say its a really good suggestion, i just need to figure how to do this!
Gratefully
Bryan.

Subscribe to Comments for "Ultrasonic servo controller forc car"