Pages: [1]   Go Down
Author Topic: Change Direction of a dc Motor  (Read 2503 times)
0 Members and 2 Guests are viewing this topic.
Offline Offline
Newbie
*
Karma: 0
Posts: 4
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I am new to Arduino and was wondering if it was possible to change the direction of a dc motor without having to switch the positive and negative wires. At the moment I have the + wire in a digital pin and the - wire in ground.

Thanks, tranoxx
Logged

0
Offline Offline
Faraday Member
**
Karma: 13
Posts: 2857
ruggedcircuits.com
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

The typical method of achieving direction control over a DC motor is called an "H-bridge". There are several motor shields for the Arduino (including ours) that simplify this, or you can build one yourself on a breadboard using a device like an L293D or 754410.

Also, you should not connect motors directly to Arduino pins. They will generally draw too much current for the Arduino and can damage it.

--
The Ruggeduino: compatible with Arduino UNO, 24V operation, all I/O's fused and protected
Logged

0
Offline Offline
Shannon Member
****
Karma: 162
Posts: 10520
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Not only will a motor draw too much current from an Arduino pin and risk burning it out, it could generate high voltage spikes that destroy semiconductor devices.  Look at the tutorials for driving motors and follow the advice.
Logged

[ I won't respond to messages, use the forum please ]

0
Offline Offline
Tesla Member
***
Karma: 118
Posts: 8962
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Below are previous post concerning h-bridges.

http://www.google.com/search?q=h-bridge+site%3Ahttp%3A%2F%2Farduino.cc%2Fforum%2Findex.php&hl=en&num=100&lr=&ft=i&cr=&safe=images&tbs=
Logged

Consider the daffodil. And while you're doing that, I'll be over here, looking through your stuff.   smiley-cool

Manchester (England England)
Online Online
Brattain Member
*****
Karma: 514
Posts: 31556
Solder is electric glue
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

See this about controlling motors:-
http://www.thebox.myzen.co.uk/Workshop/Motors_1.html
and
http://www.thebox.myzen.co.uk/Workshop/Motors_2.html
Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 4
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Also, is it possible to change the current output from the Arduino and also able to put out negative current, eg -2.5v?
Thanks to everyone for the info.
« Last Edit: June 17, 2011, 07:53:19 am by tranoxx » Logged

Manchester (England England)
Online Online
Brattain Member
*****
Karma: 514
Posts: 31556
Solder is electric glue
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

No the arduino will only give out 0 and 5V. Like any other processor.
Logged

Pages: [1]   Go Up
Jump to: