I2CXL-MaxSonar
®
- WR/WRC™ Series
High Performance Sonar Rangefinder
MB7040, MB7047
5
I2CXL-MaxSonar
®
- WR/WRC™ Series
The I2CXL-MaxSonar-WR ultrasonic sensor features an I2C interface. The sensors
have high acoustic power output along with real-time auto calibration for changing
conditions (voltage and acoustic or electrical noise) that ensure users receive the
most reliable (in air) ranging data for every reading taken. The I2CXL-MaxSonar-WR
low power 3V – 5.5V operation provides very short to long-range detection and ranging, in a tiny and compact form
factor. The I2CXL-MaxSonar-WR will typically detect objects from 0-cm to 765-cm (3-cm to 625-cm for the WRC) and
provide sonar range information from 20-cm out to 765-cm with 1-cm resolution. Objects from 0-cm (3-cm for the WRC)
to 20-cm typically range as 20-cm.
Features
•
I2C bus communication allows rapid
Low Power Requirement
•
Wide, low supply voltage
Applications and Uses
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
control of multiple sensors with only
two wires
High acoustic power output
Real-time auto calibration and noise
rejection for every ranging cycle
Calibrated beam patterns
Continuously variable gain
Object presence information up to
the front face of the sensor (3-cm for
the WRC). Range information
starting at min. distance.
3V to 5.5V supply with very low
average current draw
Readings can occur up to every
25mS (40Hz rate)
3
for up-close
objects. 15Hz rate for full range.
Triggered operation provides a new
range reading as desired
Ultrasonic signal frequency of
42KHz
Status pin available to determine
sensor state
Power-up address reset pin available
Physical dimensions match other
XL-MaxSonar-WR/WRC products
-40°C to +65°C operation
4
requirements eases battery powered
design
•
Low current draw reduces current
drain for battery operation
•
Fast first reading after power-up
eases battery requirements
Benefits
•
Acoustic and electric noise
•
•
•
•
•
•
•
•
•
resistance
Reliable and stable range data
Low cost
Quality controlled beam
characteristics
Very low power rangefinder,
excellent for multiple sensor or
battery based systems
Ranging is triggered externally
Fast measurement cycle
No power up calibration required
Perfect for when objects may be
directly in front of the sensor during
power up
Easy mounting
Multi-sensor arrays
Proximity zone detection
People detection
Robot ranging sensor
Autonomous navigation
Educational and hobby robotics
Environments with acoustic and
electrical noise
Distance measuring
Long range object detection
Security systems
Motion detection
Collision avoidance
Bin level measurement
Notes:
1
Users are encouraged to evaluate the sensors
performance in their application
2
By design
3
Recommended time between readings of
100ms (10Hz Rate)
4
Please reference page 10 for minimum
operating voltage verses temperature
information.
5
Please reference page 19 for part number key.
Close Range Operation
Applications requiring 100% reading-to-reading reliability should not use MaxSonar sensors at a distance closer than
20cm. Although most users find MaxSonar sensors to work reliably from 0 to 20cm for detecting objects in many
applications, MaxBotix
®
Inc. does not guarantee operational reliability for objects closer than the minimum reported
distance. Because of ultrasonic physics, these sensors are unable to achieve 100% reliability at close distances.
_______________________________________________________________________________________________________________________________________
Warning: Personal Safety Applications
We do not recommend or endorse this product be used as a component in any personal safety applications. This product is
not designed, intended or authorized for such use. These sensors and controls do not include the self-checking redundant
circuitry needed for such use. Such unauthorized use may create a failure of the MaxBotix
®
Inc. product which may result
in personal injury or death. MaxBotix
®
Inc. will not be held liable for unauthorized use of this component.
MaxBotix
®
Inc.
Copyright 2005 - 2012 MaxBotix Incorporated
Patent 7,679,996
MaxBotix Inc., products are engineered and assembled in the USA
Page 1
Web:
www.maxbotix.com
PD11502h
I2CXL-MaxSonar
®
- WR/WRC™ Series
About Ultrasonic Sensors
Our ultrasonic sensors are in air, non-contact object detection and ranging sensors that detect objects within an area. These
sensors are not affected by the color or other visual characteristics of the detected object. Ultrasonic sensors use high
frequency sound to detect and localize objects in a variety of environments. Ultrasonic sensors measure the time of flight
for sound that has been transmitted to and reflected back from nearby objects. Based upon the time of flight, the sensor
determines the range to a target
Pin Out
GND:
Return for the DC power supply. GND (& V+) must be ripple and noise free for best operation.
V+:
Operates on 3VDC to 5.5VDC. The average current draw for 3.3V operation is 2.7mA (50mA peak) and for 5V
operation is 4.4mA (100mA peak) respectively. Peak current is used during sonar pulse transmit. Please reference page 10
for minimum operating voltage verses temperature information.
Pin 5-SCL (I2C Clock):
This is the clock line for I2C communications. These sensors support I2C clock frequencies up
to 400kHz provided clock stretching is supported by the master device. Without clock stretching the devices can run at
speeds up to 50kHz.
Pin 4-SDA (I2C Data):
This is the data line for I2C communications. These sensors operate as I2C slave devices.
Pin 3-Not Used:
This pin is not used.
Pin 2-Address Announce / Status:
While the sensor is performing a range reading, this pin is set high and I2C
communications are ignored. During non-ranging operation, this pin is held low and the sensor is listening for incoming
I2C communication. Optionally, users may poll this pin to determine if the sensor has finished its ranging cycle and is
ready to report the latest range information.
During power-up this pin will provide a pulse width representation of the sensors current address with a length of ~100
microseconds per digit. (The default address of 224 will announce with a pulse of 22,400 microseconds in length)
Pin 1-Temporary Default:
This pin is internally pulled high. On power up, the state of this pin is checked; if left high or
disconnected, the sensor will use the address stored memory for I2C communications. If pulled low, the sensor will use its
default address for the current power cycle.
Default Address
The representation of the sensor address will be different depending on the addressing scheme your master device uses.
The chart below shows the default address for the I2CXL-MaxSonar-WR/WRC sensors under different addressing
implementations. Elsewhere in this datasheet a 8-bit read/write addressing scheme is assumed.
Addressing
7-bit addressing
8-bit addressing
8-bit read/write
addressing
Default Address Default Address
112
224
Write: 224
1110 000X
1110 000X
1110 0000
Notes
7-bit addressing handles the address
shifting and R/W bit for the user
8-bit addressing inserts the R/W bit and
only allows for even number addresses
8-bit R/W addressing schemes require the
user to set the R/W bit directly.
MaxBotix
®
Inc.
Copyright 2005 - 2012 MaxBotix Incorporated
Patent 7,679,996
MaxBotix Inc., products are engineered and assembled in the USA
Page 2
Web:
www.maxbotix.com
PD11502h
I2CXL-MaxSonar
®
- WR/WRC™ Series
I2C-MaxSonar-WR Commands
Command
Take a range
reading
Sequence of Events
1.
Initiate a write at the sensor
address
2.
Write the range command
byte
Value Used
(decimal)
224 (default)
81
Value Used
(binary)
1110 0000
0101 0001
Notes
Commands the sensor to take a
single range reading and save to
distance found for the next range
request. It is best to allow 100ms
between readings to allow for
proper acoustic dissipation.
Report the last 1.
Initiate a read at the sensor
address
range value
2a.
Read the two bytes from
the sensor starting with the
range high byte.
2b.
Read the range low byte.
The sensor will report the distance
value in cm obtained from its last
range reading. Users requiring
(Sent by sensor)
Range High
real-time information should
Byte
command a range reading ~80ms
before reading the sensor. After
(Sent by sensor)
Values are power-up if no range command is
MSB to LSB sent the sensor respond with two
part info bytes.
225 (default)
1110 0001
224 (default)
170
1110 0000
1010 1010
The sensor will only accept even
address values. If an odd numbered
address is sent the sensor will be set
to the next lowest even number. If
the sensor is told to change to one of
the invalid addresses below the
sensor will ignore this command
and stay at its current address.
Invalid Address Values:
0, 80, 164, 170
1.
Initiate a write at the sensor
Change the
sensor address
address
2a.
Write three bytes to the
sensor starting with the
addr_unlock_1 command
2b.
Write the addr_unlock_2
command
2c.
Write the new sensor
address
165
(User Value)
1010 0101
#### ###0
Range Cycle Interrupt
If the sensor receives a request to report the last range value while it is taking a range reading the range reading will be
interrupted and a NACK will be sent. If you desire to allow the full range cycle to complete before reading monitor the
status pin for the completion of a range cycle or wait for the full 100ms for the range . If the sensor is interrupted and has
already found a target the sensor will report the range to the target. If the sensor has not yet found a target when it is
interrupted the sensor will send the previous range value. If no range values have been found the distance sent will
alternate between 0cm and 255cm.
MaxBotix
®
Inc.
Copyright 2005 - 2012 MaxBotix Incorporated
Patent 7,679,996
MaxBotix Inc., products are engineered and assembled in the USA
Page 3
Web:
www.maxbotix.com
PD11502h
I2CXL-MaxSonar
®
- WR/WRC™ Series
Single Sensor Wiring Diagram
The I2C bus is a two wire interface that consists of a clock line and data line where each requires a pull-up resistor
attached to V+. Only one pull-up resistor is required each for the SCL and SDA lines per bus – not per sensor.
I2CXL-MaxSonar-WR/WRC Sensor
GND
V+
GND
V+
SDA
I2C Bus Master
SCL
The I2C specification recommends a resistance value of 4.7 kΩ for 20-100kHz interfaces with good low inductance
routing. However, these specifications are for communication between chips on a singe PCB. If you have longer cable
lengths it is best to use lower value resistor, such as 1kΩ, and also to use properly shielded cables. Often I2C bus
problems can be fixed by doing one of the following: by using properly shielded cable or by decreasing the value of the
pull-up resistors. The I2CXL-MaxSonar-WR/WRC series is capable of sinking more current than the I2C specification
requires (15mA versus 3mA) so a much lower resistance value can be used. The voltage applied to the I2C lines should
be the same voltage that is applied to V+ of the sensor.
Multiple Sensor Wiring Diagram
I2CXL-MaxSonar-WR/WRC Sensors
GND
V+
GND
V+
GND
V+
GND
V+
I2C Bus Master
SDA
SCL
MaxBotix
®
Inc.
Copyright 2005 - 2012 MaxBotix Incorporated
Patent 7,679,996
MaxBotix Inc., products are engineered and assembled in the USA
Page 4
Web:
www.maxbotix.com
PD11502h
I2CXL-MaxSonar
®
- WR/WRC™ Series
Range “0” Location
The I2CXL-MaxSonar-WR sensors reports the range to distant targets starting from the front of the sensor as shown in the
diagrams below.
The I2CXL-MaxSonar-WR/WRC will report the range to the closest detectable object. Target detection has been
characterized in the sensor beam patterns.
Range Zero
The range is measured from the front of the transducer to the target.
Range Zero
The range is measured from the front of the transducer to the target.
Range Zero
The range is measured from the front of the transducer to the target.
Range Zero
The range is measured from the front of the transducer to the target.
MaxBotix
®
Inc.
Copyright 2005 - 2012 MaxBotix Incorporated
Patent 7,679,996
MaxBotix Inc., products are engineered and assembled in the USA
Page 5
Web:
www.maxbotix.com
PD11502h