Listening For Hand Gestures

[B. Aswinth Raj] wanted to control a VLC player with hand gestures. He turned to two common ultrasonic sensors and Python to do the job. There is also, of course, an Arduino. You can see a video of the results, below.

The Arduino code reads the distance from both sensors — one for the left hand and the other for the right. This allows the device to react to single hand gestures that get closer or further away from one sensor as well as gestures involving both hands. For example, raising your left hand and moving it closer or further away will adjust the volume. The right hand controls rewind and fast forward. Raising both hands will start or stop playback.

Of course, since the Arduino is reading the gestures you could change them to suit you. We might have mounted the sensors further back (or, perhaps, added more sensors) so you could use trigonometry to triangulate the hand’s exact position. Well, perhaps not exact, but you could get an idea of the hand’s motion from right to left as well as forward and backward.

On the host computer side, Python receives serial data from the Arduino and then simulates keystrokes to get the desired result. Of course, this is also highly customizable.

By coincidence, we did a similar project a few years ago using one sensor and the Arduino’s ability to appear like a USB keyboard. We’ve also seen 8 sensors making piano music.

15 thoughts on “Listening For Hand Gestures

  1. That is a nice hack, anything better would take a lot more work. You could pull apart those modules and attach each ultrasonic transducer to each corner of the screen then have them take turns to be a sender or a listener. 1 sends as the other 3 listen, and you cycle that fast to feed a Kalman filter to get geometric truthiness, then on the PC run a neural network for gesture recognition, as others have already done.

  2. Not sure what the use of controlling VLC with gesture is.
    But then again nobody knows the purpose of gesture control in general, they keep introducing it to all kinds of things but nobody is interested really.

    Still, it’s a nice project to try and get familiar with ultrasonics and such I guess.

        1. That made me LOL :)

          Problem is that when you are moving about with any kind of repair you’d get false positives in that interface though. Plus you’ll splatter blood and oil everywhere and that only means problems later on with pesky forensics.

  3. If you have pets at home you should not use ultrasound devices as it can be disturbing for them. I speak from personal experience; just connecting a 40KHz transducer to a signal generator with no amplification in between would attract my two cats into the lab from two rooms away. They seemed curiously attracted from it, but I’m not sure they would like hearing it continuously.

    1. Cats are very sensitive to whistles in general, better whistle to them instead of calling them with ridiculous names.
      They can also be very sensitive to people singing (but not tv or music, only their human-pet singing).

    2. Also cats like to sit on laptops, messing with your VLC controls until they doze off.

      And incidentally, I tried to see the reaction of cats and dogs to ultrasonic distance devices in the past and they seem to completely ignore it. Maybe it’s the shortness of the clicks? Anyway you’ll have to test to see their reaction.

Leave a Reply to WhatnotCancel reply

Please be kind and respectful to help make the comments section excellent. (Comment Policy)

This site uses Akismet to reduce spam. Learn how your comment data is processed.