# swithcing on/off an LM7805

Hi,

I need the ability to power on/off an LM7805 with an Arduino pin.

I've thought of something like this: [see attached file "export_power.png"]

The idea is to connect "POWER_SIGNAL" to an Arduino analog pin & set it to LOW -> switch on or HIGH -> switch off

Is this a good idea or something completely crazy? Is there a better approach?

A bigger part of the project looks like this: [see attached file "export.png"]

J{1,2,3} are 3 RGB strip led common cathode
SV1 is connected on the other side to a TLC5940 ; except pin 6 which is directly connected to an Arduino pin

There will be 5 board of this type connected to 3 TLCs ; all "POWER_SIGNAL" will be connected to the same pin

No, you can't drive base of the transistor by arduino output pin, as there is high voltage +12V, which is above absolute maximum +5.3V.
You need one more 2N3904 to match levels

Magician:
No, you can't drive base of the transistor by arduino output pin, as there is high voltage +12V, which is above absolute maximum +5.3V.
You need one more 2N3904 to match levels

Thanks Magician

As suggested, I've added one more 2N3904, (which invert the logic in my first post => "set it to LOW -> switch off or HIGH -> switch on")
Now I have to calculate R1/R2 values, and be sure that I can connect 5 identical circuits on the same pin... IIRC Aduino pin can deliver 40mA
Bests

It's easy:
R2 = 12V * hfe2(n3906) / Ic2(load);
R1 = 5V * hfe1(n3904) / Ic1 = 5V * hfe1 * R2 / 12 V;

Take minimum hfe from from data-sheets, give 30-50% slack - lower R value.

Thanks again!!!!!

Magician:
It's easy:

it might be easy for lots of people, but with my electronic knowledge, it's quite obscure

Magician:
R2 = 12V * hfe2(n3906) / Ic2(load);
R1 = 5V * hfe1(n3904) / Ic1 = 5V * hfe1 * R2 / 12 V;

I've found multiple hfe values in datasheet (an extract is attached), which refers to different Ic

If I understand things correctly, Ic in the datasheet is equal to Ic2 in the given formula, which is equal to the current consumption of my circuit.
I've took my amp-meter, and measured ~10mA. But in my test circuit, I have only one 7404 / uln2003 pair.
My final circuit will have 3 uln2003 and 2 7404. So, from the datasheet, I've took the next value ; hfe=60
I've also chosen hfe1 = 60 & hfe2 = 60 too... Maybe it's a bad idea :s

R2 = 12 * 60 / 0.05 = 14400 ohm
R1 = 5 * 60 * 14400 / 12 = 360000 ohm

Magician:
Take minimum hfe from from data-sheets, give 30-50% slack - lower R value.

I've got here 12k & 330k values here, hope this will be adapted :~

Excellent!
Now time to recalculate again
I have a second look at your drawings with ULN2003 and 7406 or 7404?
If it SN7406, open collector - 6 resistors is wired not correct;
SN7404 - you don't need resistors at all.

Magician:
Excellent!
Now time to recalculate again
I have a second look at your drawings with ULN2003 and 7406 or 7404?
If it SN7406, open collector - 6 resistors is wired not correct;
SN7404 - you don't need resistors at all.

Thanks !
Just tested the "power schematic" here, and it seems to work well...
I've just added a pull down resistor (1Mohm) before R1...

I'm using "DL004d" which are from my vendor equivalent to "74LS04",
So with your comment, I've removes resistors R11 through R19.

Here is an updated schema.

Thanks a lot for your very very useful help

wahhoo ! I can switch on the system just by touching "POWER_SIGNAL" wire with my finger !!!!

Yes, it suppose to be very sensitive.
Change polarity led1 and led2 on your drawings, and update chip label and symbol - circle mark on outputs of 7404 is confusing.

Magician:
Yes, it suppose to be very sensitive.
Change polarity led1 and led2 on your drawings, and update chip label and symbol - circle mark on outputs of 7404 is confusing.

hum, yes, very sensitive, even with my finger at 1 or 2 millimeters !

Thanks for led1/led2 polarity
Replaced chip 7416 with the correct one 7404. But I don't understand which symbol you want me to use.

Bests
KumY

Actually, it's fine , geda shows two library image for 7404, with circles at input and output. I just used to drawings, that show inputs on left and outputs on the right. Probably, there are no such agreement anymore?

Didn't found the second symbol in Eagle...

Thanks one more time for your precious help !

Don't know much about them, but I've seen regulators with a logic-level shutdown pin. I might google around a bit.

yes, I've used LM2576 switching regulator which have an on/off pin.
They're not linear voltage regulator as the LM7805, and are much expensive.
I don't really know if linear voltage regulator with an on/off pin exists.
bests