×

SparkFun Electronics will be closed in observance of memorial day on Monday, May 29th. We will resume normal business hours on Tuesday, May 30th. Any orders placed after 2pm Mountain Time on Friday, May 26th will process and ship out on Tuesday, May 30th.

Creative Commons images are CC BY 2.0

$ 19.95

20% off

Not available
for backorder

Notify Me

added to your
shopping cart

quantity
Out of stock out of stock
24.95 retail price
19.95 1+ units

This product is produced in-house by SparkFun.
We are currently planning to build 80 units.

Incoming stock values are estimates, and subject to change without warning.

Need larger quantities?
Check out our Volume Sales program

Description: The ZX Distance and Gesture Sensor is a touchless sensor that is capable of looking for simple gestures. Developed in conjunction with XYZ Interactive, the sensor uses their GestureSense® technology to recognize the distance of an object away from the sensor up to about 10 inches (~25cm) and the location of the object from side to side across the sensor in about a 6 inch (~15cm) span. You will be able to use I2C or UART to communicate with the ZX Sensor via an Arduino-based microcontroller as well as a computer.

On board each ZX Sensor you will find two IR LEDs (inside the brass tubes) and one IR receiver (in the middle). The brass tubes that protect the IR LEDs are actually to block any infrared light going directly from the LEDs to the receiver (we want the light to bounce off an object first). With these IR pieces you will easily be able to ascertain both the Z axis and the X axis of an object (hence the name). In addition to providing Z- and X- axis data about an object, the ZX Sensor is also capable of detecting simple gestures. We have also clearly labeled all the pin outs on the board as well as signifying if they are needed in I2C or UART communication.

Note: Be sure to check out the Hookup Guide in the Documents section below for instructions on how to get your ZX Sensor started, load the code and library, and a list of supported gestures.

Features:

  • Operating Voltage: 3.3V - 5V
  • Z-Axis Recognition Range: 10 Inches (~25cm)
  • X-Axis Recognition Range: 6 Inches (~15cm)
  • 4 Supported Gesture Commands
  • I2C or UART Communication

Documents:

Recommended Products

Customer Comments

  • Hi,

    Someone knows where I can find the Fritzing file of this sensor? I can not find it anywhere.

    Thanks in advance !

  • Hi Shawn or any one else could offer me this help,I would like to use ZX Distance and Gesture sensor (I2C protocol) to get the Z-pos streamed at the highest sampling rate. But I’m wondering Is this feature (continuous streaming) feasible with this hardware? What would be the maximum sample rate? Are you aware of any Arduino-like library that does the job?Any suggestions would be very much appreciated, thanks in advance!

    • The ZX sensor provides up to 50 X and Z coordinate samples per second, so it refreshes every 20 msec. What you could do is check the I2C status register of this sensor for new data at a polling rate that exceeds 50 Hz. Another approach is to check the Data Ready or DR line of the sensor (in the I2C group next to DA and CL) for a HIGH reading indicating new data. If you go to the GestureSense.com website we can provide you with a simple script to do I2C polling for this data.

    • The folks at XYZ Interactive wrote the firmware for the sensor, so I don’t know the refresh rate. However, I will try to find out. The Arduino library listed in the Documents section should get you started.

  • Can someone confirm the max distance for gesture sensing?

  • I’m wondering if you would suggest this module for use as a proximity sensor. I’m racing RC cars and want a pre packaged device for measuring when they pass a checkpoint. Lighting conditions will be bright daylight.

    • It works well as a proximity sensor, but keep in mind that it can only sense objects up to about 1 foot away. If the RC car is beyond that, it won’t detect it.

      • Thanks for the help! They will follow a strict bottleneck near the checkpoint so I don’t think this will matter. Best.

  • how much power does this thing draw?

  • What is the smallest distance this sensor can read?

  • I recently tried this sensor and get very erratic readings from the X axis, but the Z axis seems fairly stable. If I use a narrow object, like a finger instead of my palm, it seems slightly better, but still too erratic to drive a feedback control loop. I’m using the I2C interface, for what that’s worth. Has anyone else seen this behavior, or know what might cause it?

    • There have been a few sensors where one of the brass LED shield caps have come up slightly (you can check by looking at the board from the side - see if one of the brass caps is slightly lifted from the board). This causes IR light bleeding from the LED to the sensor and messing up the readings. If you think this is the case, I recommend talking to our Tech Support, and they’ll help troubleshoot the problem and get you a new one if necessary.

  • Did anybody measure the actual latency of this product? It seems a little slow in the video but that can be the video update as well. How long will it take before a change in distance is visible in the I2C (or UART) connection?

  • I got the error “Error reading model version number. Model version needs to be 1 to work with this library. Stopping.” Does anyone can help me with this? Thanks!

    • Sounds like it is either a wiring issue or you have a bad ZX Sensor. I recommend contacting Tech Support. They should be able to help you and get a replacement if necessary.

      • Thanks for replying! But actually I ordered two of them, and both of them returned me this error

        • Double-check your I2C wiring. That error returns if there is a problem communicating with the ZX Sensor over I2C. Also, which microcontroller board are you using?

          • And I’ve tried both arduino Uno and Mega, and got same error

          • Yes I did notice in the tutorial that I can set those jumpers at the back of the sensor. Do I need to change them from the default status? Thanks

            • No, you should not need to change them. If you haven’t had much luck with either sensor on the Uno or Mega, definitely reach out to tech support. They can help you figure out what’s going on.

  • After using this sensor, I noticed that it will not work through a clear glass or acrylic window. If I only place a window over the detector at the center, it still works fine, however when a place a window in front of either LED it will nor work. The LEDs emit at about 950nm, so they should transmit through glass and acrylic well enough. Does anyone know what the issue is, or how to get around it?

  • EDIT: looked at the datasheet for the receiver and it uses pulsed light so I answered my own question. “Does this use pulsed light to discriminate against ambient light or is this sensitive to ambient light? Can it be used out in the sunlight?”

  • Could I have the dimensions for the brass caps used so I could 3d print a replacement? I got this in a Ding and Dent production build, and it shipped without them(along with a missing part which was the reason it was a ding and dent)

  • Hi, I purchased this sensor. I have followed the guide. i installed the downloaded demo from the tutorial. the zx I2C demo works. i can see the numbers changed when my hands are detected but using the interrupt demo, it can’t recognize gesture. it keeps saying no gesture. help please..

    • Just to make sure, are you connecting a wire from DR (on the ZX Sensor) to pin 2 on the Arduino? If you are still having issues, I recommend reaching out to our Tech Support staff who can help troubleshoot your specific issue.

  • I wish I could post pictures on here. I used this sensor to create a gear indicator for a 5 speed manual transmission. I’m using it to help teach my wife how to drive a manual.

    • Sweet! I definitely recommend creating a project and uploading some photos to Hackster. We’re…exploring some sharing options, but you can at least share the link of your project here :)

      • I’ll check it out… Started the project… I’ll have to complete it later… https://www.hackster.io/CitoNinja/shift-indicator

  • Hi, how long you say this sensor would last? I will use it 7x24. Do you know the Life Expectancy of this product? LEDs have a general life expectancy of 50.000 hrs, is that correct? Thanks

    • There should not be any issues running the sensor 7x24. I’ve tested it for a few hours, but I have no way of determining the life expectancy. The LEDs are TSAL6100s, if you would like to look into their life expectancy (it is not listed in the datasheet).

  • Hello, Your product I think is very interesting. Currently I wanna create a head display like Oculus or Samsung Gear, and I wonder if this product could work like Leap Motion or Kinect for gesture control. My project is based in Android. Could you give me information about this? Where do I can get tutorial or information for my project with the use of this product?

  • One of three boards burned today. I simply connect it to arduino, morning, some testing, And at evening, dont work.

  • Would it be possible for Sparkfun to provide a more detail information about the I2C register map and data format? Seems the manual from the upon link focus on the UART mode usage, and there’s no way to find the “GestureSense ZX Sensor I2C Register Map spreadsheet” shown at the end of the manual : )

  • Very simple and nice quality. Small form factor is great too!

  • Hello, this sensor could work in a device Android ARM?

    • As long as you can communicate over UART or I2C from the ARM, then you can use this sensor. The library used in the hookup guide was written for just Arduino, but it should not be very difficult to port to ARM.

  • Is there any issue with having two or more of these units in close proximity with each other?

    • For the most part no. We have seen multiple sensors on the same device used in Hackathons and other projects without issue. What kind of configuration were you thinking of?

      • or the most part no. We have seen multiple sensors on the same device used in Hackathons and other projects without issue. What kind of configuration were you thinking of?

        How about an array of 3 of them on the front of a robot for obstacle detection?

  • Excellent product! I wonder, will there be an XY version?

    • We are working on a version of the same sensor design with three emitters. This will give XY and Z, as well you can do circular gestures, and other cool features. What do you have in mind?

      • I want to use one as a replacement for a touch interface for a pcDuino running Android in my shop. The most applicable use would be moving through a document (such as a PDF) being displayed on the LCD TV in my shop by using gestures. I recently picked up a ZX and a Leap Motion. I’ll soon see how well each is up to the task. I may use both of them.

  • What’s the maximum sensing distance?

  • Does anyone know the minimum sensing distance of this?

  • Could you hook up an OpenLog board directly to it?

    • You should be able to, but would would have to change the OpenLog firmware to support the ZX Sensor’s 115200 baud rate.

  • Any thoughts on embedded this in a waterproof enclosure of some sort? I have an awesome use case for this sensor, but it’s outdoors and I’m not sure if there would be interference from an enclosure.

    • So long as the piece over the LEDs and receiver is clear, it will work just fine (I just tried it with some clear acrylic). If it gets dirty or something causes reflection back into the receiver, it will start to work less effectively.

      • Awesome! That’s exactly what I was hoping for. I’m ok with dirt ruining things, if the user lets their device get dirty it’s not surprising that a light based sensor would stop working… :)

  • Nice looking product. I was wondering, how does this work actually? How does the sensor measure distance, by measuring how much time it takes for light to travel and bounce back after transmitting? Is this PIC on board fast enough to do that? Or the receiving TSOP is some kind of analog type, which outputs received signal strength that PIC interprets to distance. There is no Datasheet for this TSOP, you didn’t provide good document. The X-motion is easy to understand once Z-axes is understood :-)

    Edit: I just read from schematics that this is the TSOP used: http://www.vishay.com/docs/82434/tsop572.pdf and it outputs digital information, not analog. From this it must be that they are measuring time of flight, of the light :-) Correct?

    Thanks!

    • It’s most likely just tracking the amount of power it takes for the IR receiver to detect the signal (by varying the LED power with the PIC DAC); the power required corresponds to the distance to the object. This is done with each LED separately and then the results are combined to calculate the X and Z positions.

    • It’s actually the BRM-2A18 (the TSOP is an optional SMD part that was not used). But yes, you are correct, the receiver demodulates the 38 kHz IR signals and sends that information to the PIC. It’s the same type of IR receiver used in TVs and other AV equipment.

Customer Reviews

4.5 out of 5

Based on 4 ratings:

Currently viewing all customer reviews.

3 of 3 found this helpful:

This thing makes a very cool RGB light switch. Very cool !!!

I started testing this ZX sensor with my Arduino and wired to an RGB LED to control switching and colour changes. The gestures can switch the device and the depth changes can control colour. I can’t do this with any single device any other way. Love it. Thanks !!!

2 of 2 found this helpful:

Sensor Works Great

Works exactly how I wanted it to. I did notice that Voltage changes have an effect on the distance readings.

Thank you SparkFun and Maker community

We have tested out both the delivery and support from SparkFun on these sensors and are very happy. We have also sponsored some Hackathons and continue to be impressed with some of the creative applications of our sensor technology that is coming from the crowd. If anyone has suggestions for improvements or additions to future sensor modules, please send to makers@xyzinteractive.com

Good at distance, side-to-side is a little sketchy.

Very easy to setup, managed to get it working on the FreeSoC2 and used the distance reading to set the frequency of a generated tone. Returned distance value is nonlinear, more resolution farther from the sensor. I tested the raw readings for side-to-side and it was a little hard to predict when the sensor would start reading my hand, however the fact that it can do it at all, especially at this price, is a decent reason to get one.

Related Tutorials

ZX Distance and Gesture Sensor Hookup Guide

July 9, 2015

How to connect and use the SparkFun ZX Distance and Gesture Sensor with an Arduino.

Support Tips

I2C Communications Error

If you see this error output using the I2C_ZX_Demo.ino code:

-----------------------------------
SparkFun/GestureSense - I2C ZX Demo
-----------------------------------
ZX Sensor initialization complete
Error reading model version number
Model version needs to be 1 to work with this library. Stopping.

Make sure that you are connected to the I2C pins correctly. If you have any loose connections, you will have issues communicating with the sensor through I2C. If you are using an Arduino Mega, make sure that you are connecting to the correct I2C pins https://www.arduino.cc/en/Reference/Wire .