Powering Different Components

Hello,

I am new to powering mulitple voltage objects with a single power supply on my circuit.

I have 3 lights (120V supply, .2 A current draw)
I have 2 fans (12V required, .3 A current draw)
And an Arduino UNO (5V, .1 A MAX)

I don't have an issue with the coding or making the components work, but am having an issue with the power required as I've never done this part before. I would like to create a board that has a single power supply if possible. Is this something that's easily done or someone can point me to some sketches of how to best do it?

The cheapest and fastest solution is to use power adapters for 12V and 5V.

that would require wiring an adapter into the 120V line or plugging multiple adapters in at once? I am looking for more of a single wall plugin solution.

I will be using the Arduino to control on and off of both the 12V fans and the 120V lights with a motor control further added on.

Is Your main outlet voltage 120 V or do You need a 220 to 120 volt as well??
Buying 2 separate sipplies, 12 resp. 5 is the easisest as florinc suggests. Finding one dual supply giving both 12 and 5 is not impossible but they probably cost more. How about using a power supply from a scrapped computer?

So get a 12V wall wart and plug it into the power jack of the Arduino. Providing you have not got too much current from your Arduino it will be fine.

How are you going to connect the fan and light to the Arduino? You can't connect the Arduino directly to these without some sort of interface.

How are you going to connect the fan and light to the Arduino? You can't connect the Arduino directly to these without some sort of interface.

I suggest you employ 2 solid-state-relays, one for each device (fan, bulb).

I planned on having the Arduino controlling relays for only on or off functions of the components.

Not a good idea to design a PCB for mains voltage as your first PCB.

I suggest you put all the 12V and 5V on one PCB and keep the 120V separate. http://www.whizoo.com is a good example to follow. They use a plugpack inside the enclosure with wires soldered to the 120V plug pins.

Building home power supplies, from 220 to 5, 12, 24 Volt and some more I strongly recommend the advice from MorganS. Mount and eventual relay separately and well protected. Pay attention to the relay coil cables that they not possibly can get in contact with mains if one would come lose.

MorganS:
Not a good idea to design a PCB for mains voltage as your first PCB.

I suggest you put all the 12V and 5V on one PCB and keep the 120V separate. http://www.whizoo.com is a good example to follow. They use a plugpack inside the enclosure with wires soldered to the 120V plug pins.

I do like this idea of using the plug itself as part of the circuit and not a standard plug in. I should also state this isn't my first PCB nor is it my first project.

If you’re feeling ambitious you can get a transformer to convert 120 to 12v then use a bridge rectifier and filters to rectify to DC. After this you will need regulators 12v and 5v. Pick your flavor. Basic ones are 7812 and 7805. It’s been pointed out that mains voltage can be deadly so everything must be perfect and well protected and grounded correctly. You could incorporate the relays into this same device but make sure there is good isolation from the high voltage AC to DC. You will have to do some calculations for the transformer and current requirements. I would feed the 5v from the 12v regulated. This is just a simple overview but if you’re up to it it is possible. Again. Disclaimer. 120 is dangerous!!!! Be careful and don’t do this if you have any doubt. Even the filter caps can be dangerous.

rockiron101:
I planned on having the Arduino controlling relays for only on or off functions of the components.

You could use a DC DC Buck Converter to get 5VDC off the 12VDC and not have a hot regulator.
Plug a 12V 1A switching PS into the 120VAC.
The 120 and 12 go to the relays, the 5V to the controller.

Also, don't forget the fuses.

wolframore:
If you’re feeling ambitious you can get a transformer to convert 120 to 12v then use a bridge rectifier and filters to rectify to DC. After this you will need regulators 12v and 5v. Pick your flavor. Basic ones are 7812 and 7805. It’s been pointed out that mains voltage can be deadly so everything must be perfect and well protected and grounded correctly. You could incorporate the relays into this same device but make sure there is good isolation from the high voltage AC to DC. You will have to do some calculations for the transformer and current requirements. I would feed the 5v from the 12v regulated. This is just a simple overview but if you’re up to it it is possible. Again. Disclaimer. 120 is dangerous!!!! Be careful and don’t do this if you have any doubt. Even the filter caps can be dangerous.

Should I get a heat sink for the 12V->5V regulator only powering the Ardunio and it's few sensors? Right now it only has a real time clock, few temperature/atmosphere sensors, and powers a couple relays.

Add up the total power consumption at 5V. The relays will likely be the biggest part of it as you must allow for them all to be on at the same time.

If using a linear regulator, multiply that current by (12-5) to get the power dissipation in the linear regulator. This should be in Watts. Now look at the degrees-per-watt rating for the regulator without a heatsink, usually called "junction to ambient". Add the ambient temperature inside your box. If the result is higher than the max junction temperature, you will need a heatsink.

If using a DC-DC converter, pick one with a current rating greater than your required output current. Pay attention to any little additional rules like input current limitations.

MorganS:
Add up the total power consumption at 5V. The relays will likely be the biggest part of it as you must allow for them all to be on at the same time.

If using a linear regulator, multiply that current by (12-5) to get the power dissipation in the linear regulator. This should be in Watts. Now look at the degrees-per-watt rating for the regulator without a heatsink, usually called "junction to ambient". Add the ambient temperature inside your box. If the result is higher than the max junction temperature, you will need a heatsink.

If using a DC-DC converter, pick one with a current rating greater than your required output current. Pay attention to any little additional rules like input current limitations.

So you're saying I am going to need to design out the circuit. Ugh, gotta bust out that old EE 222 book. haha! I am concerned with eating the 7V drop off a 1-2A 12V wall wart. that's a lot of power wasted, imo.

Wall Power to Relay for Lights (24W each, 3 lights)

Connect from Relay to Lights to 12V DC Wall Wart (Parallel on Same Relay Connections [Ensure if loose, can't come into contact with each other/fused on outlet circuit)

Run 12V DC Wall Wart Power to Relay for Fans.

Run 12V DV Wall Wart through 5V Regulator to Power Arduino.

Run Arduino to Relays and sensors

Another idea: you can you find a transformer with secondary with two outputs. 12 and 5v out... It's more components but it's another route. This would then require two rectifiers and filter circuitry.

I'm just throwing it out there as a possibility.

I would just go with 12v and drop to 5v using regulators for simplicity. There are other more efficient regulators out there also.

I figured with plug in wall power a little heat is ok as long as no smoke :).

I don't have any issue going the route of a double step down transformer and then a ac->dc convert rectifier. I think that may be the best way to go, and most efficient?

there are losses on the transformer too but it’s a good solution. Buck is not bad either and simplifies the conversion. Either way spec everything for full current and put in a safety factor.

DC-DC converters are not expensive, highly efficient and they're small modules that can be soldered onto your project PCB very easily.