View Full Version : [Question(s)] RC car connecting to micro controller...

11-27-2011, 04:59 PM
Hi guys ,

i have a RC car which i want to attach to micro controller , how do i do that , what should be my 1st steps. i want the signals from remote control transmitter to receiver ,from receiver to micro controller, and micro controller to control the motors .front wheels motor is servo for steering and rear wheel motor is a DC for acceleration. would really appreciate some advice on this :).


02-11-2012, 08:48 AM
You will want to research op-amp usage for getting the micro controller to intercept the rc receivers signals as a useable adc signal. Depending on your programming skills its easy as pie after that. Mind you, the rc receiver will control the cars servos and motors just fine too :)

02-12-2012, 03:00 PM
If you want to connect the receiver to the microcontroller an analog to digital convert probably isn't necessary. Typical RC receivers send a pulsetrain typically around 50Hz frequency, where the "on" period varies between about 1.0ms and 2.0ms. So your first step, research RC signals just so you understand how they work and how servos and ESC (electronic speed controllers) work. RC Car receivers have two channels (I'm speaking about hobby grade stuff here) with one channel controlling the steering servo and the second controlling the 'throttle' --the amount of power sent to the drive motor.

You want to send a DC signal to the motor, which means that your motor will either be on or off. If you want to control power to it with the microcontroller there are ways but if you're new to this, it will be significantly easier to simply send a servo signal to an ESC and let it handle the difficulties of motor control. Using servo signals simplifies interfacing to an RC car tremendously.

As for the microcontroller receiving the signals, you connect each channel's signal wire to particular pins on the MCU and connect the ground of the receiver to the ground of the MCU. BUT, it's important to make sure the receiver output peak voltage isn't higher than the maximum allowed by your MCU. If it is, there are a few ways you can deal with that. Meanwhile what sort of test tools do you have? A DMM? An oscilloscope?

As for determining the pulse width of the signal, there are several approaches. Some microcontrollers have a peripheral inside that can be used to measure pulse timing. Another way is to use a timer peripheral to keep track of elapsed time, and use an pin interrupt for each channel which causes the MCU to stop what it's doing and run a special routine you write. That routine can check the current time against the last time and figure out the pulse's on time. it would start counting when the pin voltage is high, and stop counting when it's low. It could keep track of both channels, too. Some MCUs have a way of firing a one interrupt when the pin goes high and another when the pin goes low so that'd simplify the code a bit. Another option is that you could add some external circuitry to do this same thing. The easiest approach depends on your microcontroller and development environment.

I have an autonomous robot, Data Bus, built on an RC car chassis, an ECX Circuit, and I don't actually read in signals. Since my robot is autonomous it simply sends signals to the servo and ESC. However, if I want to "take over" control of the robot, i built a circuit board that essentially switches control of the car from the MCU to the RC receiver whenever the latter receives an active signal, that is, whenever I turn on the transmitter. For sake of safety I didn't want to trust that function to the MCU itself; I wanted dedicated, simple, separate hardware to do it. In case the MCU crashes or hangs, I can still take over the vehicle.

What MCU are you planning to use?

What RC car are you using? What receiver? What ESC if any?

What are you trying to accomplish?