Turn on L.E.D for a certain amount of time - Page 1
Forum section: electronics / beginners

author: Gorgeous Jesus
author_rank: Newbie
timestamp: October 05, 2014, 05:10:51 pm
content: Hello, I've made circuit that includes a 7805 regulator and I would like to no how to make a power status led that comes on for say 5 seconds when the circuit is powered up, but then goes off after the five seconds. To minimise current drain from the battery. Thank you will

author: Zero999
author_rank: Super Contributor
timestamp: October 05, 2014, 06:55:51 pm
content: 555 timer.

author: Seekonk
author_rank: Super Contributor
timestamp: October 05, 2014, 07:22:28 pm
content: I would hook a cap from the 5V power to the gate of a FET (low voltage turn on type) and then have a 100-400K gate resistor to common neg. As the cap charges, a voltage develops on the gate resistor and turns on the FET. Once the cap is charged the LED will turn off, OK it slowly dims.

author: Gorgeous Jesus
author_rank: Newbie
timestamp: October 05, 2014, 07:42:41 pm
content: Thank you for your reply; could you recommend any particular type of FET and what value for the electrolytic capacitor would you use around 470uf? Thank you will

author: SeanB
author_rank: Super Contributor
timestamp: October 05, 2014, 08:01:55 pm
content: I did that decades ago using a 4066 quad analogue switch. That would wait 5 seconds after power on and then emulate pressing a switch. Used 3 of the 4 cmos switches, first was the delay, second was the time the switch was pressed and the third was across the switch, with the fourth being unused.You can do the same with any CMOS inverter or buffer, using a RC circuit that charges up when power is applied to light the LED until the cmos output changes state to turn it off. That only requires a single 4049, 4050 or 4069 IC in the simplest form, a capacitor and a 1M resistor to set the time, a LED and resistor to use as indicator and a single diode across the RC resistor to allow the capacitor to discharge at power off. 1M, 470uf in series, with the diode across the resistor with anode to positive, with the one CMOS gate connected to the junction. LED on the output, with the connection to either negative rail with an inverter or to positive rail with a buffer. Other 5 sections the inputs are connected to ground.

author: rs20
author_rank: Super Contributor
timestamp: October 06, 2014, 12:32:19 am
content: I second the suggestion of a 555 timer if you want the LED to cleanly turn on and off. But then again, it might be kinda cool for it to slowly fade out like the FET solution.Quote from: Gorgeous Jesus on October 05, 2014, 07:42:41 pmAn N-channel MOSFET? Just about any will do, as long as the gate threshold voltage is quite small (2V or less). We don't know where you're planning to get parts from, so I don't want to recommend any particular part on that basis. Find a particular part you can easily source, and we'll tell you if it's suitable. Having said all that, 2N7002 is just one of thousands of parts that will do the trick.You can calculate roughly (order-of-magnitude type stuff) how long the LED will stay on by calculating the time constant of the RC circuit. Real easy formula: time constant = R * C. Google can do it for you:400 kiloohm * 470 microfarad = 3 minutes!!. Try different values of C and R until you get something close to 5 seconds; keep in mind that it's a good idea to keep C small (because you don't need a physically large capacitor for this job), so I'd change C and leave R around 400k (or even push it up to 1M).

author: edavid
author_rank: Super Contributor
timestamp: October 06, 2014, 01:21:20 am
content: The paradox here is that you say you care about battery drain, but you are using a 7805 regulator. Replace that with a DC-DC converter module, and you'll save enough power to run an efficient LED all the time.

author: mariush
author_rank: Super Contributor
timestamp: October 06, 2014, 01:52:28 am
content: A linear regulator like 7805 will consume some power even when idle , about 1-2 mA. In addition, a linear regulator will waste the excess power as heat so it's not very efficient.For example, if you have a 9v battery and your device (including the internal power usage of the linear regulator) uses 10mA , then you have 9v @ 10mA in , and you have 5v @ 10mA out ... so the efficiency will be a lousy 55%.Even a simple switching regulator like MC34063 is capable of 65-75% efficiency, and better (and bit more expensive) switching regulators can achieve up to 95-98% efficiency and use very little current when idle. The downside is that besides the chip itself, you usually need other components like diode, inductor, a few resistors and a few capacitors, which takes more space on the prototyping board/pcb.... a linear regulator is just the chip and a couple of optional capacitors.Now, a led will run on a wide range of voltages because the current flowing through them controls the brightness, not the voltage. They just need a minimum voltage to turn on... For example, some red leds will light up considerably from about 1.6v, other leds like white or blue ones will need about 2.8-3v to run.I guess you could do what you want with some chip that was already mentioned by others here.Some may frown at the suggestion but I'll say it anyway... this problem would be a great start to learn about microcontrollers. A small 20-30 cent PIC12 or PIC16 microcontroller can run from about 2v and up to 5.5v, so you don't have to use a 7805 regulator unless your circuit needs it.You can write a few lines of code that would make the microcontroller turn on the led as soon as it's powered on and then turn it off after about 5 seconds, or you could write a bit of extra code to make the led blink or fade out or change the blink period depending on the battery voltage... lots of options

author: Gorgeous Jesus
author_rank: Newbie
timestamp: October 06, 2014, 03:36:59 pm
content: Hello Mariush, I used the 7805 because I wanted to learn about voltage regulators, and this particular reg, is pretty simple to use, it also is a pretty small device. I like the idea of using a Microcontroller but space is an issue as the circuit is being house in a aluminium box. It's a wireless laser security system and I know you're probably thinking it's not going to work because the aluminium is acting like a faradays cage but I've sorted that problem. I think rs20 suggestion is a pretty good one, as I like analogue electronics. RC networks are fairly new to me so I might do some research and implement one of them. Thank you will