l293d question

Hi,

using an ATmega8 I can generate a PWM (8-10 Bit) and run in at approx

4KHz. This part works perfektly, but the problem is the connected l293d from Texas Instruments.

The input voltage to the l293d is 12V but using the above PWM I don't get the whole range of 12V, but only 5-11V. I would like to get the output voltage in the whole range of 0-12V proportionally to the PWM (actually the DC in my application needs mainly a voltage in the range of

1-4V but sometimes also > 5V are needed, so I cannot use the PWM signal directly)

do you have any suggestions what could be wrong in the above configuration? Did someone succeed to get a voltage in the whole range of 0-12V using the l293d (or some other IC) (maybe even using an ATmega8 and can provide his PWM settings for status registers involving the output at OCR1A/OCR1B or OCR2)?

Artur

_______________________________________________________________________________ Artur Merke ||| snipped-for-privacy@udo.edu (O-O) _____________________________________________.oo0--(_)--0oo.___________________

Reply to
Artur Merke
Loading thread data ...

The reason your upper range is 11V is because the L293 uses bipolar switching transistors, which have a P-N junction voltage drop of about

0.5V (x2 gives you the 11V that you see). If you need to have a PWM that goes to 12V you can do one of 2 things: Raise the supply voltage to about 13V OR Use a MOSFET H-bridge like the most excellent LMD18200 (or LMD18201)

I've done both. Be aware that the voltage drop you see is converted to heat. My experience with the L298 is that you can't get anywhere near the rated current unless you use a massive heat sink and fan. That's why I won't use anything but the LMD18201 for motors in the range of

1A - 3A.

BRW

Reply to
Bennet Williams

Artur,

I'm not sure you have made a correct setup if I understand what you are writing.

The L293 has two power inputs. VCC1 and VCC2. VCC1 is the supply voltage for the logic part of the IC. This should be in the 4-7V range (common to you microcontroller). VCC2 is a separate supply voltage for the motors. This must be higher than VCC1 and below the max value which is around 36V. Both power supplies must have a common ground.

On the outputs driving the motors, you will not get the full VCC2 supply voltage, typically VCC2 - 1.4V

Look in the L293 specification If you don't have it, GOOGLE for it.

Hope this helps.

Reply to
Peter F. Jørgensen

Hi,

VCC1=3D 5V (logic supply voltage) VCC2=3D 12V (power supply volage)

Here a short table of values

PWM -> VCC at DC

0.55 -> 7.22 1.10 -> 9.20 1.65 -> 9.80 2.20 -> 10.13 2.75 -> 10.29 3.30 -> 10.41 3.85 -> 10.51 4.40 -> 10.58 4.96 -> 10.65

for me these values seem to be very strange! Does anybody succeeded in connecting the l293d to a atmega8 (or other uC), or has any other useful comments?

Here are my pwm settings (ATmega8 at 8 MHz)

//phase correct 10 bit pwm, noninverting TCCR1A =3D _BV(WGM10) | _BV(WGM11) | _BV(COM1A1) | _BV(COM1B1); TCCR1B =3D _BV(CS10); //no prescaling

this should result > Artur,

that seems to be true from the above table, but why do the voltage start at 7V and not at an lower value like 0.5V

so I did, but there is no hint at a lowest output voltage (only that the input should be > 4.6V)

thanx, but I still have no idea what could be wrong.

Reply to
Artur Merke

You don't say what the other T1 registers are set to. Since you have no scope, set the prescaler to the largest value (1024 ?) in order to slow things down to the point where you can 'see' the pwm waveform with a led. You could also run in external clock mode and 'single-step' through the pwm states. Dave

VCC1= 5V (logic supply voltage) VCC2= 12V (power supply volage)

Here a short table of values

PWM -> VCC at DC

0.55 -> 7.22 1.10 -> 9.20 1.65 -> 9.80 2.20 -> 10.13 2.75 -> 10.29 3.30 -> 10.41 3.85 -> 10.51 4.40 -> 10.58 4.96 -> 10.65

for me these values seem to be very strange! Does anybody succeeded in connecting the l293d to a atmega8 (or other uC), or has any other useful comments?

Here are my pwm settings (ATmega8 at 8 MHz)

//phase correct 10 bit pwm, noninverting TCCR1A = _BV(WGM10) | _BV(WGM11) | _BV(COM1A1) | _BV(COM1B1); TCCR1B = _BV(CS10); //no prescaling

this should result > Artur,

that seems to be true from the above table, but why do the voltage start at 7V and not at an lower value like 0.5V

so I did, but there is no hint at a lowest output voltage (only that the input should be > 4.6V)

thanx, but I still have no idea what could be wrong.

Posted Via Nuthinbutnews.Com Premium Usenet Newsgroup Services

---------------------------------------------------------- ** SPEED ** RETENTION ** COMPLETION ** ANONYMITY **

----------------------------------------------------------

formatting link

Reply to
Dave Garnett

Artur,

Are the voltages you mention measured using a voltmeter (mechanical or digital)? If so, you probably get the mean value of the PWM signal, not the max voltage. You need a scope to check this.

Peter

VCC1= 5V (logic supply voltage) VCC2= 12V (power supply volage)

Here a short table of values

PWM -> VCC at DC

0.55 -> 7.22 1.10 -> 9.20 1.65 -> 9.80 2.20 -> 10.13 2.75 -> 10.29 3.30 -> 10.41 3.85 -> 10.51 4.40 -> 10.58 4.96 -> 10.65

for me these values seem to be very strange! Does anybody succeeded in connecting the l293d to a atmega8 (or other uC), or has any other useful comments?

Here are my pwm settings (ATmega8 at 8 MHz)

//phase correct 10 bit pwm, noninverting TCCR1A = _BV(WGM10) | _BV(WGM11) | _BV(COM1A1) | _BV(COM1B1); TCCR1B = _BV(CS10); //no prescaling

this should result > Artur,

that seems to be true from the above table, but why do the voltage start at 7V and not at an lower value like 0.5V

so I did, but there is no hint at a lowest output voltage (only that the input should be > 4.6V)

thanx, but I still have no idea what could be wrong.

Reply to
Peter F. Jørgensen

Hi,

I tried the LMD18200 and it works better. But my problem is that the LMD18200 is an overkill for my application. I have 2 small DCs without gears (this is by purpose) and I would like to operate them at

0.8-1.5V (0.25A each). Using the LMD18200 I have to put at least 12V supply voltage, so > 90% of them is turned into heat. Do you have a suggest= ion for an (dual) H-Bridge with approx. specification: logic supply 5V, power supply 0-12V, output voltage 0-12V proportional to the used PWM??? It is important, that I can output very low voltage like 0.= 9 or 1.2V.

Any help is appreciated!!!

Artur

___________________________________________________________________________= ____ ||| (O-O) _____________________________________________.oo0--(_)--0oo._______________= ____ > Artur,

Reply to
Artur Merke

PolyTech Forum website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.