text.skipToContent text.skipToNavigation

Hand Gesture Power Socket

Download Project Resources View on Github

Wax-on Wax-off lighting, just like karate kid! Use this gesture controlled powerpoint kit as a fun way to turn on power sockets around your house. Connect it to lights, fans, or even the TV and amaze your friends by turning them on with a simple wave of the hand. Uses the small XC3742 Gesture module with the easy ZW3100 transmitter, controlled by arduino.

hero image

Bill Of Materials

Qty Code Description
1 XC4410 Uno Main board
1 XC3742 Hand Gesture sensor
1 ZW3100 433 Transmitter
1 PH9251 Battery snap
1 SB2423 9V battery
1 MS6149 RF Mains outlet

Extra ideas

  • MS6147 3 More power points
    • Set up different directions, up for the tv, down for the stereo, and add more powerpoints to your project
  • XC4419 Low voltage relay module
    • Lower voltage items (not on 240v)
  • AB3452 Buzzer
    • Audio feedback
  • XC4499 8x8 Dot matrix display
    • Visual Feedback

How to build

Firstly, the concept is pretty simple

concept

The hand gesture module XC3742 detects what the user is trying to do and sends a matching command to the wireless transmitter. That transmitter then activates the wireless power socket.

Likewise, the connection diagram is almost just as simple:

circuit

All we are doing is connecting up the gesture sensor exactly how it asks to be set up via the I2C protocol; The 433Mhz wireless can be connected anywhere, but we kept it on the same side as the other connections to keep things tidy.

We used a breadboard in our build, but you can use anything to connect between the pins of the hand gesture module and the UNO. If you haven't got one before, it's a good oppertunity to have a look at getting the XC3902 kit as that has a lot of the bits and pieces you might need every now and then.

breadboard connect

One thing about connecting these sort of prototyping wires is that they can sometimes fall out, which can be a real problem out in the field. If you are building something a little more longer lasting, you might want to look at learning how to solder and soldering things together, or use something like screw terminals to contain everything.

wires

If you come into the store this month (November 2020) you should be able to see this on display soon, come and try it out and pick up a kit while you're in store, plus whatever else you think you might need.

final

Programming

Programming is also just as easy. Open up the Arduino IDE and load the provided wax-on.ino.

For this we need just one library, so you can open the library manager (Tools > Manage Libraries) and install the "Gesture PAJ7620" by Seeed Studio. Then you should be able to select the Port for your arduino, and ensure that the Board type is set to "Arduino UNO"

Connecting up the RF socket.

The RF socket is easy, as there's no need to log in, nor do you need any wifi or otherwise.

  1. Connect up the RF socket into a powerpoint. You should see that the LED indicator on the socket will blink slowly.
  2. Use your project to send it a command. It should either click solid on or solid off, depending on the command that you have used.

When the RF socket blinks, it will accept and latch onto the first valid command it can hear. That's why when the RF socket is blinking, you are meant to wave your hand over the gesture sensor module just as if you were using it for real. Once the socket accepts that command, it will remain "bound" to the gesture sensor. If you disconnect the RF socket you will lose the pairing, but you can just follow the same instructions again to re-pair.

How to use

You should just quickly and confidently swipe your hand over the sensor for it to pick up the gesture.

leftright

Troubleshooting

  • Not Detecting

The distance only needs to be a few centremeters up, we've been able to get it to almost 10 cms though, so there shouldn't be any problem with detecting your hand at a distance.

distance

Check the serial monitor, it should tell you what it is doing. One issue could also be the delay in between detecting the gesture and sending the signal: you might have to wait a short while for the signal to be transmitted. This can be fixed in code and we're looking forward to a pull request on github.