Pages: [1]   Go Down
Author Topic: *SOLVED* How to reverse a 5 volt motor  (Read 1783 times)
0 Members and 1 Guest are viewing this topic.
Offline Offline
Newbie
*
Karma: 0
Posts: 15
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Hi. I am somewhat confused around this.

I have a 5 volt motor. DC.
I need to reverse the motor when it detect a HIGH signal,
and run it normal (forward) when it detects a LOW signal.

How would I do this on my Arduino Uno? smiley-roll-sweat

Do I need a stepper motor shield? smiley-confuse
« Last Edit: September 19, 2011, 07:32:08 pm by Haunted360 » Logged

New Jersey
Offline Offline
Faraday Member
**
Karma: 65
Posts: 3638
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Not a stepper motor driver, but a motor driver of some sort - search the forum for H-bridge
Logged

Global Moderator
Boston area, metrowest
Online Online
Brattain Member
*****
Karma: 514
Posts: 26260
Author of "Arduino for Teens". Available for Design & Build services. Now with Unlimited Eagle board sizes!
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Look at a part like this
http://www.ti.com/lit/ds/symlink/l293d.pdf
It uses transistors to basically switch the motor leads from +supply/gnd for current flow in one direction, to gnd/+supply for current flow the other direction to make the motor spin the other direction.
Depending on how big your motor is, what voltage/current is required, you may be able to use this part, or find a beefier part, or use discrete transistors with a chip like this to drive/control the transistors.  You may be able to use an existing motor shield for this.

What will the source for your HIGH/LOW signal? Reading that from a digital pin is usually the easist part of the project, such as from a mechanical switch.
Logged

Designing & building electrical circuits for over 25 years. Check out the ATMega1284P based Bobuino and other '328P & '1284P creations & offerings at  www.crossroadsfencing.com/BobuinoRev17.
Arduino for Teens available at Amazon.com.

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

Thanks!

The HIGH and LOW are sensors for the where abouts of a disc. It is for a CD-ROM drive.


Here is the somewhat basic logic:

If sensor 1 detects disc, forward motor.
if sensor 2 detects disc, disc loaded. stop motor.

if button pressed, reverse motor.
if sensor 1 does not detect disc, stop motor.

(there are some else's and stuff missing, but you get the idea).


Oh. The motor is some cheep tiny little thing. Like a small CD-ROM motor basically smiley-razz
Will draw hardly any amps smiley


As for your idea with a relay, would a one shot 555 timer work?
I would rather something programmable :/
« Last Edit: September 19, 2011, 11:50:13 am by Haunted360 » Logged

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

So you want forward/stop/reverse control based on inputs from several transducers. Yes, that would require a micro-controller and an H-bridge, (or a transistor and a relay).  But a simple H-bridge can be constructed from four jelly-bean transistors and is quite a simple circuit.

Would you have a link for me to make the circuit?

Or, would I just use the Arduino and the H-bridge ( http://www.ti.com/lit/ds/symlink/l293d.pdf )??

I am new to this, so no0b based information would be easier to understand.
« Last Edit: September 19, 2011, 05:54:32 pm by Haunted360 » Logged

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

lol. Nice diagram smiley-wink

Underload, I am using 0.28 Amps.
« Last Edit: September 19, 2011, 05:59:06 pm by Haunted360 » Logged

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

PERFECT.

Just what I was after.

Thank you smiley-kitty
Logged

Pages: [1]   Go Up
Jump to: