Converting 12VAC lighting rail to 12VDC

I created some simple synthesizers to be installed in an art gallery that were meant to hang from the ceiling off of some 12VAC rails (the kinds one might hang lighting from). However, I didn't realize in the beginning that it was 12VAC, instead I assumed it was 12VDC. Each synth uses a 7805 to convert 12V down to 5V to power an ATmega328, but now I need to convert the 12VAC to 12VDC.

I was hoping to find a circuit to do this, and have seen schematics that use four diodes arranged in a diamond configuration to rectify to the signal into a crude DC signal, but I don't know enough about power circuits to know how 'smooth' the resulting signal needs to be. Since the 7805 is a regulator, I hope it will help smooth the power signal, but the question I have now is: do I need to do something more elaborate to convert 12VAC to 12VDC, or can 4 diodes arranged as a rectifier get the job done?

You will also need a smoothing capacitor to hold up the voltage when the AC signal dips down to near 0V. Really, you're building the front end of a traditional transformer-based linear power supply (without the transformer). Fairly well described here:

The size of the capacitor depends strongly on how much current you will be drawing from the 7805.

--
The Rugged Motor Driver: two H-bridges, more power than an L298, fully protected

The 7805 needs a voltage that is smooth enough so that the lowest value is above it's dropout value. You won't get this from a plain bridge rectifier (four diodes arranged in a diamond configuration) since the voltage drops to zero between peaks. At the bare minimum you will need a fairly large electrolytic capacitor between your bridge rectifier and your 7805 rectifier. The size depends on the current you will be drawing. Since you are starting with 12 VAC which is most likely sinusoidal you will wind up with about 16 VDC so I would use a capacitor rated at 35 or 50 Volts and you will probably need a heat sink on the 7805.

Don

Edit: 'Rugged' types faster than me.

Great! I have a few 1n4007 diodes laying around that should do the job just fine for the rectifying section. But is there a formula to calculate the value of the capacitor necessary based on the amount of current required? My multimeter's fuse is blown, so I can't measure current right now, but I'd estimate no more than 300mA would be needed (ATmega328, 1 LED and a .5W speaker).

Also, out of curiosity, why would the voltage increase to ~16VDC as it passes through the diode rectifier?

Also, out of curiosity, why would the voltage increase to ~16VDC as it passes through the diode rectifier?

Because the filter cap after the rectifier charges to the peak AC voltage value (minus the diode forward voltage drop) not it's AC RMS voltage value. Peak = 1.414 X RMS

Lefty

Here's the formula for the capacitor required given a ripple voltage Vpp for a full-wave rectifier:

C = i/(2fVpp)

So with i=300ma, f=60Hz and 1v ripple:

C = 0.3/(2601) = 2500 uF.

To regulate that to 5VDC, I'd guess a 7805 voltage regulator would dissipate about 3 watts at your max current. You could probably get by with quite a bit more ripple--at 5V ripple, C=500 uF which would take some strain off the 7805 too.

Joe

The 7805 will need bolting onto a heatsink (any fairly large piece of aluminium nearby might be used, but it mustn't be live as the 7805 tab is at ground potential.)

@MarkT - No worries, I had already put some TO-220 heatsinks onto all the 7805s, so they should be OK.

Looks like 2500uF caps cost at least $13 each - and I'm going to need to build at least 5 of these rectifiers. Looks like the smarter thing for me to do at this point is instead by some discrete bridge rectifiers. I'm assuming these components have the diodes, capacitors and other bits and pieces necessary to rectify the voltage just like we have been talking about.

Is this a good choice for this application?

h4t:
@MarkT - No worries, I had already put some TO-220 heatsinks onto all the 7805s, so they should be OK.

Looks like 2500uF caps cost at least $13 each - and I'm going to need to build at least 5 of these rectifiers. Looks like the smarter thing for me to do at this point is instead by some discrete bridge rectifiers. I'm assuming these components have the diodes, capacitors and other bits and pieces necessary to rectify the voltage just like we have been talking about.

Is this a good choice for this application?
Electronic Components and Parts Search | DigiKey Electronics

That part is just the 4 diodes wired in a bridge configuration. It just makes wiring a little easier usually. It doesn't contain any capacitors. It's a good choice for your application, though.
I would consider using this point of load DC/DC converter instead of a 7805. It is pin compatible with a 7805 but doesn't need a heat sink.

Edit: Fixed link.

Uh oh, well I've already wired up all the 7805s to perfboard and integrated them into the offending projects. So I would like to have a part that can be added on top of what is already there, if possible.

And looks like the link doesn't work for me anyway :stuck_out_tongue:

h4t:
Uh oh, well I've already wired up all the 7805s to perfboard and integrated them into the offending projects. So I would like to have a part that can be added on top of what is already there, if possible.

And looks like the link doesn't work for me anyway :stuck_out_tongue:

Oh well. Maybe next time. DC/DC converters are much more efficient than linear circuits because they don't regulate by getting rid of the excess voltage as heat.

Sorry, I guess that link was tied to my DigiKey account. Try this.

You can buy open frame unregulated ac/dc supplies that are essentially a bridge rectifier and a large capacitor but they run off 120VAC, not 12VAC, unfortunately. You're probably stuck wiring your own.

That Murata convertor is pin compatible with the 7805 so you would only have to switch that part over.

$20+ to replace the voltage regulators for 5 boards doesn't sound great to me. By the way, these are not professional products, these are meant to be hacks for an art show, so they can be as low tech as possible.

And it still doesn't solve the original problem of needing to convert 12VAC into 12VDC!

I am considering using my 12VDC@3A lab power supply to run all of these boards, but I did want to have the 'cool' factor of having them hang from the ceiling. Here is what they look like: http://cs.unk.edu/~webb/2011/09/atmega328-based-synthesizer-boards-using-auduino/

Would it be possible to feed just the strip that these are hanging from with DC from your lab supply or some other DC source? I'm an artist and I understand your desire to preserve the cool factor. :slight_smile:

I will check into it, but I doubt it - the rails are all tied to dimmers and transformers in another room to provide dynamic lighting for the room. All of the rooms' lighting is attached to these rails, so I don't think it'd be a very trivial matter to disconnect one rail from mains to supply my own current.

Its sounding like the best option right now would be to use my lab power supply and put it in the ceiling, then create separate rails and structures for my boards to hang from.

Sounds like a plan! Good luck with your exhibit!

h4t:
Looks like 2500uF caps cost at least $13 each - and I'm going to need to build at least 5 of these rectifiers.

Well, like I said you could probably use 500 uF and get 5V of ripple (something like 11-16 V going into the 7805). You might even get by with 300 uF (8V ripple). Ripple rejection of the 7805 is over 60 dB and as high as 80 dB so there might be some millivolts of ripple on the 5VDC side if you can tolerate that.

Joe

$13 sounds a lot. The big electronics retail place in the UK sell 2200uF 35v caps for about $2. Same price for a 4700uF. Remember that the size is pretty approximate here - you probably don't need exactly 2500uF for smoothing.

I did some more research and realized that I need to use my only 12VDC power supply for a separate project, so I would either need to order another 12VDC supply, or convert the 12VAC lighting rails to 12VDC. I probably will order a 12VDC power supply big enough to handle all the synths, but my scientific curiosity compels me to learn about this circuit anyway.

I checked DigiKey for some 500uF capacitors, but the cheapest I've found is $5 (500uF aluminum). Am I searching for the wrong parameters, or approaching the problem incorrectly to begin with?

Also, since my circuit is heavily reliant on a ATMega328 and includes a speaker, will a few millivolts ripple be a problem? I don't have much experience with figuring that part out.