Simple LED circuit needed- can it be discrete parts or a micro? - Page 1
Forum section: electronics / beginners

author: Majek Ondrovic
author_rank: Contributor
timestamp: February 28, 2021, 06:55:22 am
content: Have a very simple LED circuit I'm struggling with. Cannot seem to get it to work right on simulators using all discrete components and I'm wondering if I have to use a microcontroller for this:A momentary switch turns on an LED that then turns off after a small delay (which can be adjusted by a pot). However- the LED will still shut off after the delay even if the switch is held closed.As soon as the switch is open, the LED will be ready to come on again the next time the switch is closed.Any thoughts?

author: mvs
author_rank: Frequent Contributor
timestamp: February 28, 2021, 08:46:20 am
content: It is a typical job for 555 timer...https://www.falstad.com/circuit/e-555monostable.html

author: Terry Bites
author_rank: Super Contributor
timestamp: February 28, 2021, 01:28:20 pm
content: This is a job for an edge triggered (non-retriggerable) monostable monostable. You can configure a 555 timer to do thishttps://www.basicselectronics.com/monostable-multivibrator/A low level on pin 2 starts the delay. A new delay cannot be innitiated durng the delay time. As long as pin 2 stays low a new delay cannot be generated.

author: Terry Bites
author_rank: Super Contributor
timestamp: February 28, 2021, 01:30:45 pm
content: This is a job for an edge triggered (non-retriggerable) monostable monostable. You can configure a 555 timer to do thishttps://www.basicselectronics.com/monostable-multivibrator/A low level on pin 2 starts the delay. A new delay cannot be innitiated durng the delay time. As long as pin 2 stays low a new delay cannot be generated.

author: mariush
author_rank: Super Contributor
timestamp: February 28, 2021, 03:07:12 pm
content: Considering you can buy microcontrollers for as low as 10-20 cents each (excluding low volume parts or obscure brands), don't rule them out for such application.Yes, 555 could work, but you need to add all the passive components around it, while with a microcontroller all you need is the potentiometer (or you could use the extra io pins to configure the delay by simply tying pins to input voltage for 1 or to ground for 0)

author: themadhippy
author_rank: Super Contributor
timestamp: February 28, 2021, 03:24:02 pm
content: Quotedont forget something to write the code on and transfer to the micro,the time taken to write and debug the code ,o and spending sevral hours learning how to write the code.

author: mariush
author_rank: Super Contributor
timestamp: February 28, 2021, 03:29:50 pm
content: If he's a hobbyist, a few hours of reading a datasheet and programming the "make a led blink" tutorial and then adapting it to his needs would be a well worth investment.Programmers can be cheap, you can get microchip programmers for less than 20$, other programmers are super cheap as well.If it's for a mass produced device, it can again be beneficial, yeah you spend maybe 100$ in man hours learning to program the micro, but you may save a square inch of circuit board by replacing the 555 and all surrouding passives with a single part, reduce BOM, reduce number of rolls of separate parts, and maybe reuse the micro logic for other things (like hold button down for n seconds for shut down or something like that) so you'd save a few cents on every manufactured board.For example the stuff in the video below is all one would need to know to make the led blink and all that..

author: Ian.M
author_rank: Super Contributor
timestamp: February 28, 2021, 03:39:28 pm
content: OTOH most MCUs have a very limited operating voltage range. If you need a voltage regulator as well as a MCU, unless you need additional functionality it rapidly becomes less attractive compared to a CMOS '555 clone and a few passives. However if the supply is in the 2.4V - 5.5V range, by all means use a MCU.