

- L298n motor driver 4 wheeler how to#
- L298n motor driver 4 wheeler code#
- L298n motor driver 4 wheeler download#
More information about the L298N IC is found on its datasheet: 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. Both motors will start rotating.The other benefit of using an H-bridge is that you can provide a separate power supply to the motors.
L298n motor driver 4 wheeler code#
OutputĪfter the connection you will copy and paste this code in Arduino IDE than upload the code. Tutorial by RoboIndia on Motor Control //Hardware Require: Motor Driver(By RoboIndia) & Arduino //Motor A const int inputPin1 = 10 // Pin 15 of L293D IC const int inputPin2 = 11 // Pin 10 of L293D IC //Motor B const int inputPin3 = 9 // Pin 7 of L293D IC const int inputPin4 = 8 // Pin 2 of L293D IC void setup ( ) 4.
L298n motor driver 4 wheeler download#
You may download this code (Arduino Sketch) from here. When Enable 1/2 is HIGH, motor connected to left part of IC will rotate according to following manner: Input 1 Rotation of motor depends on Enable Pins. Make sure that the Jumpers are preset on the Enable 1-2 and Enable 3-4 pins of module, so that motor will be enabled and work at maximum speed.

Module VSS power terminal- External power source of 9V. Pin 16: VCC, for supply power to IC i.e 5V. Pin 15: Input 3, when this pin is HIGH the current will flow though output 3. Pin 14: Output 3, this pin is connected with one terminal of motor. Pin 11: Output 4, this pin is connected with one terminal of motor. Pin 10: Input 4, when this pin is HIGH the current will flow though output 4. Pin 9: When Enable 3/4 is HIGH, Right part of IC will work, i.e motor connected with pin 11 and pin 14 will rotate.

Pin 8: VSS, this pin is used to give power supply to connected motors from 5V to 36V maximum depends on Motor connected. Pin 7: Input 2, when this pin is HIGH the current will flow though output 2. Pin 6: Output 2, this pin is connected with one terminal of motor. Pin 3: Output 1, this pin is connected with one terminal of motor. Pin 2: Input 1, when this pin is HIGH the current will flow though output 1. Pin 1: When Enable1/2 is HIGH, Left part of IC will work, i.e motor connected with pin 3 and pin 6 will rotate. There are 4 INPUT pins, 4 OUTPUT pins and 2 ENABLE pin for each motor. The L293D is a 16 pin IC, with eight pins, on each side, to controlling of two DC motor simultaneously. This is designed to provide bidirectional drive currents at voltages from 5 V to 36 V. This Motor Driver is designed and developed based on L293D IC. The Motor Driver is a module for motors that allows you to control the working speed and direction of two motors simultaneously.

L298n motor driver 4 wheeler how to#
This tutorial of Robo India explains how to control DC motor using L293D IC Motor Driver with Arduino.
