Return to site

L298n Stepper Motor Driver Controller Board Module Manual

broken image


1pcs Dual H Bridge Dc Stepper Motor Drive Controller Board Module L298n, Find Complete Details about 1pcs Dual H Bridge Dc Stepper Motor Drive Controller Board Module L298n,L298n,Dual H Bridgesuppliers,Motor Drive from Integrated Circuits Supplier or Manufacturer-Shenzhen Lonten Technology Co., Limited.

  1. L298n Motor Driver Board Schematic
  2. L298n Motor Driver Board
  3. Lcd Controller Board

To control one or two DC motors is quite easy with the L298N H-bridge module. First connect each motor to the A and B connections on the L298N module.

If you're using two motors for a robot (etc) ensure that the polarity of the motors is the same on both inputs. Otherwise you may need to swap them over when you set both motors to forward and one goes backwards!

Motor driver l298n

Next, connect your power supply – the positive to pin 4 on the module and negative/GND to pin 5. 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.

This can be fed to your Arduino's 5V pin to power it from the motors' power supply. Don't forget to connect Arduino GND to pin 5 on the module as well to complete the circuit. Now you will need six digital output pins on your Arduino, two of which need to be PWM (pulse-width modulation) pins.

PWM pins are denoted by the tilde ('~') next to the pin number, for example in the image of the Arduino Uno's digital pins.

L298n Motor Driver Board Schematic

Finally, connect the Arduino digital output pins to the driver module. 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. Then connect D10 to module pin 7 (remove the jumper first) and D5 to module pin 12 (again, remove the jumper).

L298n Motor Driver Board

The motor direction is controlled by sending a HIGH or LOW signal to the drive for each motor (or channel). For example for motor one, a HIGH to IN1 and a LOW to IN2 will cause it to turn in one direction, and a LOW and HIGH will cause it to turn in the other direction.

However the motors will not turn until a HIGH is set to the enable pin (7 for motor one, 12 for motor two). And they can be turned off with a LOW to the same pin(s). However if you need to control the speed of the motors, the PWM signal from the digital pin connected to the enable pin can take care of it.

This is what we've done with the DC motor demonstration sketch. Two DC motors and an Arduino Uno are connected as described above, along with an external power supply. Then enter and upload the following sketch:

So what's happening in that sketch? In the function demoOne() we turn the motors on and run them at a PWM value of 200. This is not a speed value, instead power is applied for 200/255 of an amount of time at once.


Then after a moment the motors operate in the reverse direction (see how we changed the HIGHs and LOWs in thedigitalWrite() functions?). To get an idea of the range of speed possible of your hardware, we run through the entire PWM range in the function demoTwo() which turns the motors on and them runs through PWM values zero to 255 and back to zero with the two for loops.

Finally this is demonstrated in the video on this page – using our well-worn tank chassis with two DC motors.

Lcd Controller Board

  • £108.42
    Make offer - MTE RL-00803C Ausgangsfilter
  • Modicon AS-BADU-206 Input Module Analog 4 x 10V/20MA - Used
    + £44.81 postage
    Make offer - Modicon AS-BADU-206 Input Module Analog 4 x 10V/20MA - Used
  • CE 5.5kW 400Hz Single-phase VFD Inverter Frequency Converter 220V to 3-phase
    + £19.99 postage
    Make offer - CE 5.5kW 400Hz Single-phase VFD Inverter Frequency Converter 220V to 3-phase
  • £82.98
    Make offer - Sigma Koki Vertical Translation Stage TSD-603
  • 10pcs mini Micro Small 8x9.5mm 2-phase 4-wire stepper motor with copper gear
    Free postage
    Make offer - 10pcs mini Micro Small 8x9.5mm 2-phase 4-wire stepper motor with copper gear
  • £102.35
    Make offer - Yokogawa ST3*D??Multi Status Input Card - Used
  • Bently Nevada 128240-01 I/O Module Proximior/Seismic Monitor - Used
    + £32.64 postage
    Make offer - Bently Nevada 128240-01 I/O Module Proximior/Seismic Monitor - Used
  • £20.00
    Make offer - Cast Aluminium 12v Blower / Bellows
  • Toyopuc THU-5781 Toyoda EN-I/F-T ENET Module - Used
    + £32.64 postage
    Make offer - Toyopuc THU-5781 Toyoda EN-I/F-T ENET Module - Used
  • Inkbird Digital Temperature Controller 2 Relay Output Room Thermostat 220V Heat
    Free postage
    Make offer - Inkbird Digital Temperature Controller 2 Relay Output Room Thermostat 220V Heat
  • £180.85
    Make offer - KEB 11033301 / 05 F0 R01-1228 Frequenzumrichter
  • £135.64
    Make offer - Fanuc A20b-1006-0741 working 100%




broken image