Hello,
Here is the context. I have a laptop which doesn't have the "automatic power on" in its BIOS, and will be used without a battery. So I would like to make a small circuit to simulate a press on the power button to make it reboot after a power outage. (I have easy access to the motherboard PCB because I'm running the entire thing outside its original enclosure). The timer circuit would be plugged to the 19v DC jack on the motherboard, and when the 19v power supply comes back, it would activate a small relay in parallel with on/off SPST switch for a few hundreds of milliseconds.
(for this purpose, I could maybe use an optocoupler or even a transistor but there is an issue, the on/off switch is pulling low a certain i/o line on the motherboard, but not to the same ground as the 19v input jack ground. So a relay is the quickest, easiest and least invasive method, besides maybe not the most elegant of all. But this is not the problem here, I can refine that later)
I guess there are many ways to do that with R/C timers or maybe a 555, but to be able to easily change the delay I chose to use a microcontroller, they are so cheap now.
I've made a successful attempt with a 8-pin PICAXE (again that was a quick&easy choice, in the end I will be able to do that in C on a ATtiny, but not yet) powered from the 19v by a 7805. The BASIC program was dead simple : set port C to output, make a pin high, pause 300ms, make pin low, end.
However the 7805 needs around 5mA to regulate even when the µC is sleeping and draws close to nothing. I think it is not very elegant to waste 100mW like that 99% of the time, even if it's not a problem for the 5A PC power adapter, of course. So I wanted to be able to shut off the regulator by software. There are many circuits explained online to do just that, some using a regulator with a shutdown pin, some using a pair of NPN and PNP BJTs (or a N and a P mosfet) to cut the power upstream the regulator. But I found that all of these circuits use a push button to power on the µC, momentarily bypassing the soft switch to power the microcontroller, thus giving him time to tie a pin High to maintain power afterwards.
I then came across this circuit :
http://www.wengenroth.co/projects/auto-shutoff-circuit/ , diagram below :
I breadboarded the thing (again with a picaxe 08m2) and I was amazed, it works well ! I then put a relay (with a proper diode) between +Vbat and OUT, and bingo, I have a relay that switches on for a programmable amount of time and then the whole thing shuts off and doesn't draw any power. But of course the voltage between +Vbat and -Vbat must remain in a acceptable range for the µC.
How could I modify the circuit to work from 19v ? Either by switching on and off its own regulator (e.g. a 78L05) or maybe with another trick, a dropper resistor or a zener, I don't know. I've been tinkering too many hours in a row and my mind is all foggy now, I'd greatly appreciate some fresh ideas or comments
Thank you in advance
Cheers,
JF