Hi, I am new to Arduino so hopefully an easy question, I am trying to get a stepper motor (5v 5wire s/m + ULN2003) to run as follows - press momentary button - motor runs for x amount of revolutions c/wise and stops - then press the same button (or another button) which sends the motor cc/w the same amount of revolutions and stops until the button (s) is/are pressed again, any sketch or info would be very much appreciated. Clive.
Which Arduino? How are your button(s) wired to the Arduino? How is the ULN2003 wired to the Arduino? How are you powering the 28BYJ-48?
Great Start! Arduinos are designed for experimentation and learning. They are often used with breadboards where loose wires, can become unreliable if vibrated. They are not built for harsh, dirty, or electrically noisy environments commonly found in industrial, automotive, or other commercial applications, making them unsuitable for such settings.
To ensure we can provide the most accurate assistance, please include detailed information about your setup. Specify the exact board, shield, wiring configuration, and power sources you are using. An annotated schematic is ideal, as it provides a clear overview of your setup, but be sure to also include links to the technical specifications of your hardware components.
Before posting your code, please review the forum guidelines How to get the best out of this forum and use code tags for better readability. Also, provide links to the technical information about your hardware, and include a preliminary schematic that shows all power, ground, and connections. For additional guidance, you can refer to this link: Useful Links and Tutorials. Note that in this context, breadboard diagrams are not considered proper schematics.
Hi thanks for the reply, I am using a UNO board & I'm thinking 12v dc to the UNO and running the motor from the 5v & gnd line to the driver, buttons...not sure about hence my post. Cheers Clive
Very bad idea. Never think of Arduino 5 volt pins supplying power. The onboard 5 volt converter will get overheated, close down or pop.
Listen to @Railroader, you need a separate 6V, at least 500mA supply for the ULN / 28BYJ-48, a 4 pack of AA batteries would work for a while, a 5 or 6V "wall wart" would be better.
Thanks. Hopefully we, the OP included, are closing in for a solution.
Thanks for the replies, would a 5v external power supply power the Uno as well, don't fancy two psu's on my project. Cheers Clive
If you power the UNO from the barrel jack or VIN pin with 12V, the built in voltage regulator reduces the voltage from 12 to 5 for the processor and the 5V pin to power external loads like sensors powered from the 5V pin or loads connected to output pins. The voltage regulator has a power rating of about 1 watt. The motor windings have a resistance of about 25 Ohms from each coil wire to the common red wire, so with 5V across the coil, 0.2Amps (200 mA) will flow. Now, if the regulator is dropping 7V (12 - 5) and the current flow is 0.2 Amps, the regulator must dissipate 7 * 0.2 = 1.4 Watts. See the problem?
If you want to risk blowing your UNO, we can't stop you , only give fair warning. Good luck.
If you power the Uno R3 through the USB socket with a 5volt cellphone charger, then you can safely power one 28BYJ-48 from the 5volt pin, because powering via the USB socket will bypass the 5volt regulator. Those motors draw about 350mA.
Leo..
Great advice thanks guys, regards Clive.
This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.