PSU Question: MCU and relays

Thread Starter

guitarguy12387

Joined Apr 10, 2008
359
Hey everyone,

I have a project i'm working on where i'm using an MCU to control a bunch of 5v relays (something like 20 relays), some LEDs and such.

I have tested the thing powering the relays from a bench supply and the uC is powered from USB.

I want to make this stand alone, and i am concerned about choosing a PSU. I want to use a simple linear reg based psu. My concerns arise from using so many relays and the peak currents that result. I don't want bad things to happen, either to the PSU or the uC.

So what should i do? Can i run everything off a simple LM317 rectifier PSU with a larger filter cap? Should i pull 2 regs off of one bridge rectifier? 2 Bridge rectifiers/regs? etc...

Thanks in advance!
 

debjit625

Joined Apr 17, 2010
790
Just protect your circuit from the back EMF from the relay coils using a diode and you can also decouple the mcu part from the relay driving part by an RC circuit to reduce any voltage spikes.

Good Luck
 

themindflayer

Joined Oct 29, 2010
44
a) input to lm317 will be?
b) The output is 5V?
c) the power of the coil of the relay is?
d) multiply c) by 20, add 5mA per led and 5mA extra for other assorted losses and you will have an estimate of the amount of amps your circuit is using (better yet use a lab psu make o/p volts 5 and run your system and note the current it draws)
e) with d) and a) minus b) (I and V respectively) you have the power loss that LM317 sustains ..... check with datasheet the limits to this power, anything above 0.5W will require a heat sink ... and once all is set and running, note the temp it achieves (to check heat sink is adequate or not)
e) you will need some sort of current amplification to run the relays using a mcu .... uln2003 are popular single chip darlington pairs ... check the datasheet for info on how to use it ....

hope this helps ...
e)
 
Top