Liquid Level Sensor (0.5ft - 20ft Range)- Lidar Hardware Choices

argon
xenon
Tags: #<Tag:0x00007fe222d58fc0> #<Tag:0x00007fe222d58e80>

#1

Background
I have read many of the posts on this forum regarding liquid level sensing and it appears that a lidar based sensor may be the best solution when it come to ease of building the system and robustness in sensing. The plan would be to pair the sensor with a Argon.

I have seen the Garmin LIDAR-Lite v3HP mentioned, and it appears to be a very robust sensor, but the price at ~$149 is hard to swallow.

I have recently stumbled across the TFMini Plus (link) which is a lidar based sensor with a sensing distance of 12m and boast a IP65 enclosure with a cost of ~$49.

I have found two Arduino based libraries that show promise:

  1. budryerson
  2. senegalo

Sensor requires 5V (Argon will be powered via USB so I can use VUSB for power) and most adopted communication is via UART (3.3v)


Question

  1. Has anyone worked with the TFMini Plus? If so would you recommend the sensor for liquid level measurement?

  2. Does anyone see any reason why the TFMini Plus or one of the mentioned libraries would not be compatible with the Argon?

Thank you!


#2

I’m not sure light based ToF sensors are best for liquid level sensing.
What sort of liquid are you intending to sense?
How reflective is the top surface, how much of the light will just pass through and be reflected from the bottom?


#3

In my experience, direct pressure measurements are the easiest, if you find a pressure sensor that’s 100% compatible with the liquid in the long term. A bubbler system with air pressure readings is the most robust solution for troublesome applications. “Top-Down” measurements are usually my last choice.

But, if you are looking for a sensor that will be installed in the same size/material tank measuring the same type of liquid, you can drill down to the best sensor for your application.

As you know, the TFMini is infrared. It could be a good sensor if reflections aren’t an issue and ambient lighting conditions aren’t changing on you. But the 800 mA current from the Datasheet would concern me.


#4

@ScruffR, thank you for the response. The liquid is well water for drinking. It is a round water storage tank (~12ft tall and ~8ft diameter) that is filled by a windmill and serves my friends grandparents ranch house. They have struggled for 50+ years with something going wrong with the windmill, piping, etc. usually three times a year and not finding out until the house runs out of water! My goal is to develop a monitoring system that can give fair warning (send a text to my friend their grandson via Ubidots) when the level gets below a certain point.

@Rftop, thank you as well for the response. Direct pressure measurement sounds very attractive. I did some research and found this submersible level sensor; however, with 24v input and an output in mA, it may require quite a bit of auxiliary components to make it work. These are the pressure sensors I work with (they are awesome btw), but since they are flow through and do not have a diaphragm I do not think they are applicable.

The current draw is definitely a concern considering the Garmin spec. sheet claims 85mA, 10X less to do the “same” thing! It honestly makes me think it is a typo for the TFMini.

Conclusion
My initial assumption regarding lidar based sensor being best is likely wrong due the difficulty of measuring the surface of the water vs. passing through it and other changing variables.

Direct pressure measurement would be more robust, so I need to research this method more.


#5

I’d agree with @Rftop, that bottom up measurements would be the best option others have also had some success with ultrasonic distance sensors - although they also have their shortcomings (e.g. condensation, soiling, …).


#6

@Backpacker87, How do you intend to power the Argon and Sensor?
This community can give you some pressure sensor recommendations once we know the voltage available.

Some are as cheap as $10, and you can add a $5 float as an emergency Alarm Source in case the pressure sensor fails in a weird way (an output that the Argon still “believes” is valid) .


#7

@Rftop, it will be a solar based install. I am flexible on the solar route that I take though so I can make any one of the following available if needed: 3.3v, 5v or 12v. I have another Argon (always on) nearby, and I am now thinking the level sensor should be a solar powered Xenon install and measuring liquid level is its only job and it can push that data to the Argon that is ~100ft away (unobstructed).


#8

For a Xenon, AnField makes a 3.3V pressure sensor w/ I2C. They are ~$120 and hard to find a distributor for small quantities.

Dwyer Series 626 & 628 are also great sensors, no 3.3V version (but every other option available).

All the sensors mentioned above are professional grade. You purchase once and never touch it or think about it again.

The cheap solution is the 5 Volt Chinese sensors for ~$10-$20:
image
Find the 5 PSI version.

I’ve used these pressure sensors (0.5V to 4.5V Output) that are supposed to be powered w/ 5V in the past with Electrons and been successful with powering with 3.3V GPIO Pin.
When powering with 3.3V, the output is still proportional to the input voltage, but the 0 psi bias gets skewed, and the max output.
Measure the output at 0 psi, and use that instead of 0.5V in the calculation. The same goes for the max range.
The good news is it’s a linear function.
The bad news is these cheap sensors have a “bathtub” curve failure rate.
I will bench test them for a week prior to installing in the field. If they survive the first week, they will last.


#9

@Rftop, this is awesome thank you very much. Any suggestions for the air pump? I found this pump, but have no idea how long it will last so wanted to see if you knew of a more robust solution.

I am thinking about creating a test setup to see if I can bring all the parts and pieces together prior to deployment which is 5hrs away.

On another note, I do have a MB7052 XL-MaxSonar-WRM1 sensor on the shelf that I could allocate to this project. I am wondering if this would be a worthy competitor vs. the bubbler setup.


#10

Sorry, the bubbler suggestion was before I knew it was potable water. No need in a bubbler.
The pressure sensors would be installed directly into the tank or discharge piping with 1/4" threads.

But since you already have a MB7052 on hand…that could be your easiest answer.
Your 8’ wide tank may help with the reflections.
I’ve found it best to use the Pulse Width Pin on a MB7051, so it’s likely the same for the 7052.

  digitalWrite(powerMaxbotix, HIGH);   // Turn MaxBotix 7051 Sensor ON
  for (uint32_t ms = millis(); millis() - ms < 1000; Particle.process());  // wait for 1 second
  sensor1 = pulseIn(pwPin1, HIGH);     // Measure the Pulse Width Output from MaxBotix Sensor's PulseWidth Pin (Sensor Pin #2)
  cm = sensor1 / 58;                   // Convert Pulse Width to Centimeters
  feet = (cm * 0.0328084);             // Convert Centimeters to feet
  digitalWrite(powerMaxbotix, LOW);    // Turn MaxBotix Sensor OFF

#11

@Rftop, thank you very much. I am going to go the route of using the 7052 and see how that works out.

I really appreciate your help and advice.


#12

Another good source for a sonar sensor is Adafruit. I personally use this one: https://www.adafruit.com/product/1137. I use it to measure liquid in large volume tanks similar to your application. I used analog voltage input but I average 10 readings over 2 seconds to try and improve accuracy. I may have to give the Pulse Width method a try. Cation though, this sensor does draw ~ 50mA peak during the moment of taking the reading and I believe Gen 3 devices can only put out ~15mA or so.

@Rftop Do you have transistor to kick-up the current or are you able to use the digital output directly with your MaxBotix?

-Jeff


#13

@jgskarda, I use a digital pin on a Boron LTE to directly drive the MaxBotix. Datasheet claims the average (and peak) current draw for 3.3V operation is 2.1mA (50mA peak). I suppose the capacitance handles the peaks since they are extremely short duration ?
But you could connect the Particle 3v3 Pin to Maxbotix V+, and use Maxbotix Pin 4 to cycle the ranging on/off.

Lots of interesting info on MaxBotix site:


#14

@Backpacker87 I went through the same struggle a few months ago when I started a sump pit monitoring project.
I had very promising test results with the this ultrasonic distance sensor.
All looked good until some foaming agent got into the stream from shampoo or detergent and the foam spread over the water surface. Surprise, surprise the soundwaves got beautifully absorbed by the foam and all of a sudden the test unit showed distance to the next galaxy.
After countless hours of research and more trial and error I ended up using submersible pressure sensors.
They run on 10-30VDC, which might require an additional power source. The current-voltage converter, also adds to the complexity but no more than connecting an ultrasound sensor.
All in all, my experience confirms what @Rftop stated earlier.
If you are only dealing with clean water, the ultrasonic solution definitely deserves a test run. Nevertheless, the moment some “stuff” start showing up on the surface your measurements will likely go off the chart.
Curious what will be your final solution.


#15

@LBBD, thank you for this additional info. Due to the fact that it is potable water, I am going to operate on the assumption that I will have a relatively clean liquid surface so I am going to proceed with the ultrasound sensor first. I will keep you all updated as the project progresses.