Newby needs help with 555 switch

Thread Starter

gayoub

Joined Jan 14, 2018
15
Hi all
I am trying to make a dark activated switch using a 555 timer. However, it needs to be very bright for the LDR to deactivate the relay. There seems to be very little adjustment on the potentiometer. I have tried different LDRs but still can't get the fine tuning. Can anyone help. I have included the diagram.
Thanks in advance
George
 

Attachments

dl324

Joined Mar 30, 2015
18,219
Welcome to AAC!

What is the dark resistance of the LDR and what is its resistance at the light level you want to deactivate the relay? You need the voltage at pin 2 to be less than Vcc/3.

BTW, that schematic is crap. It doesn't label the pin functions, so anyone not using 555 timers enough to recall pin function has to look it up.

Also, bipolar 555's can only sink around 200mA; with typical output voltage being 2.5V, so the relay coil will only see 9.5V (typical).
 

Thread Starter

gayoub

Joined Jan 14, 2018
15
Welcome to AAC!

What is the dark resistance of the LDR and what is its resistance at the light level you want to deactivate the relay? You need the voltage at pin 2 to be less than Vcc/3.

BTW, that schematic is crap. It doesn't label the pin functions, so anyone not using 555 timers enough to recall pin function has to look it up.

Also, bipolar 555's can only sink around 200mA; with typical output voltage being 2.5V, so the relay coil will only see 9.5V (typical).
When the light shines on the LDR it reads .850 and when it is dark it is 1.500.
 

Ford Prefect

Joined Jun 14, 2010
245
A good idea would be to dump the 555 as it has very wide hysteresis. This is probably why the light needs to be very bright for the relay to switch off.
I hope my suggestion below helps you but.....
Why not use a LM358 as in the circuit below which I have built and works very well.
I used a G5528 LDR which you can buy almost anywhere but you can use another type.
You will have to add a NPN transistor (Eg. 2N2222) as the source current of the LM358 may not be enough to switch the relay.
Setting the 100k potentiometer to about 50% will switch the LDR on/off more or less at the point of twilight (the LDR will be about 60k) but this threshold can be adjusted by using the potentiometer.
The hysteresis is governed by the 220k resistor (which will probably be ideal) but this can be changed to higher or smaller value - Higher value = smaller hysteresis / Lower value = wider hysteresis
LM358 Dark-Light Switch.jpg
 

Thread Starter

gayoub

Joined Jan 14, 2018
15
A good idea would be to dump the 555 as it has very wide hysteresis. This is probably why the light needs to be very bright for the relay to switch off.
I hope my suggestion below helps you but.....
Why not use a LM358 as in the circuit below which I have built and works very well.
I used a G5528 LDR which you can buy almost anywhere but you can use another type.
You will have to add a NPN transistor (Eg. 2N2222) as the source current of the LM358 may not be enough to switch the relay.
Setting the 100k potentiometer to about 50% will switch the LDR on/off more or less at the point of twilight (the LDR will be about 60k) but this threshold can be adjusted by using the potentiometer.
The hysteresis is governed by the 220k resistor (which will probably be ideal) but this can be changed to higher or smaller value - Higher value = smaller hysteresis / Lower value = wider hysteresis
View attachment 148850
Appreciate that. Just bought some LM358s from eBay. Can you explain the other LM358 in the diagram. It looks like there are three.
 

BobTPH

Joined Jun 5, 2013
11,463
Three? I see only two. The second one is not used and is wired to keep it from acting erratically and interfering with the other one.

Edit: Ah, I see. There is a third box indicating only the power connections to the LM358. And BTW there are two because there are two in a package.

Bob
 

Ford Prefect

Joined Jun 14, 2010
245
Appreciate that. Just bought some LM358s from eBay. Can you explain the other LM358 in the diagram. It looks like there are three.
No, there is only one LM358. The LM358 has 2 op-amps inside as below..
LM358.jpg

The symbol on the left of the schematic labelled LM358 is the 12vDC and GND rails (Pins 8 and 4)
The symbol in the middle of the schematic is one half of the LM358 using pins 2 and 3 for the inputs and pin 1 as the output.
The symbol at the bottom of the schematic labelled LM358 are pins 5, 6 and 7 which should not be left floating. Pin 5 is connected to GND and pins 6 and 7 tied together.
It would also be a good idea to solder in a 0.1uF capacitor between pins 4 and 8 which will decouple the LM358.
Anything else then please ask.
I am sure other members will augment this. :)
 
Last edited:
Top