I am working on a design for a Arduino driven project that controls a 1.7A stepper motor and 2 small solenoid valves. I am using a 12v power supply (Meanwell MDR-60-12) to power the stepper motor (though a TB6600 driver) and the solenoids (controlled by 2 channel solid state relay). I have been using the USB port both to power the Arduino (which supplies 5v power to the relay module) and to monitor the system through the serial port.

I am attaching a diagram of the circuit layout to clarify how I have put all of this together.

circuit diagram

As a move forward to finalize this design I have a few questions:

1) Do I need to create a direct common ground between the 12V power supply and an Arduino ground pin?

2) Should I power the Arduino with a dedicated power supply rather than relying on a computer USB port?

3) Should I be including capacitors or diodes at any points in the circuit for added protection?

4) Is there anything else I am missing here?

Thank you - I appreciate any and all constructive feedback!


1 Answer 1


1) Yes, you will need a separate ground connection. It looks like the TB6600 has isolated inputs, meaning your Arduino will be floating relative to the relays. Otherwise the 12V powering your relays won't have a current return path.

2) Using a computer power supply won't do any damage, and if you're using the USB for communication as well as power then it would be fine, though if it's just for power you may want to consider a separate supply. The easiest solution would be a cheap buck converter to step down the voltage from your 12V supply. That would solve your grounding problem too.

3) The solenoids could potentially do with diodes across them (anodes connected to ground). This will protect against a potentially large voltage being produced when they are turned off, which could damage the relays. It most likely won't make much difference as relays are typically much more resilient than, say, a MOSFET would be, however it would make the system more robust.

4) Looks good to me. Just keep an eye on the solenoids; some of them can get pretty hot if left on for long periods, especially lower quality ones. Run it for a minute and check the temperature, just in case.


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.