Maker Pro
Maker Pro

RC car + Arduino help please

dwreck

Aug 19, 2012
27
Joined
Aug 19, 2012
Messages
27
Hey guys,

I'm a bit new to Arduino and I've been playing with it for a while now. I have a small RC car that I'm using as a base. I also have a Sharp IR proximity sensor for input so that when the sensor detects an object, the car's motor starts rotating. I've managed to get this to work but my problem is it seems that the motor only rotates when the back wheels are not touching the ground. The motor has a separate power source (4.5V). When the back wheels are in contact with the ground surface, the car either doesn't move at all or moves only a little. It works perfectly when I hold it up.

I'm not exactly sure what the problem is with it. Have any of you ever encountered something like that and possibly know what the problem is?

I look forward to reading your replies. Thanks in advance.
 

CocaCola

Apr 7, 2012
3,635
Joined
Apr 7, 2012
Messages
3,635
It's a lack of torque, the motor is starved for power...

Specifications of the circuit driving it and the motor would be helpful as well as the power source...
 

dwreck

Aug 19, 2012
27
Joined
Aug 19, 2012
Messages
27
I'm using this circuit connected to one of the PWM pins on the Arduino.

http://tinypic.com/r/34dkb48/6

The motor is being powered by 4.5V, which is separated from the Arduino's 9V. And the motor is just a normal DC motor that you'd find in a cheap RC car.

It works perfectly when I hold it up.
 

(*steve*)

¡sǝpodᴉʇuɐ ǝɥʇ ɹɐǝɥd
Moderator
Jan 21, 2010
25,510
Joined
Jan 21, 2010
Messages
25,510
The arduino on its own can supply around 20mA, and that's likely to be insufficient to drive any load.

You should use the arduino output to switch a transistor on and off that will then drive the motor. You also need to place a reverse biased diode across the motor to prevent damage to nearby components. Arduino forums might have more specific help.
 

wingnut

Aug 9, 2012
255
Joined
Aug 9, 2012
Messages
255
Hi - I am fairly new to Arduino and PIC and driving motors from these.
But I am not new to the problem you describe - it happens to me all the time. You program the PIC or Arduino to do something, test it with LED's - all works fine - until you add the motor.

As advised above, I generally solve the problem by adding a motor driving intermediate stage such as a H-bridge made from TIP 122's and 127's - or lately a NJM2670D2 dual H-bridge chip, or if my motor only needs to go in one direction, the very cheap ULN2803.

I have also thought of using an opto-isolator/optocoupler to isolate the microprocessor from the driving circuit.

Even having a separate motor power supply does not mean that the signal sent from your arduino is strong enough to drive the motor. I have often seen the motor labor and struggle - the signal voltage or current or both has to be beefed up to drive the motor, in my experience.
 

dwreck

Aug 19, 2012
27
Joined
Aug 19, 2012
Messages
27
Firstly, thanks for your replies, guys.

I am using a transistor for the on/off and a diode in reversed biased as I showed in the circuit diagram. http://tinypic.com/r/34dkb48/6

The thing is the motor goes really fast when I'm holding the car and preventing the back wheels from touching the surface. But it's only when I place the back wheels on the surface that the motor doesn't run properly.

I will try what wingnut pointed out. But what is better, the H-bridge or the ULN2803?
 

(*steve*)

¡sǝpodᴉʇuɐ ǝɥʇ ɹɐǝɥd
Moderator
Jan 21, 2010
25,510
Joined
Jan 21, 2010
Messages
25,510
I will try what wingnut pointed out. But what is better, the H-bridge or the ULN2803?

They're just a slightly more elaborate version of your transistor. No need to go along that path just yet.

What is the transistor you're using?

Can you measure the voltage across the collector and emitter while the motor is spinning freely, then when you place the back wheels down?

Can you measure the current drawn by the motor in these cases as well?
 

CocaCola

Apr 7, 2012
3,635
Joined
Apr 7, 2012
Messages
3,635
Again? What is the motor rated for? What is the power source?

the motor is just a normal DC motor that you'd find in a cheap RC car.

The above is not useful, is the motor a 5V, 9V, or ??? What is the drive current of the motor? This could very well just be the motor being under-powered all around...

Bypass the Arduino and hook the motor directly to the battery and report back how that works, that will at least help narrow it down to the circuit or the motor itself...
 

donkey

Feb 26, 2011
1,301
Joined
Feb 26, 2011
Messages
1,301
Just to go back to coca cola's first entry its about torque.
the reason its going when in the air but not on the ground is a weight issue. too much downward pressure makes it harder to go forward. you could try using a circuit that enables a secondary power source giving more amps to the motor. this will help. the other side of it is you could try to reduce the weight, or improve the torque of your motor through gear ratio (this will reduce overall speed though)

I am very interested in all things rc so if you got some pics I would love to see them.
 

wingnut

Aug 9, 2012
255
Joined
Aug 9, 2012
Messages
255
I never noticed the circuit you posted showing you are using a transistor.

You may not be using a medium to high enough powered transistor.

Also you are using PWM. Why not try sending a high from the Arduino without PWM so that the transistor is not switching on off all the time but on. This should up the power.

I have also found that if the battery for the motor is at all flat, you get the symptoms described.

And when all else fails I have found it works to use three separate sources of power, one for the Arduino, one for the transistor (H-bridge) and one for the motor, all with a common ground. Believe it or not, that sometimes solves the problem.
Like I say, I am no expert but the above have helped me in the past.

As I understand your problem, you are using the same motor and wheels which before drove the RC car, so the setup should have enough torque, unless the arduino and other weight you have added now makes it too heavy. Feel with your finger if the motor has the same torque as it originally had when directly attached to the battery. If the torque has decreased, then there is a problem with your electronics.

Another thing to consider is have you disconnected this motor from its original RC circuit? If not, this could be draining away some power.
 
Last edited:

dwreck

Aug 19, 2012
27
Joined
Aug 19, 2012
Messages
27
I did try running the car without the arduino, by just connecting the 4.5V battery source directly to the motor and it runs work well on the ground. I don't know exactly all the details about the motor, but it came with the car chassis, so 4.5V is definitely enough for it.

I definitely don't think it's a weight issue, as the car is not heavy at all.

I did exactly what Steve said and I think maybe this is where the problem is. When the system is on and the sensor hasn't detected anything, there's a 4.4V reading between the collector and the emitter. I'm using an NPN transistor 2N2222 by the way. When the sensor detects something and the back wheels are not touching the surface, there's a decrease to around 0.2V between the collector and emitter. But when the back wheels are touching the surface, the decrease only reaches around 3.5V. I think this is the problem. But any idea what's causing it?
 

wingnut

Aug 9, 2012
255
Joined
Aug 9, 2012
Messages
255
I tried the circuit you posted with a 2n222 and could not get my small motor to turn even with 7V.

Replacing the 2n222 with a TIP122 NPN Darlington pair with built in diode protection, and the motor almost took off.

I honestly think the 2n222 is too low power. Especially with your sensor dropping the voltage.
 

(*steve*)

¡sǝpodᴉʇuɐ ǝɥʇ ɹɐǝɥd
Moderator
Jan 21, 2010
25,510
Joined
Jan 21, 2010
Messages
25,510
When the sensor detects something and the back wheels are not touching the surface, there's a decrease to around 0.2V between the collector and emitter. But when the back wheels are touching the surface, the decrease only reaches around 3.5V. I think this is the problem. But any idea what's causing it?

Well, it would be nice to know what the current is that the motor draws, nevertheless, I would suggest reducing the base resistor from 1k to maybe 220 ohms.
 

dwreck

Aug 19, 2012
27
Joined
Aug 19, 2012
Messages
27
I decreased the base resistor to 220 ohms and it works now :)

I did also purchase two TIP122 NPN darlington pair earlier, so I'll try those too.

Thanks everyone for the help. Really appreciate it!
 

(*steve*)

¡sǝpodᴉʇuɐ ǝɥʇ ɹɐǝɥd
Moderator
Jan 21, 2010
25,510
Joined
Jan 21, 2010
Messages
25,510
It would still be nice to know the current under load.

If it is less than about 250mA, then the transistor you have should be OK.

Feel it, if the circuit is working and the transistor is no more than a little warm - you're ok
 
Top