Fusion Ultrasonic Quick Start Guide

Introduction

Select Fusion series controllers are capable of interfacing to 1, 2, 4, or 8 Ultrasonic distance sensors for measuring distance between an object and a ultrasonic sensor.  When a distance value is requested, the Ultrasonic transducer sends a sound pulse and measures the time it takes to receive the echo.  The usable range for distance measurement is about 6 feet (around 2 meters).  The actual distance measurement may be slightly higher or lower depending on the type of object reflecting the sound waves.  The accuracy of measurement is typically within 0.250” of actual distance.

Sound waves are easily reflected away from the receiver, especially when distance is measured on an object sitting at an angle in front of the receiver.  In these cases, it may not be possible for the sensor to resolve the distance.  Ideally, ultrasonic distance measurement will be limited to use in applications where flat objects will be positioned directly in front of the sensor.  The composition of the object being measured will also affect accuracy and reliability.  For instance, measuring hard metal surfaces is much more reliable than measuring a bean-bag or sofa.  Further, measuring the distance of walls is much easier than measuring the distance of a table leg, which may not provide enough surface area for accurate ultrasonic reflection.

When asking a Fusion controller for the distance of an object, the controller will respond with a value from 0 to 511, indicating the distance.  A value of 0 indicates an error in distance measurement.  A value from 1 to 511 indicates the number of quarter inches between the object and the sensor.  To convert the distance measurement into real values, use the following equation:

Distance in Feet = (Sensor Value x .25) / 12

Distance in Centimeters = (Sensor Value x .25) x 2.54

Physical Implementation

Fusion controllers do not include on-board Ultrasonic transducers.  Ultrasonic transducers will require connection to a UXP expansion port, depending on the model of the Fusion controller you are using.  Fusion controllers are capable of automatically controlling relays based on sensor values.

Software Implementation

To get started, Use Base Station Software to demonstrate the use of Ultrasonic distance measurement.  Base Station Software is available for free download at the following link: http://www.ncd.io/start

 

To get started, Use Base Station Software to demonstrate the use of Ultrasonic distance measurement.  Base Station Software is available for free download at the following link:

The above screen shot shows the Ultrasonic distance measurement control panel.  Using this control panel, it is possible to read each sensor individually, 4 sensors at a time, or 8 sensors at a time.  Channel four returns a value of zero, indicating a valid distance could not be resolved.  Don’t forget to use the “MORE” button to reveal detailed information about the communications between the controller and the computer.

Command Set

The following commands will invoke the Ultrasonic Distance Measurement Features of a Fusion series controller:

Send: Function: Receive:

188 101 Read Ultrasonic Channel 1, UXP Port 1, Inputs 1 and 2 MSB, LSB Distance Value

188 102 Read Ultrasonic Channel 2, UXP Port 1, Inputs 3 and 4 MSB, LSB Distance Value

188 103 Read Ultrasonic Channel 3, UXP Port 1, Inputs 5 and 6 MSB, LSB Distance Value

188 104 Read Ultrasonic Channel 4, UXP Port 1, Inputs 7 and 8 MSB, LSB Distance Value

188 105 Read Ultrasonic Channel 5, UXP Port 2, Inputs 1 and 2 MSB, LSB Distance Value

188 106 Read Ultrasonic Channel 6, UXP Port 2, Inputs 3 and 4 MSB, LSB Distance Value

188 107 Read Ultrasonic Channel 7, UXP Port 2, Inputs 5 and 6 MSB, LSB Distance Value

188 108 Read Ultrasonic Channel 8, UXP Port 2, Inputs 7 and 8 MSB, LSB Distance Value

Send:

188 100 1 Read All 4 Ultrasonic Sensors on UXP Port 1

Receive:

MSB, LSB Channel 1  (8-Bytes Received)

MSB, LSB Channel 2

MSB, LSB Channel 3

MSB, LSB Channel 4

Send:

188 100 2 Read All 4 Ultrasonic Sensors on UXP Port 2

Receive:

MSB, LSB Channel 1 (8-Bytes Received)

MSB, LSB Channel 2

MSB, LSB Channel 3

MSB, LSB Channel 4

Send:

188 100 Read All 8 Ultrasonic Sensors on UXP Port 1 and 2

Receive:

MSB, LSB Channel 1 (16-Bytes Received)

MSB, LSB Channel 2

MSB, LSB Channel 3

MSB, LSB Channel 4

MSB, LSB Channel 5

MSB, LSB Channel 6

MSB, LSB Channel 7

MSB, LSB Channel 8

Fusion Controllers will return a MSB and LSB value for each channel.  The MSB/LSB values are converted to usable distance values using these formulas:

16-Bit Distance Value = (MSB * 256) + LSB

Distance in Feet = (16-Bit Distance Value x .25) / 12

Distance in Centimeters = (16-Bit Distance Value x .25) x 2.54

NOTE:  The commands shown in this guide MUST BE API ENCODED before they will be processed by a Fusion series controller.  Please refer to the API Quick Start Guide in the Resources section of our web site at ncd.io