ZX Distance and Gesture Sensor Hookup Guide

This Tutorial is Retired!

This tutorial covers concepts or technologies that are no longer current. It's still here for you to read and enjoy, but may not be as useful as our newest tutorials.

View the updated tutorial: ZX Distance and Gesture Sensor SMD Hookup Guide

Pages
Contributors: Shawn Hymel
Favorited Favorite 6

Board Overview

The ZX Sensor works by bouncing infrared (IR) beams of light from the two LEDs on either side off of an object above the sensor. The bounced light returns to the receiver in the center of the sensor, and a microcontroller on the back of the sensor interprets the data. We can read the results using an I2C or UART connection.

Pin Descriptions

The ZX Sensor gives us 2 ports to connect to: I2C and UART.

ZX Sensor front

Pin LabelDescription
GRNNot used
TXOUART transmit out from the ZX Sensor
RXIUART receive. Not used at this time.
VCC3.3 - 5 V power supply
GNDConnect to ground
BLKNot used, but connected to GND
DRData Ready. High when there is data to be read via I2C
CLI2C clock
DAI2C data


Setting the Jumpers

The ZX Sensor has a couple of jumpers on the back of the board that can be opened or closed with a soldering iron.

ZX Sensor back

I2C Pullups - The ZX Sensor, by default, comes with 4.7 kΩ pull-up resistors on the SDA and SCL I2C lines. Remove the solder on this jumper to disconnect the pull-ups.

I2C Addr - By default, this jumper is open. Close it to change the I2C address of the sensor.

JumperI2C Address
Open0x10
Closed0x11


The Infrared Shields

See those little brass tubes on the LEDs? They are needed to block any IR light going directly from the LEDs (inside the brass tubes) to the receiver (the black domed component in the center of the sensor). We want the light to bounce off an object first.

LED blinders

They are held on with Super Glue. You can remove them, but it might require a bit of acetone. If you plan to mount the ZX Sensors in your own housing, make sure IR light can't travel directly from the sides of the LEDs to the receiver (i.e. you will want to make your own IR shields).