Hello everybody!
My vehicle light system is built around the idea to use a tactile button for system ON, then use software to trigger system OFF.
(this, instead of a ON/OFF main switch.)
This way i can use a combination of user input-buttons, a temperature sensor limit, or a battery voltage limit as a system OFF-trigger.
The auto-off part of my project is copied from this LINK! (at homecircuits.eu)
Ive constructed my circuit according to the link above, created a clean sketch containing only the part of setting the keep_ON-pin (D8) to HIGH, to take over from the button-press.
Now, my circuit works exactly as described, but it requires a button-press with MINIMUM length of 2-3 seconds before it latches to ON-state.
I know, i shouldnt try to fix what isnt broken, and a 3 second ON-press could be considered a feature to filter out accidental buttonpresses, but i still want to reduce the boot-delay as much as possible...
From what ive gathered, this delay is mostly due to the fact that the arduino waits a defined time at boot-up to see if its being re-programmed.
Is this true?
Is there a way to reduce this number and still be able to upload new sketches?
I do have multiple arduino´s (nano, ch340), so i figure i would be able to use one of them as a programmer, but i have never dived this deep into programming..
Alternatively, i could build a 555 timer circuit between the button and the optocoupler/mosFET pair that works as the ON/OFF-switch.
The ON-button would trigger the timer circuit, witch would in turn keep the circuit up for say 5 seconds, while the arduino starts up to take over.
But ive already started populating the pcb (my own design, ordered online), so its a wee bit late to "throw in" a timing circuit...