Instructables

DIY Arduino Motor Shield [for only $8!] (L298N 2x4A)

Featured
Picture of DIY Arduino Motor Shield [for only $8!] (L298N 2x4A)
IMG_1334 - Copy.JPG
IMG_1275.JPG
IMG_1277.JPG
IMG_1276.JPG
MotorShield_R3_Front_450px.jpg
Today, I'm going to show you how to make an Arduino motor shield (driver) at a low cost. It works splendidly, its posses almost all the characteristics of the original Arduino motor shield. It's almost considered as a clone. The original Arduino motor shield has the same motor driver chip (L298), the only difference with it, is the package type, my project contains the vertical version of the chip L298 (with a "N").

Structure:
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.

Cost:
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. 

About The Guide:
The guide includes the datasheet, schematic diagram, PCB layout, Arduino test files and etc.... All you need is an hour and the 6 step instructable.

Specs:
____________________________________________________
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 Softwareplease 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:

 
Remove these adsRemove these ads by Signing Up
First of all, thank you for the great instructable!!
Unfortunately, I have a problem- my motor shield only drives the motor when the usb cable of the arduino is connected. I really can't understand why this is happening.. Can you think of a possible reason?
ASCAS (author)  Bozhidar Evdokimov10 months ago
That happened to me several times, I also felt frustration before, but I solved the problem. I manufactured 10 of these shields for the school. Be sure to read my instructions below thoroughly, and inspect your PCB carefully!

1st.) Power source should be connected to the Motor shield
2nd.) You forgot to solder the 7805 regulator chip
3rd.) The 7805 Regulator's pins aren't connected properly
4th.) You forgot a jumper (the short one in the lower right)
5th.) There's a broken line in your PCB

If this doesn't work try to contact me again. Thanks!



Hi, excellent instructable.
If you put a silicon diode (1N4001) in forward mode between pin 2 of 7805 and ground you will have aprox 5.7 volts at the output pin.

Regards
ASCAS (author)  fespósito11 year ago
I'm not sure. I only use the circuit with PWM pins coming from the Arduino. Probably it will work, but i don't think the output pin will retain the voltage from the input pin.
james.m.k1 year ago
Very cool!
diy_bloke1 year ago
Indeed I was impressed by your heat sink
Very interesting instuctable. I was surprised how well your pcb came out. All the ones I make turn out rubbish! Any special tricks? :) Thank you again and ill be reading this in depth later!
I print only one time on glossy paper. Transfer that to a clean piece of copper pertinax board, put a hot iron ont for 3 min, then use the point of the iron to really press down the edges and then throw it in water and rub off the paper.
Etching in HCl H2O2. No real problems
ASCAS (author)  tboultwood11 year ago
Thanks! The trick is in the toner ink transfer method is to use a sheet of acetate then, over lap them three times :)))
you mean print it 3 times on the same sheet?
diy_bloke1 year ago
looks great!!
Did not know Alexan. May come in handy
ajoyraman1 year ago
Great Instructable for the Robotics Community !
fretted1 year ago
Merry Christmas to you as well and a most prosperous new year

Great Ible well done
ishan55316 days ago

can we use it for ur Phone Controlled FPV Rover (Fast & Agile) project

ASCAS (author)  ishan55314 days ago

Yes and I mentioned it clearly in the FPV Rover instructable.

ishan553 ASCAS13 days ago

sorry i asked this before reading the other lible

Hi. The L298N schematic what are the inputs for pin 12, 10, 7, 5(inputs 4, 3, 2, 1)?

ASCAS (author)  andromeda202014 days ago

It should be connected to the Arduino's PWM pin.

enguilo22 days ago

I could provide circuit diagrams for sensors and motors, help me please, thanks you, great instructable

ASCAS (author)  enguilo22 days ago

No need, there's a schematic diagram above. What can I help you with?

enguilo ASCAS18 days ago

Ok but what did you use to power circuit and motor circut to connect ultrasonic sensors, see what happens q bakelite and there are many circuits of these, thanks!

ASCAS (author)  enguilo18 days ago

It looks like you're new to Arduino :| You have to learn the basics of Arduino before attempting this project. Here's a great tutorial: Beginner Arduino

dpineda328 days ago

I am kind of confused about the bottom part since Im a newbie in electronics. you see, you made the top part which is the clone wbout the bottom part where the clonse is sitting on?, did you buy it or did you also made it?

I have soldered the circuit but I am getting two pins shorted on the L298N IC when tested using multimeter. Please help

THANK YOU !!

kberce1 month ago
Hello. I have one question. Current range is from 2 to 4 Amps. Is this for one motor or both? Because i have two 3.3A motors. If not, is there any way to modify the motordriver for higher current?
akusalewicz made it!1 month ago

Hey, congrats on your great instructable!
Could you please tell me, if there should be connection between paths as shown in the attached image(green colour)? Without any modification, the circuit is open for right motor. Greetings! :)

circuit.jpg
ASCAS (author)  akusalewicz1 month ago

Thanks!

Yup, there should be a line there but it doesn't really matter since the other pin is for wider screw posts. You can just connect the gap with lead.

Amgaa978 months ago
Can i use it for my tamiya double gearbox? with 4xAA NiHM batteries for motor supply?
ASCAS (author)  Amgaa978 months ago
Yes! I used it with my SUMOBOT, it also has a tamiya twin gearbox installed.
Here: http://www.instructables.com/id/My-Mini-Sumobot-500g-Prototype/
jumezurike ASCAS3 months ago

How do I know the shield works .... Is it possible to figure that out
without hooking it up to the Arduino uno. One more thing my shield was
flipped during etching I hope that won't affect the operation of the IC
as far as the architecture it is the opposite of yours. Another thing is
that the 5v battery is not able to power this thing up. Let me know
what you think. be nice be nice

jumezurike3 months ago

The lines for the schematics are too thin I tried this with the transparent (screen printing paper). Is it possible you can make the schematic lines thicker including the little pin holes it is not easy getting the hole to go through. Thanks. If you can adjust the PCB schematics I will really appreciate it.

ASCAS (author)  jumezurike3 months ago

I'm working on a version 2.0, I'll post the guide around March. Hang in there for a while. The new guide will answer your problem. (version 2.0 = 40mm lines)

jumezurike3 months ago
I am confused a little here. I got this all figured out except the fact that I have L293D instead of L298N. How can I modify this on your PCB design to get a good result? L293D has 16 pins while L298N has 15 pins. Will this affect anything at all? If the answer is no then let me know how to put the l293d IC on the board. Thanks.
Is it possible to make it compatible with Arduino mega 2560 v3?
jumezurike3 months ago
Ok here is the problem I don't have L298N but I got L293D. Is it possible to get a modified version of the schematic in order to build this right?
ASCAS (author)  jumezurike3 months ago
I'm not sure about the L298D. As far as I know, the "D" was released in year 2000. I think it's the discontinued version of the L298 series.

I would recommend doing a search for the L298D's datasheet, you would find the schematics there.
jumezurike ASCAS3 months ago
Can I use the L293D : It won't require a heat sink. It is more as it is a quad channels as opposed to 2 channels H-bridge in L298D. So can you give me the
direction on how to use this for the shield. I will need to modify the Eagle schematic for the PCB.
ilaoutid3 months ago
a big hug from Morocco ! perfect instructable, i just want to ask before starting to make the controller. i want to know if it can run an actuator up to 36V.
thank's again ! i came 11months after the last comment hoping i'll get mine :)
davemaster5 months ago
eXCELLENT...
das12334445 months ago
nice job dude....its a nice project and i loved it...i have one problem...can you give me the eagle diagram of this arduino motor shield??because the diagram that u gave is very large and so i want accurate position of those chip on the board so that i can print it by my printer and can do etching...so please help me!!!!!!!!!!!!!!!!!
Pro

Get More Out of Instructables

Already have an Account?

close

PDF Downloads
As a Pro member, you will gain access to download any Instructable in the PDF format. You also have the ability to customize your PDF download.

Upgrade to Pro today!