Light activated circuit.

Thread Starter

ccs6971

Joined Sep 9, 2019
10
Hello, First post but not last.
I am needing help with a circuit I have in mind. I want to use a LDR to activate a LED but I need the LED to stay on until light strikes the LDR again.
Basically:
Box lid closed= LED off
Box lid opened and closed= LED on and stay on
Box lid reopened and closed= LED off until box lid reopened.
Cycle begins with lid closed and LED off then, open lid LED on stay on, open lid again and LED off stay off, repeat
I studied electronics when I was in the service 20+ years ago and don't remember much.
Any help or suggestions are greatly appreciated.
 

AnalogKid

Joined Aug 1, 2013
8,575
You need a toggle (alternate-action) function of some kind. A two-MOSFET flipflop will do this with very little current draw in the LED-off state. So will 1/2 of a CMOS D flipflop chip, like a CD4013, driving a MOSFET LED driver transistor.

What is the LED current?

What is the power source?

If batteries, how long do you need for the circuit to stay active before the batteries run down?

ak
 

Thread Starter

ccs6971

Joined Sep 9, 2019
10
You need a toggle (alternate-action) function of some kind. A two-MOSFET flipflop will do this with very little current draw in the LED-off state. So will 1/2 of a CMOS D flipflop chip, like a CD4013, driving a MOSFET LED driver transistor.

What is the LED current?

What is the power source?

If batteries, how long do you need for the circuit to stay active before the batteries run down?

ak
Hello thanks for the reply! I'm in the concept phase right now so I know what I want to do but am designing and planning. It will be battery powered, probably 9v. Duration of on state is probably 2-3 hours. I will do research on mosfet flip flop circuit. I am not too familiar with mosfets so any help is appreciated.
 

Thread Starter

ccs6971

Joined Sep 9, 2019
10
I get my checks in the mail and the mailbox is 100 yards from where I can see it. I want to make a circuit and device that allows a led on the back of my mailbox. Internal circuit has LDR. When mail person opens box to insert mail, circuit is activated making LED act as an alert that I have mail and not wasted trip to box. When I open the box to get mail it turns off LED and resets until.next opening by mail person.
 

ScottWang

Joined Aug 23, 2012
6,933
The current of 9V battery is 300mA or 600mA or others?

So the led is for illumination function then it should be a High-brightness led as 3V/20mA.
 

ScottWang

Joined Aug 23, 2012
6,933
Maybe you can add a LMC555 CMOS Timer to make a 1 Hz flashing led, it is more easier to see the light at the daytime.

Someday you may want to build a mail auto alerts system, like as to use your smartphone and EP8266, when the mail insert into the mailbox and the EP8266 get the message and send a signal to your smartphone through the Wifi.
 

AnalogKid

Joined Aug 1, 2013
8,575
I get my checks in the mail and the mailbox is 100 yards from where I can see it. I want to make a circuit and device that allows a led on the back of my mailbox. Internal circuit has LDR. When mail person opens box to insert mail, circuit is activated making LED act as an alert that I have mail and not wasted trip to box. When I open the box to get mail it turns off LED and resets until.next opening by mail person.
Something you will discover is that people do not always do what you want them to. If the mailman opens the box, puts in some mail, closes the box, and the realizes he has more mail and opens it again, then when he leaves the box will be full and the light will be off.

This problem was solved over 100 years ago. What is wrong with the red metal flag that already is built into some mailboxes?

ak
 
Last edited:

Thread Starter

ccs6971

Joined Sep 9, 2019
10
Something you will discover is that people do no always do what you want them to. If the mailman opens the box, puts in some mail, closes the box, and the realizes he has more mail and opens it again, then when he leaves the box will be full and the light will be off.

This problem was solved over 100 years ago. What is wrong with the red metal flag that already is built into some mailboxes?

ak
Alot of mail theft where I live. Something as obvious as the flag lifted would indicated something to grab either outgoing or incoming. With an LED it would only be seen from the back of the box which is facing my house.
 

MrChips

Joined Oct 2, 2009
21,818
This thread is a perfect example of the importance of stating up front the application of the initial request.
The solution as proposed in post #1 has flaws, as already identified in the replies:

1) The LED should remain activated until reset on retrieving the mail.
2) A flashing LED is easier to see and will consume less power.

CD4013 is a dual flip-flop. You can also create a simple S-R flip-flop using a pair of NAND or NOR gates (CD4011 and CD4001 respectively).
 

AnalogKid

Joined Aug 1, 2013
8,575
A set-reset would function better (open door = set; pushbutton = reset) but now you have wires going to two switches as opposed to the automatic nature of the LDR approach. Maybe combine the two - LDR for set, button for reset. I think the extra effort is worth it, but it's not my mailbox.

ak
 

LesJones

Joined Jan 8, 2017
2,694
There have been some good points made about the design concept. I would use a reed switch and magnet on the door (Instead of an LDR.) to switch the trigger the LED on. I think the idea for you to switch the LED off when you collect the mail is a good one. For this I would use a reed switch at a location known only to you inside the mail box. When you collected the mail you would wave a small magnet near to the reed switch to switch the LED off. One other thing I would do is to have the LED to flash with quite a low duty cycle which would save power and give a brighter more noticeable flash.

Les.
 

MrChips

Joined Oct 2, 2009
21,818
Now we are getting to some reasonable design aspects.

1) Use a set-reset flip-flop. There are different ways to implement this.
2) Use a microswitch to set the flip-flop.
3) A simple push-button to reset the flip-flop.
4) Flash the LED, 100ms ON, 900ms OFF.
 
Top