L298n motor driver prce
The motor direction is controlled by sending a HIGH or LOW signal to the drive for each motor (or channel). Then connect D10 to module pin 7 (remove the jumper first) and D5 to module pin 12 (again, remove the jumper). In our example we have two DC motors, so digital pins D9, D8, D7 and D6 will be connected to pins IN1, IN2, IN3 and IN4 respectively.
L298n motor driver prce driver#
PWM pins are denoted by the tilde ("~") next to the pin number, for example:įinally, connect the Arduino digital output pins to the driver module. Now you will need six digital output pins on your Arduino, two of which need to be PWM (pulse-width modulation) pins. Don't forget to connect Arduino GND to pin 5 on the module as well to complete the circuit.
![l298n motor driver prce l298n motor driver prce](https://www.tinyosshop.com/image/cache/data/MOTOR/L298NLOGO-800x800.jpg)
This can be fed to your Arduino's 5V pin to power it from the motors' power supply. If you supply is up to 12V you can leave in the 12V jumper (point 3 in the image above) and 5V will be available from pin 6 on the module. Next, connect your power supply - the positive to pin 4 on the module and negative/GND to pin 5. Otherwise, you may need to swap them over when you set both motors to forward and one goes backward! If you're using two motors for a robot (etc) ensure that the polarity of the motors is the same on both inputs. First, connect each motor to the A and B connections on the L298N module. To control one or two DC motors is quite easy. Connect to PWM output for DC motor speed control. Leave this in place when using a stepper motor.
L298n motor driver prce how to#
Furthermore, if you're completely new to the world of Arduino we highly recommend you review a copy of "Arduino Workshop", and if you have questions, ask in our customer forum.įirst, we'll run through the connections, then explain how to control DC motors then a stepper motor. These L298 H-bridge dual motor controller modules are inexpensive and available from the Tronixlabs Australia store. There is also an onboard 5V regulator, so if your supply voltage is up to 12V you can also source 5V from the board. This allows you to control the speed and direction of two DC motors, or control one bipolar stepper motor with ease. The L298N H-bridge module can be used with motors that have a voltage of between 5 and 35V DC. If you apply power greater than 20V and enable the on board 5V regulator, the board and components will get quite warm (but this is normal).In this tutorial, we'll explain how to use our L298N H-bridge Dual Motor Controller Module 2A with Arduino. The board includes built-in flyback/back EMF diodes for added protection.
![l298n motor driver prce l298n motor driver prce](https://electropeak.com/pub/media/catalog/product/cache/fa232c603e0403143aafcf902b42df2f/_/m/_m_t_mtr-09-017-1.jpg)
Maximum current output is up to 2A(peak) per motor. The original motor driver board used by thousands of makers across the globe! The famous L298N has become the default starting point for new makers learning robotics thanks to its simplicity, robustness and low cost.