Note: if you supply more than 12V, you need to remove the jumper and supply 5V to the +5V terminal. However, if the jumper is in place, the chip is powered using the motor’s power supply and you don’t need to supply 5V through the +5V terminal. The +5V terminal is used to power up the L298N chip. The +12V terminal block is used to power up the motors. OUT1 and OUT2 at the left and OUT3 and OUT4 at the right.Īt the bottom you have a three terminal block with +12V, GND, and +5V. The motor driver has a two terminal block in each side for each motor.
Let’s take a look at the L298N motor driver pinout and see how it works. The L298N motor driver is shown in the following figure: L298N Motor Driver pinout Additionally, it allows us to drive two DC motors simultaneously, which is perfect to build a robot. We’re going to use the L298N motor driver that can handle up to 3A at 35V. The method we’ll use here is suitable for most hobbyist motors, that require 6V or 12V to operate. There are many ways to control a DC motor.
Power source: 4x 1.5 AA batteries or Bench power supply.ESP32 DOIT DEVKIT V1 Board – read ESP32 Development Boards Review and Comparison.To complete this tutorial you need the following parts: Installing the ESP32 Board in Arduino IDE (Mac and Linux instructions).Installing the ESP32 Board in Arduino IDE (Windows instructions).To better understand with this tutorial, you may want to take a look at the following posts: This tutorial is also compatible with similar motor driver modules. Note: there are many ways to control a DC motor.
#L298n motor driver 5v output how to#
Then, we’ll show you an example on how to control the speed and direction of a DC motor using the ESP32 with Arduino IDE and the L298N motor driver. First, we’ll take a quick look on how the L298N motor driver works. This tutorial shows how to control the direction and speed of a DC motor using an ESP32 and the L298N Motor Driver.