DIY Arduino Motor Shield [for only $8!] (L298N 2x4A)
It’s controlled using 4 PWM pins. The connections are: 11&10 for the R-Motor and 6&5 for the L-Motor. With the help of eight fast recovery diodes (1N4937) it shows a very fast response of stopping/ braking, that’s why I’m going to use it for the national SUMOBOT competition.
What Is A Motor Shield?
A motor shield is a circuit that drives different loads such as motors, lights and etc… The Arduino Board (Microcontroller) itself isn’t designed to operate high current loads, that’s why we use motor shields, it is a circuit that is controlled by your arduino board to drive high power accessories.
It only cost me P363.75 (Converted: $8.87)! The prices would decrease to P262.50 (Converted: $6.40) if I sticked to the original plan, since it’s for competitional purposes, I substituted some parts with a higher rate of response.
Voltage Range: 5- 50 volts
Current Range: 2-4 Amperes
Power: 25w @75°C
Working Temparature: -40°C to 150°C
Board Compatibility: Arduino Uno
Motor Outputs: 2 Motors (Left & Right)
Possible Robot Movements: Left, Right, Forward, Backward & etc..
PWM Pins: [12&11] [6&5]
The PCB layout is my original design, it was created using Fritzing Software, please ask for permission if anyone is willing to modify and republish it.
This Instructable is dedicated to the: DB Makati ROBOTICS Team
(Merry Christmas & A Happy New Year!!)
Here’s A Video Of My Sumobot Containing The DIY L298N Motor Driver Circuit:
Step 1: Parts & Materials
– L298N Motor Driver Chip
– 7806 Regulator Chip
– 1N4937 Fast Recovery Diode
– 1 Ohm ¼ watt Resistor
– Screw Terminal Blocks
– PCB Board (Regular or Photo-positive)
– Male or Female Pins (Used to connect to Arduino)
– Heatsink (Bought or DIY)
7806 Regulator Chip = (Substitute: 7805- 7809)
1 Ohm ¼ watt Resistor = (Substitute: Up to 10 Ohms)
1N4937 Fast Recovery Diode = (Substitute: 1N4007 or 4148)
Step 2: PCB Making
In making the photo-positive PCB, it’s better to stay in a dark area and have a 10W fluorescent lamp beside you, also use a kitchen timer to set a 5 minute alarm for counting the exposure time.
Step 3: Soldering The Parts
The 7806 regulator chip was also bent for the whole circuit to fit in my robot. Since I could not find a heat sink that was thin and small enough for the whole circuit to fit, I made my own heat sink by using a small sheet of metal .
Almost everything is uniform in values. The diodes are all the same, and also the resistors.
Step 4: Installation Of Motor Driver
Anyways, the motor outputs doesn’t have a label of polarity, it’s all about your codes, it has a reverse function, that’s why the output polarity is interchangeable.
For the power, the left side of the terminal block is the positive and the right is the negative. There’s no need for connecting a power cable to your Arduino since the 6v regulated power supply of the Motor driver circuit is connected to the “vin” pin of your Arduino board. The power input should now be connected to your Motor Driver circuit instead of the Arduino’s DC Jack.
Step 5: Testing Your Motor Driver (Programming & Codes)
Here’s an Arduino code used to TEST the motor driver circuit. There are two options, it’s either your copy and paste it or just download the Arduino file below, please do not remove the file from the folder after extracting, since the file will corrupt.
Movements After Observing:
1st.) Forward Clockwise Motor Movement (slow)
2nd.) Forward Clockwise Motor Movement (medium)
3rd.) Forward Clockwise Motor Movement (fast)
4th.) Complete Stop
5th.) Reverse Counter-clockwise Motor Movement (medium)
For more detail: DIY Arduino Motor Shield [for only $8!] (L298N 2x4A)
JLCPCB – Prototype 10 PCBs for $2 + 2 days Lead Time
China’s Largest PCB Prototype Enterprise, 300,000+ Customers & 10,000+ Online Orders Per Day
Inside a huge PCB factory: https://www.youtube.com/watch?v=_XCznQFV-Mw