In this project, we learn how to use a Tibbit #01 to interface with a MaxBotix MB7851-B2A TankSensor.
Components
- Tibbit #01: an RS232 transceiver, this Tibbit allows the TPS and the sensor to communicate.
- MaxBotix TankSensor: an ultrasound-based ranging device, which means it uses sound to measure distance. These distance sensors have multiple applications, ranging from navigation to intrusion detection.
How To
For liquid level detection, the sensor is placed at the top of a water tank, pointing towards the bottom of the tank.
First, we need to wire the sensor to the TPS. In the TankSensor's datasheet, you'll find a table explaining the function of each colored wire. You can also check the following diagram as a reference.
We used a TPP3, but a TPP2 can also house the Tibbits required for this project.

By default, the sensor is in the TTL serial mode. To switch it into the RS232 mode, connect the orange line (#2, AE) to GND. This is covered in the Serial Communications section of MaxBotix's guide.
DO NOT connect the RS232 Tibbit's TX output to the sensor's RX line. This may cause permanent damage to the sensor.

The sensor has two operation modes: FREERUN and TRIGGER. For this application, we will use the TRIGGER mode. FREERUN mode means that the sensor is always running, and is active when the green wire is HIGH or left floating. See this project for the demonstration of the FREERUN mode. To enable the TRIGGER mode, we will use the "On Timer" and "On Command" blocks.
To request data from the sensor, the TPS sets the FREERUN/TRIGGER pin (green wire) HIGH through Tibbit #00_3 and starts a timer. When the timer reaches zero, the TPS sets the FREERUN pin back to LOW. We achieve this functionality with an "On Command" block to the sensor on schedule or through a button on the dashboard.
Here is how the dashboard looks:

The reading is updated every hour. Additionally, you can update it manually by pressing the dashboard button.