Hellloooo people, today weโll be seeing what is a motor driver module, how to use it and where to use it โ its connections and coding. So without wasting time, letโs directly jump to our motor driver L298N Arduino tutorial.
The thing is whatever you do, the Arduino supplies maximum of 5V 1A as output; which is enough to power LEDs or smaller applications but not a motor, a LED strip or our bot! So for applications demanding more current or voltage we need a higher power source as well as a means of control. This is where motor driver comes into play, it lets more power flow through itself by taking commands from the Arduino, simple?
So first things first,
12V โ Battery +ve
GND โ Arduino GND, Battery -ve
2 Signal pins โ Pin 7 & 8 of Arduino
2 wires from application terminals โ motor wires
void setup() {
pinMode(7, OUTPUT);
pinMode(8, OUTPUT);
}
void loop() {
digitalWrite(7, HIGH); //clockwise rotation
digitalWrite(8, LOW);
delay(5000);
digitalWrite(8, HIGH); //anticlockwise rotation
digitalWrite(7, LOW);
delay(5000);
}
Thatโs it! Power up your Arduino with your cable or battery and you are good to go. Here is a video tutorial which will make things super easy for you!
Also here is a video tutorial on Obstacle avoiding robot using an ultrasonic sensor and this same motor driver module..! Go try it, what are you waiting for? Itโs a mere 10 min job!
Also, needless to say, if you face any difficulties, comment down below.. Iโll get to them as fast as I can ๐
Radar systems are integral to a variety of crucial applications, from national defense to weather…
Metal fabrication plays a vital role in engineering, transforming metal into functional components of everyday…
The pieces being produced in complex machining services frequently have difficult patterns. They may need…
Digital height gauges are precision measuring instruments used to determine the height of an object…
Injection molding is a rapid prototyping and manufacturing process applicable in the mass production of…
Fastening hardware, such as industrial pins, serve various functions in all industries. Butprimarily, you can…
View Comments
whenever I connect the ENA and ENB pins to the Arduino-L298 motor driver. The motor slows down and stops
Hmph.. quite interesting! I need more information what have you done & are you exactly trying to do