I want to detect taps on the desk my Windows laptop sits on, but it doesn't have a built-in accelerometer. I'd rather not add an external sensor or keep the microphone listening all day. Are there other practical options?
Can my laptop detect desk taps without an accelerometer?
Answers
First check what sensors the laptop actually exposes and whether you can read their data programmatically. Laptops don't necessarily have the motion sensors you'd find in a phone or tablet.
If there's no usable motion sensor, something else has to measure the tap. Without a microphone or external hardware, there may not be a practical way to do it on that machine.
Reply to this answer
The built-in microphone is probably the easiest thing to prototype with, even if it isn't your preferred final solution. Try detecting short sound peaks and filtering out background noise, then test it with typing, voices and other everyday sounds.
It won't be perfect. Putting a mug down or bumping the desk could look a lot like a tap, so think about whether a distinctive pattern of taps would work for your project.
Reply to this answer
If you can relax the no-hardware requirement, a contact microphone attached to the desk is another option. It picks up vibrations through the surface rather than relying only on sound traveling through the air.
A sensitive accelerometer or other vibration sensor is another possibility. Either way, you'll still need to distinguish deliberate taps from ordinary bumps.
Reply to this answer
Could you prototype the interaction on a phone first? Phones tend to have motion sensors, so that would let you test whether the tap detection is useful before figuring out how to get similar input on the laptop.
Reply to this answer
Add your answer
Answers are reviewed before publication.
n73+opwatch_462:
That could at least help test the idea before committing to a sensor. It doesn't solve the concern about leaving the microphone on during daily use, though.