Hello, I am trying to find the most effective way to power a 12v relay and my Arduino Uno using only one wall socket and no batteries. My current dc power supply does a little bit more than 12v so I don't know that using it to power the relay as well as the Arduino would be a good idea since the Uno input is only rated up to 12v. Does anyone know of any power supplies that output 12v and include a USB port or is there perhaps an easier way to do this?
Power the Uno with 12V, put 12V on the relay coil, and add an NPN transistor controlled by the Arduino to connect the other side of the coil to Gnd to energize it.
See the middle example here.
I already have the circuit with the relay set up and working fine. However, I have the 12v that the relay is switching connected to the wall and I have the Arduino connected to my computer. I am trying to find the best way to also use the 12v source to power the Arduino.