Automatic LED turn on and off circuit, can someone check my circuit to see if it will work?

So I'm working on project where I want LED strips to turn on and off depending on whether or not the IR LED and phototransistor circuit is open or closed

This is what I've come up with. Can someone please check and tell me if this will work or not (sorry I can't seem to find a good simulator)

It makes sense to me. 

The power supply will be one of those 12V LED power supplies. 

I will use http://www.ebay.co.uk/itm/LM2596-Power-supply-module-adjustable-DC-DC-Step-down-1-5V-5V-12V-24V-/261512603010

this to step down the voltage to 5V for the IR LED.

The LED strip will probably be this one

http://www.ebay.co.uk/itm/5M-300-LED-Strip-Light-3528-5050-SMD-RGB-Ribbon-Tape-Roll-Waterproof-IP65-12V-UK-/350871703543

3 sections of 1metre long strips

In the images below, I've shown what I want it to do

EDIT: I changed the circuit a bit

Picture of Automatic LED turn on and off circuit, can someone check my circuit to see if it will work?
switchon.jpg
Untitled-1.jpg
sort by: active | newest | oldest

Here's as sample circuit. There's nothing special about the bits, you don't need an external power supply. Make the resistor on the phototransistor something like 4.7K, make the other transistor something chunky, like a TIP120. I can't remember the forward volt drop for the IR led, but work out the resistor for that as (12 - forward drop)/0.02 Ohms.

Photointerrupter_01.jpg
hanashoib (author)  steveastrouk2 years ago

Oh by the way! Why did you say I don't need an external power supply? You mean the step down module?

Yes.

hanashoib (author)  steveastrouk2 years ago

Great, your answers have really helped : )

I will "best answer" your solution

hanashoib (author)  steveastrouk2 years ago

Thanks for this! I drew something like this originally then crossed it out xD

Wired_Mist2 years ago

I guess you are using this as a photo interrupter Circuit?

The transistor will most likely not handle the Current you need for the LED Strips.

Take the leg of the transistor that you have wired to ground and use it to trigger a 5V relay. Use that relay to switch the LED's on or off. I'll draw you a pic when i'm off work :P

Here you go !

The bit on the left of the relay is the coil. Be sure to wire the strip to the normally open side of the relay if you want the strip to turn off when the IR-led is blocked.

I see that Steve has also posted a schematic that will work nicely too ! Second the TIP120, It's the one I use for Led Strips up to 5M.

Take note, A relay will work north or south of the strip, But the TIP120 MUST be on the cathode side of the strip (because it is a N-Chanel Mosfet)

and Totally second max on the resistor vs switching supply; Much simpler

Untitled4.png

FYI "Circuts-123"

http://123d.circuits.io/

has a built in emulator otherwise Eagle has one too.

http://www.cadsoftusa.com/

hanashoib (author)  Wired_Mist2 years ago

Hey! Thanks for this, I didn't realise you were showing me a simulator. Really appreciate it : )

Np :) hope it helps !

also PLEASE go for the 50/50 RGB

they will suite you FAR better in the long run :)

Er, no, how does the IR LED light up ? Its got no ground, and a short across it, as its shown here.

lol, my bad

move the cathode of the led to ground

Geuss I should draw my own insted of editing next time >.>

hanashoib (author)  Wired_Mist2 years ago

Than you, this helps a lot ~

-max-2 years ago

What going to stop the flow of electrons through the LED strip? Place a relay or a MOSFET in series with the strip. If using a N channel MOSFET, Make sure the source of the gate is connected to ground.

Also, for driving a small, simple IR LED, you do not need a sophisticated switching regulator, especially one with a low output impedance (constant voltage that does not change much with current draw). Just add a resistor in series with it, as you did in the schematic.

How is that phototransistor going to turn off the LED strip? It is not in series with it, and has no way of controlling the current through it or the voltage across it. If it is turned on with light, then excessive current from the 5V regulator will flow through the photodiode, destroying it. you'll let out the magic smoke, and when the magic stoke is released, it dont work no-mo.

A phototransistor cannot handle a lot of power, so use it like small signal output, which can drive a more transistors and amplify the output of the phototransistor. I would use a comparator or op-amp (used as a comparator!) and have that phototransistor drive one of the inputs of the comparator, and the other input be connected to a potentiometer to adjust the sensitivity to light. Then the comparator's output can go off to the MOSFET then that will switch the LED strip ON and OFF depending of if the original photodiode 'sees' enough light.

This method has one fatal drawback, and that is any ambient light detected by the phototransistor that can activate the LED stip. To make this less susceptible to ambient light, some more advanced digital logic may be necessary.

hanashoib (author)  -max-2 years ago

"What going to stop the flow of electrons through the LED strip?" - this is what my doubt was about, that's why I posted this

"Also, for driving a small, simple IR LED, you do not need a sophisticated switching regulator, especially one with a low output impedance (constant voltage that does not change much with current draw). Just add a resistor in series with it, as you did in the schematic." - True!

"A phototransistor cannot handle a lot of power, so use it like small signal output, which can drive a more transistors and amplify the output of the phototransistor. I would use a comparator or op-amp (used as a comparator!) and have that phototransistor drive one of the inputs of the comparator, and the other input be connected to a potentiometer to adjust the sensitivity to light. Then the comparator's output can go off to the MOSFET then that will switch the LED strip ON and OFF depending of if the original photodiode 'sees' enough light." - I did draw up a comparator circuit originally then got rid of it because I deemed it unnecessary : (

"This method has one fatal drawback, and that is any ambient light detected by the phototransistor that can activate the LED stip. To make this less susceptible to ambient light, some more advanced digital logic may be necessary." - truuue

Thank you!

No, it won't work, there is nothing switching the LEDs, the strips are wired across the supply.

hanashoib (author)  steveastrouk2 years ago

Hi! Thanks! I realised something that was wrong. I've changed it. Could you give it another look? And maybe suggest what I can do?

Thank you ~