fruffers
Posts: 1
Joined: Thu Sep 23, 2021 9:31 am

Connect Pi to wires of an RC car

Thu Sep 23, 2021 9:36 am

Hi there. Hope you're all doing well.

I have bought a https://www.amazon.co.uk/gp/product/B08 ... UTF8&psc=1 RC car and I took the board out so that the wires to the motors, steering servo, and battery are now free. How can I hook these up to a Pi to be able to control the car? Are there any tutorials? Would it be better to use an ardunio?

I hear about ESC (electronic speed controllers) but I'm not really sure how they work or what they do. The idea is that I would like to be able to program control with ROS on a microcontroller.

Kind regards. 8D

pcmanbob
Posts: 11783
Joined: Fri May 31, 2013 9:28 pm
Location: Mansfield UK

Re: Connect Pi to wires of an RC car

Thu Sep 23, 2021 1:46 pm

Hi.

So to control you car using a pi you are going to require a motor drive board most probable a simple H-bridge motor driver, this will need to be rated to handle the voltage and current drawn by the main drive motor with could be several amps to tens of amps.

Most of these cheap toys don't actually use a servo for the steering, the use a simple DC motor but you wont know for sure until you disassemble the car and see what it contains.

Depending on the answer will depending on how you control the steering.

There a general tutorials on using H-bridge motor controllers on the pi but you are not likely to find one for your specific toy car, these questions have been asked be for about controlling such toy cars so a search of the forum might help you find examples.
The idea is that I would like to be able to program control with ROS on a microcontroller.
If you want to use a microcontroller then why are you even mentioning using a pi ?
We want information… information… information........................no information no help
The use of crystal balls & mind reading are not supported

User avatar
B.Goode
Posts: 12973
Joined: Mon Sep 01, 2014 4:03 pm
Location: UK

Re: Connect Pi to wires of an RC car

Thu Sep 23, 2021 2:51 pm

fruffers wrote:
Thu Sep 23, 2021 9:36 am
Hi there. Hope you're all doing well.

I have bought a https://www.amazon.co.uk/gp/product/B08 ... UTF8&psc=1 RC car and I took the board out so that the wires to the motors, steering servo, and battery are now free. How can I hook these up to a Pi to be able to control the car? Are there any tutorials? Would it be better to use an ardunio?

I hear about ESC (electronic speed controllers) but I'm not really sure how they work or what they do. The idea is that I would like to be able to program control with ROS on a microcontroller.

Kind regards. 8D



"I would like to be able to program control with ROS on a microcontroller."


The only microcontroller board available from Raspberry Pi at the time of writing is the Raspberry Pi Pico - https://www.raspberrypi.org/products/raspberry-pi-pico/

There does not seem to be a release of ROS that would be compatible with a Pico microcontroller - https://www.ros.org/install/

ejolson
Posts: 8237
Joined: Tue Mar 18, 2014 11:47 am

Re: Connect Pi to wires of an RC car

Thu Sep 23, 2021 3:21 pm

pcmanbob wrote:
Thu Sep 23, 2021 1:46 pm
Hi.

So to control you car using a pi you are going to require a motor drive board most probable a simple H-bridge motor driver, this will need to be rated to handle the voltage and current drawn by the main drive motor with could be several amps to tens of amps.

Most of these cheap toys don't actually use a servo for the steering, the use a simple DC motor but you wont know for sure until you disassemble the car and see what it contains.

Depending on the answer will depending on how you control the steering.

There a general tutorials on using H-bridge motor controllers on the pi but you are not likely to find one for your specific toy car, these questions have been asked be for about controlling such toy cars so a search of the forum might help you find examples.
The idea is that I would like to be able to program control with ROS on a microcontroller.
If you want to use a microcontroller then why are you even mentioning using a pi ?
My experience is a toy radio-controlled car already has suitable H-bridges. What I did was locate which pins on the radio IC of the toy are used to control the steering and wheels, I then connected GPIO through resistors to those same pins.

Amusingly, by leaving all the electronics of the toy intact it was possible to record commands sent from the original remote control by setting the GPIO on the Pi to input. When the remote is not in use, set the GPIO to output and then control the same functions of the car from the Pi.

One will need a clever control program and a toy mounted camera or sensors to prevent the car from bumping into walls. In my case it was possible to pulse the signal to the drive wheels by rapidly turning the GPIO on and off to make the car move more slowly in a less uncontrollable way.

Fortunately a battery-powered toy car made of plastic doesn't cause as much trouble as a Tesla when it bumps.

timbowarren
Posts: 1
Joined: Thu Oct 07, 2021 9:54 am

Re: Connect Pi to wires of an RC car

Thu Oct 07, 2021 10:05 am

Hi,

I hope this helps.
" How can I hook these up to a Pi to be able to control the car?"
Try using a Raspberry Pi Pico combined with the Pico Robotics Board from Kirktroniks (PiHut).
This will allow motor control, stepper motor control and control of up to 8 servos. Coding is pretty straight forward. Only remember to save on the Pico the Kirktronik supplied PicoRobotics.py file as well as any code that you write.
Enjoy.

Return to “Automation, sensing and robotics”