Turn a PC on with a Knock and an ATTiny

Pressing the power button on your computer usually isn’t too much trouble, unless your computer is stored away somewhere hard to reach. [Joonas] has been hard at work on a solution that would also impress his friends, building a knock sensor to turn on his PC.

For around $10 in parts he put together an ATTiny45 that emulates a PS/2 device, which takes advantage of his computer’s ability to boot upon receiving PS/2 input. The build uses a Piezo buzzer and a 1M Ohm resistor as a knock sensor exactly as the official Arduino tutorial demonstrates, and one of those PS/2-to-USB adapters that are most likely lurking in the back corner of every drawer in your office.

[Joonas] used AVRweb to disable the 8X clock divider so there’d be enough clock cycles for PS/2 communication, then loaded some test code to make sure the vibrations were being detected correctly. You can check out his Github for the final code here, and stick around after the break for a quick video demo. Then check out a similar hack with [Mathieu’s] home automation knock sensor.

Post navigation

14 thoughts on “Turn a PC on with a Knock and an ATTiny”

Did something similar on a tower i modified before. It was an old IBM that had a broken plastic button for the power. Decided to bondo over it and install a reed-relay. Any time i wanted to turn it on, i just waved a magnet in the bottom corner(far far away from any components) and voila almost like magic. To turn it off i just hovered it longer than usual.

Would be great if someone could get a NFC switch working where it either turns on with the right phone or logs the user in automatically.

Except for archaic diskettes and floppies you really can’t hurt your computer with ‘normal’ magnets. I’m sure if you had some 2T beast of a magnet the RAM wouldn’t be happy but the HDD is encased in mu metal which block magnetic fields, mostly to keep it’s magnets from screwing w/ the computer.

See: http://www.kjmagnetics.com/blog.asp?p=hard-drive-destruction
(They sell strong magnets at reasonable prices, and I love their blog). In summary, they tried to “damage” a hard drive with strong magnets, and could not corrupt the files. They stopped trying when they got to magnets so large, that it was actually deforming the hard drive and they heard rubbing sounds. Squishing the hard drive was not the method whey wanted to use to corrupt the data…
– Steve

Problem here: It works for wake up and shut down, as you synthesize the function of pressing the power button. So if you knock while using the pc, it would shut down. The PS2-Bios thing is a simple way to only have a wake-up signal.