Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

Best circuit for light / dark activated switch

Status
Not open for further replies.

philr

New Member
Hello everyone

Having done a fair bit of research for my project, chicken coop opener that i want to work with light sensing action in the first instance.

I am wondering which circuit would work best, i wish to work with regular batteries eg. 9v or 6 with AA's

I have looked at the 741 op amp circuit, and also the 6v switch using a double pole relay.

Wondering which would give best battery life and effectively operate a motor for the pulley system.

i see there is lots of previous posts but no one had updated any of them giving success stories or pitfalls to watch out for.

Thanks in advance

Phil
 
I wouldn't recommend the 741 for this kind of circuit, the LM311 is much better as a comparator and will drive a small relay with no drive transistor.
**broken link removed**
LM311 Light/dark detector/thermostat
 
Thanks for the recommendation, is the power drain of a relay in a small voltage circuit that much to worry about, the relay appears to be the best way to go
 
How annoying Maplins dont seem to stock the lm311, would be interested on members thoughts of maplin for price and convenience
 
How annoying Maplins dont seem to stock the lm311, would be interested on members thoughts of maplin for price and convenience
Morning Phil,
The LM393 is a dual comparator, use it to drive a low power transistor/relay.

Maplins never seem to have just what you want.
Google for Rapid Electronics
 
Hi Eric, thanks for the help, due to my inexperience does anyone know what pins on the lm311 i should be connecting to,
 
Hi Eric, thanks for the help, due to my inexperience does anyone know what pins on the lm311 i should be connecting to,
hi Phil,
Give us more details of the pulley requirement, eg: loading, operating speeds, how often etc.
Basically tell us what you are trying to do.
 
Sorry for not being very specific i decided to break the prject down into control then onto the motor and pulley, then adding a timer, may need to think of some kind of shut off in case the cables get caught up to prevent damage in the process was not actually telling members what my overall plans were.

Hope to use this circuit as a master control for a motor that will drive the coop door up and down currently based on light levels,
Looking into what spec motor i will need, the door is not very heavy so nothing more than 1 kg pull needed, maplins have a few that will work on 3v supply, so i need the circuit to trigger open in the AM and close in the PM, based on light levels, once i sort out the hack for analogue dc timer i will swap the circuit to be triggered by on off signal from the timer
 
Last edited:
Sorry for not being very specific i decided to break the prject down into control then onto the motor and pulley, then adding a timer, may need to think of some kind of shut off in case the cables get caught up to prevent damage in the process was not actually telling members what my overall plans were.

Hope to use this circuit as a master control for a motor that will drive the coop door up and down currently based on light levels,
Looking into what spec motor i will need, the door is not very heavy so nothing more than 1 kg pull needed, maplins have a few that will work on 3v supply, so i need the circuit to trigger open in the AM and close in the PM, based on light levels, once i sort out the hack for analogue dc timer i will swap the circuit to be triggered by on off signal from the timer

hi,
I guess a doorway of say 9inch wide by 12inch high would fit most laying hens.
I would suggest a counter weight and pulley system so that the motor could be small and it will be easier to hold the door in the up/open position.

Ref the timer, whats it purpose if you are using a light/dark switch system.?
 
i was wondering about a counter weight on the pulley to take the strain off the motor, the timer idea is due to not 100 % sure how the sensor will work with random occurences, dirt or a leaf dropping onto the sensor, or our naughty cat sitting on the coup causing a shadow as he watches the world go by.
 
you will probaly need a delay in there or the door will shut early on cloudy days etc. most hens roost the same time(ish) each day so you may be better off with a timed device rather than a light level operated one, with our hens (all 2000) of them you can set your watch by them :D
 
yes i was thinking along the same lines, wow 2000 hens my 3 wreck the garden in no time at all, egg hunting would be a full time job
 
Yes but 2000 hens, just gives a mental picture of them queueing up for their turn in the box to lay laughing as i type with the picture in my mind (mad i know)
 
we have about 400 that are totaly free roaming with no restrictions so they can lay anywhere but you find that they pick a spot and use it all the time, but sometimes they do tend to lay in the most bizare places! we have one hen that will only lay on a nest she has made on the seat of a old tractor in the barn
 
Morning Phil,
The LM393 is a dual comparator, use it to drive a low power transistor/relay.

Maplins never seem to have just what you want.
Google for Rapid Electronics

I see maplins have the lm393, is this used in the same circuit configuration as posted a little earlier in this thread for the lm311
 
The LM393 can be used but its output isn't powerful enough to drive a relay so an extra driver transistor is required.
 
The LM393 can be used but its output isn't powerful enough to drive a relay so an extra driver transistor is required.

Morning Phil,
The LM393 is a dual comparator, use it to drive a low power transistor/relay.

Maplins never seem to have just what you want.
Google for Rapid Electronics
hi hero,
I have told Phil that a transistor is required with a LM393.

Phil,
Choose a transistor with about 100mA max collector current and the relay to work from the available battery voltage, also you require a low current diode across the relay coil.

Do you require a circuit,?

EDIT:
Post details of the motor, its going to be more battery efficient if the relay can be omitted.
 
Last edited:
Eric said:
I have told Phil that a transistor is required with a LM393.
I know.

Well he obviously didn't understand you, otherwise he woudln't have asked it can be used in the same circuit as the LM311.

philr said:
I see maplins have the lm393, is this used in the same circuit configuration as posted a little earlier in this thread for the lm311
You need another transistor, the maximum output current from the LM393 is only 20mA or so, a typical relay needs 50mA to work.

Here's a circuit showing how to use an LM393 to drive a transistor.
 

Attachments

  • LM393 relay light sensor.PNG
    LM393 relay light sensor.PNG
    2 KB · Views: 2,472
Last edited:
I cannot thank you both enough for helping me, and your pateince !! i did miss the need for the transistor for the circuits thanks for pointing it out. havent worked out what motor i would need just yet, need to work out if counter balancing the wooden door to allow for a smaller motor or to get one with enough guts to pull the total weight. I guess if motor small enough i could be able to rid the need for a relay. i have managed to get hold of both IC;s the 311 and the 393 as although maplin on line said no stock they did in fact have both. Hero i will have a good look at the circuit you kindly provided and will update if i still cannot get my head round it, at present not totally sure which pins to connect to on the IC.

Phil
 
Status
Not open for further replies.

Latest threads

Back
Top