# 555 timer with photocell

#### Mountain man

Joined Mar 15, 2014
28
I am trying this circuit out as well. I think I can use this 555 timer to make the leds flash , Solar panel, Charge batteries, and turn on at night. Can someone tell me where i would hook up the photocell to make this turn on at night? This way i can adjust the flashing to my liking if i go with the 555.

#### AnalogKid

Joined Aug 1, 2013
8,487
The only real control pin on a 555 is the Reset pin, which is a digital input. You would have to condition the photocell with an opamp or comparator to give a clean signal when to turn on and off.

ak

#### Mountain man

Joined Mar 15, 2014
28
How about using a pnp for the photocell and then to the 555? If that would work any direction would be greatly appreciated.

#### #12

Joined Nov 30, 2010
18,210
True. There is no way to make a photocell just plug in to a 555 circuit and work right.
You could do it in a sloppy way and get sloppy results, but the photocell needs a switching point and an amplifier to get it to work sharply at a certain light level.

#### #12

Joined Nov 30, 2010
18,210
How about using a pnp for the photocell and then to the 555? If that would work any direction would be greatly appreciated.
Still a sloppy switching function.
If you just want it to respond to a flashlight in a dark room, one transistor might work. If you want it to respond to the very slow change of our sun, that won't work very well.

#### Mountain man

Joined Mar 15, 2014
28
What would be the best way to connect this circuit to a solar panel with rechargeable batteries and turn on when the sun goes down? I am still new to this and i appreciate all the help!

#### #12

Joined Nov 30, 2010
18,210
First, you have to declare whether the photocell has more resistance or less resistance when it sees light, then decide on which resistance you want to switch at. It seems all photocells are a bit different from other part numbers.

I did this by going outside at night to see what resistance it would have under a full moon and with a street light about 50 feet away. The switching has to occur while considering this light pollution.

#### #12

Joined Nov 30, 2010
18,210
Kind of like this:

#### Attachments

• 9.5 KB Views: 61

#### Mountain man

Joined Mar 15, 2014
28
LM741 17741 IC OP AMP COMPENSATED DIP-8 would this one work? Thanks for the drawing #12

#### #12

Joined Nov 30, 2010
18,210
Yep. a 741 should work here because the switching point is expected to be in the middle of the power supply voltage. 741 chips suck in a lot of applications, but this one is the kind of thing they can do well. You might need a transistor on the output of the chip to make sure the output voltage is high enough to switch the reset pin "on".

#### Mountain man

Joined Mar 15, 2014
28
Great thank you very much Sir.

#### ScottWang

Joined Aug 23, 2012
6,909
If you want to have auto charge and the LED auto flashing by photocell, the circuit as below will be the reference.

Something with the circuit that you should be care as below:
The voltage of photocell should be higher more than battery about 1V, because the Vce of Q1.

The VR1 is adjusting the working sensitivity for 555.

The circuit has not tested it yet.

#### Attachments

• 7.4 KB Views: 114

#### Mountain man

Joined Mar 15, 2014
28
Thank you very much Scott. I will try to get this together soon.

#### #12

Joined Nov 30, 2010
18,210
That looks to me like Scott thinks your photocell is a solar collector, and I think it is a variable resistor. Want to clear this up?

#### Mountain man

Joined Mar 15, 2014
28
What I have is a solar cell, that will charge 4 aaa batteries. The batteries will run 6 leds that will turn on at night and charge during the day. If there is another way to do this with out the photocell I can go that way to. I already built this with flashing leds but did not like the look so now I'm on the 555 timer so I can adjust the speed of the leds

#### #12

Joined Nov 30, 2010
18,210
Oh dear! I have been operating under a false belief.

The circuit I gave you will work as a, "night" detector by using a variable resistance photocell. You may or may not want to use that in addition to having a solar cell charge a battery.

I think Scott's circuit will work, based on the idea that the timer starts whenever the solar collector stops charging the battery. There is some adjustment range for the "start" time (compared to sunset) by using VR1. I also think you will need another 4.7k resistor from Battery+ to the collector of Q2 and change R6 to 22k.

Try Scott's scheme if you want to, and if it doesn't fire up as the sun goes down, try my modifications.

#### Mountain man

Joined Mar 15, 2014
28
#12 I just ordered those chips so I will let you know how it goes. Should be here Thursday

#### ScottWang

Joined Aug 23, 2012
6,909
I also think you will need another 4.7k resistor from Battery+ to the collector of Q2 and change R6 to 22k.

Try Scott's scheme if you want to, and if it doesn't fire up as the sun goes down, try my modifications.
I have been considered about the 4.7K that you tried to add in, but what I thought was that when the sunset and the photocell no power output, Q1,Q2 will be turn off, and the current will flows from the bat1 through Vcb(as a diode) of Q1 and R7, diode(1N4148), VR1, R4, and turn on the Q3.

If 555 used 4 LED as the type 3V/20mA/5mm, it will need about 80mA, but when they are flashing then it could be only need 40mA, so the Q1 maybe ok for the application, otherwise it will need as 2SC1384 or some other bjts has similar specs.

In the beginning that I just considered only 1 LED, when the circuit used 4 LEDs, so maybe R6 really need to change to some higher values, it depends on the Mountain man to try it.

#### #12

Joined Nov 30, 2010
18,210
I have been considered about the 4.7K that you tried to add in, but what I thought was that when the sunset and the photocell no power output, Q1,Q2 will be turn off, and the current will flows from the bat1 through Vcb(as a diode) of Q1 and R7, diode(1N4148), VR1, R4, and turn on the Q3.
You have seen my concern. I think the NPN transistor will not leak enough because it is reverse biased on its collector. I know the base emitter junction can be used as a zener diode but I have never seen a base collector junction used like that. This is why I gave an option, in case it doesn't work as a zener that way.

#### ScottWang

Joined Aug 23, 2012
6,909
You have seen my concern. I think the NPN transistor will not leak enough because it is reverse biased on its collector. I know the base emitter junction can be used as a zener diode but I have never seen a base collector junction used like that. This is why I gave an option, in case it doesn't work as a zener that way.
I just hope it will work like a diode not a zener diode, if the photocell off time is too late, maybe it will need the 4.7K, because the 4.7K will dissipate some power from the battery, so if no need to use it is better.

Edit : Maybe in series some diodes or one zener could solve the problem of photocell during sunset.

Last edited: