Turing on led and 20 second lader stay off

I want to use an 555 timer and one magnet switch on my fuse cabinet door connected to one 9V battery.

I want the led to fade on after door is opened and stay on for 20 seconds before the the led fades off and stays off, until the door closes and opens again.

Is that possible with an 555 timer, 9V battery and magnet switch?

Can someone give me an headstart regards to the wiring?

Some ideas

I can't see where an Arduino would fit in this project. You could use an ATTiny85! this would at least fit with this forum.

Arduino for lighting up an led for 20 seconds and turn it off?

I know this is an Arduino forum, but i if every question have to had something with arduino to do, i'm sorry. Then i have missunderstood.

That was not your specification.

This was your specification, notice the word 'fade'? Turn an LED on, and turn it off after 20 seconds is not the same. On/Off can be done.

And yes, Using the Arduino/ General Electronics section does kind of tell us it's general electronics using an Arduino!

Hello
I would realize this task with an Arduino.
Sooner or later, additional wishes come to this function.

General Electronics
Resistors, capacitors, breadboards, soldering, etc.

I think it's all fair enough.

For straight on/off behaviour, a 555, a cap and a few resistors will fit the bill. For fading, on the other hand, you will need the PWM capabilities of a uC. An arduino is overkill for that; an ATTiny85 will do, like it was suggested on post #2.

The biggest problem with this project is the 9V battery, any proposed circuit using a 555 timer is going to flatten the battery in a few hours, or a few days if you are lucky.

You can:

  • Forget the dimming and just use a switch to turn the light on and off
  • Design a circuit that goes to sleep and consumes negligible power when it shuts down
  • Use a mains power supply

You might get away with using a large capacitor to keep the LED on after the switch removes the power. You will get the fade and zero power consumption when off. Only problem being that the switch will have to charge the capacitor when it closes and that might flash the contacts.

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.