3
\$\begingroup\$

EDITED. I found that my supply of 3V was insufficient as there are voltage drops across the transistors. I replaced the 3V supply with 4.5V and the motor ran fine - although now my 3V motor has 2.5V across its terminals (3.3V to 0.8V). I did not think that DC motors exhibited any voltage drop since the current through their coils is constant. What can be done about this? And how would you calculate the voltage fed to the motor ANYWAY? I found it to be 3.3V simply because I measured it.

I have read over the data sheet for the L298 and it seems quite simple to use. Using one side of the chip (i.e. one H-Bridge) set IN1 to 5V and IN2 to ground to conduct from OUT1 to OUT2. Also, to enable the H-Bridge ENA must be 5V. That is all the wiring needed aside from some stabilizing/filter capacitors and flyback diodes.

So, to not mess with all of that I have simply purchased the Sainsmart L298 Driver module. Below is a photograph of the module and I have drawn on it to illustrate the pins that I have wired.

*Note that I have not included the 5V to ENA because (shown towards the bottom left) the board has some jumpers connected so the pin is always 5V.

Also, there is a state switch at the bottom right. From my experiments, and from what I have read, if the button is depressed (closed) then then VCC is tapped and regulated at 5V for the logic circuitry and the 5V (far right of the bottom screw assembly) can be used to power external circuits. If the button is OPEN then VCC is not regulated and you must supply an external 5V supply to this pin for the logic.

Now, my motor is only rated MAX at 3V DC, so obviously I have to leave the switch open and supply the two sources independently.


What I have noticed:

If I have everything wired up exactly as I have shown in the depiction below (but without the motor!) it works fine!

I have put a multimeter across OUT1 or OUT2 to ground as my microcontroller code executes (simply code to run one way then reverse direction), the polarity of the pin changes as expected.

If I place my motor across a 3V supply momentarily - it runs!

If I place the motor leads into OUT1 and OUT2 (after I have verified that the voltage polarity switches) nothing happens. Actually, the indicator LEDs that show direction (that were working prior) no longer light up with the the polarity of IN1 and IN2 changes.

What the heck is happening? Could it be that the board is not supplying the current required to turn the motors? These motors are quite small and the Absolute Max current draw of the L298 is 2A for a single bridge. I checked the datasheet for these motors and they draw 2.2A at stall and 300mA no load.

enter image description here

Here is the schematic for the actual L298 pin soldered to the above board. As you can see, the wiring scheme that I provided above should work just find. OUT1 should conduct to OUT2. The board just includes protection diodes and filter capacitors.

enter image description here

\$\endgroup\$
  • 1
    \$\begingroup\$ ENA and ENB are both connected to 5V via the two jumpers shown at the bottom left of the top image (two blue rectangles jumping pins 5V to ENA and the other 5V pin to ENB). The fact that ENB is set to 5V does not mean anything since I am not using the right bridge. I can remove that jumper but nothing would change. \$\endgroup\$ – sherrellbc Aug 18 '13 at 2:15
  • 1
    \$\begingroup\$ Actually, I see the point you are trying to make. It's a little obscure but there are actually 8 pins at the bottom right of the top image. Imagine them as two columns. The right column contains (from top to bottom) ENA, 5V, ENB, 5V. And is jumped like this: [ENA, 5V], [ENB, 5V]. The other pins in the left column: IN1, IN2, IN3, and IN4 are independent pins are shown by the bottom image. You use these to determine which transitors in the H-Bridges conduct and which are off. \$\endgroup\$ – sherrellbc Aug 18 '13 at 2:18
  • \$\begingroup\$ First though that comes to my mind is "Is there a diode in parallel with motor", since you mention that the driver functions normally when no motor is connected & also you have verified the same using multimeter. So driver and code is running properly. So possibly when the polarity reverses the diodes start conducting and short-circuit condition occurs. \$\endgroup\$ – Mayank Apr 20 '16 at 9:08
  • \$\begingroup\$ And what do you mean by momentarily "If I place my motor across a 3V supply momentarily - it runs!" Does that mean that when you directly connect to 3V supply it runs and then stops? even after it is connected to supply (momentarily condition)? Can you make a video of your case and share the link here, and also the motor specifications? \$\endgroup\$ – Mayank Apr 20 '16 at 9:08
  • 1
    \$\begingroup\$ The deficiencies of the L298 and L293 style bipolar bridges have been covered here numerous times, many of them automatically linked in the sidebar of this page. The voltage drop is to be expected from any bipolar bridge - if you want to avoid that, you will need an FET bridge. \$\endgroup\$ – Chris Stratton Apr 25 '16 at 14:33
0
\$\begingroup\$

You show a 3v supply to VCC, that's ok but the 5 volt regulator on board will not be doing anything, the 5volt reg supplies the logic supply. Am I to assume you have supplied this separately, it looks like that from your diagram. Try connecting 6 volts to VCC, disconnect the 5volt supply (if there is one) now try, use a resistor across the output of say 100ohms.

\$\endgroup\$
  • \$\begingroup\$ This is not really an answer - questions to the poster should be posted as a comment, however given that the question is almost 3 years old that is not likely to be helpful here. The reality is that the issue here is well understood, and well covered in the similar questions linked in the sidebar. \$\endgroup\$ – Chris Stratton Apr 25 '16 at 14:31

Not the answer you're looking for? Browse other questions tagged or ask your own question.