TeraBee TeraRanger One Скачать руководство пользователя страница 14

 

Copyright © Terabee 2016 

 

Reading the distance is done by sending 0x61 (this is the 7 bit address 0x30 followed by the 
read bit '1') followed by three byte read operations. The first two bytes you receive are a 16 
bit word containing the latest measurement in mm, the third byte is the CRC8 checksum. 
 
Writing commands to the TeraRanger One: 

1. Send the address byte consisting of a 7 bit base address and the last bit indicating 

write (‘0’), e.g. 0x60 for base address 0x30. All commands listed in the table below 
are write operations, the answer will be in the next read operation for which you have 
to send the 7 bit address with the read bit set. 

2. Send the desired command listed in the table below. 
3. In case the command creates an answer, read it back immediately. 

 
Reading data from the TeraRanger One: 

1. Send the address byte consisting of 7 bit base address and the last bit indicating 

read (‘1’), e.g. 0x61 for base address 0x30. 

2. Read back the the number of bytes imposed by the command, e.g. three bytes for a 

distance reading.

 

 

 

Command in 
hexadecimal  

Command name 

Command explanation 

0x01 

WHO_AM_I 

Write this value to TROne via I2C and the 
next distance reading will contain 0xA1 in 
the first byte (ignore others). You can use 
this function to uniquely identify a 
TeraRanger One on the I2C bus. 

0xA2 

CHANGE_BASE_ADDR 

Command to change base address of the 
TeraRanger One. Write this value 
followed by new address to set, e.g. send 
0x42 if you want base address 0x42, 
ignore read/write bits. 
 
After sending this command, power cycle 
the device. Afterwards it will join the I2C 
bus as a slave on the new address. 

 
Please note that the default modes when shipped are “Precise” with “Binary” output for

 

 

 

 

 

 

 

 

 

 

 

 

 

 

sensor type A and “Optimal” with “Binary” output for sensor type B (refer to section 5.1 for

 

   

 

 

 

 

 

 

 

   

   

 

 

 

the description of the modes). The operating modes for the I2C interface are set by default.  
 

How to connect to Pixhawk autopilot 

 

 

 

 

  90 Rue Henri Fabre

Website: 

   01630 St. Genis‐Pouilly

Technical support: 

   France (next to CERN)

Commercial: 

 

 

 

www.teraranger.com 
[email protected] 
[email protected] 
 

14 

Содержание TeraRanger One

Страница 1: ... resolution 0 5cm Accuracy 4cm in precision mode Field of view 3º Supply voltage 10V DC recommended 10 to 20V DC accepted Supply current 50mA average 110mA peak 12V Interfaces 1 UART 5V level up to 115200 8 N 1 2 TWI I2C compatible 5V level up to 400kHz configurable address Connector 15 pin DF13 open ended 1 27mm pitch flat ribbon cable provided Designs Box Spider Frame Weight 8g Spider Frame or 1...

Страница 2: ... About the Connector 1 5 UART Data Interface 1 6 TWI I2C Data Interface 1 7 USB Interface 1 8 Details on Supply Voltage 2 Connecting the TeraRanger One Using a Computer With a Serial Console 2 1 Windows 2 2 MacOS 2 3 Linux 3 Running the TeraRanger One in ROS 5 Protocol description 5 1 UART interface 5 2 I2C interface 6 How to connect to Pixhawk autopilot 7 How to calculate the CRC8 checksum 8 Unde...

Страница 3: ...esting and for making firmware updates to the sensor and it is also an essential item in case you need post sales technical support The USB adapter can be purchased at http www teraranger com product teraranger usb adapter If you have purchased a USB adapter in addition to your TeraRanger One you will also receive the following items the USB adapter board a connector cable that connects your USB a...

Страница 4: ...t using a 15 pin connector of the Hirose DF13 series The part number of the corresponding female connector is DF13 15S 1 25C The cable assembly delivered with the TeraRanger One comes with six wires installed Ground GND pin 1 and 15 positive supply voltage Vcc pin 14 UART receive RXD pin 12 UART transmit TXD pin 13 and reset pin 7 Please use the following image valid for all yellow outer part desi...

Страница 5: ...oltage level is 5V Please use a serial to USB interface e g such as the TeraRanger USB adapter to connect the TeraRanger One to your PC DO NOT connect the TeraRanger One to a real RS 232 port of a PC the voltage levels are different and might destroy the sensor s electronics The UART is configured to send and receive at 115200 bit s 8 data bits no parity bit and one stop bit 115200 8N1 1 6 TWI I2C...

Страница 6: ...After successful installation unplug the interface for a moment and plug it back in The virtual COM port should now be available on your PC Note Do not plug unplug the TeraRanger One from the USB adapter while the device is powered disconnect the USB plug from the PC first 1 8 Details on Supply Voltage TeraRanger One works with clean spike and interruption free voltages ranging from 10V to 20V and...

Страница 7: ... it and double click on the HTerm exe file Now connect the TeraRanger One to your computer via the USB adapter In order to select the USB port on which the TeraRanger One is plugged refresh the port list by clicking on the R button as shown on the following image Once you have selected the port click on the Connect button The data will now appear in the Received data box in Binary mode To convert ...

Страница 8: ...d this application go to Applications Utilities Terminal You can now click on the item to enter the terminal and set the appropriate reading settings by copy and pasting this first command to the page ls dev tty This command will tell the terminal to show the USB device s name that will be used to acquire distance data from your TeraRangerOne Example dev cu usbserial XXXXXXXXX The X s will have yo...

Страница 9: ...ensor from its fast mode to its precision mode press Shift F for Fast mode Shift P for Precision mode Shift O for Optimal mode To stop the data measurement press Ctrl A then K 2 3 Linux Linux is very similar to MacOS and also works with a terminal Open a terminal shortcut ctrl alt t type ls dev tty 90 Rue Henri Fabre Website 01630 St Genis Pouilly Technical support France next to CERN Commercial w...

Страница 10: ...em http www ros org node which provides a topic to access the TeraRanger One data stream Please note that the sensor has to be configured to work in Binary mode before you can start using it with ROS You can download the ROS node from https github com Terabee terarangerone ros To use the ROS node you need to 1 Create a ROS Workspace 2 Copy the node terarangerone package into the workspace src dire...

Страница 11: ...rmat In all UART modes the sensor is free running that means you do not need to send anything to start a measurement Once a measurement in the mode you selected is finished the sensor will send the data in the format you selected and immediately start a new measurement Two operating modes can be selected for either type A and type B sensors by sending the corresponding uppercase character to the T...

Страница 12: ...reading accuracy and maximum range which is limited to 4 5m in this mode The delay between two readings is 1ms You can also set the output format by sending the corresponding uppercase character to the TeraRanger One via the serial port T Text output Data output in human readable form 5 7 bytes message xxxxx r n Distance reading in millimeters maximum 5 bytes per sensor xxxxx Carriage return chara...

Страница 13: ...its TWI bus also known as I2C Please refer to chapter 1 4 for the the electrical connections to be made for using TWI The signal levels are 5V the maximum bus speed is 400kHz and the pull up resistors 10kOhms are already integrated in the TeraRanger One If you want to connect to an I2C bus with 3 3V voltage levels you need to use a voltage level translator An I2C adapter for reliable voltage level...

Страница 14: ...the the number of bytes imposed by the command e g three bytes for a distance reading Command in hexadecimal Command name Command explanation 0x01 WHO_AM_I Write this value to TROne via I2C and the next distance reading will contain 0xA1 in the first byte ignore others You can use this function to uniquely identify a TeraRanger One on the I2C bus 0xA2 CHANGE_BASE_ADDR Command to change base addres...

Страница 15: ...2 0 x 1 5 0 x 3 8 0 x 3 f 0 x 3 6 0 x 3 1 0 x 2 4 0 x 2 3 0 x 2 a 0 x 2 d 0 x 7 0 0 x 7 7 0 x 7 e 0 x 7 9 0 x 6 c 0 x 6 b 0 x 6 2 0 x 6 5 0 x 4 8 0 x 4 f 0 x 4 6 0 x 4 1 0 x 5 4 0 x 5 3 0 x 5 a 0 x 5 d 0 x e 0 0 x e 7 0 x e e 0 x e 9 0 x f c 0 x f b 0 x f 2 0 x f 5 0 x d 8 0 x d f 0 x d 6 0 x d 1 0 x c 4 0 x c 3 0 x c a 0 x c d 0 x 9 0 0 x 9 7 0 x 9 e 0 x 9 9 0 x 8 c 0 x 8 b 0 x 8 2 0 x 8 5 0 x a ...

Страница 16: ... the target based on the time it takes for the reflected signal to be detected The system is optical and measured within a specific field of view which is 3 degrees This field of view corresponds to a detection window of 4 5cm x 4 5cm at a distance of 1m and this window size scales linearly with distance If multiple targets are placed in the field of view of the sensor a distance averaging effect ...

Страница 17: ...Copyright Terabee 2016 90 Rue Henri Fabre Website 01630 St Genis Pouilly Technical support France next to CERN Commercial www teraranger com support teraranger com teraranger terabee com 17 ...

Отзывы: