Go Down

Topic: L293DNE motor driver uneven Voltage[SOLVED] (Read 577 times) previous topic - next topic

Apr 23, 2014, 12:15 am Last Edit: Apr 23, 2014, 06:54 am by diegomichel Reason: 1
Hello,

I'm trying to make work two motors(for a mini car) with a L293DNE the problem i found it is that the lower the signal i send to the enable pin the more uneven the voltages become.

Im using a 7.4V battery at Vcc2 and the 5 volt of the arduino at VCC1

I i analogWrite 255 to EN1(pin 3 from arduino)and EN2(pin 6 from arduino), i get on my two pins those voltages:

Quote
4.96v
4.97v

And on the output pins of the L293DNE i get the following voltages:

Quote
6.85v
6.85v

Now if i instead i write with analogWrite 50  to my enable pins i get the following voltages at the pins

Quote
0.979v (Dont know if this little difference of PWM voltage make that much different on the L293DNE hope no)
0.993v


And the outputs of the L293D
Quote
3.50v
4.80v


(the outputs at the H-bridge both acted like capacitors in my multimeter because the voltage increases if i left them connected to multimeter, but what is certain is that my Second bridge on the L293D is giving me much more voltage than the first one.)

I have tried searching on the web and the forums and have not found anything similar, i added capacitors of 333uF at both Vcc1 and Vcc2, and still no luck.

done the tests without load, with a tiny capacitor a cross of outputs and with motors, its always uneven, and the uneveness increases as pwm output is lower, also tried with two different L293DNE's.

Well hope someone could help me, thank you.

raschemmel

Either your post was written incorrectly or your circuit is wired wrong. Pins 3 & 6 are not ENable pins they are outputs.
Draw a schematic with pen and paper of how YOUR circuit is wired and take a photo. DO NOT POST A LINK TO A TUTORIAL . I DO NOT CARE HOW ANYONE ELSE'S CIRCUIT IS WIRED. I'm only interested in yours. Post the photo. Take a photo of your circuit and
post that photo . Post the datasheet to prove you have seen it.
Arduino UNOs, Pro-Minis, ATMega328, ATtiny85, LCDs, MCP4162, keypads,<br />DS18B20s,74c922,nRF24L01, RS232, SD card, RC fixed wing, quadcopter

Sorry i mean pin 3 and 6 on arduino.

Sure thing man.

http://www.ti.com/lit/ds/symlink/l293d.pdf

Diagram(Did it myself in inkscape).

http://i.imgur.com/3hKDfWJ.png

Pin 3 and 6 from L293D are outputs for my motor 1, and pin 14 and 11, are outputs for my motor 2.

I wonder if a low pass filter in my pwm pins would fix my problem.

Thank You.

raschemmel

Arduino UNOs, Pro-Minis, ATMega328, ATtiny85, LCDs, MCP4162, keypads,<br />DS18B20s,74c922,nRF24L01, RS232, SD card, RC fixed wing, quadcopter

raschemmel

#4
Apr 23, 2014, 03:52 am Last Edit: Apr 23, 2014, 03:54 am by raschemmel Reason: 1
Quote
Take a photo of your circuit and post that photo  


No comment until I see that.
Arduino UNOs, Pro-Minis, ATMega328, ATtiny85, LCDs, MCP4162, keypads,<br />DS18B20s,74c922,nRF24L01, RS232, SD card, RC fixed wing, quadcopter

Sorry man i dont get your point, is my diagram wrong wired somehow?, i don't see it.

Another discovery, so i was reading that you can change the frequency at the pwm pins from http://playground.arduino.cc/Main/TimerPWMCheatsheet , and that the pins 5 and 6 run on the same timer, so i decided to connect my L293D on those two pins instead(did no change the frecuency tho), and guess what... voltages now are closer to each other with only a difference of 0.1v, ill check if makes difference to my robot, but i guess now is negible.

raschemmel

That's great feedback. Did you try swapping the motors ?
Arduino UNOs, Pro-Minis, ATMega328, ATtiny85, LCDs, MCP4162, keypads,<br />DS18B20s,74c922,nRF24L01, RS232, SD card, RC fixed wing, quadcopter


That's great feedback. Did you try swapping the motors ?


Sorry i didn't post a photo, but due the mess of cables was not appreciable where they connect, but the diagram i draw it was clear(well i hope xD),

I didn't try to swap the motors because i did notice one of them turning and the other not moving when i lowered the signal to the enable pins at the same time.

What i did was to test the outputs of the L293D without the motors and its where i noticed the difference of voltages, and tried to find a reason, i guess the difference of 0.1 volts on the PWM pins translated to a bigger change on the outputs of the H-bridge, but i don't really understand what was happening.

I did a double test with the L293, connected to pins 3 and 6 of the Arduino and voltages where uneven by 1 volt on the Ouputs of the L293D, then did the same with pin 5 and 6 from the Arduino, and voltage where just uneven by 0.1 volt on the L293D  outputs, so i guess it was related to the timer that pwm uses, but no idea really lol.

raschemmel

#8
Apr 23, 2014, 04:26 am Last Edit: Apr 23, 2014, 04:34 am by raschemmel Reason: 1
Did you know about this ?
Quote
The frequency of the PWM signal on most pins is approximately 490 Hz.On the Uno and similar boards,  pins 5 and 6 have a frequency of approximately 980 Hz. Pins 3 and 11 on the Leonardo also run at 980 Hz.


from here:
http://arduino.cc/en/Reference/AnalogWrite  

Quote
I i analogWrite 255 to EN1(pin 3 from arduino)and EN2(pin 6 from arduino), i get on my two pins those voltages:  


Quote
And the outputs of the L293D
Quote
3.50v
4.80v
Arduino UNOs, Pro-Minis, ATMega328, ATtiny85, LCDs, MCP4162, keypads,<br />DS18B20s,74c922,nRF24L01, RS232, SD card, RC fixed wing, quadcopter

Didn't know about that, i guess that's explains everything then :), Thank you Raschemmel.


Did you know about this ?
Quote
The frequency of the PWM signal on most pins is approximately 490 Hz.On the Uno and similar boards,  pins 5 and 6 have a frequency of approximately 980 Hz. Pins 3 and 11 on the Leonardo also run at 980 Hz.


from here:
http://arduino.cc/en/Reference/AnalogWrite  

Quote
I i analogWrite 255 to EN1(pin 3 from arduino)and EN2(pin 6 from arduino), i get on my two pins those voltages:  


Quote
And the outputs of the L293D
Quote
3.50v
4.80v


Go Up