I'm trying to make a CNC machine with an Arduino Uno and 3 stepper motors. I plan on powering the Arduino with USB, but I need a 5v power supply for the 3 stepper motor microcontrollers. I couldn't find a 5v wall adaptor at any nearby store, and was hoping a USB could suffice as I don't want to wait for shipping.

Researching online it seems that there may be voltage spikes that could possibly damage the microcontrollers when powered via usb. Is this something I need to worry about? Do I really need to use a capacitor? This is my first electrical engineering project, so I apologize if this is common knowledge.

Hopefully this diagram clarifies how I'm assembling this machine:

The power would be coming from the far right (red is power, black is ground).

The specific drivers I am using are the easy stepper motor drivers, and the specs can be found here: https://learn.sparkfun.com/tutorials/easy-driver-hook-up-guide

But it is indicated that it works in a 5v system.

  • \$\begingroup\$ @Tom it seems that the stepper has a separate controller voltage and a motor voltage input, I'm assuming from the phrasing. \$\endgroup\$
    – Passerby
    Commented Jul 26, 2016 at 2:11
  • \$\begingroup\$ @TomCarpenter I don't think he means the steppers themselves, I think he means the chip logics. A4988's? \$\endgroup\$
    – dpdt
    Commented Jul 26, 2016 at 2:12

2 Answers 2



What you are asking makes no sense. The Easy Driver already has its own 5V source which is regulated down from the voltage you provide to drive the stepper, which MUST be between 6V and 30V, and at least 2A, according to the Easy Driver page. I would recommend 20-24V: with current limited drivers, the higher the voltage, the better. However, this also renders your board vulnerable to LC voltage spikes which, if they go over the maximum 30V, can instantly destroy your board. While it has a 47uF decoupling cap across Vin and GND, I would recommend that you supplement this with an electrolytic of 100uF or more.

When the product page says it works on 3.3V or 5V, it means the logic signals from your Arduino, NOT the motors supply voltage.

All this below is useless, as the board does not have a 5V logic input, but kept for historical reasons.

My guess is you're using A4988 drivers from Pololu.

If, as I assume, you are ONLY powering the stepper motor driver logic power supplies, then you can run it off of the 5V USB line.

You are correct, though, that there are noise problems with USB's. While I doubt that the spikes are enough to harm the drivers (they don't harm other 5V gadgets you plug into them), the bigger worry is that with several stepper drivers on the same line, if you do not put a ~0.1uF ceramic cap across each logic supply, they will create noise that will interfere with each other and result in skipped steps by your steppers (this happened to me).

EDIT: Important notes

The capacitors MUST be ceramic, (often little yellow disks) NOT electrolytic (columns). Their purpose is to absorb super-fast noise spikes, and ceramics will get rid of MUCH higher frequencies. While I don't think a large filter capacitor is super-important, it can't hurt to put a 47+ uF electrolytic capacitor on the 5V line to absorb any large dips/spikes.

If they're the Pololu drivers, follow the setup info on the product page and you'll be fine (probably).

  • \$\begingroup\$ I apologize for the confusion. I was watching a YouTube video from a pretty reliable source, TinkerNut to be exact, and he showed that system working from a 5v pc power supply. I have the same stepper motor drivers, so I either have a different model, or I misunderstood how he was connecting the power supply. He didn't go into detail there, so I looked here for help. I really appreciate the updated responses! \$\endgroup\$
    – Dak31
    Commented Jul 26, 2016 at 23:38

It depends on the USB source. If it is a PC then current is limited to 500mA but is well filtered. If using a wall-wart current is 1 amp maximum for typical chargers and 2 amps maximum for certain Samsung smart phones.

The wall warts do put out several mV p-p of ripple. Omitting a filter keeps the wall-warts small, and the phones charging circuits have filters built in. If you use a wall-wart I would add a 100uH 3 amp inductor in series with the 5 volt line, then a 100uF 16 volt capacitor from power to ground, close to the wall-wart.

If possible it is recommended that you install bypass/decoupling capacitors where the USB power is connected to your board. Usually a .1uF 25 volt ceramic smd will do. It will absorb local transient noise. If noise is strong add a 4.7uF 25 volt ceramic capacitor in the same area.

  • 1
    \$\begingroup\$ . . . and of course, you ALWAYS need decoupling capacitors \$\endgroup\$
    – Mark
    Commented Jul 26, 2016 at 0:50
  • 1
    \$\begingroup\$ @Mark. Added them in last paragraph. Thx for the reminder. \$\endgroup\$
    – user105652
    Commented Jul 26, 2016 at 1:15

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.