

This pin can accept voltages from +7VDC to +35VDC. The +12V pin is where the motor power is attached. The controller board, shown above, has +12V and +5V terminals. Using a breakout board is easier for prototyping compared to using the IC. All you need to do is apply signals to the inputs to make the motor(s) rotate to a certain direction. The L298N Motor Controller BoardĪs already mentioned, the L298N has four inputs corresponding to the four switches in the H-bridge diagram above. More information about the L298N IC is found on its datasheet:įor this tutorial, we will be focusing more on the L298N breakout board. This means you can power high voltage motors while controlling them with microcontrollers. The most notable feature here is its high power supply although its input pins follow lower voltage levels.

The diagram above shows an example diagram for using the L298N to drive one DC motor. To drive the motor counter clockwise, the pin Input 1 is low while the pin Input 2 is high. To drive a motor to a direction, say, clockwise, the pin Input 1 must be high while the pin Input 2 must be low. The Enable A pin must be high to turn on the motor. For example, if a motor is using channel A, its terminals must be connected to pins Out 1 and Out 2. This IC drives two motors through two channels, A and B. It comes in two IC packages: MultiWatt15 and PowerSO20. The L298N is an integrated circuit that follows the H-bridge concept.

This is very significant, especially when using an Arduino board where the 5V power source is simply not enough for two DC motors. The other benefit of using an H-bridge is that you can provide a separate power supply to the motors. On the other hand, when S2 and S3 are on, the right motor terminal is more positive than the left motor terminal, making the motor rotate in the other direction. When S1 and S4 are on, the left motor terminal is more positive than the right terminal, and the motor rotates in a certain direction. Here, the motor rotates in the direction dictated by the switches. The L298N motor controller follows the H-bridge configuration, which is handy when controlling the direction of rotation of a DC motor. This is where the L298N motor controller comes in.

Obviously, you can’t drive loads that require much more current like a motor. There’s no problem there because the 20 mA or so current from the pins is enough. You can drive a LED on or off using a microcontroller like Arduino or PIC.
