# How to calculate voltage fed to motor in an H-Bridge circuit?

1. Aug 17, 2013

### sherrellbc

So, I have been long struggling with getting a L298 motor driver I have to work. I figured it to be more compact than wiring up all the protective diodes myself so I purchased this:

Where the board simply supplies a regulator, protection diodes, and a filter capacitor.

Anyway, I have gotten the chip to work fine at higher voltages. My problem lies here in the actual schematic of the H-Bridge:

By setting IN1 HIGH, IN2 LOW, and ENA HIGH, the motor will conduct via the top left and bottom right transistors. Now, my problem is that my motor is of the 3V variety. Initially, I had a problem with the driver not turning the motor at all. It turned out that my supply VS (~3V at the time) was insufficient because a significant voltage was being dropped across the transistors.

So, after upping VS to 4.6V (3 D-cell batteries) the motor would turn fine. However, now, after measuring, the voltage at the motors terminals are 3.3V and 0.8V. And my questions are:

*How to calculate the voltage across a DC motor in general?
*How to calculate the voltage drop across the transistors in the H-Bridge circuit to determine the voltage at the motor leads?
*In my case, is the 2.5V seen across the motor demanded by the current through its coil, or a product of the current through the transistors?

--It seems that the current through a coil (V = L di/dt) would be zero for a DC motor. Why am I measuring 2.5V? Can this be entirely attributed to the internal resistance of the wires? Does this affect the motor in any way?

--The datasheet for my motor states that at no load a 300mA current is drawn. So, are my measurements going as far to say there exists a 8 Ohm internal resistance? So, at higher currents, the drop across the motor should get larger? What if the current is such that (assuming the motor were to not burn up at this point) the voltage demanded across the motor was 5V or so (~0.625A current given 8 ohm internal resistance) .. would the motor at some point between 2.5V and 5V simply shut off and "open" the circuit path? Or it seems that perhaps the current would demand a larger voltage drop across the transistors - but with sufficient current would the motor still turn despite lowered voltage across its terminals?

Then we are right back the first and second questions.

Last edited: Aug 17, 2013
2. Aug 17, 2013

### Baluncore

If you read the L298 data sheet you will see that the minimum supply voltage Vs = Vih + 2.5V.
You will also see that Vih is 2.3V minimum.
So your power supply to the L298 must be at least 2.5 + 2.3 = 4.8V
Unless you provide that supply the chip will not be able to correctly bias the driver transistors.
Notice also that the logic supply Vss must be greater than 4.5V.

Further down the data sheet you will see the Vce(sat) for the H-bridge Source and Sink transistors is about 1.5V. That is probably because the L298 uses darlington transistors. A more recent design MOSFET driver would have a much lower saturation voltage and almost no power dissipation.

The circuit shows Rsa and Rsb sense resistors. They are probably selected for the 1A currents the chip is designed for. You are using one third of that so they should not be a problem, but they will drop some motor voltage.

You need 3V for your motor and 3V for the two transistor saturation voltages, Vs = 6V.

3. Aug 17, 2013

### sherrellbc

The datasheet defines Vih as "input high voltage" which appears to be the threshold by which
after this voltage the AND gates shown in the schematic above will register as "HIGH." Where do you find that Vs = Vih + 2.5V ?

Also I am a bit rusty on my transistors, what does Vce(sat) represent? I understand its the voltage difference between the emitter and collected, but what relevance does it have? I never fully understood this concept when I originally learned about transistors.

4. Aug 17, 2013

### sherrellbc

The datasheet defines Vih as "input high voltage" which appears to be the threshold by which
after this voltage the AND gates shown in the schematic above will register as "HIGH." What does the logic for an AND gate have to do with transistor biasing and voltage drop across them?

Also I am a bit rusty on my transistors, what does Vce(sat) represent? I understand its the voltage difference between the emitter and collected, but what relevance does it have? I never fully understood this concept when I originally learned about transistors.

And 3V is the maximum rating on the motor. I currently am supplying 4.6V to the bridge and get an associated 2.5V across the motor. It seems to run fine.

5. Aug 18, 2013

### Baluncore

See the top line of the ELECTRICAL CHARACTERISTICS on page 3/13, it has the Vs ~ Vih spec.

Vce(sat) is the voltage across the switch when it is conducting.

The AND gate is probably not so much logic as the driver voltage level conversion.
If the data sheet makes some specification, then it is a good policy not to operate outside those specs.

“It seems to run fine” is OK for your design, if you are happy with it.
“It seems to run fine” is certainly not OK for a professional design.

6. Aug 18, 2013

### sherrellbc

Well, sure but I did not mean it like that. I was just implying that the motor is 3V max and I was running it a bit under that as to not push its limits. Perhaps I should have used better phrasing.

What do you mean by "driver voltage level conversion."? It seems that the AND gates, when both inputs are 5V, will provide the feeder current to turn the transistors on. If there is more to this design than I am seeing please explain because I thought I had fully understood it prior to you saying that.

7. Aug 18, 2013

### Baluncore

Your inexperience with level conversion demonstrates that you do not yet understand the design requirements of the chip when operated with Vss = +5V and say Vs = +30V. Something has to provide base current to the H-bridge transistors. That current must come from the immediate supply rail. It is important that they are not both turned on at the same time. The circuit that ensures that condition is in what is drawn as a simple AND gate. The block diagram is conceptual, not a complete schematic, there is much detail not shown. Without a detailed schematic I can only guess at the contents. The data sheet defines the functional conditions. You have only that to guide you.

8. Aug 18, 2013

### sherrellbc

What are you referring to here? What should not be turned on at the same time? Are you referring to the two transistors through which current is conducted to drive the motor?

Where might I find documentation regarding what you are describing here (level conversion/shifting .. and?) ?

9. Aug 18, 2013

### Baluncore

10. Aug 18, 2013

### sherrellbc

I understand what an H-Bridge does, but your comment was vague with regards to what should not be turned on at the same time.

I know that, in its more basic form, an H-bridge gives two paths of conduction to run a motor bi-directionally depending on which set of transistors is on.

11. Aug 18, 2013

### Baluncore

You need to think about it more.

12. Aug 19, 2013

### meBigGuy

The AND gates convert from logic levels to drive switching voltage levels as well as provide a logic function to keep the h-bridge from blowing itself up. The motor drive supply must be a higher voltage than the logic supply so this conversion will work properly (since the system was designed with that assumption).