Arduino L298 Motor Shield


Introduction: Arduino L298 Motor Shield

About: I am a 21 year old DIY ist and Tinkerer with a deep interest in the field of robotics, electronic and cooking. I am skilled in wood and metal work as well. I work in my basement workshop and i am mostly scra...

This is my version of a cheap and diy arduino motor shield. It is very simple and rugged. Credit goes to Ascas for the design.

Voltage = 5 - 50 V
Current = 2 - 3 A
Maximum two motors
Speed and direction control for both
Arduino compatible

This is my Facebook page. Please like and share

Step 1: Parts

You will need:

1 x L298 Motor Driver
1 x Veroboard
1 x Male Header Strip
1 x Female Header Strip
8 x 1N4007 Diodes
3 x Block connectors
2 x Indicator Led
2 x Led Resistor
2 x 1 Ohm Resistor
Jumper Wire

You will also need basic soldering tools and some soldering skills

Step 2: Schematic

This is the schematic and again credit to Ascas. Pin out for the motor driver is also given

Step 3: Step 1

You will start off by cutting your vero board to the arduino size. Sand down the sides for a neat finish. Start off by soldering the female headers, the L298 and the block connectors as shown 

Step 4: Step 2

Next step is to solder the male headers below the female ones to make it a shield type thing. You could buy the arduino headers to make the project prettier and more sturdy but i found them to be expensive. The best way is to insert the male header in the arduino I/O pins and align the shield on top of it. Use tape to secure it and then solder away. 

Step 5: Step 3

Next is to make the power and other connections along with adding the diodes. Follow the schematic and add the two resistors as well. 

Step 6: Step 4

Next is to add the led and resistors along with it. Here one option is to add a LM7805 so that you could power the arduino with the the power only to the shield but for my application i didnt need that so i went with separate power supply. I also made connections to the arduino PWM pins. 

Step 7: Test It

You are all done and next is to test it out. 

Use the following code 

int outPin = 5;
int outPin2 = 6;
int outPin4 = 10;
int outPin3 = 11;
void setup()
Serial.begin(9600); // setup serial
pinMode(outPin, OUTPUT);
pinMode(outPin2, OUTPUT);
pinMode(outPin3, OUTPUT);
pinMode(outPin4, OUTPUT);
void loop()
analogWrite(outPin, 50);
digitalWrite(outPin2, LOW);
analogWrite(outPin3, 50);
digitalWrite(outPin4, LOW);
Serial.print(" ");
analogWrite(outPin, 150);
digitalWrite(outPin2, LOW);
analogWrite(outPin3, 150);
digitalWrite(outPin4, LOW);
Serial.print(" ");
analogWrite(outPin, 255);
digitalWrite(outPin2, LOW);
analogWrite(outPin3, 255);
digitalWrite(outPin4, LOW);
Serial.print(" ");
analogWrite(outPin, 0);
digitalWrite(outPin2, LOW);
analogWrite(outPin3, 0);
digitalWrite(outPin4, LOW);
Serial.print(" ");
analogWrite(outPin2, 100);
digitalWrite(outPin, LOW);
analogWrite(outPin4, 100);
digitalWrite(outPin3, LOW);
Serial.print(" ");
analogWrite(outPin, 0);
digitalWrite(outPin2, LOW);
analogWrite(outPin3, 0);
digitalWrite(outPin4, LOW);
Serial.print(" ");

Step 8: Conclusion

I used this shield to make LINUS my line following robot which i will upload soon and it worked great. I put it through endurance and it stood up to the challenge although a good heat sink is essential. Thank you for viewing and i hope i effectively communicated my build. 

Th schematic is very simple but still if you have issues, double check your connections. Using a multimeter always helps :P



    • Clocks Contest

      Clocks Contest
    • Creative Misuse Contest

      Creative Misuse Contest
    • Oil Contest

      Oil Contest

    9 Discussions


    1 year ago

    Nice work! I will try a similar project but with two servos addition. Hope it will work fine :)

    is it okay if i used 1.1ohm? i only found it scavenging old TVs i guess...

    Good work. Some months ago I did a similar project to control motors using arduino. I suggest you to use fast diodes like schottky.

    Would it be possible to post a schematic on how to solder this, I'm kinda new to this stuff.