Let's Make Robots!

Questions about my hacked RC car arduino robot

Greetings everyone. I have an old RC car with 6V accumulator. Can I power my arduino board + the l293d motor driver from this accu without using any voltage regualtors? I read that arduino and 3 of the 4 pins on the l293d motor driver require 5V. 

The voltage requlator I have requires 2.5V more ie 7.5V, but the accu is 6V. More stupid questions will follow :D

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.

Hmm, if you look at the foto, the motor also has two small ceramic caps. Arent they supposed to filter tha noise out? I mean why additional choke coils?

Both, coils and capacitors build a better noise filter than the capacitor only filter, especially when using PWM. I would further recommend:

  • twist the motor wires together
  • keep motor wires as short as possible
  • keep motor wires away from any sensor wires

Here is the diagram about suppression of brushed DC motor

First success! But I do still have issues. The main problem was that my program looked like:

Drive forward for 2 sec

Drive backward for 2 sec

Iam guessing that the battery was failing to supply high current when the motor was trying to switch its direction while still having the momentum. Can I be correct on this ? When I added 1 sec stop time before switching the direction the robot could run much longer. But still, after 1-2 minutes moving back and forth the distance between stops fell aprox. to 50%. If I turn the car off and then on the car moves faster again gradually slowing down. I supply 6V VSS for the motor and 4,3V  (again why 4,3 and not 5V?) from the arduino via USB cable to the INPUT pins on the L293. I also have a low current 3mA LED there to indicate the current. As the car moves "fast" at the beginning for aprox. 1-2 min the LED is shinig. As soon as the car begins slowing down the LED starts going on and off. 

Enable pins on the L293 should not use much current should they? Even if so, why is it OK at the beginning with gradual dying off after some minutes ? I will try to use power supply now, but Iam still want to know what cousing this behaviour. 

As you can see no power regulator used. 6V direct to VSS on the L293 with arduino giving 4,3V for the enable pins. The bottom LED is for the 6V battery and is always on. But the top LED begins to going on and off after some minutes of driving.

Update. Hooked up power supply with 7.4V via voltage regulator and it works almost perfect. It doesnt drive perfectly straight but apart from that it drives well )) What helped was the 7.4V power supply with higher PWN. Somehow this car cant go as slow as I wish. When I set PWN below 170 can run a metre or two but then it runs only for about a quarter of it. Pretty dissapointing actually as I want it to drive very slow at my home.

Update 2. Even with 200-255 PWN the motor fails to run if the car hits small obstacles like cables or my foot. With 170 a tiny small cable can cause the car to stop. As I understand the motor is too weak, because its more a less a toy RC car? If I want the robot to drive slow yet ovecome small obstacles should I look for a motor with a high tirque, preferably brushless? Because now I have enough power only with 200-255 PWN which is too fast.

Update3: Made the stops 2 sec and replaced 460uF cap with a 1000uF one and it helped. So proud of myself now :D

maybe try decreasing the PWM frequency to get it to move better at slow speeds.  It might make it noisy and might not help, but I think it is worth a try.

Yea it goes slower with fewer PWN but it also gets less power and cant get over little objects. So there is a trade off there.

Are you meaning PWM duty cycle?  What I am talking about is the overall frequency (inversely proportional to overall period).

With PWN I mean setting the motor to 200 for example i.e. analogWrite(10, 200). What do you mean with " overall frequency "

yeah, you are varying duty cycle.  Frequency is the inverse of the overall period of that PWM waveform (one cycle of the waveform)

Ok I kinda fixed everything for now and everything works. Things that helped:

1. Replacing battery with a power supply with higher voltage. Battery was 6V, power supply 7,4V

2. Replacing 470uF cap with a 1000 big one.

3. Adding 1-2 seconds stop time to change direction

Regarding the capasitors. They are of a great help, but can I just add more caps in parallel to help the motors? I will do more tests now, but theoretically more caps should help no ?

Now another topic. I wanted to buy a RF link to be able to control my robot, but yesterday I got an idea that if you have a working RC car with a remote you can just hook up the cables that supposed to be going to the motors into digital pins of an arduino that then controls the motor. My board was working while still in the car, but after some soldering the board behaves wiredly. Look at the foto. There are 8 black thingy with a hole in that are getting very hot to the point I burn my finger. Do you know what those are? I think Iam having a short circuit there but cant figure out why.