Alarm clock switches computer on

project: , published: by Maarten Tromp.

My student room was a single room. I had a huge self-assembled computer, but it was so noisy I couldn't sleep with it powered on. So in the evening I powered down the computer, go to sleep, and in the morning, get out of bed and power it up again. Now how can we optimize this?

If my computer were to power up automatically in the morning, that would save me one step. The BIOS had an option for that, but it could only power up on the same time every day. Since my schedule was more flexible than that, I needed a more flexible solution. There is however a device that knows exactly when I should be getting out of bed; my alarm clock. So why not switch the computer on when the alarm sounds?

I opened up the alarm clock. There were only a few parts inside; transformer, buttons, display, piezo speaker and a black blob chip. Given the options I choose to use the piezo speaker as trigger. I mounted a 3.5 mm jack chassis in the side of the alarm clock and wired it in parallel to the piezo speaker. From there I ran a wire to the computer.

Inside the computer I connected the wire directly to a TIL111 optocoupler from the parts bin. The optocoupler output was connected in parallel with the power button. If I recall correctly this was all the circuitry there was. No smoothing, no debouncing, no current limiting, just a single optocoupler. Now if everything would go according to plan, the alarm clock would drive the optocoupler as well as the piezo speaker, tricking the computer into thinking that someone had pressed the power button.

The setup worked first try! Since that day I woke up to the sound of my alarm clock and my pc. And since I could not sleep with the computer powered on there was nothing else to do than get out of bed. Talk about win-win.

However, as I found out later, snoozing the alarm would trigger another alarm 9 minutes later. This would simultaneously be transferred to my computer which registers it as another power button press and starts to power down again. This was clearly not the intent.

To counter this effect I could wire the alarm clock to the wake-on-lan port on the network card instead of the power button. This would provide the power up functionality, without the power down side-effect. But before I got around to do this something unexpected happened. I replaced the hard disk with a bigger one. But the old hard disk, being some old server disk, was the reason why my computer was so noisy in the first place.

With the computer much more silent I could sleep with it powered on. There was no more need for the alarm clock power switch. So soon I started to work on a script that would play music in the morning to get me out of bed.