#411

แชร์
ฝัง
  • เผยแพร่เมื่อ 28 เม.ย. 2024
  • Measuring levels of liquids is a common problem. Where I live, it is probably more the water level of the coffee machine, in rural areas the level of a water tank, and in the industry the level of chemical substances. There are many different ways to get this job done. If you stick around, I will show you ten different sensors and, as usual, we will learn some new tricks.
    - Sensors that react on fluid level thresholds
    - Sensors that measure the fluid level
    - Sensors that have to be mounted inside and sensors that are mounted outside the tanks
    - Sensors for the top and for the bottom of the tanks
    - And, as usual, you get some background info on the sensor interfaces
    I am a proud Patreon of @GreatScott!, @ElectroBOOM , @Electronoobs , @EEVblog , and others.
    Links:
    VL53L1X TOF sensor (4m) : s.click.aliexpress.com/e/_ATvJC4
    VL53L0X TOF sensor (2m) : s.click.aliexpress.com/e/_97st9m
    Ultrasonic Sensor (7m) : s.click.aliexpress.com/e/_A8Xi6k
    Threaded pressure sensors (e.g. 30psi) : s.click.aliexpress.com/e/_9uwKJO
    Capacitive Threshold sensor : s.click.aliexpress.com/e/_DFu...
    Metal threshold sensor : s.click.aliexpress.com/e/_AWQfDQ
    Plastic threshold sensor : s.click.aliexpress.com/e/_9GCwTe
    Ultrasonic Sensor (4m) : s.click.aliexpress.com/e/_A2Ad0G
    Throw.in pressure sensor : s.click.aliexpress.com/e/_AtXYrm
    Thresold sensor Steel : s.click.aliexpress.com/e/_9QAJQY
    Capacittive moisture sensor : s.click.aliexpress.com/e/_AUp7J2
    Resisitve moisture sensor : s.click.aliexpress.com/e/_AUu5j6
    Differential pressure Sensor: s.click.aliexpress.com/e/_97URk1
    The links above usually are affiliate links that support the channel (no additional cost for you).
    Supporting Material and Blog Page: www.sensorsiot.org
    Github: www.github.com/sensorsiot
    My Patreon Page: / andreasspiess
    Discord: / discord
    If you want to support the channel, please use the links below to start your shopping. No additional charges for you, but I get a commission of your purchases to buy new stuff for the channel
    My Amazon.com shop: www.amazon.com/shop/andreassp...
    For Banggood bit.ly/2jAQEf4
    For AliExpress: bit.ly/2B0yTLL
    For Amazon.de: amzn.to/2r0ZCYI
    For Amazon UK: amzn.to/2mxBaJf
    For ebay.com: ebay.to/2DuYXBp
    profile.php?...
    / spiessa
    www.instructables.com/member/...
    Please do not try to email me. This communication channel is reserved for my primary job
    As an Amazon Associate, I earn from qualifying purchases
    #no#midroll#ads
  • วิทยาศาสตร์และเทคโนโลยี

ความคิดเห็น • 818

  • @colinstamp9053
    @colinstamp9053 2 ปีที่แล้ว +88

    The other classic fluid level sensor is the float-driven potentiometer as used in car fuel gauges. It's quite easy to cobble one together out of bent wire and bits of packing foam.

    • @AndreasSpiess
      @AndreasSpiess  2 ปีที่แล้ว +7

      Also a good idea if the dimensions of the tank allow it.

    • @rvendrame
      @rvendrame 2 ปีที่แล้ว +15

      That's the only way I got rid of corrosion, vapor and false readings, after trying almost all techniques described by Andreas in this video. Instead a regular potentiometer (which can corrode too), I ended up using a AS5600 magnetic-position sensor with both sensor and corresponding magnetic embedded in epoxy resin.

    • @magikben
      @magikben 2 ปีที่แล้ว +4

      There are immersion style capacitive based sensors that are simply a tube whose length can be adjusted for tank depth. The materials are offered in a range including corrosion resistant. Commonly used with petrochemicals.

    • @miguelangelsimonfernandez5498
      @miguelangelsimonfernandez5498 2 ปีที่แล้ว +1

      @@rvendrame also consider that modern bio oils and fuels are a great playground for bacteria.

    • @mistercohaagen
      @mistercohaagen 2 ปีที่แล้ว +3

      I use mine to monitor my gasoline tank for my tractor out back by the hay bails, but I think birds or something keeps stealing the styrofoam off the end of the coat hanger. I keep adding a new wad of white styrofoam from the box I got my new dryer in, but someone keeps stealing it. Couldn't find anything modern so I used the old "coil-wiper" volume knob from an old vacuum tube radio my grandpa had plugged in out in the barn. It sounds a bit crackly when it turns if the wind sloshes the gasoline around, but at least it keeps a regular incandescent bulb brightly lit as long as there is gasoline in that tank. It's so nice when you don't need nothing fancy to get the job done!

  • @Thamli
    @Thamli 2 ปีที่แล้ว +79

    You can also use a weight sensor. You can use the density of the fluid to measure the liquid.

    • @einars899
      @einars899 2 ปีที่แล้ว +9

      Yes. This is a much used method in industry. It does not matter if the fluid is highly corrosive or very contaminated.

    • @rjung_ch
      @rjung_ch 2 ปีที่แล้ว +7

      I worked for a company, the measured the amounts of screws in their bin with scales, knew right off when it was getting low. Works great for such things.

    • @AndreasSpiess
      @AndreasSpiess  2 ปีที่แล้ว +11

      A good idea! Thank you.

    • @matneu27
      @matneu27 2 ปีที่แล้ว +2

      @@einars899 yes I know it from water pressure balancing systems in pipeworks. The balance vessel stands on 3 feet while there Is one weight sensor under one feet.

    • @immortalsofar5314
      @immortalsofar5314 2 ปีที่แล้ว +5

      I used this approach in my van conversion. I was sick of the 1-2-3-4 light indicators for the fresh/gray water tanks so I fitted weight sensors under them and worked on the principal that 1L of water weighs 1Kg.

  • @peterholst8875
    @peterholst8875 2 ปีที่แล้ว +37

    This video is so awesome!
    About 8 years ago, I needed a sensor for an expensive semi transparent plastic tank.
    I did a lot of thinking, and purchased a lot of different sensors and made a lot of different trials with prototype tanks.
    In the end I decided that I only needed to know if the level was 3/4 full, and 1/4.
    I ended up using 3 temperature sensors. 2 glued to the outside of the tank. One for ambient temperature near the tank.
    Sensing the temperature difference between them was surprisingly accurate.
    When the level got low, I got a warning, and could turn on a pump with a timer, to fill the tank to approximately below 3/4, or stop at 3/4 if reached.

    • @AndreasSpiess
      @AndreasSpiess  2 ปีที่แล้ว +8

      This is innovative! Also an indirect way of measuring levels...

    • @benhetland576
      @benhetland576 2 ปีที่แล้ว +4

      Very interesting approach! What happens when the liquid temperature equalizes with the ambient, or was that just not much of an issue in your case? Perhaps something similar could also be used to measure flow through a pipe by sampling two points on the pipe some distance apart along with the ambient temperature.

    • @peterholst8875
      @peterholst8875 2 ปีที่แล้ว +2

      @@benhetland576 in my case equalizing of temperature was never a problem.
      I think it could be because it was mounted in an engine bay, so when it was operated the ambient would rise, but due to thermal mass and location, the water temperature did not increase significant during operation.

    • @peterholst8875
      @peterholst8875 2 ปีที่แล้ว

      @@benhetland576 I don't think it would be as easy to do with a pipe?
      I also think the pipe material and temperature of the liquid is pretty important in that case.
      But I could be wrong 🙂

    • @rasmusforsberg60
      @rasmusforsberg60 2 ปีที่แล้ว

      This approach is used to detect leaking waterpipes in households. More specific leaking toilets.

  • @AntoineMariotat
    @AntoineMariotat 2 ปีที่แล้ว +19

    Great memories about my industrial automation lessons back in time.
    May I add something : for measuring pressure in order to get a fluid level, you need (in most case) a second sensor perpendicular to the tank wall to measure the static pressure (unless an open tank, due to level and temperature variation, or just the appliance is an pressurized tank) and them substrat the static pressure to your measured dynamic pressure to get the relative pressure of your fluid level.
    The main point of that 4-20mA sensor you introduce is that if there is an open loop (wire cut somewhere) or a short circuit, you will notice it instantly (by getting 0 or ♾ Amps) and this is why sensors with this reading range are WIDELY used in industry. (Way much that any other kind of sensors, and for many appliance : temp, flow, angle, etc.)

    • @AndreasSpiess
      @AndreasSpiess  2 ปีที่แล้ว +4

      You are right that you have to subtract the outside pressure. Some viewers use a second pressure sensor. I could imagine to use the weather forecast if you do not want to be very precise.
      I was not aware why the current loops start at 3mA and not at 0. Now I know. Thank you.

    • @BobHannent
      @BobHannent 2 ปีที่แล้ว

      That's very interesting, I have a long term project to upgrade a small cabin in some fields belonging to my father in law.
      I'd like to make the water tank autonomous, filling/monitoring from a well, I was thinking of using float sensors or the passive sensor that was used on the coffee machine.
      But I quite like the idea of those pressure sensors, but now I have to think about static pressure?! Yoinks.

    • @AntoineMariotat
      @AntoineMariotat 2 ปีที่แล้ว +2

      @@BobHannent I think for that small home appliance, using a constant value based on average atmospheric pressure for static pressure is fine ;)
      Measuring static pressure is mandatory in tanks where this static pressure is subject to significant changes

  • @RoterFruchtZwerg
    @RoterFruchtZwerg 2 ปีที่แล้ว +45

    Very interesting :) I once made a simple water level sensor with a capacitive approach. It was just two parallel copper tape strips on a long plastic sheet, covered with tape for isolation. When submerged, the water changes the capacitance between the two copper strips, which can be measured by an MCU simply by toggling a digital IO and measuring how long it takes to charge and discharge the IO (libs are available, usually used for touch sensors). This way you can tell how much of the sensor is submerged.

    • @AndreasSpiess
      @AndreasSpiess  2 ปีที่แล้ว +7

      I did not know that this also works for deep tanks. One of the moisture sensors work that way.

    • @benhetland576
      @benhetland576 2 ปีที่แล้ว +5

      Maybe the copper strips could be replaced by a regular 2-lead cable? Like one of those flat ones used with lamps on 230V AC, or and old telephone cable or antenna feeder cable with that little flat segment to create a distance between the two wires (anyone remember those?). They come ready made and sealed in almost any desirable length, so only the end needs to be sealed off.

    • @ExplorerOffgrid
      @ExplorerOffgrid 2 ปีที่แล้ว +8

      i use this a similar setup for monitoring my two water tanks using speaker wire to measure the levels of a 3k gallons and a 5k water tanks .. most consistent thing I've found to measure the levels that doesn't include me sticking my head inside.

    • @furmek
      @furmek 2 ปีที่แล้ว +2

      @@ExplorerOffgrid what did you choose to measure the capacitance of the wire - some dedicated IC or something else? How accurate are your readings?

    • @TowerThree
      @TowerThree 2 ปีที่แล้ว +1

      @@benhetland576 it's often called ladder line, and is still used to feed low frequency antennas. Try a ham radio store

  • @antoniobegines
    @antoniobegines 2 ปีที่แล้ว +2

    Hi Andreas ... as usual, your videos are a great source of inspiration and help. Thank you for continuing to post so frequently.

    • @AndreasSpiess
      @AndreasSpiess  2 ปีที่แล้ว +1

      My pleasure! Now I will pause over Christmas and New Year...

  • @JackSoldano
    @JackSoldano 2 ปีที่แล้ว +17

    I've worked on a project where we needed to monitor water level, we used a float in the chamber with a magnet mounted in the housing. We then had an array of Hall effect sensors along the tank which were monitored to identify the position of the magnet. This was a nice contact free solution which avoided risk of fluid ingress into the electronic housing.

    • @AndreasSpiess
      @AndreasSpiess  2 ปีที่แล้ว +1

      Thank you for sharing. But I assume the hall sensors were somehow in contact with the fluid? Or were they outside the tank?

    • @pete3897
      @pete3897 2 ปีที่แล้ว +1

      @@AndreasSpiess I would expect they were attached to the outside of the tank. The float on the inside of the tank is restricted so it can only travel vertically up and down the inside edge of the tank (and therefore always readable from the outside as it passes the nearest hall sensor). Nice idea @Jack Soldano

    • @BobHannent
      @BobHannent 2 ปีที่แล้ว +1

      There's the old one of putting the float in a tube running parallel, either inside or outside the vessel.
      Or putting the float on a wire.

    • @JackSoldano
      @JackSoldano 2 ปีที่แล้ว +4

      ​ @Pete Mundy Basically this, we had a tank with a channel for the float to hold it in a specific position, the float would sit at water surface level and house the magnet. On the outside of the tank along the channel was a PCB Hall Effect Array with around 10mm spacing between the magnet and Hall effect sensors. This is not the most accurate solution but depending on your algorithm can give you around +/-2mm accuracy

  • @avejst
    @avejst 2 ปีที่แล้ว +1

    Fantastic walkthrough of the possibilitys of sensors, love it!
    Thanks for sharing your experience with all of us 👍😀

    • @AndreasSpiess
      @AndreasSpiess  2 ปีที่แล้ว

      You are welcome! Glad you liked it.

  • @grosseruser
    @grosseruser 2 ปีที่แล้ว +31

    A couple of years ago i used two insulated wires as a capacitor in a ne555 resonant circuit. The liquid then serves as a dielectric and the change in frequency can be recorded very well with a microcontroller.

    • @AndreasSpiess
      @AndreasSpiess  2 ปีที่แล้ว +1

      This is the same concept as used in the shorter sensor I had in the video. It is interesting that it also works for longer distances. Thank you for sharing that it worked.

    • @xDR1TeK
      @xDR1TeK 2 ปีที่แล้ว +1

      I have attempted a similar scenario but with steel cables used for laundry with thick polymer insulation. Didn't work at all and never thought to try copper. Did you try it as a twin lead arrangement? As a signal transmission line? Not sure if I over engineered it or used inappropriate materials. I will revisit this project from my notes but would like some feedback to improve on my research.

    • @grosseruser
      @grosseruser 2 ปีที่แล้ว +3

      @@xDR1TeK I used two configurations, two parallel cables and one cable in an aluminum tube. Both worked well and are very sensitive. A drop could be detected in a 1L container. That makes the absolute accuracy a bit problematic. It is important that the 555 sits directly on the "capacitor". Attempts with a feed line in coax were not really successful.

    • @grosseruser
      @grosseruser 2 ปีที่แล้ว +2

      @@xDR1TeK I used a cmos 555, which can handle the high frequencies better with small capacities.

    • @xDR1TeK
      @xDR1TeK 2 ปีที่แล้ว +2

      @@grosseruser I went all over the physics to calculate the dielectrics and permittivity along with conductance and inductance of the transmission line based on immersion and different intrinsic impedance for a transmission line. Too much, for so little. and yet the 555 wins again. :D

  • @jenskaa4044
    @jenskaa4044 2 ปีที่แล้ว +26

    Pressure can also be measured from the top, placing the sensor at the end of a tube that goes to the button of the tank. The tube inner diameter and the weight of the fluid determine the pressure

    • @colinstamp9053
      @colinstamp9053 2 ปีที่แล้ว +2

      This doesn't normally work reliably long-term, since various effects tend to cause the fluid level to rise in the tube over time. The setup has been used in the past though by very slowly feeding gas into the tube (normally bottled nitrogen). The gas pushes the liquid right to the bottom edge of the tube where it bubbles out, giving a consistent effective tube length. If you only want periodic readings, you could use an aquarium pump, controlled by the micro, to provide the pressure.

    • @AndreasSpiess
      @AndreasSpiess  2 ปีที่แล้ว +3

      Others mentioned this type, too. But I fear it has to be air-tight for a very long time.

    • @jenskaa4044
      @jenskaa4044 2 ปีที่แล้ว +6

      @@colinstamp9053 you might be right, but if you emptying the tank regularly, it will be "reset"

    • @colinstamp9053
      @colinstamp9053 2 ปีที่แล้ว +1

      @@jenskaa4044 Yep. There are a few applications where it's not a problem. I think washing machines often use this method. Just make sure you don't need accurate readings for more than an hour or two between emptyings.

    • @markpalmer9002
      @markpalmer9002 2 ปีที่แล้ว +4

      If the pipe has a T at the top then a positive pressure device (air cylinder or small air pump) can be attached to the third part of the T, the first and second go to the sensor and subsurface pipe respectively. It was called a bubbler system and I've used it to measure seawater levels for months at a time. The and will bubble out of the bottom of the the and always maintain a pressure proportional to the depth of water, an advantage being that atmospheric air pressure is cancelled out.

  • @yekutielbenheshel354
    @yekutielbenheshel354 2 ปีที่แล้ว

    Thank you!
    I greatly appreciate videos like this that focus on mundane yet important stuff.
    I get sooooo tired of superficial (shallow dives) that basically exclaim, "Wow! Here's a bright shiny new object!!" I want to know how to actually get stuff done. Your videos tend to eschew the hype and focus on the "Here's how to get stuff done" aspect. Yeah. Sure. Of course it's often boring and tedious... but it's also crucial information.

  • @masmanaa
    @masmanaa 2 ปีที่แล้ว

    Perfect timing! I have a small decorative fountain that I brought in to store for Michigan's winter. I wanted to outfit it with a sensor to stop the pump if the water level dropped to prevent damage and alert Home Assistant. Now I have no excuse to forget. Once again thanks to the guy with the Swiss accent!

    • @AndreasSpiess
      @AndreasSpiess  2 ปีที่แล้ว +1

      Good project for the cold winter where you live. I still remember my February trip to Chicago many many years ago ;-)

  • @kevgermany
    @kevgermany 2 ปีที่แล้ว +1

    Thanks. Your timing is perfect for me. Just about to add level sensors in my campervan. Lots of interesting work ahead.

    • @AndreasSpiess
      @AndreasSpiess  2 ปีที่แล้ว

      Good project! Movement might complicate the things. I always wonder how my gas tank knows how much gas it still contains ;-)

    • @kevgermany
      @kevgermany 2 ปีที่แล้ว

      @@AndreasSpiess float I think. Mine is resistive, I think there's a float operating a rheostat.

  • @jacquesdubord6844
    @jacquesdubord6844 2 ปีที่แล้ว +1

    Hi! I am Jacques from Quebec. I had to build a liquid monitoring device to allow reading the level of the liquid so I used load cells sensors. These worked fantastic. Thanks for your very exciting video.

    • @AndreasSpiess
      @AndreasSpiess  2 ปีที่แล้ว

      You are right. I should have included measuring weight in my video. Because both applications cannot be done like that (tank burried in earth and coffee machine has also waste water and waste grinded coffee which adds to the weight) I forgot it.

  • @danielatbasementtech
    @danielatbasementtech 2 ปีที่แล้ว +1

    Another informative video … thanks. A few years ago I prototyped a multi-level capacitive approach using adhesive copper tape on the outside of an aquarium and the Adafruit MPR121 12 channel sensing board. It worked quite well and I’m finally getting back to an aquarium automation project using that approach.

    • @AndreasSpiess
      @AndreasSpiess  2 ปีที่แล้ว

      Good idea. Like that you even get more than just one or two level signals.

  • @bertondroid
    @bertondroid 2 ปีที่แล้ว +4

    Great Video as usual ;)
    You mentioned LIDAR and Ultrasonic. I recently learned that conventional radar is a commonly used strategy for measurement of solid and liquid levels in the industry. 😎

    • @AndreasSpiess
      @AndreasSpiess  2 ปีที่แล้ว +1

      I was not aware of that. But other viewers also mentioned it...

  • @lmamakos
    @lmamakos 2 ปีที่แล้ว +2

    I think the comments on this video have the highest S/N ratio that I've ever seen on a TH-cam video. Just full of all sorts of wonderful ideas and experiences! And the video was really good, too!

    • @AndreasSpiess
      @AndreasSpiess  2 ปีที่แล้ว +1

      Indeed, we have a wonderful community with lots of knowledge!

  • @pedrobaco563
    @pedrobaco563 2 ปีที่แล้ว +8

    Great video, Andreas. I've created a level sensor for my house heating system tank using the TOF approach. Used a VL53L0X with a wemos D1 mini, one 18650 cell and a small solar panel. Measures were sent to a rpi running mosquito. Had issues with corrosion, so needed to encapsulate the sensor pretty well. Apart from that the thing is working now for over 5 years.

    • @AndreasSpiess
      @AndreasSpiess  2 ปีที่แล้ว +1

      Thank you for sharing your experience!

    • @rgrfrst
      @rgrfrst 5 หลายเดือนก่อน

      @@AndreasSpiessYou really covered this well Andreas and mentioned practical points. eg my heating oil tank has two sensors (because it's so important). A VL53L0X and a cute ultrasonic JSN-SR04T car bumper sensor (which can't read under 300mm). Even when they read 6 times a minute and I massively average the output the result is 'noisy' (eg maybe the liquid sloshes in the tank - maybe a video on signal conditioning is a future idea). @pedrobaco563 mentions corrosion - oh yes! On my sensors the oil vapour destroyed the plastic and silicone casing - yup silicone conformal goo is no good with oil. Allegedly polyurethane is oil resistant. My 3D printed housing HAS been good though though I can't recall if I used PLA or PETG. The project is written up should you need it. Roger F

  • @adrianclint1449
    @adrianclint1449 2 ปีที่แล้ว

    Great video - shows the things that are needed to consider when someone asks to measure water level, - what do they really want to know is a second question which applies to all sensor questions.

  • @Quemedices684
    @Quemedices684 2 ปีที่แล้ว +1

    Great video, Andreas, it pointed to the real difficulties I also encounter, as corrosion and cludge of mechanical switches. In my case I had to measure the level of a underground tank feeded from a 100m well. The only solutions that worked for me was a floater with a long cable that has internally a switch that opens when the horizontal angle exceeds some value. Also a pressure gauge 4-20mA at the bottom of the tank

    • @AndreasSpiess
      @AndreasSpiess  2 ปีที่แล้ว

      Maybe the second part of your last sentence is cut?
      These mechanical switches are for sure quite robust as long as you do not need to measure aggressive fluids...

  • @manunle
    @manunle 2 ปีที่แล้ว +1

    This is a timely video for me. I live in California, in a town that was mostly destroyed by wildfire. My house was saved but the water treatment plant was damaged. They have repaired it enough that we have water but very low pressure. I have to pump water into a tank to supply our house with water. Right now I have a float switch in the top to tell me when the tank is full but now I am going to put a pressure sensor in the line coming out of the tank so I can monitor the level in the tank. Thanks for the video :)

    • @AndreasSpiess
      @AndreasSpiess  2 ปีที่แล้ว

      Glad to read that you and your house survived this catastrophe! A pressure sensor is probably the easiest thing in your case. I forgot to mention htat you ahve to correct the values with hte current pressure (obtained by a weather service) if you ant to be precise.

    • @manunle
      @manunle 2 ปีที่แล้ว

      @@AndreasSpiess I didn't think of that. I wonder if I could use the pressure sensor in conjunction with something like a BMP280 for barometric pressure. But, then I would have to do math :)

  • @horacioventurino7497
    @horacioventurino7497 2 ปีที่แล้ว +2

    Hi Andreas, thank you for the water level measurements review.
    The radar sensors have the advantage over ultrasonic type in that they are not affected by the temperature of air, which in certain cases can be an error factor

    • @AndreasSpiess
      @AndreasSpiess  2 ปีที่แล้ว

      Thank you for the additional info. Good point!

  • @georglinde3910
    @georglinde3910 2 ปีที่แล้ว

    Thanks for this great video, Andreas. Wanted always the same like you, a reliable water level sensor for my Gaggia coffee machine. Bought this capacitive sensor like shown in your video and was happy, that it worked also with just 3.3V. So the integration in my Sonoff S20 Socket was very simple. I use this socket for a couple of years now to remotly switch the machine on. Now I could use the spare GPIO for the sensor. In combination with Homebridge I get now the messages on my iPhone - very nice! :-)

    • @AndreasSpiess
      @AndreasSpiess  2 ปีที่แล้ว

      Thank you for sharing your project!

  • @JakubJiricek
    @JakubJiricek 2 ปีที่แล้ว +3

    Good overview, thanks for another great video! I have very good experience with the last sensor you mentioned - pressure one with 4-20mA output. I’m measuring water level in the outside well. Level is in the range of 2-3 meters. And this sensor combined with interface board from Mikroelektronika (correct board: MIKROE-1387) is reliable and precise. I read the values via SPI, just a single 5V/3.3V power supply is needed for powering the board and also the sensor.

    • @AndreasSpiess
      @AndreasSpiess  2 ปีที่แล้ว

      Good information. So your sensor also works down to 3.3 volts?

    • @JakubJiricek
      @JakubJiricek 2 ปีที่แล้ว +1

      ​No, the sensor works on approx.16V. This voltage is provided by the interface board, as it contains DC/DC boost converter. And the board also contains the DAC with SPI interface. I made a mistake in my previous comment, the board used in this project is actually MIKROE-1387. Manufacturer has a datasheet and also schematics for the board on their web pages.

  • @husseinsharafaddin1851
    @husseinsharafaddin1851 2 ปีที่แล้ว +2

    Great video Andreas,
    In my project I used the last sensor, which is the pressure sensor. Measuring the current was a bit tricky. A normal resistor will not work because the current range is limited to 20 mA and the ADC resolution is not enough. For this purpose I used the Ina219 current sensor board with a built-in shunt resistor. This delivered better results. It is important to use a stable 12 or 24 V power supply. Because any voltage changes in mV level has an effect on the results. I used software filter to deal with this issue.

    • @AndreasSpiess
      @AndreasSpiess  2 ปีที่แล้ว +1

      Thank you for sharing your experience. The INA219 is also a good solution if its shunt resistor is changed to a higher value.

  • @sarahjanegray
    @sarahjanegray 2 ปีที่แล้ว

    Thanks Andreas. This is something I have been thinking about as would like to be able to measure the amount of heating oil (kerosene) in our outside tank. So this has given me some ideas.

    • @AndreasSpiess
      @AndreasSpiess  2 ปีที่แล้ว

      Maybe you also read the comments on another sensor: A tube to the bottom of the tank and a pressure sensor (and sometimes a pump) on the top outside the tank. This seems to be a very good method. Maybe I will make a video about it in the future...

  • @edwardcdg
    @edwardcdg 2 ปีที่แล้ว

    Once again, great work! Thank you.

  • @Ne9n
    @Ne9n 2 ปีที่แล้ว +1

    Nicely done! A flashback to my past. Open Collector outputs are used in many places in industrial I/O especially when the sensor is a long distance from the MCU as it reduces the power supply loading on the I/O point. The important point is to decouple the power supply from the sensor. Current loop systems have some concerns about short circuit protection. It can be a party-line with several devices consuming this data. Also, current loop is very often used to send serial data which may be fun to dive into. Nicely done.

    • @AndreasSpiess
      @AndreasSpiess  2 ปีที่แล้ว

      I thought I explain it because, as you mention, it was often used in the past and maybe no more known by younger people.

    • @Ne9n
      @Ne9n 2 ปีที่แล้ว

      @@AndreasSpiess as always you communicate technical topics in an easy to digest fashion

  • @juergenheisel7360
    @juergenheisel7360 2 ปีที่แล้ว +9

    I use a VL53L0X sensor for water level measurement. This sensor is mounted so that the highest water level is about 10 cm below the sensor. To avoid light influences from outside the sensor unit was mounted in a plastic tube. Attention to the diameter of the tube. The VL530X has an opening angle of 25-35 degrees. If the tube is too small, internal reflections will occur.

    • @SarahKchannel
      @SarahKchannel 2 ปีที่แล้ว +2

      As long as the water is still and not moving this can work, but the moment the surfaces moves the laser can reflect away from the sensor, or even not be reflected at all (brewster angle). So while technically possible, not a very safe way to measure. Unless you place a floating reflector to the surface of the liquid and use that as a target.

    • @juergenheisel7360
      @juergenheisel7360 2 ปีที่แล้ว +3

      @@SarahKchannel That's right, that's why the plastic tube goes to the bottom of the tank. In the lower end of the tube are holes so that the water can flow in and out. In the tube itself is a white plastic float as reflector. Ping pong balls are good for this.

    • @AndreasSpiess
      @AndreasSpiess  2 ปีที่แล้ว +2

      Good information! Others also mentioned the tube to avoid problems with sunlight. But not the diameter.

    • @SarahKchannel
      @SarahKchannel 2 ปีที่แล้ว +1

      @@juergenheisel7360 each medium, or fluid therefore, has a different refractive index. At certain angles a surfaces is either fully reflective or fully transmissive, or changes polarisation angles of the source. I am using the VL sensors in other applications and love them ! As long as the distance is not greater than 1-1.2m they do a good job.

    • @juergenheisel7360
      @juergenheisel7360 2 ปีที่แล้ว +1

      @@SarahKchannel In my case, there are even extreme differences, once clear water, the other time with foam (washing machine). That's why I decided to use a white reflector to get the same measurement results and yes I can confirm the distance information.

  • @scottwood1143
    @scottwood1143 2 ปีที่แล้ว

    Just what I needed - I have a small tank with a sump pump in the basement that needs monitoring! Thanks Andreas 😃

  • @Alex000113
    @Alex000113 2 ปีที่แล้ว +2

    Ive used the inexpensive moisture sensors for automatic watering and sump pump applications. They are so cheap I dont mind replacing them annually when they corrode - especially outdoors or in salt water. One design practice I suggest is if you are pumping fluids is to include a purely analog override based on the raw sensor output when tank full, to switch off the pump if the controller crashes.

    • @AndreasSpiess
      @AndreasSpiess  2 ปีที่แล้ว

      I agree: To have a plan B is always good practice.

  • @mikefochtman7164
    @mikefochtman7164 2 ปีที่แล้ว

    It takes a bit more, but we used 'capacitance probe' sensors to measure water level in tanks. It had a thin rod centered in an outer tube that had many holes along it. The two were electrically isolated from one another. An oscillator circuit was used to put this in one leg of a 'bridge' (similar to a wheatstone bridge, but composed of capacitors). As the level rose/fell, the capacitance between the outer tube and inner rod would change, resulting in a signal across the bridge. The probe was made of stainless steel, so it did not corrode in the hot water. Probably a bit too complicated for most hobbyists, but just wanted to share. Another nice video, thanks.

    • @AndreasSpiess
      @AndreasSpiess  2 ปีที่แล้ว

      The tube was already described in the comments. But it was only used as a capacitor for an oscillator, not in a bridge as you used it. Thanks!

  • @DaCat2
    @DaCat2 2 ปีที่แล้ว +1

    Great topic and info Andreas, brilliant as always. Thank you for creating this. Level sensing is a very popular subject and complex (with challenges) at times. In the industrial world, Radar for level is also very popular, with different frequencies and ranges available. Ultrasonic can also use different frequencies, depending on range. With Ultrasonic, keep in mind that the temperature will affect the accuracy of the signal, therefore sensors have temperature compensation internally. You can use a 'still well' to eliminate disturbances on the liquid surface affecting your signal, as well as air movement affecting the return echo signal. With pressure, you will find 'front-flush' sensors which are typically used in the food industry, this reduces the chance of contamination. Even optical sensors are used for level at times, infra-red light can be your friend. For your viewers who want more info on this topic, I would recommend doing a google search, all the leaders in the industrial electronics have various sensors for this application and a world of information to share with you.

    • @AndreasSpiess
      @AndreasSpiess  2 ปีที่แล้ว

      Thank you for the additional information. The VL... TOF sensors use infrared light, BTW. Radar is also an interesting topic (a longtime topic on my list)

    • @sorensteinkellner2123
      @sorensteinkellner2123 2 ปีที่แล้ว

      @@AndreasSpiess As a Swede I want to mention Acconner. The advantage is that the radar sensor does not have to be in contact with the fluid. It works with, for example, a plastic disc between the sensor and the fluid. The company mentions the sensor's low energy consumption. Such a property you usually appreciate.
      th-cam.com/video/4OEXVjBmmFw/w-d-xo.html&ab_channel=Acconeer

  • @EmmanuelLieurain
    @EmmanuelLieurain 2 ปีที่แล้ว +2

    Thanks!
    I liked this subject, because I experimented this on my pool, with unfortunately not a success due to corrosion and accuracy.
    I appreciated the open collector explanation, and the various usages.
    I faced with one of them on my 3D printer with an inductive bed level sensor, which led me to fry the motherboard...

    • @AndreasSpiess
      @AndreasSpiess  2 ปีที่แล้ว +3

      Thank you for sharing your experience. I think corrosion is the biggest problem of those sensors.

    • @chancsc
      @chancsc 2 ปีที่แล้ว

      I use ultra sonic sensor to measure the distance from water surface, work well after > 1 year

  • @magikben
    @magikben 2 ปีที่แล้ว +2

    In racing you can find level switches like the Honeywell LLE Series used in fuel swirl pots and dry sump oil reservoir tanks. They use optical sensing at the tip of the unit based on changes or refraction. It is not uncommon for fuel to be weighed prior to being added to a race car rather than using volume measurement. Another thing we deal with in race cars is the slosh which makes measurement a real pain. We end up having to buffer the results of the measurement to a high degree.

    • @AndreasSpiess
      @AndreasSpiess  2 ปีที่แล้ว

      I always wondered how even my car (I am a prudent Volvo driver;-) ) is able to get the right value. In your case it must be much more complicated...
      These Honeywell LLE sensors seem to be threshold level detectors. I can imagine that it would work if you place an LED and a phototransistor close to each other.

  • @linuxranch
    @linuxranch 2 ปีที่แล้ว

    Andreas,
    One way to sense the level in a tank is to use a "bell" shaped dome, open side down. You attach a hose to the top of the bell.
    Outside the tank, you have a "t" fitting. One branch of the T goes to the hose attached to the bell. The 2nd branch goes to a pressure sensor. The third branch of the T goes to a small air pump.
    With the dome anchored to the bottom of the tank, air is pumped, slowly, into the bell. Run the pump for a bit, stop the pump, read the pressure. Pump some more.stop the pump. Measure the pressure.If the pressure is unchanged,the height of the fluid is proportional to the depth and density.
    Successive readings take very little additional air. If the tank is being drained, no additional air may be needed.
    You must stop pumping and allow the pressure to equalize, between readings,or the resistance to flow of air down the hose will affect your reading.
    The tank must be vented and operating at ambient pressure and known temperature.
    I would not use this to measure flammable liquids. (Although, the first place I saw it was measuring the level of fuel oil in an underground tank! The pump was a miniature "bicycle type pump". The instructions read "operate the pump until the reading stabilizes. Read the level in "feet of oil".)
    A small aquarium pump, either bellows or piston type, would work for shallow depths of water.

    • @AndreasSpiess
      @AndreasSpiess  2 ปีที่แล้ว

      Maybe you watch my newest video about the topic. There I used a similar system with a pump...

  • @darko2612
    @darko2612 2 ปีที่แล้ว +3

    There is also another simple way with ESP32. I had to measure when plastic bottle with liquid is near empty. I just cut circle from one side Copper PCB with radius 15 mm and made short connection with one of capacitive touch pins of ESP32. PCB was put on outside surface of bottle near bottom. After setting threshold of readings, it works perfectly for my project.

    • @AndreasSpiess
      @AndreasSpiess  2 ปีที่แล้ว

      Good idea to use the built-in sensor of the ESP

  • @johanneswerner1140
    @johanneswerner1140 2 ปีที่แล้ว

    First time I got a relevant Ad. It was for Wago, who do make nice electrical connectors... Merci vielmals uss dem grosse Kanton im Norde!

    • @AndreasSpiess
      @AndreasSpiess  2 ปีที่แล้ว

      I changed to TH-cam Premium because I prettty much replaced TV with TH-cam. What a relief ;-) Und: gern geschehen!

  • @KillerSpud
    @KillerSpud 2 ปีที่แล้ว +2

    My favorite fluid sensor is a reflectivity sensor. I found one that looks like a clear led. It has an LED and a photo transistor in the same casing. When dry the light bounces if the outside of it's case and into the transistor, but when wet the similar density if the plastic and water let more light escape and the transistor turns off. I use these to detect the presence of water in buried conduits.

    • @AndreasSpiess
      @AndreasSpiess  2 ปีที่แล้ว

      Another viewer also mentioned those sensors (from Honeywell). I was not aware that they exist. Do you have a cheaper source (These original sensors are quite expensive).

  • @EarthWalkerMan
    @EarthWalkerMan 2 ปีที่แล้ว +2

    In a company where I worked, we had a problem how to measure liquid height in a small plastic container which was also under a bit of pressure. We tried many approaches, like capacitive reading with glueing copper strips on the outside wall of container, but it turned out that it is too sensitive to an environment and when liquid in tube that went out of container touched another container, values of capacity reading changed. Resistive measurements were also not good due to erosion and contamination. We couldn't measure pressure, as the air above liquid had different pressures. In the end we end up measuring container weight with a load cell. Not ideal but we couldn't find any better and cheap way of doing it without massively modifying container itself. In case we would make container itself, we would probably make it with potentiometer and a rod with floater, like in a car gas tank.

    • @AndreasSpiess
      @AndreasSpiess  2 ปีที่แล้ว +1

      Measuring weight is a very good way for many applications. I should have mentioned in my video...

  • @Zhaymoor
    @Zhaymoor 2 ปีที่แล้ว

    Thank you , great episode as usual

  • @crayzeape2230
    @crayzeape2230 2 ปีที่แล้ว +10

    As for the coffee pot, you could build a decorative (wife compatible) coffee pot stand with a load cell in it, this avoids connecting a sensor to the pot itself and also gives you the option of a variable level indicator.

    • @AndreasSpiess
      @AndreasSpiess  2 ปีที่แล้ว +6

      Good idea. The only problem I see is that there are two other "sources of weight": The waste water and the grinded (waste) coffee.

    • @EKTORPTULLSTA
      @EKTORPTULLSTA 2 ปีที่แล้ว +2

      @@AndreasSpiess Could multiple load cells detecting balance shift , solve that problem?

    • @crayzeape2230
      @crayzeape2230 2 ปีที่แล้ว

      @@AndreasSpiess Yes, that would be a problem, unless full waste trays are significantly lighter than the clean water capacity, which would be workable. I downloaded the manual but couldn't find the water capacity listed.

    • @craiglarson2346
      @craiglarson2346 2 ปีที่แล้ว +2

      Wouldn't it be easier to simply weigh the wife? When she gets light enough then she is probably thirsty and you know to fill the coffee machine.

    • @AndreasSpiess
      @AndreasSpiess  2 ปีที่แล้ว +5

      @EKTORPTULLSTA. Maybe. And then my wife puts something on top of the machine ;-)

  • @bluegizmo1983
    @bluegizmo1983 2 ปีที่แล้ว +1

    I use one of those screw in style pressure sensors with a range of 0 to 300 PSI with my oscilloscope for engine diagnostic. Works great for engine compression tests and running engine back pressure tests.

    • @AndreasSpiess
      @AndreasSpiess  2 ปีที่แล้ว

      Thanks for sharing your experience!

  • @maxg4958
    @maxg4958 2 ปีที่แล้ว +1

    I use pressure sensors (MXP) for bore wells and tanks. These measure the difference between ambient and 'bottom' level pressure to indirectly measure the water level. Only downside, I use an air pump once per hour to drive any water out of the tube that runs to the bottom of the well or tank.

    • @AndreasSpiess
      @AndreasSpiess  2 ปีที่แล้ว +1

      I think tis is a very good idea. There are a few discussions about this method in the comments. Using a differential sensor seems to be a very good option.

  • @marcelo.massimi
    @marcelo.massimi 2 ปีที่แล้ว

    Ladies are always the best motivation.... be careful, if she mad at you ... cheers

    • @AndreasSpiess
      @AndreasSpiess  2 ปีที่แล้ว

      She knows me for a long time :-)

  • @McTroyd
    @McTroyd 2 ปีที่แล้ว +4

    Thanks for the primer on sensors! I have a water cistern I'd like to measure that has some exposure to the elements, and was trying to figure it out. This helps. (As for the coffee problem, though, I usually just make it for my wife. 😁) 👍

    • @AndreasSpiess
      @AndreasSpiess  2 ปีที่แล้ว +3

      Your solution is much better than mine, of course. But then I would have to get up very early (she works in a hospital) and could not work the long evening hours ;-)

    • @McTroyd
      @McTroyd 2 ปีที่แล้ว

      @@AndreasSpiess Fair point! It does help we get up at the same time. If anything, I'm the one that makes us wake up earlier. (Kinda funny, as I too prefer the evening hours.)

  • @lorenzoconfortiandreoni6585
    @lorenzoconfortiandreoni6585 2 ปีที่แล้ว +1

    Very interesting. I had a similar problem to your colleague's; I need to measure the water level of a 30m deep water well and of an underground reservoir. I ended up using two water pressure sensors (one with a 5-20ma output and the other on rs485 modbus); they are managed by an Arduino mega and I get remotely the readings by SMS through a GSM module. Also, the Arduino drives the pump that extracts water from the well into the reservoir; and it's all configured through a Nextion touchscreen monitor

    • @AndreasSpiess
      @AndreasSpiess  2 ปีที่แล้ว +1

      Thank you for sharing your experience. So I am confident that it can be done.

  • @800Javi008
    @800Javi008 2 ปีที่แล้ว

    Awesome just thinking how to make that for my rain water reservoir, keep going like that

    • @AndreasSpiess
      @AndreasSpiess  2 ปีที่แล้ว

      I hope you will chose the right sensor!

  • @zoonvanhetuni7993
    @zoonvanhetuni7993 2 ปีที่แล้ว

    BRAVO! (bin weighing, level systems, strain gauge)

  • @patrickmaartense7772
    @patrickmaartense7772 2 ปีที่แล้ว +2

    I have used your video as inspiration to make a salt level sensor for our water softener , this uses larges blocks of salt where the height diminishes when being used
    by using a laser TOF and measuring every 6 hrs I can also check the connectivity as well as the levels itself.
    I create a simple stand to mount the sensor and used 4 wires to connect to a ESp32 with esphome currently using USB power from the wall, will create a USB powerbank version with deep sleep as well
    thank you for your insights !

    • @AndreasSpiess
      @AndreasSpiess  2 ปีที่แล้ว +1

      Cool! This project is on my list since quite a while. But the level does not move fast. That is probably why it did not make it to the top priority ;-)

  • @IvanSanchezDS
    @IvanSanchezDS ปีที่แล้ว

    ok, I have to admit you got me suscribed to your channel with the 2 first mins.

  • @ProdigalPorcupine
    @ProdigalPorcupine 2 ปีที่แล้ว

    Merry Christmas to you and your family, Andreas.

    • @AndreasSpiess
      @AndreasSpiess  2 ปีที่แล้ว

      Thank you. And happy holidays too!

  • @DLSDKING
    @DLSDKING 2 ปีที่แล้ว +1

    My first custom water level sensor was for my home tank on roof. It was 1Mtr tall and i built it first 10 years back when i was in 1st year of engineering school with a floating led in a tube, an LDR on the top of it. I used to set the led brightness such that the change in resistance of LDR is linear for linear decrements of the distance between ldr and light source. This solution was good but i had to change the light source every year as there is salt scale builtup on led.
    I changed from this method to ultrasonic sensor ones which failed much faster. Explored pressure sensor method but that was expensive and sensor drifts over time due to scale builtup. Currently i am using a reed switch type float sensors (which needs to be replaced every once every two years)but working on a capacitence based sensor for precise level monitoring and not having to replace them.

    • @AndreasSpiess
      @AndreasSpiess  2 ปีที่แล้ว

      Very interesting. Thank you for sharing your experience!

  • @stehfun85
    @stehfun85 2 ปีที่แล้ว

    Great overview! 👍
    I am using a throw-in pressure sensor (4-20 mA) for an IBC container filled with rainwater. For measuring the current an INA219 does a much better job than the internal ADC (Wemos D1 Mini).

    • @AndreasSpiess
      @AndreasSpiess  2 ปีที่แล้ว

      Thank you for sharing your experience. Indeed, the INA219 is a good chip for such a purpose.

  • @craiglarson2346
    @craiglarson2346 2 ปีที่แล้ว +8

    Thanks, Andreas, for another useful video. I have been trying to measure household water consumption for the last several years. The pressure sensors (shown @ 9:30) yielded excellent real time information, but there were two problems: 1. Different locations of the sensors in the home network results in far different information, and 2. The relationship of pressure to flow is an exponential relationship in dynamic conditions. Each of these problems can be solved but then there a difference between the hot and cold-water systems. When the hot water tank fires it pressurized the system fouling some of the mathematics. It was getting too complicated for me. Between these two problems I have found that better real time information comes from a magnetometer mounted to the side of the municipal water meter. There is a ‘nutating’ magnet disk that rotates for each small amount of water that passes. By monitoring this I’m able to accurately count the magnetic pulses vs. time. Kevin Darrah has a wonderful presentation of the idea though I had to take it in a different direction because I’m battery powered. Most of time my monitor sleeps and wakes every 8 seconds looking for a change. If change is detected, then the device is on full-time and counting. After 20 minutes of observations, the data is bulk-uploaded to Thingspeak to save on batteries. That is the summary of the last 2 years of my life!

    • @AndreasSpiess
      @AndreasSpiess  2 ปีที่แล้ว +1

      Measuring consumption obviously is very different to just a level. I also would have chosen your route. Or I would have tried the project which reads the municipal water counter's display with a camera and an ESP32...

    • @casemodder89
      @casemodder89 2 ปีที่แล้ว

      just monitor the Flow not the pressure.

    • @grahamtravis
      @grahamtravis 2 ปีที่แล้ว +2

      @@AndreasSpiess A non-intrusive method I learned about many years ago uses two sensitive microphones on the outside of the pipe a fixed distance apart. The noise of the flowing liquid (eddies, bubbles, etc) is digitised and compared with the other microphone to find a statistical best match. The time difference between the two matching samples and the distance apart of the mics gives the flow rate.

  • @KonstantinFlis
    @KonstantinFlis 2 ปีที่แล้ว

    For my non-implemented project I've considered creating a bit complex discrete measurement system using several custom optocouplers with enough distance between LED and photodiodes to avoid surface tension. Of course, sensors and LEDs should be waterproofed.
    The idea was to place this couplers inside the tank at desired levels and calibrate their output with water levels above and below them.

    • @AndreasSpiess
      @AndreasSpiess  2 ปีที่แล้ว

      That should work if the "water" lets enough light pass.

  • @darrenchapman7203
    @darrenchapman7203 2 ปีที่แล้ว +2

    I've used a salvaged washing machine level sensor to monitor a Grey water sump, was only good for Maximum, minimum but perfect for turning on a submersible pump to water the garden in the hot Australian summer.

    • @AndreasSpiess
      @AndreasSpiess  2 ปีที่แล้ว

      A good idea. And probably very corrosion resistant!

  • @MiguelDeMarchena
    @MiguelDeMarchena 2 ปีที่แล้ว +1

    several years ago I thought of a pulley system with sensors that when countering the turns of the pulley indicates the distance of the rope or chain I think that if you put an object that can float at one end and a counterweight at the other end can work with that we can calculate the height of the liquid, the most scientific approach i think is use vibration frequency from the exterior of the tank, frequency will change depending on how full or empty is the tank (sorry my english i know is not good)

    • @AndreasSpiess
      @AndreasSpiess  2 ปีที่แล้ว +1

      The chain systems seem to be used in the industry for example to measure the level of lakes. It for sure can be used by makers.
      The resonance method is probably a bit more complex to use.

  • @SvenKillig
    @SvenKillig 2 ปีที่แล้ว

    The ultrasonic sensor I used for a watering can worked quite well.

    • @AndreasSpiess
      @AndreasSpiess  2 ปีที่แล้ว

      Thank you for sharing your experience!

  • @robertofernandez4129
    @robertofernandez4129 2 ปีที่แล้ว +2

    Hi. You can use a vertical tube with top cap and open bottom. The liquid level compress the air inside of the tube. To mesure the level, two options:
    1.- a flex diaphragm that push a microswich
    2.- analógic sensor that measure de air pressure inside of tube.

    • @AndreasSpiess
      @AndreasSpiess  2 ปีที่แล้ว

      A few other viewers mentioned this method and a similar one with a pump. I assume your method needs a very tight system if you want to use it longterm?

    • @robertofernandez4129
      @robertofernandez4129 2 ปีที่แล้ว +1

      @@AndreasSpiess Nothing difficult to obtain. PVC pipe, plastic, cooper, .... Tube must be well sealed with teflon, glue, solder, ... If air escapes when the tube is submerged, it does not work. Even so, it is a very cheap system and works without mechanical or electronic complications for many months or years. It is a system widely used in water treatment plants, even for dirty water, for years.

  • @JonyTonyHowk
    @JonyTonyHowk 2 ปีที่แล้ว +1

    As an indirect method, to mesure water level can be used the 2x water meters with inbuild LoRaWAN controler or with impulse output. That approche gives accurate measurement to build balance. The water meter also can have built-in pressure sensor.

    • @AndreasSpiess
      @AndreasSpiess  2 ปีที่แล้ว

      This method would even give more information on consumption...

  • @larsrunevad3627
    @larsrunevad3627 2 ปีที่แล้ว +4

    Great video as always! But don’t forget the most important use case of a sensor like this… to monitor the water level for the Christmas tree! That is very important these days 😉

    • @jost459
      @jost459 2 ปีที่แล้ว

      Great idea,
      but please including pump and fire hose ;-)

    • @AndreasSpiess
      @AndreasSpiess  2 ปีที่แล้ว +1

      Good idea if you do not have a plastic tree ;-)

  • @nigeljohnson9820
    @nigeljohnson9820 2 ปีที่แล้ว +13

    I have been looking for a water level sensor, to detect the water level in a garden pond. This turns out to be a really difficult environment for such a measurement. The water is biologically active, coating any sensor in contact with the water in algae and limescale. While the pH of pond water is relatively stable, and close to pH 7.0, it can still be corrosive, due to the high oxygen content. A pressure sensor has the problem of silt build up on its surface, as well as the previous three. A float system only gives an indication of a maximum and/or minimum level. These too suffer from jamming, if there is a build up of lime scale of biological growth.
    The best uses a water proof reed switch and a floating magnet ring. The non contact surface water level sensors, suffer from water ripples, and in the case of LIDAR, reflected sunlight, thought this can be mitigated by mounting the sensor in an open ended tube. All surface sensors fail to give the real water level if the pond surface freezes in winter, with the danger that the pond water can drain away under the ice. I have experimented with an insulated capacitive probe that provides a continuous reading of water level. This works like a coax cable, but with a larger diameter tube and a plastic coated wire down the centre. The dielectric is the pond water. As the water level changes, the capacitance of the sensor changes by as much as a few hundred pF. Making this capacitor part of the tuning element of a Schmitt trigger RF oscillator, allows the water level to be measured as a change of oscillator frequency. Unfortunately my attempts to water proof the outer screen have not proved successful in the long term.
    The Brita water filter, has a water level sensor which is used to measure how many times the filter is used, and thus recommend when the filter cartridge needs changing. This uses a two wire contact probe to measure when water is in the water reservoir. It solves the corrosion problem by sensing the water level with a very low voltage AC square wave. The microprocessor circuit runs on a cr2032 battery. By using both low voltage and AC, the problem of Electrolysing the water, or the salts it might contain, is minimised to almost zero. I do not know what metal is used for the electrodes, but I guess it must be stainless steel.
    I have come across an inductive method of measuring water level. This uses two water proofed torrid rings mounted close to each other. The water is allowed to flow through the centre of both toroid rings. The coil mounted on one of the rings is energised with an AC signal, this is detected with a coil mounted on the other ring. The water linking the two coils acts as a shorting turn, coupling the two rings together forming a transformer. This arrangement is used in, not only detecting water level, but measuring its conductivity.
    FYI. I use a none contact capacitive sensor, similar to the one shown in your video, to measure the level of solution in my PCB acid etch tank. A microcontroller monitor system uses the level signal to cut the power to the tank heater and air pump, if the solution level falls, due to evaporation. This prevents the exposed glass immersion heater melting the plastic tank. The sensor is mounted several centimetres from the tank wall, to protect it from the acid. It still gives reliable readings at this distance.

    • @AndreasSpiess
      @AndreasSpiess  2 ปีที่แล้ว +2

      A lot of valuable experiences. Thank you!

    • @benhetland576
      @benhetland576 2 ปีที่แล้ว +1

      I like the very nice collection of ideas and practical experiences and challenges there! This is real engineering, finding good compromizes that actually work.

    • @nigeljohnson9820
      @nigeljohnson9820 2 ปีที่แล้ว +2

      @@benhetland576 the capacitive sensor is the most promising, particularly as it gives a measure of water depth. It has a number of advantages, in that the outer wall of the sensor can be the zero volt of the circuit, acting as an RF screen. It is relatively easy to mount the Schmitt feedback circuit close to the plastic tube and coupled to the electrodes with a short length of coax. This adds a small capacitive offset. .
      It is necessary to add some temperature correction to the oscillator, and provide it with a stable regulated supply rail, but this can be switched off between measurements to save energy. The capacitive change on a one meter long pipe is significant, between fully filled with water and empty (filled with air).
      I made my prototype out of uPVC water pipe, while it is easy to water proof the the centre electrode with plastic air line tube, trapping the outer aluminium foil screen between two lengths of concentric uPVC pipe proved to be very difficult, as is making a weather proof connection to the electrodes. The pipe needs to be open at both ends, with the central wire supported at both ends to keep it in position. In a pond environment, it is difficult to keep insects from making a nest in the tube, and water weed growing inside it. The top of the pipe can have a cap, but it must have a hole for air to get in and out, or the water will not rise up on the inside.
      What is required, is the outer electrode sealed between two flat sheets of plastic, and then these rolled into a tube. I could have used a metal outer pipe, but I did not want to introduce metal ions into the pond water, copper pipe would have been ideal for the outer, but copper salts are toxic to fish.
      One other sensor we tried was using two lengths of fibre optic cable, mounting the ends so when in water, the light emitted by one is refracted and can be captured by the other. This works well for clean water, but pond water quickly renders the ends opaque. The idea was inspired by the optical smoke detector. It has the advantage that the electronics it is completely galvanicly isolated from the water. By using a modulated light beam, it's possible to eliminate the effects of ambient light, plus the fibres can be mounted in a opened plastic tube or box to shade the sensor from ambient light.

    • @benhetland576
      @benhetland576 2 ปีที่แล้ว +1

      @@nigeljohnson9820 Perhaps you could use some braided metal sheet/band to wrap around the plastic tube, then top that with a layer of epoxy resin to seal it off (and the resin will bond to the pipe through the braiding). The inner wire can just be a regular insulated wire. I guess you could also use a cap with a hole at the bottom (water) end too, but the insect and growth problem probably will manifest itself at some point regardless.

    • @nigeljohnson9820
      @nigeljohnson9820 2 ปีที่แล้ว

      @@benhetland576pond fibre glass epoxies might work, but it's important not to put toxic chemical into the water..

  • @lucgoeman304
    @lucgoeman304 2 ปีที่แล้ว +1

    there are also optical level sensor that indicate the threshhold.
    The sensor has an infra-red emitter and detector aligned within an accurately shaped cone to give good optical coupling
    when the sensor is in air. This coupling is greatly reduced, when the sensor is immersed in liquid, as the infra-red light
    escapes through the liquid rather than being reflected back to the detector.

    • @AndreasSpiess
      @AndreasSpiess  2 ปีที่แล้ว

      Others also mentioned these sensors. They seem to come from Honeywell (expensive) or Adafruit (a bit less expensive). Maybe somebody even find a cheap clone?

  • @andrewwilson6240
    @andrewwilson6240 2 ปีที่แล้ว +1

    A very old type of fluid sensor is the Buchholz relay found in use in oil filled power transformers. This is a basic float type mechanical float switch, mounted below a small "conservator" tank at the highest point of the main tank of the transformer. It actually serves 3 purposes
    * Operates to identify low oil.
    * Will detect gas production due to an insipient fault in the transformer (the gas byproduct displaces the oil over time)
    * It operates for a disruptive fault in the transformer since the oil surge operates it
    It really is protection of last resort for the transformer.

    • @AndreasSpiess
      @AndreasSpiess  2 ปีที่แล้ว

      Thank you for the info. I had to look it up in Wikipedia. A simple but effective solution for transformers. I asume the mounting placet on a "normal" tank would be important.

  • @ikidd3123
    @ikidd3123 2 ปีที่แล้ว +2

    I've found an air pressure sensor like a MPX5010 is an inexpensive way to accurately measure levels, but you need to add a small air pump to pressure up the measuring tube until air escapes from the tube at the bottom of the vessel. This give you a balance pressure equal to the pressure of the water over the inlet of the measurement tube that you can measure and calibrate.

    • @alexrossouw7702
      @alexrossouw7702 2 ปีที่แล้ว +1

      I'm sure you can take a static pressure measurements with no airpump needed, I have seen a tutorial on the matter

    • @AndreasSpiess
      @AndreasSpiess  2 ปีที่แล้ว +1

      This method was described in other comments. Some use a pump, others not. The pump seems to be necessary if your level never drops to 0 because the system can lose the air pressure and the water fills the tube after a time.

    • @ikidd3123
      @ikidd3123 2 ปีที่แล้ว +1

      @@alexrossouw7702 You certainly can, but it will be much less accurate as the pressure differential you're measuring is much, much smaller, especially in a smaller vessel like a brew kettle.

  • @phillrullzXBL
    @phillrullzXBL ปีที่แล้ว

    As someone that works in industrial automation as a profession, great video, few other methods include some of your favorites, radar and guided radar. They are usually used on fluids that can have a vapor, since vapor / condensation can cause issues with the speed of sound with ultrasonics. Another very common visual level indicator is a MLI magnetic level indicator, its a tube connecting the bottom of the tank to the top, there are magnetic rollers which rotate to show the fluid level, the end user can strap hall effect sensors / reed switches to different levels for say a low a low low high high high contacts. Also for intrusive solutions like the moisture sensors you get what we call spiders, theyre a collection of vertical stainless steel electrodes, as the water levels rise making contact from level to level its measured, either capacitively or resistively. 90% of industrial automation uses 4-20mA current loops, but you also get oldschool 0-10V aswell as new stuff like Modbus Profibus Hart( old).
    A majority of the instruments i look at are flow, this is measured by alot of different means, differential pressure , mechanical , electromagnetic, ultrasonic, mass flow , Laser . The nuts thing is thats not an exhaustive list.

    • @AndreasSpiess
      @AndreasSpiess  ปีที่แล้ว

      Thank you for the additional insight from a professional!

  • @racingtogreen2023
    @racingtogreen2023 ปีที่แล้ว

    Love the Living with Significant others reference!

    • @AndreasSpiess
      @AndreasSpiess  ปีที่แล้ว

      I do not understand :-(

    • @racingtogreen2023
      @racingtogreen2023 ปีที่แล้ว

      @@AndreasSpiess The coffee maker responsibilities with your wife. 🤣

  • @DougHanchard
    @DougHanchard 2 ปีที่แล้ว +2

    Superb video (as usual). I use ultrasonic HC-SR04 sensor to measure water height as water fills a ground water tile drain pipe. This pipe is not perpendicular to the horizontal plane. As a result, finding a sensor that can measure height accurately with the 5" diameter pipe that fills with water at a 45 degree plane is problematic. Ultrasonic sensors are the only option in this case and work well to trigger / power a submersed pump to drain the pipe when water rises to a set height, below ground level (I use 5" / 12 cm) at preset maximum limit, which triggers a simple arduino GPIO power (using a 12V relay) ON command, for 45 seconds, then resets until the water rises again and triggers the 12V pump as required.
    Corrosion is a minor issue (the SR04 sensor is not in an enclosed atmospheric environment) which is reduced by making a 3D printed case to protect the SR04 circuit board. But the emitter and detector sensor cones do eventually show signs of oxidization and effect performance after 2 years. The reason the sensor lasts so long is because the median atmospheric temperature rarely deviates from 18 C. Because HC-SRO4's are so cheap (less than $12.00 for a box of 5), replacing them is cost effective for my particular performance requirements and durability. This setup wouldn't work for all-season outdoor environment.
    Anyone know of an Arduino shield board available with built-in power relay and 2 or 4 line display with horizontal GPIO pins? The only thing I would need to plug-in would be the SR04 cables. My setup is built using classic Arduino board with patch wires on a development board, display and kit parts only. It's not elegant or rugged, though I wish it was. It's ugly but works.
    I've been running this setup for 3 years with only one SR04 corrosion failure.

    • @AndreasSpiess
      @AndreasSpiess  2 ปีที่แล้ว

      Thank you for sharing your experience. A pack of 5 HC-SR04 just arrived in my lab. I also want to try them.

  • @AdityaMehendale
    @AdityaMehendale 2 ปีที่แล้ว +2

    Nice overview, Andreas,
    A couple of additional types:
    Some coffee-machines use:
    1) Magnetic sensor (Hall-effect) with an encapsulated captive magnet that floats in the tank. (This is also an "indirect" sensor, as it also needs the water to have weight ;) A reed-switch could be used, but hall-switches are cheap enough.
    2) Optical "brekingsindex" based-sensor: A total internal retro-reflector "feature" in designed-in into the plastic molding of the tank; LEDs+ PTs observe this reflector. If the tank gets filled, the total-internal reflection no longer works (as the RI of water is similar to that of plastic); the reflector only works when air (emptiness) is present behind the molded retroreflecting feature.
    A "better" contactless type imo would be one that observes resonance-frequency - if you treat the "cavity" above the water as a helmholtz resonator, the base-eigenfrequency is strongly dependent ton the water-level. A sounder (speaker+microphone combo) can easily detect this at a distance, and estimate height. Unlike ultrasonic ToF, as the frequencies involved are low, a moisture-blocking "shield" can be placed in front of the speaker/mic. This resonator may be restricted to an immersion-tube if you wish to be agnostic to the shape of the rest of the tank.

    • @AndreasSpiess
      @AndreasSpiess  2 ปีที่แล้ว +1

      Interesting new concepts! If I remember right, our old coffee machine had a moving part in the tank.
      Other viewers also wrote about these optical sensors which work with refraction. Honeywell seems to sell them. But they are expensive. I wonder if there is a cheaper source. They are very good because they can be easily protected as you write.
      The resonance way sounds a little adventurous for me. Theoretically, it should work. But I do not know if the resonance is distinct and if there is only one. Did you use it and did it work?

    • @AdityaMehendale
      @AdityaMehendale 2 ปีที่แล้ว +1

      @@AndreasSpiess The Senseo/Philips machines use a floating magnet, and (if I am not mistaken) the Krupps machines use the refractive-index mechanism. The latter is nothing more than an LED and a phototransistor (on the machine) and a molded retroreflector "prism" in the water-tank that gets positioned facing the optical components.
      I have used the resonance-concept for a different application (more like, injecting white noise, and looking for peaks; all this before optical ToF was hot). A friend of mine has used a mic/speaker arrangement on an ESP32 with a PVC pipe (in resonance-mode) to measure the level of his garden-pond. By placing the pipe at a shallow angle (instead of straight-down) he gets more dV for the same dh.
      Eigenfrequency-seekers are surprisingly easy to build - if you take the microphone's (or any sensor's) output, amplify+clip it, (i.e. amplitude-constantify) and feed it back to a speaker (any actuator), you tend to trigger the dominant eigenmode. Frequency-counting the clipped signal is straightforward.
      I can imagine though that it may not be nice to have a coffee-machine-tank whistling at your guests at random moments ;)

    • @AndreasSpiess
      @AndreasSpiess  2 ปีที่แล้ว

      This Eigenfrequency sniffer is interestig! Thanks. The prism sensors were mentioned in other posts. But so far I did not find a cheap one. Adafruit has one for more than 20 dollars.

    • @AdityaMehendale
      @AdityaMehendale 2 ปีที่แล้ว +1

      @@AndreasSpiess If you are interested, I have uploaded a video I made long back illustrating a prism-(total-internal) reflector implementation with a laser-pointer: th-cam.com/video/esRmX1tBS5g/w-d-xo.html

  • @klassichd10
    @klassichd10 2 ปีที่แล้ว +3

    Thanks again for your work and the level sensor overview. In my house, I am using the float switch sensors to monitor the water tank of my dehumidifiers (Aldi) together with a 433MHz door/window sensor. Several XKC Y25 capacitive sensors are also in use in different configurations, I tried to use a bigger capacitive level sensor as a rain sensor, which failed. But it was usable as a touch sensor hidden behind the wooden board of a piece of furniture.
    For my oil tank I built a pneumatic level sensor using a BME280 as a pressure sensor and a small air pump. First as a proof of concept. But it is now for years in productive use, performing in the range of 0.1% deviation, which means

    • @AndreasSpiess
      @AndreasSpiess  2 ปีที่แล้ว +2

      The Make journal featured this pneumatic system system in their last issue. They seem to also need a valve. But it is definitively something I want to look at. Do you have more information to share?

    • @klassichd10
      @klassichd10 2 ปีที่แล้ว

      @@AndreasSpiess Part 1 @Andreas Spiess In theory valves are needed. But I need just e few measurements a day, so I rely on the natural leakage and block the measruements in between by SW.
      The theory of operation is well described in German Wikipedia "Pneumatische Füllstandsmessung"

    • @klassichd10
      @klassichd10 2 ปีที่แล้ว +1

      @@AndreasSpiess Part 2 My tinker-solution is described in homematic-forum post 328133#p328133 ff. As you can see: tinkering and proof of concept. But as it happens sometimes, continues beeing in operation. And even the TÜV had no complaints.
      More important than a valve, is a pipe to the bottom of the tank. This already was built in. The tank was equipped with a "mechanical" solution by Afriso, which was not very reliable and not very precise. But I could use this pipe. This company and some others offer also electronical solutions nowadays. The pressure range of the BME280 fits well to the geometry of my tank. Otherwise a dedicated differntial pressure transducer would be required.

    • @AndreasSpiess
      @AndreasSpiess  2 ปีที่แล้ว +1

      Thank you for the link. I see the point that you used time as your "valve".

    • @klassichd10
      @klassichd10 2 ปีที่แล้ว

      @@AndreasSpiess Yes, keep it as simple as possible and as precise as necessary :-) The system is kind of open to the liquid side and the air can escape, the oil returns into the pipe..

  • @jvgorkum
    @jvgorkum 2 ปีที่แล้ว

    As usual, good stuff.

  • @wallaceshackleton1889
    @wallaceshackleton1889 2 ปีที่แล้ว

    Capacitance level probes are another option, You can use pressure indirectly by having a known reference pressure applied to the wet leg going down into the fluid, controlling the air flow and therefore a constant pressure down the wet leg can be compensated in the differential pressure device.
    Finding the simplist device that will do the job is a good start and don't forget the simplest of the lot a visual sight tube.
    You must let us know how you get on with the two applications.

    • @AndreasSpiess
      @AndreasSpiess  2 ปีที่แล้ว

      For sure, visual control is a good thing (if you do not have to drive 10km as my friend). The tube to the bottom was mentioned a few times and it seems that several methods exist. Some use a valve, others not. And some even did not mention a pump. It seems to be a good compromise because the electronics can be placed in a save place.

  • @thearchibaldtuttle
    @thearchibaldtuttle 2 ปีที่แล้ว

    Worked for Keller druckmesstechnik AG in Winterthur. I cannot remember how many different pressure sensors I have built in those years! Once we had to calibrate a sensor to measure the level of a tank holding Honey.

    • @AndreasSpiess
      @AndreasSpiess  2 ปีที่แล้ว

      So you are the expert in this matter! The honey tank sensor for sure is not common. But I can imagine that somebody needs it in a plant...

    • @thearchibaldtuttle
      @thearchibaldtuttle 2 ปีที่แล้ว

      @@AndreasSpiess Yes, it was for Lang**e :-)

  • @codemitey
    @codemitey 2 ปีที่แล้ว +1

    Industry also use magnetostrictive linear position sensors for fluid levels. They resist temperature and viscosity changes.
    Also, magnetic hall affect sensors can be used used as well. Radar chips are also becoming more affordable.

    • @AndreasSpiess
      @AndreasSpiess  2 ปีที่แล้ว

      These magnetostrictive sensors seem to be high-tech. I never have seen such a sensor.
      Radar was also mentioned by a few other commenters. It is still more expensive, but travels through various materials.

  • @y2ksw1
    @y2ksw1 2 ปีที่แล้ว +2

    I engineered and prototyped (successfully) a resonance volume sensor for beer barrels, in the time when the Z80 processor was the only good and cheap option. The barrel was exposed to fine tuned sounds which allowed to compute the volume of the barrel, the air and the liquid separately. It was however too complex for the time and the company opted for standard barrels and weighing on the fly. The accuracy was not so much of a problem by then. Nowadays maybe, but I am not good in marketing... I am a maker 😊

    • @AndreasSpiess
      @AndreasSpiess  2 ปีที่แล้ว +1

      Weighing small tanks is probably a reliable and simple solution. Another viewer also mentioned to measure resonance for the measurement. An interesting option. I wonder how narrow the measured "dip" would be?

    • @y2ksw1
      @y2ksw1 2 ปีที่แล้ว +1

      @@AndreasSpiess The precision was very narrow, in the order of ± 10 ml for 50 l barrels.

  • @WimDH
    @WimDH 2 ปีที่แล้ว

    This is a very useful video!

    • @AndreasSpiess
      @AndreasSpiess  2 ปีที่แล้ว

      Glad you think so! Thank you for your feedback.

  • @clpiatak
    @clpiatak 2 ปีที่แล้ว

    Very informative details on the various water level sensors out there. Do you have a video on how you installed your capacitive threshold sensor to your coffee maker? Would love to see that. Keep up the good work. 🙂

    • @AndreasSpiess
      @AndreasSpiess  2 ปีที่แล้ว

      Project is not yet done:-(

    • @AndreasSpiess
      @AndreasSpiess  2 ปีที่แล้ว

      Project is not yet done:-(

    • @clpiatak
      @clpiatak 2 ปีที่แล้ว

      Good luck Andreas. Your wife will love the new water sensor feature you add to the coffee ☕ maker at home. 👍

  • @tverspeelt
    @tverspeelt 2 ปีที่แล้ว

    Looking at this topic myself for measuring the level in our rain water tank. First looked at a cheap ultra sonic sensor, but those can give errors when spiders or other bugs start building their house in them :).
    At work we always use guided radar level sensors. Basically you insert an antenna in the liquid, it is also a TOF sensor, so the signal bounces on top of the liquid. You also have some sensors that can measure the level of different liquids in the same tank, if they don't mix because of different density. They do need different electrical properties for this to work.

    • @AndreasSpiess
      @AndreasSpiess  2 ปีที่แล้ว

      Interesting. Particularly the possibility of measuring two different liquids!

    • @tverspeelt
      @tverspeelt 2 ปีที่แล้ว

      @@AndreasSpiess I can't remember by heart which ones those are. But we normally use SICK LFP, those can also ignore foam layers. They are around 300€ per piece, so probably not the first choice for us makers. But in some situations, maybe the easy choice.

  • @ovalwingnut
    @ovalwingnut 2 ปีที่แล้ว

    You are a valuable human. 98 points awarded. Cheers.

  • @christopherguy1217
    @christopherguy1217 2 ปีที่แล้ว +3

    For a artisan well you can use echo acoustics, measure the echo time and barometric pressure and temperature to calculate the distance. The accuracy is surprisingly good. You need tables for speed of sound based on barometric pressure and temperature so the micro needs memory to hold the tables but the parts list is low, speaker, microphone and barometric sensor with temperature, the rest is just software.

    • @StuartCGadgetRev
      @StuartCGadgetRev 2 ปีที่แล้ว +2

      I’d love to see a video on this!

    • @AndreasSpiess
      @AndreasSpiess  2 ปีที่แล้ว +1

      Isn't this how the ultrasonic sensors work? Or maybe I misunderstood something.

  • @bobylapointe7975
    @bobylapointe7975 2 ปีที่แล้ว +1

    IR sensors with floating stuff can be handy as well. Note you should consider vapor for any top sensor as a critical issue. Depending on temperature and fluid, top sensors will quickly become unusable due to condensation on the sensor. You have to eat or ventilate them to keep them clean. After various attempts with Sonars, IR, Conductive sensors I ended up with these basic reed switches in plastic enclosure in serie, they give low precision but high reliability. Time of flight is also impacted by water surface, if this is moving or if fluid is filled from the top and cause lot of waves they'll have weird output requiring additional software processing.

    • @AndreasSpiess
      @AndreasSpiess  2 ปีที่แล้ว

      Good information. Thank you for sharing!

  • @silverjohnson3163
    @silverjohnson3163 2 ปีที่แล้ว

    I had the same issue with my coffee maker. I created a project with esp8266 as an alexa switch to have it refill the coffee maker with my voice. I started to use one of the water level sensors that you mention but then I ended up just having it refill for 10 seconds, which is about the time it takes to refill the fluid for one cup of coffee :)

  • @martinpfeiffer7884
    @martinpfeiffer7884 ปีที่แล้ว

    Capacity measurement also works for liquid level measurement. I did last year a lot experiments with a mpr121 and copper foil. Works good. If it only works inside or also outside the tank I have not tested yet. I laminated two cooper foil strip's near to eachother together in a long strip for the experiment.

  • @jost459
    @jost459 2 ปีที่แล้ว +1

    My father in law has also an tank for watering the garden with an simple mechanical "display".
    On the top panel of tank he drill an hole. At tank below he fasten an plastic bare (cable channel) on an float (Styropor or canister).
    So if the plastic bare looks approx 2m outside of the top panel hole the tank is full, if the platic bare goes down the tank will be more empty. A small rack outside were some reed switches are fasten and the magnet on the plastic bare could also switch on or off a pump.
    The advantage is that reed relais are not inside liquid.

    • @AndreasSpiess
      @AndreasSpiess  2 ปีที่แล้ว +1

      Your father in law's method is simple and does the trick if you are not a nerd like we are ;-)

  • @gardner959
    @gardner959 2 ปีที่แล้ว +1

    Optical parallax distance sensors like the Sharp GP2Y0A21YK0F might be applicable in some cases. My application is measuring the depth of snow cover. For water tank level I used a cheap JSN-SR04T automotive sensor, but I had to add an aluminium cone to direct the beam and avoid picking up the fill plumbing and tank sides. It has been reliable for several years now.

    • @AndreasSpiess
      @AndreasSpiess  2 ปีที่แล้ว

      Good advice for the JSN-SR04T. Thank you! The GP2Y0A21YK0F has probably not enough range for many applications.

  • @aahnacer1897
    @aahnacer1897 ปีที่แล้ว

    Very interessting.thank you Sir.

  • @rickz6006
    @rickz6006 2 ปีที่แล้ว

    If your tank has legs a strain gauge placed on 1 leg can be used.
    Be sure to be aware that ultrasonic sensors are sensitive to air density changes due to temperature change. This can be compensated for via a temperature sensor.
    Also if you use a pressure sensor at the bottom of the tank and only have the tank discharge port to attach to, a running discharge pump will invalidate the reading due to the pump suction.
    In my industrial life I applied each of these methods on a variety of different chemical and other dry material tanks. Was able to use radar sensors fairly often as well.

    • @AndreasSpiess
      @AndreasSpiess  2 ปีที่แล้ว

      Thank you for sharing your valuable experience! Indeed, radar is also often used. But such sensors are not cheap and probably more for the industrial field.

  • @mikefochtman7164
    @mikefochtman7164 2 ปีที่แล้ว +1

    Oh and if you have a readily available low pressure air supply (like an aquarium pump for example), you can use pressure sensors in another way. Instead of putting the sensor at the bottom of the tank and subjecting it to the fluid, you can pass air very slowly through an orifice and down a tube that is open at the bottom of the tank. If you adjust the air flow so it just barely 'bubbles' out the bottom of the tube, the pressure in the tube right after your orifice will be proportional to the level in the tank and can be measured with any air-pressure sensor. The sensor never touches the liquid. But a loss of air supply will have the same effect as an empty tank, so consider that in your design.

    • @AndreasSpiess
      @AndreasSpiess  2 ปีที่แล้ว

      This is a good idea. There are a few discussions about it in the comments. It seems to be very robust.

  • @martinus118
    @martinus118 2 ปีที่แล้ว

    Last summer I built a sensor for a closed water tank (50 liters) in our camper. The first approach was an ultrasonic sensor, waterproof, and capable to measure small distances. Did not work (to much condensation inside the tank while driving up an down). After a bit 'testing around' I ended up with cupper tape (6mm, aliexpress) , glued to the inner and outer side of a plastic tube (as used for electrical installations), protected with a epoxy layer. The signal was then read with one of the pins for touch sensors. After some work with signal attenuation and calibration the sensor works fine.

  • @AccidentalScience
    @AccidentalScience 2 ปีที่แล้ว

    Another one is linear capacitive sensing. They can be made with a couple of long conductors at a fixed distance and completely isolated. The fluid's dielectric is exploited to know the level by measuring the relative capacitance. I've made a video some years ago about a diy sensor that uses this principle. It was designed as a threshold sensor but the linear signal can be picked up to get the actual level. Being completely isolated they can be submerged with no risk of corrosion or contamination. They can also be sticked to the external lining of a plastic tank.

    • @AndreasSpiess
      @AndreasSpiess  2 ปีที่แล้ว

      Good video! Maybe it even would be possible to use the electronics of the capacitive sensor I showed (using an NE555)?

    • @AccidentalScience
      @AccidentalScience 2 ปีที่แล้ว

      @@AndreasSpiess Thank you. With a NE555 you can definitely make a suitable circuit. I rather used a fast cmos though, as it performs better IMO: higher input resistance => better Q => higher sensitivity and larger range. The circuit layout is always critical. Greetings.

  • @TheRadeonVideo
    @TheRadeonVideo 2 ปีที่แล้ว +1

    I am using standard "arduino" ultrasonic sensor for measuring water level. Sensor itself is mounted 10-15cm from top level. Difference between empty and full tank is about 1m. The setup works mostly fine. Output has some noise, so i use averaging in software.
    Corrosion might damage the sensor one day, but it works continiously for like 3 years now.

    • @AndreasSpiess
      @AndreasSpiess  2 ปีที่แล้ว

      Thank you for sharing your experience. I read that the normal ultrasonic sensors die much faster. So it seems you were lucky...

  • @dav1dsm1th
    @dav1dsm1th 2 ปีที่แล้ว +1

    I like the idea of using a strain gauge (and an MCU to do the calculations) to measure the weight of the tank and contents (and working out the level by subtracting one from the other). It reduces the problem of content contamination and sensor corrosion. It just requires the tank to have some flex (or motion) in its mount, which can be quite simple on small tanks. I like the idea that the sensor is completely external - which is more difficult with a pressure sensor.

    • @AndreasSpiess
      @AndreasSpiess  2 ปีที่แล้ว +1

      I agree and I should have included this method because of the many advantages.

    • @dav1dsm1th
      @dav1dsm1th 2 ปีที่แล้ว

      @@AndreasSpiess It's a great video regardless. Stay safe out there 😀

  • @TheManul4eg
    @TheManul4eg 2 ปีที่แล้ว +7

    11:10 this recalibration is a bit dangerous because the output signal is still not guaranteed to be within 10 mA even if the pressure is always below the corresponding level. E.g. pressure spikes may occur when the liquid is moving. And some sensors output 22 mA as an indication that the piezoresistive element is damaged.

    • @AndreasSpiess
      @AndreasSpiess  2 ปีที่แล้ว

      Good point. You are right!

    • @martinbernhardt6372
      @martinbernhardt6372 2 ปีที่แล้ว +2

      In instustrial enviroment there is a specification by NAMUR (Normungsausschuss Meß-und Regeltechnik) called NE43. It specifies 4-20mA not only for pressure sensors, but for any kind of measurement. 3,6mA means failure (low), 3,8 to 22,0 mA is linear to mearurement and 22.5mA means failure (high). Any other value is per definition invalid

  • @handihomann
    @handihomann 2 ปีที่แล้ว

    We have the same problem with our coffee maker. Hope this will be your next project soon🙂. Regards from New Jersey.

    • @AndreasSpiess
      @AndreasSpiess  2 ปีที่แล้ว

      I do not think it will be sufficient for a video. Not a lot of viewers have this problem...

  • @KlausMusch2
    @KlausMusch2 2 ปีที่แล้ว +14

    I found another interesting solution in the German magazin "c't Make, 6/21". Here the water level in a cistern for collecting rainwater is measured. A simple plastic tube is put from top of the cisterne to the bottom and air is pumped into the tube. As soon as the air escapes at the bottom of the tube, the pressure in the tube doesn't rise anymore and you can calculate the height of the water. A blood pressure meter can be altered for doing this and can be connected to a microcontroller. Since all the electronics is outside the cistern, there are no problems with moisture.

    • @ReneKnuvers74rk
      @ReneKnuvers74rk 2 ปีที่แล้ว

      This is also used for fuel tanks on some locomotives.

    • @SarahKchannel
      @SarahKchannel 2 ปีที่แล้ว +1

      I am measuring marine tides the same way, only having a silicone tube with an open end placed from surface to a specific depth. One sensor reads ambient air pressure, one air pressure within the tube, combine both values for higher accuracies.
      My sensor is now living a couple of hundred meters off shore, without any issues for about a year now.

    • @sumantkhalate
      @sumantkhalate 2 ปีที่แล้ว +3

      This method is widely used in industries with tall tanks and is called air purge level measurement.

    • @mac17820001
      @mac17820001 2 ปีที่แล้ว

      Also called dip tubes technique

    • @mac17820001
      @mac17820001 2 ปีที่แล้ว +4

      If you use 2 tubes at a known different depth you can also calculate density of the fluid

  • @Drenov
    @Drenov 2 ปีที่แล้ว +1

    A tube, a floating ball and a bank of opto-couplers. You can hit the tank and listen to the resonant frequency. Weigh it. Use a float and a potentiometer. A floating rod with a resonant coil around it. If the liquid is a different temperature to the ambient you could use a thermal camera. You could heat the tank and measure how fast it changes temperature. Anyway there's a few more ideas to be getting on with.

    • @AndreasSpiess
      @AndreasSpiess  2 ปีที่แล้ว +1

      A lot of innovative ideas! Thanks.

  • @MagivaIT
    @MagivaIT 2 ปีที่แล้ว

    great video as always.... dont forget measuring volume by weight

    • @AndreasSpiess
      @AndreasSpiess  2 ปีที่แล้ว

      You are right. I forgot this method.

  • @colinstamp9053
    @colinstamp9053 2 ปีที่แล้ว

    It's worth metioning that pressure sensors are affected by atmospheric pressure as well as the fluid level. In a water thank, that might make 60 mm or so difference to the reading. To compensate, sensors for fluid level measurement normally need a vent to the surrounding air. For submersible sensors, that means the cable has to contain an air tube which needs to be dealt with at the microcontroller end.

    • @AndreasSpiess
      @AndreasSpiess  2 ปีที่แล้ว

      You are right. Thank you for mentioning the fact!

  • @benpellican5932
    @benpellican5932 2 ปีที่แล้ว +1

    Great video, but your videos always are. I'm interested in the FM24-NP100 from #378. The concept is only good for plastic tanks but should avoid contact, corrosion and condensation problems. Mount it above the tank facing down so it can "see" through the top of the tank to the liquid surface. As you know, the sensor communicates via a UART so no ADC to deal with. Ignore the return from the top of the tank and so long as you know the height of the sensor above the floor of the tank, its easy math to read the level.

    • @AndreasSpiess
      @AndreasSpiess  2 ปีที่แล้ว

      Radars were mentioned by a few other viewers. They seem to be quite common in commercial applications. But they are not cheap...

    • @benpellican5932
      @benpellican5932 2 ปีที่แล้ว

      @@AndreasSpiess Agreed. Maybe they come down in price with time.