*SOLVED* How to reverse a 5 volt motor

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? :cold_sweat:

Do I need a stepper motor shield? :~

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

Look at a part like this

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.

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 :stuck_out_tongue:
Will draw hardly any amps :slight_smile:

As for your idea with a relay, would a one shot 555 timer work?
I would rather something programmable :confused:

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

lol. Nice diagram :wink:

Underload, I am using 0.28 Amps.

PERFECT.

Just what I was after.

Thank you :slight_smile: