Pages: [1]   Go Down
Author Topic: L293DNE motor driver uneven Voltage[SOLVED]  (Read 150 times)
0 Members and 1 Guest are viewing this topic.
Offline Offline
Newbie
*
Karma: 0
Posts: 6
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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.
« Last Edit: April 22, 2014, 11:54:37 pm by diegomichel » Logged

Offline Offline
Edison Member
*
Karma: 31
Posts: 2467
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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.
Logged

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

Offline Offline
Newbie
*
Karma: 0
Posts: 6
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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.
Logged

Offline Offline
Edison Member
*
Karma: 31
Posts: 2467
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Look at this before you ask any more questions.
http://www.me.umn.edu/courses/me2011/arduino/technotes/dcmotors/L293/L293.html
http://accrux.blogspot.com/2013/08/arduino-controlling-direction-and-speed.html

* MotorDriverL293Dnet (1).pdf (291.86 KB - downloaded 2 times.)
* Control Engineering • H-Bridge PWM DC motor control with IC L293.htm (46.15 KB - downloaded 2 times.)
* L293 Motor Driver 1.pdf (51.24 KB - downloaded 2 times.)
« Last Edit: April 22, 2014, 08:48:44 pm by raschemmel » Logged

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

Offline Offline
Edison Member
*
Karma: 31
Posts: 2467
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
Take a photo of your circuit and post that photo  

No comment until I see that.
« Last Edit: April 22, 2014, 08:54:55 pm by raschemmel » Logged

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

Offline Offline
Newbie
*
Karma: 0
Posts: 6
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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.
Logged

Offline Offline
Edison Member
*
Karma: 31
Posts: 2467
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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

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

Offline Offline
Newbie
*
Karma: 0
Posts: 6
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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.
Logged

Offline Offline
Edison Member
*
Karma: 31
Posts: 2467
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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
« Last Edit: April 22, 2014, 09:34:23 pm by raschemmel » Logged

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

Offline Offline
Newbie
*
Karma: 0
Posts: 6
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Didn't know about that, i guess that's explains everything then smiley, 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
Logged

Pages: [1]   Go Up
Jump to: