Some simple way to keep an LED lit for some duration after motion?

Thread Starter

wrybread

Joined Jul 3, 2005
34
I'm trying to keep an LED illuminated for ideally a few minutes after it's illuminated by a vibration switch. I'm using this kind of vibration switch;

1723623943004.png

It works well to momentarily illuminate the LED but now I need to find a way to keep it lit for a period. Ideally that would be a few minutes, but even a few seconds could work. And the circuit needs to fit into a very small space and I need to make a lot of them, so I'm trying to find as simple a method as possible. The illumination time is flexible and the illumination doesn't have to be perfectly uniform during that period. In other words there can be a fade, that doesn't matter.

With that in mind can anyone think of a super simple way to keep the LED lit? Maybe a small capacitor or something similar?
 

ericgibbs

Joined Jan 29, 2010
21,391
Hi wry,
Charging a capacitor via that vibro switch and running an LED for even 1Sec, is not feasible.
It would require a very large capacitor.
Also the switch is rated at 10mA max.
E
 

Attachments

Externet

Joined Nov 29, 2005
2,626
Last edited:

AnalogKid

Joined Aug 1, 2013
12,045
Rather than store battery charge in a capacitor, then pee out that charge into the LED, you will get much better performance if you put a timed switch between the battery and the LED. There still has to be a capacitor, but it is only to set the time the power remains switched on after the last switch closure. With the ultra-high input impedance of a MOSFET, the cap can be pretty small. In very round numbers, approx. 1 second per uF of capacitance.

1 - R
1 - C
1 n-channel MOSFET optimized for low voltage operation.

Schematic later.

And just because I know someone is gonna say it - this can be done with a very small microcontroller (uC). The chip is less than $1 in single pieces, and that is the entire circuit. The chip has an internal oscillator and timer programmable from milliseconds to years, it drives the LED directly, and if it is really close to the battery you don't even need a power supply decoupling capacitor (maybe).

ak
 

ericgibbs

Joined Jan 29, 2010
21,391
And the circuit needs to fit into a very small space and I need to make a lot of them,
so I'm trying to find as simple a method as possible.

With that in mind can anyone think of a super simple way to keep the LED lit?
Maybe a small capacitor or something similar?
hi wry.
How tight is this specification, for size, cost and quantity?
E
 

MrChips

Joined Oct 2, 2009
34,628
In terms of smallest size and lowest cost, look at the following MCUs:

Microchip PIC10F200
Microchip PIC16F15213
Microchip (Atmel) ATtiny202, 212
 

AnalogKid

Joined Aug 1, 2013
12,045
First pass at the basic concept. With each vibration, SW1 closes and tops off the charge in C1. The voltage across C1 is enough to cause Q1 to conduct. When the switch stays open, R1 discharges C1 to the point that Q1 turns off.

ak


!!LED-Vib-Timer-1-c.gif
 

AnalogKid

Joined Aug 1, 2013
12,045
Here is an updated version of the design.

The R1-C1 time constant is the same, but the components have been scaled to decrease the amount of charge drawn from the battery by C1.

The switch contacts are rated for only 10 mA. R2 decreases the peak switch current to less than 4 mA. Note that the current into C1 is at this level for only a few milliseconds. When the device is at rest, the only circuit current is the Q1 leakage current.

ak


!!LED-Vib-Timer-2-c.gif
 

sghioto

Joined Dec 31, 2017
8,633
Since the battery is only 3 volts and for a definitive cutoff use a cmos 555 like the LMC555 in this configuration.
Delay time 2 minutes with C1 and R2 values shown.
1723668534958.png
 
Last edited:
Top