Light dependant bicycle lamp

Thread Starter

T.Stark

Joined Jan 25, 2023
8
I'm trying to build a bicycle lamp that is on/off depending on the light. I would like it to be turned off there is light, and turned on while it is dark outside. + some kind of delay so that the light isn't immedietly turned of then exposed to light, but maybe 5-10 sec later.
I'm trying to keep the circuit as simple as possible, and this is what i've come up with so far. Any tips or insight would be much appreciated.
The 90k resistor is meant to be a photoresistor, that increases the resistance when dark, and decreases while light, thus turning off/on the n-MOSFET
Skärmavbild 2023-01-25 kl. 09.53.02.png
 

Alec_t

Joined Sep 17, 2013
14,280
Welcome to AAC.
What is the intended purpose of the op-amp? As shown it is just passing a bit less than the battery voltage to the FET drain and the 1k.
10uF/1k are way too small for setting a 5-10s delay.
In well-lit streets your light will turn off*. Probably illegal in most jurisdictions?

*Edit: and stay off.
 
Last edited:

Thread Starter

T.Stark

Joined Jan 25, 2023
8
Hi! The op-amp is only used as a buffer.
Below is an updated version. What would you change for it to work on a well-lit street?
Skärmavbild 2023-01-25 kl. 12.20.14.png
 

Thread Starter

T.Stark

Joined Jan 25, 2023
8
Hi!
How would you change the circuit so that it is turned on when dark, but goes turns off when exposed to light under a longer period of time, say 3-5sec?
 

Thread Starter

T.Stark

Joined Jan 25, 2023
8
Thanks, i've made the changes you suggested and they work as i want to. The op-amp did not add any value as you said and the delay is now good. However i'm having problems with the LED that needs approx. 20mA to emit light, but with the circuit shown below (when 9kohm is turned up, ex 900kohm), I only have about 5mA going through the LED (with a 9V battery). I have tried changing the values of the components to change this, but with no success. Do you have any insight into how or what I could change so that the current going through the LED is sufficient, while keeping the same battery?
Thanks
Skärmavbild 2023-01-26 kl. 11.58.26.png
 

Thread Starter

T.Stark

Joined Jan 25, 2023
8
Thankt alot that works perfectly. How exactly did you work out which components to change. I am having difficulties finding how the relationship between the components change the current going through the LED. Node Voltage Method?
 

Alec_t

Joined Sep 17, 2013
14,280
How exactly did you work out which components to change.
A white LED has a forward voltage drop of about 3V. So for a 9V supply and a 20mA LED current the resistor in series with the LED needs to drop about 9-3=6V. By Ohm's Law therefore its resistance = 6V/20mA = 300Ω.
For a transistor switched fully on the collector current is assumed (rule of thumb) to be 10-20 times the base current, so here the base current needs to be at least 1mA. Base current now = (9V-0.7V}/8.2k = ~1mA.
With 1mA base current the 100uF cap value needed doubling to maintain your required delay.
 

Thread Starter

T.Stark

Joined Jan 25, 2023
8
A white LED has a forward voltage drop of about 3V. So for a 9V supply and a 20mA LED current the resistor in series with the LED needs to drop about 9-3=6V. By Ohm's Law therefore its resistance = 6V/20mA = 300Ω.
For a transistor switched fully on the collector current is assumed (rule of thumb) to be 10-20 times the base current, so here the base current needs to be at least 1mA. Base current now = (9V-0.7V}/8.2k = ~1mA.
With 1mA base current the 100uF cap value needed doubling to maintain your required delay.
Great, thanks alot!
 

sghioto

Joined Dec 31, 2017
5,376
That it uses only 1 transistor, a much smaller size capacitor and a sensitivity control.
The operation is the same as in post #7 just configured differently.
As in both circuits as the ambient light level decreases Q1 will start conducting and the LED will get brighter as it gets darker until it is fully ON at some light level controlled by Vr1. It's not a discrete ON- OFF unless the light level changes dramatically.
There are other options if you want a more controlled ON or OFF circuit.
 

MisterBill2

Joined Jan 23, 2018
18,167
Consider the situation where the bike is temprarily stored in a dark place, such as a closed garage. A lite that switches on in tghe dark will switch on and drain the battery.
And when I ride my bike I always know when it is appropriate to switch on the lights, and when to switch them off.
 
Top