Maker Pro
Maker Pro

LDR/BC550 as switch - Darkness threshold.

Hello all,
New member here, hoping someone might be able to help me with a 'simple' 5V LDR switch circuit.
I want the circuit to be able to toggle a 5VDC relay coil which measures approx 50ohm.

I've set up a 5k pot, LDR, and BC550 as a basic switch and that works well but the issue is that this isn't a dark sensor, it's a slightly-less-bright sensor.
The switching threshold is too bright for my application as I want something to switch after dusk/before dawn.

The LDR that I had was reading around 1.5meg at the kind of darkness I'd like to have as a threshold, but I have ordered some LDRs which max out at around 200k thinking that might help.
That means I don't have an exact value, for now, but the desired LDR threshold resistance will be somewhere close to, but less than, 200k ohm.

Presumably there'll be greater consumption when the relay is held open so, ideally, I'd like the circuit to do that during lower LDR resistance - I.E. during the day. (I'll be solar charging)

I've read a few relevant threads on these forums, looking at darlington suggestions, but I don't fully understand them, if I'm honest.

I'd like to keep it as simple, and as low consumption, as possible.
If it's helpful at all, I do have iCircuit for basic simulations.

Grateful to anyone who may be able to help!
 
Welcome to EP!
as low consumption, as possible
A 50 Ohm relay isn't going to be 'low consumption' if energised for a long period.
Have you considered using a latching relay? That requires a brief current pulse to switch it 'on' and a second brief current pulse (which might need to be of opposite polarity to the first one) to switch it 'off'.
As for a well-defined light/dark threshold, a 'comparator with hysteresis' would provide that.
I suggest you do a search for 'chicken coop door circuits'.
 
Thank you for the reply!
I'm not against using a latching relay although it seemed like perhaps the triggering circuit for that might be much more complicated?
I'm googling comparator with hysteresis and really wouldn't know where to start.
 
It is a door opener/closer, with 12V motor and DPDT relay wired for polarity switch when coil is high/low.
If the sensor that Bluejets linked is sensitive to change at much lower light levels, I think that, plus a transistor for greater current capability, should work. :)
 
The ebay item you suggested would be used with a transistor to power relay coil - That's more like 100mA.
Think I'm sorted, folks. Thank you.
I'll update here either way.
 
It is a door opener/closer
For animal or human building? Regardless, there will be safety issues to consider, to prevent damage/overload if the door is obstructed.
How will your system cope with unwanted activation due to e.g clouds passing, insect on sensor, etc?
Does your opener/closer include internal limit switches?
 
Chicken coop^.
Yeah, it's got physical limit switches.
I'm not too concerned about there being no obstruction detection as it's a sideways sliding door, moved in and out by turning a long threaded bar. Door's going to move at something like 1cm per second for that reason.

I'm hopeful false positives wont be a big deal as I'm not reacting to direct sunlight - rather after sunset/before sunrise, but I'm making this for my Brother and did explain it could be an issue.
It's a short term solution as the area where the coop is will most likely have mains power within a year.
At that point there'll be a Rpi + web-interface to control garden lighting, so the coop's going to be controlled by that, based on sunrise/sunset API calls.

If the short term solution means he doesn't have to get up at 3/4 am through the coming summer, he'll be happy enough. :D
 
The chicken coop is equipped with physical limit switches. While it lacks obstruction detection, I'm not overly concerned because it uses a sideways sliding door. This door operates by rotating a long threaded bar, resulting in a movement rate of about 1cm per second.

I anticipate minimal issues with false positives since the mechanism operates post-sunset and pre-sunrise, rather than in direct sunlight. Nevertheless, I've informed my brother (for whom I'm designing this) about the potential for occasional hiccups.

This setup is a temporary measure. Within a year, the coop's location will likely have access to mains power. Subsequently, a Raspberry Pi with a web interface will take over, managing garden lighting and controlling the coop door based on sunrise/sunset data from APIs.

If this interim solution spares my brother from waking up at 3 or 4 am during the upcoming summer, Air Cushion Machinehe'll be quite content.
 
Top