Help With Powering/Wiring of a CNC-Style Setup

Hi there,

I've been researching for a couple weeks and this is my setup:

My questions are, 1) What should my power supply be if I want to power the Stepper Motors and RC Servo from the Shield (with a separate power supply) and the camera and Arduino through USB? 2) Is the 1.3A Stepper Motor too high for the 1.2A current limit for the motorshield? 3) Should I get heat sinks and where should I put them?

I'm new to Arduino but I'm building this for a project for work. Any help would be incredibly appreciated.

Those motor shields are far from ideal for driving stepper motors. You should consider an "proper" stepper motor driver board such as the Pololu A4988 or the Sparkfun BigEasydriver. To get good performance from a stepper motor you need to drive it with a high voltage and the proper stepper motor drivers can limit the current in the motor coils so that the high voltage does not over load them.

With the motor shield you will be limited to the voltage determined by ohms law. The datasheet referred to by Amazon says the current is 1.3A and the resistance is 2.5Ohms. That implies a voltage of 3.25v, not 12 volts. It will perform very poorly at 3.25v.

With an A4988 driver board you can drive it with up to 35 volts.

You will have to decide how you are going to drive your stepper motors before you can decide on a power supply. The servos will also need their own power supply - about 1 amp per servo at a voltage of 4.8 to 6v. That voltage is not going to be high enough for the stepper motors which will probably need at least 12v - but DO NOT give them 12v with the motor shield.



Thank you so much for the specifics - I realize now why that motor shield should not be used for this project. I am looking into getting a different motor shield, like the ones you recommend.

I have only a couple follow up questions: 1) Can I stack two of the Pololus so that I can control two steppers?

2) I was originally planning on using the afmotorshield to power the servo, but now if I use a 12V servo is there a particular shield you would recommend so that I could use solely one power supply to power all the shields - two Pololus and one servo shield? (I am powering the Arduino separately via USB)

3) Are there any great heat sinks that you would recommend to go with the Pololus?

Thank you for your help.

The Pololu A4988 boards don't stack on the Arduino like a shield. They will need some other sort of connection - perhaps a breadboard at the development stage. You can eaily connect several to a Mega.

I'm not aware of 12v servos, but if there are such things at a reasonably price that might be a solution.

You don't need any shield for servos as the signal from an Arduino pin can connect directly to the servo. However the servo should not draw its power from the Arduino (even if it can work with 5v).

I don't know where you would get a heat sink for an A4988. You will almost certainly need one if you want to draw 1.3 amps. They have to be quite small in order to fit.

The Pololu A4988 web page has a lot of useful info about using them.

It would be helpful if you describe what your project is all about in case there are things to consider that may not occur to you.


I don’t know where you would get a heat sink for an A4988. You will almost certainly need one if you want to draw 1.3 amps.

I faced the same problem on a Rep-Rap I was building. I arranged aluminum brackets to drop down on the ICs. There was a thin thermal gel pad between the brackets and the chips. These photos give you the idea.

My project uses two stepper motors to control a belt-driven XY axis, a Firgelli L12 linear actuator as the Z axis(it can be driven as an RC Servo but has other versions that might be easier to use? I’m still trying to figure that out), and a camera to see what’s going on. I have attached a drawing for reference.

How can I power the servo separately, but control it with the Mega? I’m hoping for an example to clarify.

I was able to find nicely sized heat sinks on the adafruit website. Aluminum SMT Heat Sink - 0.5x0.5 square : ID 1041 : $2.75 : Adafruit Industries, Unique & fun DIY electronics and kits

Thanks for the visual example. I’m curious, did you really need that large of a heat sink for your project?

Thank you both!


did you really need that large of a heat sink for your project?

Probbly not. I just wanted a cheap heatsink and surface mount sinks are a bit expensive compaires with a piece of angle aluminum.

. There is no perceptible increase in temprature of the sink, and without it the chips run too hot to touch. But it needs to be that big to mechanically fit the four chips, this is simpler than giving each chip it's own sink that needs support like this.

@Zoomkat usually comes along with his nice diagram for powering a servo. This diagram is a poor imitation

Power + ----------------- + Servo Power - -------- |-------- - Servo | Arduino GND---- | Arduino Signal ---------- signal Servo

What voltage does your Firgelli Actuator work with?


Thanks for the diagram, after looking up some setups with the Mega we think we can setup the servo properly.

The Fergilli Actuators come in different models, and the 'P' model supports PWM and RC Servo capability (according to the description). It comes in 6V or 12V, so we thought we would choose 12V so that we only need one 12V power supply that is consistent across all of the motors:

Steppers and stepper drivers are unique animals.

the stepper motor does not usually have a voltage because voltage supplied has more to do with speed than power.

if you supply 1 amp at 1 volt or 24 volts, the only difference is that at 24volts the driver will deliver that 1 amp much faster. a Chopper driver chops off the excess once the power has been supplied. in theory, you could supply 100 volts. Since higher voltages can deliver that 1 amp faster, teh motor can take the same number of steps in much less time. this higher voltage has the effect of allowing a motor to run faster. this is very important with a lead screw, not so much on a direct drive turn table.

You need to calculate how many motor RPM you need to move the axis from one side to the other. also calculate the resolution of a FULL step. your FULL step should not be more than 4 times your maximum required accuracy. a leadscrew for a high speed will not work fast enough.

since the drive listed has a maximum voltage of 12 VDC, I would use 12VDC to get the most power and use a regulated power supply such as might be from an old desk-top computer.

In reality, the motor offers resistance, so the motor will get hotter with the higher voltage. not to worry, as stepper motors are designed to run hot. hotter than you can comfortably touch.

when setting up a CNC machine, there are two approaches. one is to run lower voltage to see what voltage is required to make the unit move. and then to run the voltage up to get the speed needed for high speed rapids. then reduce the voltage to the best compromise. everything faster than the maximum needed rapids is pure waste, and anything less than what is required is unacceptable.

an old computer power supply will have both 5 volts and 12 volts so you can try either at your pleasure.

Thanks Dave for the input! Really helps outline whether I need to supply voltage/current and how much.

The only other question I have at this point is: if I want to power the two 12V steppers with two DRV8825 Drivers, and I want to also power the 12V Firgelli (using the Linear Actuator Control Board:, is it okay if I supply a single 12V 6A power supply to all three of these boards - the two DRV8825s and the LAC board? Will supplying the 6A to the different drivers damage them in any way? I really want to limit my project to using only one power supply.

Thank you all so much with your help. I think I'm very close to finalizing my design.

I bought a bunch of VGA/RAM heat sinks. Just the right size for the A4988. Many come with thermal double-stick tape on them, if not, buy some.

is it okay if I supply a single 12V 6A power supply to all three of these boards

It is only OK to do this if the total current will not exceed 6A at any one time.

Current is additive, if you have three loads that all take 3A then the total current draw is 9A. It is not like voltage where you will apply 12V to all the devices. The current rating of a supply is what it can supply not what it will supply. So if you have two motors and each takes 6A then a 6A supply will only work if only one motor is active at any one time. Remember a stepping motor takes the maximum current when it is not moving, so if you want to use that current in some other device you have to disable the drivers, that removes all current from the coils. The down side is that it is easy to move the shaft when there is no current so the motor will not hold.

Yes, that is one of the counter-intuitive things about stepper motors. They may draw less current when they start moving faster.

coltonS: Will supplying the 6A to the different drivers damage them in any way?

It seems to be a common miscnception in these pages that you can damage something by giving it access to too much current.

Electrical devices only take as much current as they need from the available supply. You must have at least as much as they need - but there is no such thing as too much.

If you supply a device with a too high voltage it will be damaged because the high voltage will pobably force too much current to flow.

But you can have hundreds of amps available at the correct voltage and no harm will be done. A good example is a car battery which can produce a couple of hundred amps to start the engine and can also safely drive a car radio that only needs a few amps.

Generally it is a good idea to have a slightly oversized power supply - capable, say, of supplying +50% or + 100% of the required current so that the load is not a strain on the power supply.