Ultrasonic distance sensor as an oil level gauge

Поделиться
HTML-код
  • Опубликовано: 25 окт 2024

Комментарии • 384

  • @olaaunelefstad195
    @olaaunelefstad195 2 года назад +138

    How can this man make something I know nothing about and have no interest in, so fascinating to watch? I just click on all Matthiases videos now, regardless of the topic, and Im never disapointed. He could have made a video about insuring your pet rock, and It still would be interesting. Another thing is that a "normal" youtuber would have made 10 videos out of one minute of Matthiases video. Always straight to the point, no bs and he packs it with greath info whitout it being confusing.

    • @claudiomenesesc
      @claudiomenesesc 2 года назад +3

      Matthias rocks.

    • @fixitfelix718
      @fixitfelix718 2 года назад +1

      He does but can i send him a link to proper gauge i just bought 1..$9.00

    • @apdj94
      @apdj94 2 года назад +12

      Forgot to mention he didn't plug his patreon, merch website, second channel, sponsor and paid subscribers. Nor did he implore us to "Like, subscribe, and hit the bell to receive notifications!"

    • @bmich281
      @bmich281 2 года назад +3

      AMEN to Everyone on that, I have watched every video and some 3, 4 5xs they never get old. I always learn something.

  • @JeffGeerling
    @JeffGeerling 2 года назад +95

    It's amazing how much can be accomplished with the humble sound wave.

    • @ddegn
      @ddegn 2 года назад +8

      My favorite use: *"GET OFF MY LAWN!"*
      BTW, I'm serious considering a robotic mower after watching your video.

    • @AuDHDQ
      @AuDHDQ 2 года назад +6

      Hey, you're the guy from the thing!!!

    • @2993LP
      @2993LP 2 года назад

      Constructicons inferior, Soundwave superior.

    • @Miketz
      @Miketz 2 года назад

      Sound waves are the most common method of converting fluid level to electrical signal. Simple ultrasonic methods like this (except far more reliable and accurate) are very popular, as are the "Guided radar" systems that use a rod or wire rope to guide the sound wave to the surface rather than have it bounce around inside the container. It's good stuff.

    • @EmyrDerfel
      @EmyrDerfel 2 года назад

      The spec fuel flow sensors for F1 cars use sound pulses aimed with and against the flow. It's suspected that part of Ferrari's subterfuge involved detecting the current draw of the sensor and slowing the fuel pump to a legal flow rate just before the next sample.

  • @SuperJamster1
    @SuperJamster1 2 года назад +7

    Wow! I just use a fishing tip off and float and know my tanks at 20% full when it goes off, or I've caught a red herring. I've always loved this channel. Thanks

  • @burchds84
    @burchds84 2 года назад +6

    I love these real-life analytical research projects that apply to things like utility usage

  • @Motor_Cackle
    @Motor_Cackle 2 года назад +73

    The dielectric constant of fuel oil is about 2.1, so a dual electrode dipstick would allow measurement via the capacitance change. I'll be using that method for a similar project.

    • @usbcd360
      @usbcd360 2 года назад +11

      Aircraft fuel gauges have used capacitance sensors for years. There's a company in Florida that makes coaxial tube sensors for water or fuel, custom for cars/boats/RVs.

    • @wobblysauce
      @wobblysauce 2 года назад +9

      And here some people use a stick.

    • @markm0000
      @markm0000 2 года назад +6

      @@wobblysauce The stick never lies.

    • @bradley3549
      @bradley3549 2 года назад +5

      @@markm0000 Except when it falls over onto the ground.

    • @ikocheratcr
      @ikocheratcr 2 года назад +11

      AFAIK, you need 3 electrodes:
      the tip has 2 electrodes, all the way to the bottom, is always under the oil. With it you measure the dielectric of the oil itself, as it varies with temperature, composition, etc. Then there is gap from the tip to the third electrode, and this is the one you use to measure the level. That is how car levels work; think engine oil full of contaminants and varying temperatures.

  • @patmash
    @patmash 2 года назад

    This video is light years above my pay grade but, still enjoy all his content. How does one become this smart.

  • @volchip
    @volchip 2 года назад +2

    I used these same ultrasonic sensors on several projects. My experience is that they seem to work fine on the bench but for use in the real world the output requires some very careful filtering and checking before using the distance measured.

  • @chickeandtech
    @chickeandtech 2 года назад +7

    I would suggest you to use a pressure sensor simply on the bottom or, to avoid contamination of the sensor, a reverse tube "filled" with air, dropped from the same hole as this one. An air cushion will form between the free surface of the liquid and the sensor, the pressure will increase as the liquid level rises. It will have a very high accuracy and stability.

  • @aamackie
    @aamackie 2 года назад +6

    I wonder if it's only a matter of time before there's a video here that starts. "I seem to have ended up with many little sensors around the house that can only be read from the computer, so today I'm building a mount to put a Raspberry pi and display next to the thermostat so everyone in the house can see what's going on on one convenient dashboard."

  • @tracybowling1156
    @tracybowling1156 2 года назад +4

    I always have fun watching your experiments!

  • @Miketz
    @Miketz 2 года назад +15

    Some tips:
    Electrical tape will not protect from condensation, and the hydrocarbon fumes will just make it unsticky and it will fall into your tank. I like vulcanising tape or a spray-on protective wax coating such as "Electrashield" which can also be used on your connections and RasPi. (It is easily removed with contact cleaner)
    If there are any objects in the tank such as pipes or baffles near the beam path, they can often give a stronger signal than the level so location is important.
    The expansion characteristics of hydrocarbons is well documented, you can attach a temperature sensor to the tank and have the Pi deliver a "Temperature compensated" value that while does not exactly match the actual value, is more than accurate for your needs.

    • @TheRainHarvester
      @TheRainHarvester 2 года назад +3

      Yeah I was surprised he used electrical tape. Moisture can even get pulled through insulated wires when the encapsulated enclosure "breathes" due to temperature fluctuations.
      Also fuel vapors and electricity don't mix with good results. Spark goes boom!

    • @Miketz
      @Miketz 2 года назад +1

      Fuel vapours aren't that big a deal in enclosed tanks, especially fuel oils and the extra-low voltages and currents being used here. It's done all the time.

    • @TheRainHarvester
      @TheRainHarvester 2 года назад +2

      @@Miketz When I worked for a fuel tank company, there were laws and regulations which prevented anything not certified/tested and regulated.

    • @Miketz
      @Miketz 2 года назад +1

      @@TheRainHarvester Yup - IS (Intrinsically safe) equipment is very important for working in and around open storage vessels. But enclosed tanks containing some product don't have the available oxygen required to allow combustion.

    • @TheRainHarvester
      @TheRainHarvester 2 года назад +2

      @@Miketz Also, only brass fittings were allowed. Other metals, if knocked, could spark / cause explosions.

  • @benoitvannoten5113
    @benoitvannoten5113 2 года назад +5

    There is a remote measuring system without electricity: look for "pneumatic fuel level gauge"
    It allows you to measure the fuel level up to 50 m away from the tank. It works with a small hand pump and a manometer.
    Basically there is a (plastic?) tube with one end at the bottom of the tank and the other end connected to a manometer. One has to pump air in the tube until bubbles come out of the tube in the tank.
    Then the manometer reading remains stable while pumping and the pressure is equal to the pressure exercised by the fuel height above the end of the tube.
    One can place the indicator near the boiler if not too far away.
    Contrary to Matthias Wandel's solution it doesn't give a continuous reading. Continuous measurement is needed if one wants to detect a leak greater than evaporation.

  • @jasonsvendsen3917
    @jasonsvendsen3917 2 года назад +2

    I have a commercial version of this thing you made, it works on the same principal! It's nice to keep an eye on the level without having to go to the basement all the time, and I can see trends and also estimate how long I have before I need to order more oil.

    • @ronaldwoofer5024
      @ronaldwoofer5024 2 года назад +1

      wat it called ? i need one for underground tank

  • @frollard
    @frollard 2 года назад +18

    I've just ordered a bunch of infrared time of flight sensors - they supposedly give sub-mm accuracy from 1cm to 50-400cm depending on model. For around 3-9 dollars they're pretty neat, and the calculations all happen on board, you then i2c the data out meaning no operating system lag can interfere with the measurements. The best performance per dollar I can find is the VL53L0X or VL6180 family of chips...they can be hermetically sealed with a glass cover.

    • @matthiasrandomstuff2221
      @matthiasrandomstuff2221  2 года назад +7

      I should look into those

    • @mookfaru835
      @mookfaru835 2 года назад +1

      Yea, you paid 100$ right? Maybe he gets them from alibaba, ask him. Alibaba is worth the price if you’re willing to buy a bunch to test which ones are good.

    • @superdau
      @superdau 2 года назад +2

      I have used VL53L1Xs on drones to show pilots through goggles the distance to the ground (for the last 2 meters) with an LED. They are not the usual "china" cheap, where you get a ten-pack for a few Euros. But for 4-5 Euros you get a pretty reliable device, that works quite well even in sun light. What's neat it that you can set an area of interest, because the sensor is something like an 8x8 pixel array and you can define the rectangle to "look" at. That's useful if there's something in your "view" that you can't remove but want to ignore.

  • @JeanPhilippeLETARD
    @JeanPhilippeLETARD 2 года назад +1

    I plan to do the same, thank you for validating the idea. There is waterproof ultra sound sensors versions which can be more resistant if you see failure occurs.

  • @chuckw4680
    @chuckw4680 2 года назад

    The amount technical/engineering know how and problem solving ability in your brain astounds me. And I've got a couple of engineering degrees under my belt. If you were a US citizen, I've no doubt you could make the cut to be an astronaut.

  • @bnasty267
    @bnasty267 2 года назад +12

    My oil tank gauge is broken, but I took a different approach. I attached a simple hour meter to the burner circuit and record the minutes it runs. Oil burners use a calibrated oil nozzle rated for a certain gallons per hour (at the standard 100 PSI pressure.) My furnace calls for (and I use) a .75GPH nozzle. I know how much oil I got last fill, so it's pretty easy to calculate the amount I burned and how much is remaining. I could hook all this up to a Pi if I wanted to for better tracking.

    • @matthiasrandomstuff2221
      @matthiasrandomstuff2221  2 года назад +11

      Hmm, maybe just an old electric clock hooked up in parallel to the burner?

    • @krashanb5767
      @krashanb5767 2 года назад

      How is the pressure kept the same with lowering oil level?

  • @Nono-hk3is
    @Nono-hk3is 2 года назад +1

    Logging in to the wrong raspberry pi is very relatable.

  • @florian.2342
    @florian.2342 2 года назад +2

    There are also water tight variants of these! Also note: oil will probably not ignite when it's not out in the sun, but other fuels can act differently when electric sparks occur.

  • @joethompson11
    @joethompson11 2 года назад +2

    I can't wait to see what you learn from the long term data. Amazing precision you're able to get!

  • @TheGeekPub
    @TheGeekPub 2 года назад +21

    I wonder how the oil itself and the soundwaves interact. I wonder if the oil absorbs more of the wave than say something like sheet metal.

    • @rimmersbryggeri
      @rimmersbryggeri 2 года назад +1

      I would have thougth you would get the reflections both from the surface of the oil and from the bottom of the tank the latter being muffled by travelling through the oil. In sound enfinering the rwvwrburation could have been gated.

  • @jpee5409
    @jpee5409 2 года назад

    I build a similar system in 2013 and it still works fine. The signal is processed by a pic18458 (averaging 5 measurements) which also controls my burner and circulation pump. I have a cylindrical tank of 4500 liters lying on it side so my accuracy is around 20 L (+-5mm). This is more then enough to know when to order more fuel. Temperature, moisture in the air and air pressure also influence the measurements.

  • @Conradlovesjoy
    @Conradlovesjoy 2 года назад

    Even when you’re a genius like this guy, some people don’t realize you can point at a computer screen WITHOUT touching it 🤦🏿‍♂️

    • @moninum
      @moninum 2 года назад

      I don´t mind as long as they do it on their own screen.

  • @markholm7050
    @markholm7050 2 года назад +1

    The first electronically controlled traffic lights I ever encountered, ca. 1968, used ultrasonic sensors. They were mounted alongside or over a traffic lane. The transmitter and receiver transducers were about 3 inches in diameter, mounted next to each other on a traffic signal grade metal box. The lane side units had the transducers about 7-8 feet up on a pipe mast, aimed down at an angle into the adjacent lane. I was young, and had good hearing, so I could hear the ultrasonic pulses quite clearly when next to the sensors. They pulsed several times per second. Pulse rate probably around 10 Hz. I’m guessing, based on the fact my young ears could hear it, that the carrier frequency was in the 20 - 25 kHz range. From a driver’s point of view, they seemed to work pretty well. The traffic lights they were connected to seemed to trigger pretty reliably, except perhaps that a motorcycle would not trigger them. I think the most common scheme now uses inductance, with a buried loop of cable in the pavement detecting the presence of a big hunk of inductive metal just above the coil.

    • @nrdesign1991
      @nrdesign1991 2 года назад +1

      Inductive sensors are quite common now, more often now very shallow and at a 45 degree angle, to heighten the chances of detecting small and narrow vehicles

  • @senorjp21
    @senorjp21 2 года назад

    Leo's Bag of Tricks has a video about developing a water tank level monitor. His design uses a tube that goes all the way to the bottom of the tank to simplify the problem, and he sends single pulses. He uses op amps to condition the signal. It's a great channel.

  • @bradley3549
    @bradley3549 2 года назад +19

    I think we need a characterization of how much the oil expands and contracts with temperature so you can do temperature based compensation.

  • @enotdetcelfer
    @enotdetcelfer 2 года назад

    Oh that's delightfully clever. That makes me think of a lot of different things... nice

  • @AbdicateDotNet
    @AbdicateDotNet 2 года назад

    Awesome video and very educational! Can you imagine what another 10 years will bring!? Very cool stuff! 😎😎😎😎

  • @michaelrice500
    @michaelrice500 2 года назад

    Excellent! 👍 So, now if you have an accurate strapping chart (lt/mm or gal/in), apply that to your data and use a standard temperature correction for heating oil, you can factor that in and see your actual liters or gallons in the tank, just as we do at a 4 million gallon tank farm. To be entirely accurate, you also will need to know the level of water at the bottom of the fuel (if any). Water and fuel have differing levels of capacitance which is how we determine if there is any water present, but we often just use a tape measure with a bronze weight with a thermometer on it. We smear a bit of water finding paste on it, dip the tank and record the readings and compare to the electronic meter. Make sure that your sensor is intrinsically safe for use in an atmosphere that may contain combustible vapors; you don't want that sensor to be an igniter.

  • @ianoliver3879
    @ianoliver3879 2 года назад

    I only understood about half of that, but I enjoyed it. Thank you very much.

  • @cjhoyle
    @cjhoyle 2 года назад +1

    Very cool! I've recently been working on a project to control my humidifier using a Raspberry Pi (by sending it radio signals, which the humidifier thinks are coming from the OEM remote control) . It would be useful to also monitor the level of water inside the tank, and using an ultrasonic distance sensor seems like a handy way to do it. Great video, and very timely!

    • @matthiasrandomstuff2221
      @matthiasrandomstuff2221  2 года назад +3

      or you could put it on some load cells to weigh it!

    • @cbalan777
      @cbalan777 2 года назад

      What aspect of the humidifier are you trying to control?

    • @bootsowen
      @bootsowen 2 года назад

      @@cbalan777 On and off presumably, that's all the functionality that my humidifier has!

    • @cjhoyle
      @cjhoyle 2 года назад

      @@cbalan777 The fan speed. This humidifier has 9 different fan speeds, but no built-in option to set the speed based on the humidity.

    • @fuzzy1dk
      @fuzzy1dk 2 года назад

      @@matthiasrandomstuff2221 or a differential pressure sensor between atmospheric and bottom of the tank

  • @chrisbonney7563
    @chrisbonney7563 2 года назад +4

    This is pretty cool and I thought about automating oil level measurement; however decided to put an hour meter on the furnace instead. With a 0.75 gph nozzle I enter the data into excel, also got real lazy and put a $20 camera in front of the hour meter and can see it from my phone or PC, no automatic data logging so I'm envious of your system with regards to data acquisition

  • @SilenceDogood76
    @SilenceDogood76 2 года назад +20

    Could you modify your program to take temperature into account. The volume/temperature coefficient should be a known value, and you already have a temp sensor outside. Would be interesting to see how accurate it could get.

    • @matthiasrandomstuff2221
      @matthiasrandomstuff2221  2 года назад +14

      I would need a temperature sensor in the oil. It's a big mass, so it takes a long time to settle to a new temperature

    • @ddegn
      @ddegn 2 года назад

      Does the air above the oil get hot? If the temperature is near room temperature then temperature compensation isn't really needed.

    • @ikbendusan
      @ikbendusan 2 года назад

      @@DatNdNd the outdoor temperature is not known; it is an approximation.

    • @englebig
      @englebig 2 года назад +2

      I get a feeling the temperature of the oil isn't the culprit off these level changes, rather the geometry of the tank. Intuitively, I wouldn't expect measurable changes on the scale of an hour or so, which is what I think we see. But I can imagine a metallic tank to buckle a bit due to the temperature gradient between the inside (oil temp) and the outside. Any thoughts?

    • @jurgislll
      @jurgislll 2 года назад +4

      ​@@matthiasrandomstuff2221 Air temperature in tank will have the largest impact to the measurements, since speed of sound increases about 0.6m/s per 1°C increase.

  • @Gunbudder
    @Gunbudder 2 года назад

    i wrote a program for the TI-83 calculator that used a sonic sensor, and it was surprisingly accurate. very little jitter. i'm also probably one of only a few kids who ever got to use an official TI sensor package for students lol. they do have a max range obviously, and i do remember having weird multipath problems when measuring something moving around near another surface

  • @jum5238
    @jum5238 2 года назад +1

    "Give me a ping Vasili. One ping only, please." (Hunt for Red October)

  • @fairweatherfoundry715
    @fairweatherfoundry715 2 года назад +1

    FYI, sometimes my oil gauge gets stuck on my tank. You can unscrew and remove the clear plastic graduated part and grab the float with your hand and just push and pull it up and down. That will free it up. your sensor is much cooler though!
    I am guessing the sensor does a cross correlation (matched filter) using a stored reference of the transmit pulse. Very common in remote sensing devices.

  • @DEADB33F
    @DEADB33F 2 года назад

    Nice project.
    I did similar but converted needle float gauges (that I already had) to have a hall effect rotary position sensor in line with the needle so it directly measures the needle angle.
    Position sensors I'm using are I2C, 12-bit (4092 graduations), and the needle covers ~3/4 of a revolution so theoretically on a 1200mm tall tank it should have sub-mm precision. Realistically the resolution is limited by the 'notchiness' of the gears inside the float mechanism (float tends to drop a 1-2mm at a time as the level drops)
    It's mostly jitter free though, even when taking short interval readings without any smoothing.
    The unit is also self-contained and battery powered using Lora to send a readings every few hours (which is plenty for something like this, and means the battery will last years).
    I also have a few more of these in livestock water tanks a couple miles from my house sending back to the same Lora receiver ...mounted on my chimney stack.
    ---
    NB. I made a previous comment including links to some pics but I think it got removed due to the links 😢

  • @MatSmithLondon
    @MatSmithLondon 2 года назад

    That distance sensor will last about 6-12 months. Then it will die. You are correct about condensation. However your fix won’t work. For a few dollars more buy the IP rated design. I have experience with this over a number of years! The IP rated design in small cylindrical housing is excellent. I sealed all connections in potting compound. (2 part gel.) I had three water sumps and each one of them died, when I took it apart the inside of the little transducers was completely rusty and gross. Definitely spend the time to upgrade now, it will be worth it!

  • @tonysheerness2427
    @tonysheerness2427 2 года назад

    I have a commercial oil tank reader that sends a radio signal to a mains plug with an led display with 10 bars. When the tank is full it has ten bars and goes down in tenths as the oil is used. The unit has jumpers on it for various size oil tanks in height. But not as much fun as your one.

  • @MCsCreations
    @MCsCreations 2 года назад

    Pretty interesting project, Matthias! 😃
    Brilliant!
    Stay safe there with your family! 🖖😊

  • @samTollefson
    @samTollefson 2 года назад +1

    I am still at the "drop a stick in it" level, my raspberry pi is something I eat!
    I love your content!

  • @BillyBoy7380
    @BillyBoy7380 2 года назад +31

    How about using a tiny hammer to “ring” the tank. The computer could analyze the frequency changes as oil level and temp changes. Good times!

    • @PotentiallyAndy
      @PotentiallyAndy 2 года назад +16

      That’s good, but I think we can make it even more complicated ;)

    • @HighVoltageMadness
      @HighVoltageMadness 2 года назад +1

      Just no use a fluid level sensor

    • @Thepiecat
      @Thepiecat 2 года назад +4

      @@HighVoltageMadness 👎

    • @marco23p
      @marco23p 2 года назад +3

      That's amazing! That's one of the more creative transducers I've heard. I bet it works quite well too. Just get the electromagnet plus ''hammer" from an old mechanical doorbell, and put a guitar pickup next to the oil tank.

  • @TimSavage-drummer
    @TimSavage-drummer 2 года назад

    Had a similar problem with water tanks when I lived in a location with only rainwater. Wanted to know the level without going out and checking them. Ended up using a pair of pressure sensors, one connected to a hose at the bottom of the tank and the other measuring atmospheric pressure and the difference to determine the level of water.
    Got the PoC working in a bucket, but we moved away before I got it installed in the actual tanks.

  • @mitnoxin
    @mitnoxin 2 года назад +1

    We use similar devices for detecting water levels in culverts etc. A bit bigger and fancier with solar power and 4g connection but basically the same thing.

  • @benoitvannoten5113
    @benoitvannoten5113 2 года назад +2

    Linear displacement can be measured with a string making one or two turn around a drum coupled to the axis of a 10 turn precision potentiometer.
    The string must remain under tension. It is better to have the potentiometer coupled elastically to the drum to avoid any stress on the potentiometer.

    • @videblu
      @videblu 2 года назад

      This is more integrated and less prone to mechanical failure.

  • @Rouverius
    @Rouverius 2 года назад

    Wild I was for sure that the heating oil fumes would have fowled up the acoustic transducers. Those things are tougher than I thought.

  • @pennyroyal3813
    @pennyroyal3813 2 года назад +5

    "Hi this is Matthias Wandel, I'm in need of more heating oil."
    "How much will you need?"
    "About 787mm."
    "???"

  • @jeanyvespochez
    @jeanyvespochez 2 года назад +2

    these ultrasonic sensors are sensible to temperature and humidity, which will change a lot over time on this outside tank. that's why may be you see the level getting up !
    it's easier to detect when the boiler is on, because the boiler consumes an almost constant fuel quantity over time (around 2kg/h)
    and integrate this on-off data over time ti get the number of hours the boiler is on each day, multiply by 2 and you get the consumed fuel volume.(as 1 L fuel is almost 1Kg)
    plus: it's completely forbidden to use any electrical device so close to a fuel tank, even low voltage powered. there can be any spark that fires the tank.

    • @matthiasrandomstuff2221
      @matthiasrandomstuff2221  2 года назад

      it has a temperature sensor and compensate. The effect of humidity is much smaller.

    • @TheRainHarvester
      @TheRainHarvester 2 года назад

      Fuel vapour can ignite. Might be a time bomb waiting to explode...Who knows. Sleep well at night?

  • @BMG6519
    @BMG6519 2 года назад

    I work with equipment that uses ultrasonic sensor for level measurements. Outputs are 4-20mA rather than pwm. Can be fiddly though.

  • @SiXiam
    @SiXiam 2 года назад +1

    When the Pi first came out I used a ping ultrasonic sensor and it was a disaster. Nothing but problems and limited help with the Pi, because it was so new. I abandoned the project and lots of time later I tried an Arduino and it worked so easy it was kind of a joke given all the trouble I had with the Pi. I don't know about current Pi's, but early ones could not do PWM properly.

  • @bladee_enjoyer540
    @bladee_enjoyer540 2 года назад +17

    If you're spending a lot of time in the TTY, it would probably be worth learning a terminal multiplexer such as tmux or screen. They're super handy for having long running session over SSH, and they give you the ability to see multiple things at the same time.

    • @ianphilip6281
      @ianphilip6281 2 года назад

      This is really good advice to Linux folk in general new and old, simple solid functionality. Seems like Matthias is an an old hand but a lot of the crowd may not have experienced using it yet. I also like terminator and tilda if at a Linux workstation and running an X session obviously.

    • @ianphilip6281
      @ianphilip6281 2 года назад

      I should note I wrote this while the adverts were rolling at the start (on my phone currently)
      So please ignore this if its irrelevant!

    • @andythebritton
      @andythebritton 2 года назад +1

      +1 for screen, it saved my life recently.

  • @isdeekelis
    @isdeekelis 2 года назад

    Have done similar to measure oil level too. Have used same sensor connected to esp8266 which uses some fancy multi measurements and filtering to remove noise. Then it sends data over wifi to Influx DB and Grafana displays graphs.

  • @stonee4729
    @stonee4729 2 года назад

    I love how you included a shot of your sigh when things didn’t work on the first attempt lol

    • @matthiasrandomstuff2221
      @matthiasrandomstuff2221  2 года назад +3

      except that part was filmed days later, cause cutting straight from "gotta try it" to "it didn't work" didn't look right.

  • @hshanoo
    @hshanoo 2 года назад

    I'm glad too ;) Take care! :)

  • @Wordsnwood
    @Wordsnwood 2 года назад +1

    I find the comments almost as entertaining as the video.

  • @fangthewarrior
    @fangthewarrior 2 года назад

    Ultra sonic sensors are so much fun to mess around with

  • @claudiomenesesc
    @claudiomenesesc 2 года назад +2

    All I understood of the technical explanation were the millimeters. Very entertaining though.

  • @LucasHartmann
    @LucasHartmann 2 года назад +1

    You can find these rangefinders with automotive transducers, separated from the processing board. Should be more reliable long term.

  • @loewietje4897
    @loewietje4897 2 года назад +1

    I keep wondering where this 0.6 mm steps come from, since the signal looks really "analog" apart from these discrete steps. After some digging on these kind of ultrasonic sensor modules, it seems they all have a microcontroller on board. When translating 0.6 mm to seconds (using 340 m/s) the timestep equivalent to 0.6 mm seems to be 1.76 microseconds. Assuming the microcontroller uses several clockcycles to determine this output signal, the clock frequency of the microcontroller is an integer multiple of this timestep, for example if the microcontroller uses a 6.8 MHz instruction cycle, the calculation uses 12 cycles. So in the end the resolution of the ultrasonic sensor is limited by the processing of the sensor and not the timekeeping of the raspberry pi.

  • @ferrumignis
    @ferrumignis 2 года назад +4

    Note the the speed of sound changes quite a bit with air temperature (around 0.6m/s per degree Celsius), so that will also introduce errors. You could put temperature sensors in the oil and air space to compensate for oil expansion and speed of sound changes.

  • @stephenmiller6690
    @stephenmiller6690 2 года назад +1

    We always used a calibrated dip stick.

  • @bob-ny6kn
    @bob-ny6kn 2 года назад

    Make a narrow, clear-glass (plastic tarnishes) level gage and use LED refraction to sense when the liquid is below a level.

  • @darylh8657
    @darylh8657 2 года назад

    One trick is to send pseudo-random pulses and sync up to the incoming wave-forms, as is done with GPS. Use a bit of machine learning wizardry to match echos and compare them to what you expect from the tank geometry. You could probably get high resolution by combining different reflection modes. Another thing to try is to connect a BME280 or 680 sensor to correct for atmospheric conditions. The BME680 also has a gas sensor which could detect if you have a leak.

  • @mckenziekeith7434
    @mckenziekeith7434 2 года назад

    The speed of sound is also temperature dependent. So the flight time will go up as the temperature goes down. I think this exacerbates the problem of the fuel expanding and contracting.

  • @alec4672
    @alec4672 2 года назад +2

    Ever used that plasti dip liquid tape? Works great to seal up electronics like that from the elements.

  • @peterjensen6844
    @peterjensen6844 2 года назад

    All I can think about is the "oh thank God" scene from Waterworld...

  • @kenc2257
    @kenc2257 2 года назад

    If my tank-level-float wasn't working, I'd probably default to some sort of dip-stick (maybe using a real 'stick'). This was really fascinating, though much of it went over my head.

  • @mikewurlitzer5217
    @mikewurlitzer5217 2 года назад

    Might try this in my bread dough proofer to tell me when the dough has risen a given percentage.

  • @caractacustube
    @caractacustube 2 года назад

    U., you need to use a resistor divider to drop the voltage - putting a single resistor in line will limit current, but not control the voltage.

  • @syrus3k
    @syrus3k 2 года назад

    You could measure temperature at the same time to negate any expansion of the oil

  • @Peter_Enis
    @Peter_Enis 2 года назад

    Round up (or down) the values to 3mm (dividable by 0.6mm) , should be enough for a tank that size. It's probably the clock-cycle of the chip or opening and shutting time of the value-reading (pwm?). See if it happens when you measure every 5 seconds apart. Should stabilize....

  • @syrus3k
    @syrus3k 2 года назад

    This has applications for a flood sensor network I was considering..

  • @poobertop
    @poobertop 2 года назад +5

    Matthias, I know you have plenty of good reasons to keep these videos short and to the point, but I'd love to see more details and troubleshooting of these projects. Thanks!

    • @Don.Challenger
      @Don.Challenger 2 года назад

      Maybe check his website, he might have an article written up for this project. I don't think he always mentions those for every video project and this may be so recent a piece of work it might not yet be posted.

  • @1ucasvb
    @1ucasvb 2 года назад +9

    Wouldn't having these sensors inside a tube cause all sort of nasty standing waves and interferences by the sound bouncing around? Is this type of sensor really appropriate for a confined tube?

    • @matthiasrandomstuff2221
      @matthiasrandomstuff2221  2 года назад +23

      the thing that goes inside the tube is longer than the tube, so a non issue. But I did try it thru a tube, and that worked too.

    • @jyvben1520
      @jyvben1520 2 года назад

      the longer tube may even clean up the signal, less scattered sound returning,
      might have seen a video from Andreas Spiess.

    • @isdeekelis
      @isdeekelis 2 года назад

      Actually sensor in a tube will not work correctly. Have tested it.

  • @bobd.
    @bobd. 2 года назад +1

    Nice job building a level gauge. Don't feel bad as the real ones are a PITA to setup in the field too. Depending on the beam width you may get echos off the side of the tank. Where does the return line (do you even have a return line, some systems don't need it) dump into the tank in relation to the level gauge? Is it possible there is some splash or ripple created that are affecting your readings.

  • @edwardjoyner9344
    @edwardjoyner9344 2 года назад

    Love this kind of stuff

  • @jojuae
    @jojuae 2 года назад

    This method is used by tankers and naval vessels in their liquid storage tanks. TLIs or Tank Level Indiciator use this and similar devices to measure distance of fluid from top of tank IE level of fluid in tank

  • @achuyman
    @achuyman 2 года назад

    Do a follow up video to see the durability of the sensor, i have always wonder if it would still be accurate after continious usr

  • @tinkmarshino
    @tinkmarshino 2 года назад

    Strange.. But very interesting.. I will file this information for use later.. thanks..

  • @vejl
    @vejl 2 года назад

    I would have guessed that you had issues with echo in the tank! But it seams to work.

  • @LeonvandenBeukel
    @LeonvandenBeukel 2 года назад +2

    I wonder if you ever considered using those ESP WiFi modules like ESP8266 and ESP32 (not specific for this project)? Would be nice to see more projects like this :)

    • @Pokornz
      @Pokornz 2 года назад

      I second using WiFi-enabled microcontrollers over microcomputers for such simple tasks as sensor data aquisition. Also ESP32 wouldn't have the timing issues that Raspberry Pi has.

    • @matthiasrandomstuff2221
      @matthiasrandomstuff2221  2 года назад +3

      yes, I know about dsp32. But it just adds a whole level of hassle. As it is, I can log into the thing, compile on it, grep thru logs, etc. So much easier, well worth the extra $15!

  • @jennitsu12
    @jennitsu12 8 месяцев назад

    Great work! Question, do you know how I can make a sensor for transmission oil pan? Temperature may reach 110°C.
    May be laser?

  • @davebashford3753
    @davebashford3753 2 года назад

    I use an ultrasonic distance sensor and rpi to watch the level of the river out back. Once or twice each year, it gets exciting - i.e. 8 ft higher than normal.

  • @RichardGreco
    @RichardGreco 2 года назад

    Hoping you can share a script snippet for plotting in the terminal. Curses might be very useful for this type of terminal data display.

  • @johthe
    @johthe 2 года назад

    Good to know, but I will suggest another larger change and I'm sorry since you did not ask for it. I have replaced the oli-burner with a woodpellets-burner with the same fittings and I would suggest you to do the same if possible or atleast something that suits you in this place to replace the oil, since I do not know your details. It paid off itself fast here anyway. Also automation made to vaccum transport the pellets from the storage to the burner, but thats a different unrelated story. Continue to improve. :)

    • @matthiasrandomstuff2221
      @matthiasrandomstuff2221  2 года назад

      The cost of wood pellets per BTU is about the same price of electricity. Definitely not worth the capital cost. And if I want to keep feeding it, I'd rather throw much cheaper chunks of wood in the wood burner.

  • @FerretPirate
    @FerretPirate 2 года назад

    Man, I didn't even know you could get a float. I've been using a dipstick!

  • @andyspoo2
    @andyspoo2 Год назад

    Have you tried those little radar project boards? e.g. the HLK-LD2410B

  • @tobywenman4769
    @tobywenman4769 2 года назад +9

    Have you had any issues with just using a single resistor on the input to the pi? The input impedance is rated at 50K so putting a 1K in line should only drop the voltage to 4.9V which might not be healthy for it.
    I always use a pair of resistors as a potential divider but I've never tried just the single resistor

    • @matthiasrandomstuff2221
      @matthiasrandomstuff2221  2 года назад +5

      I have fed 5 volts into the 3 volts inputs before, but the 1k resistor is to make sure it doesn't put too much current in.

    • @ddegn
      @ddegn 2 года назад +2

      @@matthiasrandomstuff2221 The 3.3V logic I've used with 5V requires at least a 3K resister. I think a RPi is not technically 5V tolerate so even larger resistor value would not guarantee no damage but a larger resistor value would likely reduce the odds of the RPi being damaged.
      Personally, I'd use at least a 10K resistor.

    • @ianphilip6281
      @ianphilip6281 2 года назад +1

      I nearly commented almost this exact thing. I've always used dividers or a level shifting IC for pcb projects.

    • @Manawyrm
      @Manawyrm 2 года назад +6

      This is relying on the body diodes of the Raspberry Pi's SoC. The SoC has diodes from the GPIO to VCC and GND which limits the maximum voltage to VCC + diode drop.
      This diode now only has to dissipate the current through the 1k resistor.

    • @ddegn
      @ddegn 2 года назад +2

      @@Manawyrm Where did you find this info?
      I searched the following: *5v tolerate raspberry pi*
      It brought up a webpage about how to use level shifters with the RPi since it's not 5V tolerate.
      Edit: I hope the need for level shifters only applies to older RPi boards but I haven't found any info stating the RPi is 5V tolerate.

  • @godfreypoon5148
    @godfreypoon5148 2 года назад

    They ought to transmit a pseudo-noise sequence with a single strong autocorrelation peak.

  • @yoyofargo
    @yoyofargo Год назад

    I miss when pi's were cheap. Hope they do a run specifically for hobbyists. Even the orangepi or bananapi sbc's are going for well over msrp. I just miss putting klipper on a $5 pi zero lol.
    We'll see if risc takes over the sbc space.

  • @roboman2444
    @roboman2444 2 года назад

    Shouldn't you use a voltage divider (2 resistors) instead of just a single inline one?

  • @sabelch
    @sabelch 2 года назад +1

    I kept expecting you to add a temperature sensor to normalize the oil level.

  • @virtualmarc2383
    @virtualmarc2383 2 года назад +2

    What's the oil man going to do when he finds an electrical gizmo blocking the filler pipe?

    • @matthiasrandomstuff2221
      @matthiasrandomstuff2221  2 года назад +3

      He only comes when I call, and I'll put the old cap back on before he comes.

  • @ahmetmetinuzun
    @ahmetmetinuzun 2 года назад +1

    Effective yet with no regard to efficiency, just the way engineers like to design things :)

  • @fmaz1952
    @fmaz1952 2 года назад

    Wish the range on those sonic sensors was better. I'd LOVE to monitor my well level from inside the house

  • @joerideman
    @joerideman 2 года назад

    Another option might be a ir time of flight sensor. Should work through glass. But they can be more complex

  • @EugeneFir
    @EugeneFir 2 года назад

    Please (anyone) answer this one curiosity ... what would/could the readout display while percussioning the tank wall (at varying frequencies)? (e.g. ball peen tapping or wooden mallet or even ambient room voices/speakers/furnace-turns on/expanding waterpipe clanks, etc) Thank you in advance from "curious, but too lazy to look it up"

    • @EugeneFir
      @EugeneFir 2 года назад

      BTW My great great grandfather had one of the very early ANALOG sonic oil level gauges. It was simple, he would open the lid, yell "GALLONS" and then count the number of "GALLONS, gallons, gal..." echoed back to know how much was needed. To be fair though, he stole the idea from my uncle's failed analog septic tank gauge; and this is where the phrase "he's full of it" comes from. (... he installed it backwards)

  • @MaartenVerheyen1985
    @MaartenVerheyen1985 2 года назад

    I was looking into doing something like this aswell, but I wanted to put some kind of smart hour reader before the burner, since I know how much oil the burner uses per hour I can then calculate the usage. By doing so I would not have to put a Pi outside and the readings of the oil shrinking and expanding do not show in the graph. but then again your system could send a warning when the oil level is at a certain point so you can order new oil :D

  • @kiddiescripterkiller
    @kiddiescripterkiller 2 года назад

    Those sensors are made cheap. Plus you also have barometric pressure, that affects the speed of sound... Those weird readings could be an animal on top of the tank, hitting the tank or even crawling over the wires. Radio interference is a possibility if the cables aren't shielded. There are actual liquid level sensors you can get for pi and arduino.

  • @samueljames9342
    @samueljames9342 2 года назад

    Do you incorporate any Hysteresis? It might help to smooth out the graph