# Minimal components for timer relay

A 5V LED should run for a predefined time period once a button is pressed. The LED should be illuminated for the same duration as the button is pressed, but only once the button is released and illumination should last at least 5 seconds. The time deviation should not be more than 2 seconds. Since the controller needs to be positioned on the backside of a wood panel, only limited physical space is available (the smaller the better). A 5V power source is provided for. The project is part of an art project that is to be displayed on a music festival in the summer of 2020. At least 200 of these panels+controllers are needed, so cost should be reduced to a minimum.

Previously (prototype), an Arduino Nano was used. Now, cost and size need to be reduced further. What would be the minimal components required to complete this task?

• A simple 555 monostable timer configured for 5 minutes should do the trick. – chamod Apr 3 at 4:55
• You should define how much current is drawn. If it is in mA and the 5 minutes don't need to be very accurate, a RC plus mosfet will even do the trick. – Huisman Apr 3 at 5:10
• If you must stay digital: Check out the PIC series of microprocessors. I find them priced at around 50 cents. – JRE Apr 3 at 5:25
• You can do this with a $0.25 4060 counter , transistor to drive LED but a PIC is best – Sunnyskyguy EE75 Apr 3 at 5:52 • A small micro could do it in software, you could use an ATTiny108 they are less than$0.20 if bought in bulk. But a small micro, the LED and a decouple capacitor would be minimum required components. – Puffafish Apr 3 at 8:14

There are many low-cost approaches for solving this problem. I will list the two that I would consider:

1) CD4060 (or 74HC4060) timer / oscillator. These chips cost several pennies from Asian suppliers. A few resistors and a couple of capacitors are required. Probably may also need an output buffer for the LED, depending upon LED current.

2) 6-pin Microchip PIC. These are also available for very little money, although my favourite part from that family (PIC10F321 or 322) does cost a bit more. The chip can directly supply up to 20mA or so to the LED, so a buffer may not be needed. Again - depends on the LED. You can also feed the LED with multiple pins for more current.

Still need a couple of resistors and a couple of capacitors but otherwise very simple.

The PIC-based solution is probably the most flexible and would also have the smallest footprint. You could literally fit the whole circuit on a PCB the size of a postage stamp.

• How is the PIC programmed? Would require a program connector as well, though? – Huisman Apr 3 at 6:54
• I would include pads for in-circuit programming. Most of Microchip's low-cost tools will do ICSP. – Dwayne Reid Apr 3 at 16:56

As I read your question, the LED is to stay on for the same amount of time as the switch is on, but for at least five seconds. ( I don't know why others are saying five minutes.) I have designed analog circuits that could do this, but by far the least expensive solution is the PIC. One six or eight pin PIC, a bypass cap, the switch, a resistor or two, and a FET if the LED requires more than 20 miliamps. All would fit on a PCB about half an inch on a side. ( Assuming the switch is located off board (and possibly the LED.))

• The "5 minutes" comes from the original question before it was edited and changed to 5 seconds. – Dwayne Reid Apr 3 at 16:52

When timing doesn't need to be that exact, the schematic below is another option: it is also very simple, no programming and it doesn't require more components than shown, so it satisfies the condition least components the best.
Maybe its dimensions are a bit larger due to the capacitor.

EDIT
Timing requirements have been changed by OP, which makes this solution better/smaller:
For the capacitor now a way smaller capacitor like a SMD 0603 4.7uF 10V can be used, costing hardly nothing.

For a low power LED, a low power PMOS can be choosen which may be compatative in privce to the PIC solution. And this solution may also have a smaller total footprint.
For a higher power LED, the PIC solution as well as this solution require a power mosfet, which makes this solution definitely cheaper.

end of edit

The PMOS and R2 depend on your choice for D1. Also R1 and C1 values can be tweaked a bit to get closer to the 5 minutes when desired (current values should give about 335 seconds).

simulate this circuit – Schematic created using CircuitLab

• The problem with this circuit is that the LED takes a long time to turn OFF completely. That may not be a problem - only the original poster can say. – Dwayne Reid Apr 3 at 16:54
• @DwayneReid Ah, haha, I read 5 minutes instead of 5 seconds... makes the circuit way smaller... thanks for addressing it. Will change it soon. – Huisman Apr 3 at 17:20