Need a very simple light switch.

Thread Starter

Jacob J

Joined Jun 18, 2009
159
Hello

I need a simple light switch that contains a light diode and a photo diode (or transister, I am not sure about the difference) and when the light disapears it has to shut off a motor.

I have found this, but it seems to do the opposite, turning something on when the light disapears.

http://www.circuitstoday.com/photo-relay-circuit

Can I somehow reverse this?

/Jacob
 

Thread Starter

Jacob J

Joined Jun 18, 2009
159
Okay, I think I understand the LDR, but not the reversing part you explain last in the topic, wich would be the type I need right (the 555 circuit)?

The pin 3 on the 555'er is connected to the DC motor and the DC motor is put to ground. If the light gets interupted it will stop the DC motor right?

I have almost all the components, just not the CDS1/LDR. What type should I buy? I would want to have a normal light diode, maybe a blue or red one sending in fotons in the LDR, does that has anything to say about the LDR I need to buy?

If I want a switch to start the light and it has to be running untill it gets shut down buy the reciever, how would I do that? Some sort of relay or something?

I have read about the LDRs and on the danish wiki site it says that these components are not very handy if the light turns on and off quickly. In the project I am building they need to turn off exactly (within a 1/10 second) when the light is disrupted. Will the LDRs be capable of that?
 
Last edited:

Thread Starter

Jacob J

Joined Jun 18, 2009
159
What if I did this:

I put a NPN transistor after the LDR sensor and then a LED light in series with the transistor (I would probably need a resistor too). Then when I trigger the transistor by a push and release button it turns the LED light on wich makes the current flow thrugh the LDR sensor and keeping the LED light on. When the LED light gets interupted, the LDR stops the DC motor and the whole thing has to be triggered from the push and release switch again.

Ill try to draw it, so you can see what I mean and tell me if it will work.
 

marshallf3

Joined Jul 26, 2010
2,358
Most all LDRs are very slow. Nothing wrong with the first circuit you posted but to reverse its action use an SPDT relay so you can choose how you want the output to switch. Alternately if you've got a 555 timer involved you can use it to sink instead of source current.
 

Thread Starter

Jacob J

Joined Jun 18, 2009
159
I am very new to electronics and I dont understand everything, so thats why I draw a lot. I have read about SPDT relays, but havnt been able to figure out how it would work in my circuit.

I have taken the LDR circuit that has been posted and made some adjustments, but as I said, I dont know if it would work and thats why I need some help.

Take a look at the circuit and tell me what is wrong.
 

Attachments

Thread Starter

Jacob J

Joined Jun 18, 2009
159
Hmm, maybe that wont work, because when the button is released, no current will flow into the transistor, wich will kill the circuit.

I cant figure out how this is done...
 

Thread Starter

Jacob J

Joined Jun 18, 2009
159
Will this work

Take a look at the circuit.

My idea is, that when the button is pushed, the current runs to the LED light wich has a resistor on it, to keep the current low, so it doesnt blow the LED light. Now, the current passes on to the coil of the relay and it triggers the contact.

Now that the light is on and the contact is triggered, the current flows thrugh the LDR and further on thrugh the relay where it gets seperated. One way is going back to keep the coil triggered. The other one goes on thrugh the rest of the circuit.

Now when the light is interupted, there cant flow any current, wich causes the circuit to stop. The only way it can start again is to push the button.

Now what do you all think of that. That sounds like it would work right?
 

Attachments

soda

Joined Dec 7, 2008
177
Why don't you just change the relay to a SPDT and then connect your devise to the normally close side of the relay. The moment the relay get energized the NC. connection will open and turn off the motor
 

Thread Starter

Jacob J

Joined Jun 18, 2009
159
I cant vialize how the setup you are explaining me is done. Do I put the LDR after the LED light and then connect the whole thing to a SPDT?

Thought of just taking a simple mosfet transister and connect my push button to the base. Then I connect my LDR to power and run it back before the base of the mosfet. When I then push the button it closes and current runs through my device and the led is lighting into the LDR, wich closes and current runs from it directly to the base of the mosfet. When the light disapears the current cant run and the mosfet opens up, causing the system to shut down untill it gets a repush on the button.

A sketch is added to vialize the above mentioned mosfet circuit.
 

Attachments

Last edited:

soda

Joined Dec 7, 2008
177
marshallf3
You connect the motor to the close contacts of the relay when the relay is in off state , the moment the transistor turn the relay on,those contacts will then open which will turn off the motor. Can't you sea that.

Go to your workbench and take a 12v relay. Connect a continuity tester to the close contacts of the relay.Connect a 12v supply to the coil of the relay and sea for yourself what happen.
 
Last edited:

Thread Starter

Jacob J

Joined Jun 18, 2009
159
Hmm. If I do as you say, wont I then have a light activated device?

I want the device to do as followed:

When I push a "push and release" button a motor will start, because light is comming from a LED and hitting the phototransistor. When there is no light between the LED and transistor ect. a piece of carton, the motor will stop, as will the LED. If the LED doesnt stop, the motor will start up again as soon as I pull out the piece of carton, that I used to stop the light from passing to the transistor and that isnt what I want.

Ive made a new drawing. Will this work?
 

Attachments

marshallf3

Joined Jul 26, 2010
2,358
This all started out as
I need a simple light switch that contains a light diode and a photo diode (or transister, I am not sure about the difference) and when the light disapears it has to shut off a motor.
You posted a perfectly operational circuit: http://www.circuitstoday.com/photo-relay-circuit in which all you need to do is change the relay to an SPDT type. Use the common pole of the SPDT relay contacts for one of the driven ouputs and whichever of the other two (either NC or NO) for the other output connection to make it work as you desire.

I don't know where all the other stuff came in from, but if you want an indicator just stick one across the load.
 

Thread Starter

Jacob J

Joined Jun 18, 2009
159
I am sorry, but I am very new to electronics. Could you maybe use paint to draw what you are suggesting?
 
Last edited:

marshallf3

Joined Jul 26, 2010
2,358
I don't use "paint" as I never really considered it to be worth a darn to a non-artist with shaky hands to begine with, would a JPG drawing suffice?

when the light disapears it has to shut off a motor.
Try this, I used a phototransistor because they're esier to work with and eliminated the adjustment since it didn't need it. C1 & 2 are optional but recommendd for noise immunty. The connector is also optional, I just like using them because its easier to build and house the circuit in a chassis box first then hooking it up.

I designed it for 12V but you can change that by using a relay with a different coil voltage D1 is essential to prevent transients from damaging the transistor.

Any light source will do, it's a sensitive detector, Even room light will set it off so keep that in mind when mouning it.

Didn't know what you wanted to drive so the relay I chose is capable of carrying 10A.

When light hits the photodetector it generates a voltage that turns Q2 on which then switches the relay on.

No light, nothing to turn Q2 on, relay drops out, motor stops.

http://www.innoengr.com/examples/light_activated_controller.jpg

http://www.innoengr.com/examples/light_activated_controller.xls

All part #s are for http://www.mouser.com, probably the least expensive supplier out there is that provides the same level of service to the small customer as they do to the huge industrial ones they mainly deal with. They only pass on their actual discounted UPS shipping rate and if you get an order in before 8 PM Central time it usually ships out that evening. UPS Ground from them to Oklahoma City is essentially overnight, other locations will vary acording to UPS.

Choice of chassis box is up to you but they have a million of them. Same thing if you want a stress relief for the wires eading in & out. It only takes a short amount of time to learn how to navigate their menu system then, when you've got your choices narrowed down, use the little Up arrow abve the prces such that the lest expesnive items will show first then choose from what they show they have in stock. I specify the least but most acceptable inexpensive parts they have in stock at the time of writing, if they run out of something there's an "alternates" button you can use.

You could even get most of these items from Radio Shack but youll pay twice if not far more for lesser quality.
 
Last edited:
Top