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
And I want to add another question. In the datasheet of my 7805 voltage regulator it states that the recommended min. voltage should be 7V. I tested it with 6V and it gave sufficient 4.98V. What is the drawback ?
I got a simple answer for you. It will work, but not for long. The volt regulator says it needs 7v to work, in reality it will probably work as low as 5.5v or so. Probably not much lower than that. The 6v will work, but as the battery dies, there is not much “room” for it to die. If it started at 7.2v, you have 1.7 volts or so before you volt reg stops working. If you start at 6v, you only have to drop a little for the volt reg to stop working.
Don’t forget --every time your motors start up or change direction, there is going to be a little surge in power. This little surge might be enough to pull the voltage down to a point where your microcontroller resets.
Check with the guys but you may just want to add a diode to that 6v pack to “shave off” a volt instead.
I was going to suggest that; use a 1N914 or some such diode with the usual 0.7V forward voltage. Put that in series before your ardu board and you’ll get 6.0V - 0.7V = 5.3V.
Which Arduino board do you have, or did you build your own? I have a Mega clone and it is working just fine with the on-board regulator. I’m using 4xAA alkalines, which are currently providing less than 6V. The motors and everything else is working without a hitch.
If you are building your own, ditch the 7805 regulator and get yourself a Low Dropout (LDO) regulator. Those can supply the desired voltage with only 0.5V higher coming from the batteries. The LM294 is a good example. It provides 1A @ 5V output. You can run the motors and servos themselves directly from the batteries, so that doesn’t count against the 1A.
Thank you all for your comments, it helped a lot. Now I have a more important issue. I hooked everything up just like you said using 470uF with 100Nf before and same caps after the voltage regulator. Also I have 4 100Nf caps on each L293 pin that goes to the motor.
Now to the issue. I “told” to both motors to go with 255 PWN wich shoould be 6V. What happens is that while the wheels are driving in the air everything is OK. As soon as the vehicle drives on the floor it slows very rapidly until it cant move. I did the voltage measurments and was astound. The setup is following: Arduino powers from the USB from the PC. Then we have 6V Battery-Switch-Power Regulator etc. If the Arduino is OFF and the switch is OFF I read 6.2V which is good. If I turn the switch on, so that the current can flow to the L293 motor driver while the Arduino is still OFF I read 5,7V. ! Just like that! The car is on the ground. If I now turn the arduino ON and the bot starts moving I read whipping 1.5V on the L293 motor output! If I then take the car from the ground the voltage raises to 4,7V which is better but still should be like 5,7V (well better 6,2V)
Now I still have the original electronics in the car and it drives flawlessly with a remote. Sorry for such a big post but I really dont know what to do.I can make a picture if it will help.
My guess is that your motors are drawing more current than your supply can provide. Because of Ohm’s Law, when your current draw goes up your voltage will drop.
Once again, my knowledge is probably worth about 2 cents.
Double check everything, be sure that the + side of data power and motor power are not together. DO make sure your grounds are connected together. Double check the L293 for the enable pin, etc.
Thx for you reply, I will try to do what you said and will post a picture of the circuit if nothing helps.
But I already found one really weird and disappointing thing. The 5V out pin on my Arduino gives only 4.3V, the 3,3V pin gives sufficient 3,25V when powered from USB to PC cable. The 4,3V were measured WITHOUT any load applied and everything disconected from the board. The enable pin on the L293 requers 5V. Anyway the Arduino should give 5V out, whats going on ?
And btw, how do I when when the battery is dying? Is there any way to measure it etc?
Just opened up the motor housing and saw a weird yellow thingy:
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.
Yea, thats what I think too. Please read below. The car was moving back and forth WITHOUT any stops, so I guess thats where batteries failed to supply needed current. Note though that the batteries came with car, they are 10 years old NiCd though, could be half dead.
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
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.