I am relatively new to Arduino, and have been doing a project to trigger an LED/alarm when movement is detected to be over a certain threshold value. I am using an Arduino Uno, an LED/buzzer (https://www.adafruit.com/product/2994), an MPU-6050 (https://playground.arduino.cc/Main/MPU-6050), and a 4 channel relay board (http://www.seeedstudio.com/blog/2013/02/28/shield-evolution-flexible-add-ons-for-arduino/relay-shield/ - sorry it's not very descriptive).

The LED/buzzer needs a 12V DC power supply, and I am using a wall wart to supply it. I am wondering how I am supposed to hook everything up - everything online tells me that the LED needs to be connected not only to the relay board, but to a power supply as well. However, my power supply is to the Arduino itself.

Based on the following picture, I would think that I would need to take the ground wire of the LED to the power source itself, then connect the power source to the relay board Common input.

This is not my project - I am simply looking at how the power is connected

Here is the circuit without the external power, using a small LED:

enter image description here

And here is the current setup (note that the cables were initially shifted over by 1 on the analog input, but I have fixed that since):

enter image description here

Is there a way to use the wall wart as the power supply? Do I even need the relay board?

1 Answer 1


You will need the relay board. The Arduino output 5V and so you can't use it to directly power the 12V half of the circuit.

If you can split the power from the wall wart so it powers the 12V circuit and the barrel connector on the Arduino then that should work. If you can, then you will need to ensure that the 0v of the Arduino and the 12v circuit are tied together, otherwise the two halves of the circuit will be using different versions of 0V and you will get interesting results.

If you want to use the setup in your second picture then no you don't need the relay board, but that's only because the whole circuit is 5V.

"How do you split the power?" I hear you say, "do I need any extra hardware?"

That depends, how attached are you to your wall wart's cable? The way I have done it is to UNPLUG the wall wart, cut the cable in "half", strip a cm of each wire and plug both ends of it into two empty rows on you bread board. Then use jumper wires to take an additional feed off to the 12V circuit.

enter image description here

CAUTION Ensure you get the polarity of the wires the right way around. You can test this with a volt metre. I suggest red electrical tape to mark the +ve wire.


  • Okay that makes sense, thank you. Since I am a newbie, I'm not sure how to split the power between the two. Does that require another piece of hardware, or is it done via the wiring from the Arduino?
    – elarr
    Jun 5, 2018 at 14:09

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.