I would like to know if anyone can help with designing a circuit that powers an LED using (2) 2032 coin cell batteries (6V). The ON/OFF function of the LED is controlled by a NO switch (magnetic reed switch-like the kind used on windows in homes for security systems). I would like the LED to shut off after about 2-3 minutes if the switch is left in the NC position. I am not sure how to do this. The less components the better. Any help would be greatly appreciated.
ITYM the *fewer* components the better. How many mA for the LED?
Best regards, Spehro Pefhany
--
"it\'s the network..." "The Journey is the reward"
speff@interlog.com Info for manufacturers: http://www.trexon.com
Embedded software/hardware/analog Info for designers: http://www.speff.com
20mA is a bit much for 2 coin cells. YOu could run the led at 5mA and use a high bright one.
As for the rest of the circuit, it needs more detailed information:
1: When the switch is open (no magnet), what does the led do?
2: When the switch goes closed (magnet added) what does the led do at that moment?
3: When the switch stays closed, for 2 - 3 minutes what does the led do?
4: When the switch goes open after 3-x minutes, what does the led do?
5: When the switch goes open before 2 minutes are up, what does the led do?
6: When the switch stays closed for indefinete, what does the led do?
7: When the switch goes open and closed again after 3 minutes, what does the led do?
This could be converted to a truth table. As it is, it sounds like it is probably a monostable multivibrator also known as a 'one shot'.
Ben is right. 20mA is too much for a 2032 coin cell. The Maxwell data sheet gives a figure for 10mA for five seconds, aftere which you'd probably cook the battery.
formatting link
Think about some kind of battery better adapted to relatively high current pulsed loads - NiCd and NimH come to mind, or some form of passive display.
Can you use a Normally Open magnetic switch. Since your project does nothing when the magnet is near (Open)? This will make the batteries last longer and the project somewhat simpler. Personally I'd use a tiny
10Fxxx series PIC processor. But then again I use a PIC for most everything I build. keep the power super low with an RC oscillator or
32KHz crystal. The PIC can drive an LED directly and a small 1N4148 diode to get the power down to 5.3 volts or so. OR use only one 3V battery and modulate the LED directly from the PIC pin at around 40Hz or so. (apparently bright with less power)
That is not a "logic" description. A logic description would go something like this:
A)LED turns ON when SW opens but no sooner than 2-3 mins since last ON. B)LED turns off immediately when SW closes, and remains off.
That takes care of 1,2,3,4,5, and 6.
Number 7 seems to be saying you want the LED to alternate between ON/OFF at 4 minute intervals when there is no change in SW action. But this contradicts 6 where you call for the LED to remain OFF indefinitely. But then it could be interpreted as 4 minute delay in actuation or deactuation. Who knows. Get your story straight and post your question to the Basics NG.
In simple terms, all I really want to do is control a bright white LED using (2) 2032 coin cell batteries (I don't have a lot of room) and a remotely located magnetic switch (NO or NC) so that the LED turns ON when the magnet is moved away from the switch and the LED turns OFF when the magnet is moved near the switch. The challenge for me is have the LED turn OFF after roughly 2-3 minutes after being turned on. Thanks.
--- Sorry, hit the TX button by mistake on the last one.
OK. AIUI, (if we use the analogy of a window actuated switch) with the window shut, the LED will be off. If the window is raised the LED will come on and will stay on for a few minutes and then go off even if the window stays open, but if the window is closed before the few minutes goes by, the LED will go off as soon as the window is closed.
On top of that, because of your battery constraints, you'd like to have the circuit draw zero or close to zero power when the window is closed or when the LED goes off if the window is still open but the circuit times out, right?
You described it perfectly. The board space is 1 inch square. So far it is populated with the LED, resistor, space for switch wires, and the batteries (stacked) in the CAD model. It sounds like I may need more room for other components. If I new what they were I could start thinking about where they could go.
I went "outside the box" a little on this. I made the assumption that the reason you wish to have the LED turn off is to save on battery drain. So I aimed for low quiescent current, and low current while the LED is glowing, plus long time with the LED glowing for you to notice it. You also wanted a simple design, with low parts count to fit in 1" sq.
The circuit uses a 6000 MCD red led that may well suit your needs in place of the bright white LED. It draws only a hair over 6 ua quiescent current when the magnet is near the switch. When the magnet is removed, the max current is < 3 mA, and the LED lights and stays lit > 3 minutes with ever diminishing current. The brightness diminishes gradually during the period, remaining very easily noticed for well past 2 minutes. The LED is still easily detected at < 100 uA if you look directly at it. When the magnet is left away from the LED for long periods, current draw drops to zero (after ~ 10 minutes).
+6 ---+----------------------------+ | | | 3 minutes) but I suspect it meets your needs. If you must have a shorter period of time with the LED lit, you can reduce the value of the 1000uF cap.
I'll set this circuit up after ordering components. I have the caps and resistors. Any suggestions other then Digikey and Newark? Radio shack has limited components. Can I just exchange the red for the white in this case? I guess I'll find out after I try it. I like that there are limited number of components.
You can't exchange the red led for a white and get the same performance. White LEDs need a higher voltage than Reds, which will translate to more drain on the battery when the LED is lit. The red LED I specified is a really good performer in terms of visibility vs battery drain.
If you want to try a white LED, you'll need to change the value of the 1K resistor that is in series with the LED to
150 ohms. A higher value will make the LED glow less brightly, but will make the drain on the battery lower.
For parts, try All Electronics:
formatting link
Catalog #'s: LED-94 ($.75 each), 2N3906 (5 for $.75), and try
2N3904 (5 for $.75) in place of the BC337. You'll pay more for shipping/handling ($7.00) than for the parts, so think about adding more parts to the order. Shipping charge does not increase unless weight goes up appreciably, as I recall.
Also (in general, not necessarily for this project) look at Mouser as a parts supplier. like Newark & Digikey, they have just about everything, and there is no minimum order.
ElectronDepot website is not affiliated with any of the manufacturers or service providers discussed here.
All logos and trade names are the property of their respective owners.