Home

About

3Drag
3DPrinter

Projects

Contacts

Submit!

Store

Home

About

3Drag
3DPrinter

Projects

Contacts

Submit!

Store

Don't miss

Red
Pitaya: the opensource electronic laboratoryPosted 2 days ago

A
Robotic lawn mower powered by Solar Energy with an Arduino heartPosted 3 weeks ago

Exclusive
interview: Pete Lomas, co-founder of Raspberry Pi on Mission, Openness,
CommunitiesPosted 3 weeks ago

The
perfect Remote, Programmable, Controller for interactive LED stripsPosted 1 month ago

3Drag
contest relaunchedPosted 1 month ago

Print
flex filaments with 3Drag/K8200Posted 1 month
ago

Interview to
Open TronsPosted 1 month ago

An
Easy and Customizable Arduino powered Weather Station connected with
XivelyPosted 2 months ago

Internet
Radio with Raspberry PiPosted 2 months
ago

A
Great I/O expansion Shield for RaspberryPi based on I2CPosted
2 months ago

Home
>   Products
>   Arduino Motor
Shield

Arduino Motor Shield

By Boris Landoni on June 25, 2011

Tweet

Pin It

Tweet

Pin It

We are not the first to make an Motor Shield for
Arduino.  But could be that we are the first that make a Motor Shield with
a minimum of flexibility.

We are studing a WiFi robot with camera controlled by Arduino. The robot will
be controlled by browser. But we find a problem with an existing shield: the pin
SPI to controll Ethernet shield (that become WiFi shield) are the same of motor
shield.
So we reengineered the Motor Shield and we allow to user the
choice of what pin use to drive the L298. Infact we provided some jumper to
select the pin to use.

But the schematic is more clear…

The Motor Shield schematics

The main power can be selected by a jumper: if the
motors work at 12V and the current is less than 1A you can chose the VIN input
(INT) and power the Arduino with a 12V, else if the motors work higher than 12V
you must chose the EXT input anche connect the power to PWR screw.

The core of the project is a L298 H-Bridge, a motor
driver with this caracteristics:

We chose the SMD version of L298 because is also
simple to solder, but the profile is lower than the traditional version, so
other shield could be mounted without problem.

The main power is transferred to the
analog input A5 through a voltage divider (R9 and R10) to reduce the
voltage on A5. This can be useful e.g. for all the application that use a
battery (like our WiFi robot).
With the jumper DIRA and DIRB  the user
select the direction of the motor A and B.
The speed is controlled by PWMA
and PWMB. All the pins conneted to these jumpers are obviously PWM pins.
The
LD1 and LD2 are special leds that light on red or green in function of
directions.

With this shield the user can also drive a step
motor without problem.

Part list

[code]

R1: 4,7 kohm
R2: 10 kohm
R3: 4,7 kohm
R4: 4,7 kohm
R5: 10
kohm
R6: 4,7 kohm
R7: 1 kohm
R8: 1 kohm
R9: 100 kohm
R10: 10
kohm
C1: 100 nF 100
C2: 100 µF 63 VL
C3: 22 µF 35 VL
U1: L298P

LD1: Led 5 mm R/G (L-57EGW)
LD2: Led 5 mm R/G (L-57EGW)
D1: 1N5819
D2:
1N5819
D3: 1N5819
D4: 1N5819
D5: 1N5819
D6: 1N5819
D7: 1N5819

D8: 1N5819
T1: BC547
T2: BC547
screw 2 via (3 pz.)
Strip male 3 via
(9 pz.)
Jumper (5 pz.)
Strip M/F 6 via (2 pz.)
Strip M/F 8 via (2
pz.)
PCB

[/code]

Code

This code originaly is used to drive the Sparkfun’s
motor shield.

I modified only the pins used to drive the L298. If
you need you can chose other pin with the jumper and modify the sketch.

/*
10-5-10
Pete Dokter
SparkFun Electronics
*/

int pwm_a = 3; //PWM control for motor outputs 1 and 2 is on digital pin 3 (or 5,6)
int pwm_b = 9; //PWM control for motor outputs 3 and 4 is on digital pin 9 (or 10,11)
int dir_a = 2; //direction control for motor outputs 1 and 2 is on digital pin 2 (or 4,7)
int dir_b = 8; //direction control for motor outputs 3 and 4 is on digital pin 8 (or 12,13)

void setup()
{
pinMode(pwm_a, OUTPUT); //Set control pins to be outputs
pinMode(pwm_b, OUTPUT);
pinMode(dir_a, OUTPUT);
pinMode(dir_b, OUTPUT);

analogWrite(pwm_a, 100); //set both motors to run at (100/255 = 39)% duty cycle (slow)
analogWrite(pwm_b, 100);

}

void loop()
{
digitalWrite(dir_a, LOW); //Set motor direction, 1 low, 2 high
digitalWrite(dir_b, LOW); //Set motor direction, 3 high, 4 low

delay(1000);

analogWrite(pwm_a, 255); //set both motors to run at 100% duty cycle (fast)
analogWrite(pwm_b, 255);

delay(1000);

digitalWrite(dir_a, HIGH); //Reverse motor direction, 1 high, 2 low
digitalWrite(dir_b, HIGH); //Reverse motor direction, 3 low, 4 high

delay(1000);

analogWrite(pwm_a, 100); //set both motors to run at (100/255 = 39)% duty cycle
analogWrite(pwm_b, 100);

delay(1000);
}

Design

ArduinoArduino ShieldMotor shield

About Boris Landoni
Boris Landoni is the technical manager of
Open-Electronics.org. Skilled in the GSM field, embraces the Open Source
philosophy and its projects are available to the community.

Related Posts

A
Robotic lawn mower powered by Solar Energy with an Arduino heart

A
Robotic lawn mower powered by Solar Energy with an Arduino heart

An
Easy and Customizable Arduino powered Weather Station connected with
Xively

An
Easy and Customizable Arduino powered Weather Station connected with
Xively

Adding
telemetry to OpenWheels and feel like a PRO

Adding
telemetry to OpenWheels and feel like a PRO

Welcome
the Open Source Wireless Inventors Shield for Arduino

Welcome
the Open Source Wireless Inventors Shield for Arduino

Opinions

Open Hardware Summit 2014 Rome: From Making Open to Open
Manufacturing

It’s already several years that we talk about open source...

Posted 3 months ago

2

Open Source boats: the opportunity to build a foundation

Here at Open Electronics we are big fans of sailing....

Posted 4 months ago

3

Why choose to be Open Source in the Hardware Industry

These days I’m thinking a lot about what’s the meaning...

Posted 5 months ago

7

How to start a Fab Lab: some tips and tricks

Building a Fab Lab can be funny, and can be...

Posted 6 months ago

3

Open Compute Project: open design applied to data centers

Have you ever thought about what would happen if data...

Posted 6 months ago

0

A Look into the Open Source Hardware Community

AS you may know, just few weeks ago OSHWA published...

Posted 6 months ago

4

3Drag/K8200 is the second best selling desktop 3D printer

As you may probably figure out we recently attended CES...

Posted 6 months ago

1

Tutorials

Welcome OpenWheels the Open Source personal vehicle inspired by
the Segway

(This is the second post of the OpenWheels series....

Posted 4 months ago

14

Press a button and Send a Tweet thanks to Arduino YÚN

After the Yun presentation post, we are going to present...

Posted 9 months ago

2

How to design and 3D print a Case for an electronic board

As you probably know if you have one, the overall...

Posted 10 months ago

3

A Bunch of Cool Prints To Experiment With Your 3DPrinter

After countless hours of playing with 3Drag (now with a lower...

Posted 1 year ago

1

Mods and
Hacks

Open Source wearable platforms: time for your own gadgets

When I think about the world that we are now...

Posted 4 months ago

2

3Drag K8200: the most amazing Mods and Hacks

Some weeks ago we launched our contest to see what...

Posted 4 months ago

1

Raspberry Pi as an Audio/Media Center: the best Linux
distros

Probably, the best use you could do with a Raspberry...

Posted 5 months ago

6

Arduino Yún: the best hacks you will ever see

The last time I wrote about the best hacks available...

Posted 5 months ago

6

Login

Username

Password

Remember Me

Register|
Forgot Password?

Popular

Latest

Comments

Arduino
GSM shield

...

Posted 3 years ago

199

Arduino
ISP (In System Programming) and stand-alone circuits

We use an Arduino to program other ATmega without...

Posted 2 years ago

158

Localizer
with SIM908 module

The device is based on a GSM/GPRS module with...

Posted 2 years ago

145

GSM
GPS shield for Arduino

Shield for Arduino designed and based on the module...

Posted 2 years ago

143

Small
Breakout for SIM900 GSM Module

Some post ago we presented a PCB to mount...

Posted 3 years ago

99

Open
Source Hardware market worth $1billion by 2015 (50M$ in 2013)

According to to Phil Torrone, designer at Adafruit
industries the...

Posted 13 hours ago

0

MatterMachine
is the tool for Parametric Design

An incredible new tool I’ve found online: this parametric...

Posted 1 day ago

0

Red
Pitaya: the opensource electronic laboratory

Here we present a tool to measure and acquire...

Posted 2 days ago

1

A
Low-Cost, Open Source LiDAR (autonomous vehicles)

An interesting project is rising funds on kickstarter: a...

Posted 2 days ago

0

If
you still don’t know Solar Pocket Factory that’s why you should

This project really hit the news earlier on this...

Posted 3 days ago

0

Bertrand says:

Hi
Boris, Congrats for this huge job. I am ex...

BorisLandoni says:

Our
GSm shield is for 5V Arduino...

BorisLandoni says:

To
obtain a perfectly flat surface...

BorisLandoni says:

The
shield is for 5V arduino, you havt tho re...

BorisLandoni says:

I
suggest you to use the shield http://www.op...

ADV

Categories
Select
Category Featured
Gadgets Guest Posts Interviews Meet the
Founders Mods and Hacks
News Open Source Projects Opinions Product
launch Products
senza categoria Tutorials

Sponsors

http://www.open-electronics.org/contacts/

About us

Open Source Electronicsis the brainchild of a world leader in hobby
electronics Futura Group srl.
Open Source Electronics is
devoted to support development, hacking and playing with electronics: we share
exciting open projects and create amazing products!

Open Source Electronics is not just a container of ideas: it is also a
web site lead by a team of engineers and geeks who will take part in the
discussions and give support.

Our mission is to become a reference Open Source hacking site with
ideas and feedback aimed to enrich the community.

License

The Articles you can find on Open Electonics are
licensed under a Creative
Commons Attribution-NonCommercial-ShareAlike 3.0 Unported License. Where not
specified differently, design files and source code are instead provided
according to a Creative
Commons Attribution-ShareAlike 4.0 Unported License.

Explore tags

3D 3dprinting
3drag
Android
Arduino
Arduino
Shield Breakout for
SIM900 crowdfunding design
diy
GSM
GSM/GPRS
GSM
Localizer GSM remote
control GSM shield hacking
homefeatured
indiegogo
innovation
instructables
iot
italy
kickstarter
Maker
maker
faire makers mods
newsline
open
design open hardware opensource
open
source open source
hardware opensource
hardware OSHW raspberrypi
Remote
control Remote
localizer Robot Schematic
SIM900
Temperature
Control Tip & tricks Tutorials
wearable

Home

About

3Drag
3DPrinter

Projects

Contacts

Submit!

Store

Copyright © 2014 Open Electronics