Greetings,
I am building a miniature castle (1/64 scale). I want to raise and lower a drawbridge and also illuminate some LED's inside the main structure and tower using a push button input on my Arduino Uno.
My question is how do I reverse the rotation of the motor? (to lower the bridge) Can I do this with code or do I need to go through a DPDT relay to reverse the polarity?
Any help would be greatly appreciated
G
You should be able to do it in code. What driver are you using? Some of them have a separate input to take one reverse step.
I will use a ULN2003 Driver if I have to. However I didn't think I needed a driver, as the Arduino will act as the driver. Or am I wrong about that?
You can connect only the very tiniest of motors directly to the Arduino output (strictly obeying the 20 mA maximum current on each pin) and even in that case you must have protection diodes and current-limiting resistors or you will destroy the Arduino. In general, count on using a motor driver and a separate power supply for the motor.
Stepping motors "step" in a direction that is specified by the order in which the (2 or 4) individual windings are activated.
If you want more informed advice about your project, post a link to the actual motor you will be using (or its data sheet).
Well, I suppose you could make an H bridge out of transistors of use an H bridge IC or something.but the arduino can't directly drive steppers that I know of.
Servos are generally easier to drive(They have 3 pins, two to power it and one that goes directly to the arduino) and much much cheaper, but I think the cheap servos might make slightly more noise than a stepper. Look on youtube?
Here is a link to the motor I want to use.
http://www.amazon.com/gp/product/B00DUSYEWY/ref=oh_details_o00_s00_i00?ie=UTF8&psc=1
You don't need a stepper motor to raise a drawbridge. A small hobby servo (as used in model aircraft) will do the job more easily - easier to install and easier to control with an Arduino.
...R
With that motor you simply reverse the sequence of coil switchings to reverse the motor direction.
Over in the motors section of the forum, we've been waiting for someone to come up with a project for this cute little stepper. MarkT even kindly provided a board layout for direct drive from the Arduino! Could this finally be the awesome app?
http://forum.arduino.cc/index.php?topic=212653.0

That motor would be perfect for many applications in table top/war gaming terrain. And for buildings, bridges, gates, portcullis, water wheels, windmills, etc...The possibilities are limitless. And the very small size is very easy to hide...
Thanks for sharing the link.