
This Happens when all Buy Options Suck! (DIY or Buy)
video description
Date: 2024-06-16
Related videos
Comments and reviews: 20
kgrzeg
Few weeks ago I had a similar need to monitor water level in a well. I considered ultrasonics and some other ideas and decided that the simplest solution for me is a capacitive linear sensor made with old polyethylene flat tv antena cable (symetric and unshielded, used half a century ago. I have connected the cable directly to ground and one of gpio pins on esp32 (s2. Flashed with ESPHome and used its capacitive buttons function for the measurement. I have added a proper readout on Home Assistant panel together with a graph. Worked flawlesly from the start. I got a data stream that I could scale to water height in cm. The response seemed very linear and stable.
Flat ribbon cable I have used for initial testing worked too (I have connected wire 1, 2, 3 to gpio, 4, 5, 6 unused, 7, 8, 9 to esp's gnd. I prefered polyethylene because I had doubts about pvc insulation changing its proprieties while being kept under water all the time.
reply
Few weeks ago I had a similar need to monitor water level in a well. I considered ultrasonics and some other ideas and decided that the simplest solution for me is a capacitive linear sensor made with old polyethylene flat tv antena cable (symetric and unshielded, used half a century ago. I have connected the cable directly to ground and one of gpio pins on esp32 (s2. Flashed with ESPHome and used its capacitive buttons function for the measurement. I have added a proper readout on Home Assistant panel together with a graph. Worked flawlesly from the start. I got a data stream that I could scale to water height in cm. The response seemed very linear and stable.
Flat ribbon cable I have used for initial testing worked too (I have connected wire 1, 2, 3 to gpio, 4, 5, 6 unused, 7, 8, 9 to esp's gnd. I prefered polyethylene because I had doubts about pvc insulation changing its proprieties while being kept under water all the time.
reply
zolatanaffa87
Hi, I completely agree with you.
Even when I have something in mind I look for various solutions and then often switch to DiY, even if my things are less electronic than yours the principle is always to look for the best for our use which is not always standard.
Only one thing isn't clear to me: did you have the box with the transducer interface inside the tube along the entire length of the transducer cable or did you place it just inside the tube The second of the two hypotheses seems to me to be the best of the two because it allows you to access the box always and in any case without having to disconnect the cat7 from the circuit in the garage, saving one or two meters of cat7 and then having to disconnect it every time you have to work on it (even if it will be rare) seems useless to me
reply
Hi, I completely agree with you.
Even when I have something in mind I look for various solutions and then often switch to DiY, even if my things are less electronic than yours the principle is always to look for the best for our use which is not always standard.
Only one thing isn't clear to me: did you have the box with the transducer interface inside the tube along the entire length of the transducer cable or did you place it just inside the tube The second of the two hypotheses seems to me to be the best of the two because it allows you to access the box always and in any case without having to disconnect the cat7 from the circuit in the garage, saving one or two meters of cat7 and then having to disconnect it every time you have to work on it (even if it will be rare) seems useless to me
reply
bansheedearg
Our house is on a buried stream, so water wells up into our basement. I too had a need for a water lever sensor and my solution was also cheap. Cut a piece of styrofoam packaging to loosely fit a pvc gutter downpipe (squarish plastic pipe. Because sump well is only about 0. 7 meters, and I want to detect the top part, I only measure about 0. 3 meter. That said, cut a slot into the pvc pipe so you can attach a pin to the styrofoam block. Two paint sticks make a simple linkage to a potentiometer at the top. An arduino analog pin completes the project. I also went with an RV pump as my submersible pumps seemed to disintegrate over time. There's some extra stuff, like a raspberry pi and relay board to run the pump and irrigation valves. Very very diy.
reply
Our house is on a buried stream, so water wells up into our basement. I too had a need for a water lever sensor and my solution was also cheap. Cut a piece of styrofoam packaging to loosely fit a pvc gutter downpipe (squarish plastic pipe. Because sump well is only about 0. 7 meters, and I want to detect the top part, I only measure about 0. 3 meter. That said, cut a slot into the pvc pipe so you can attach a pin to the styrofoam block. Two paint sticks make a simple linkage to a potentiometer at the top. An arduino analog pin completes the project. I also went with an RV pump as my submersible pumps seemed to disintegrate over time. There's some extra stuff, like a raspberry pi and relay board to run the pump and irrigation valves. Very very diy.
reply
greatscott
Cool hacking there: . I like the DIN rail mounted box, it should keep the electronics warm, dry and comfy. Speaking of which, I really love your Hager distribution box. Clean and elegant. The legendary German quality!
At some point I did a repair job on my friend's old VW LT28 camper, where he needed the wiring and plumbing fixed and ready for a trip around Europe. I don't remember the exact manufacturer and model of the system controller in that thing, but it featured a water level meter that used four screws in the tank's wall as probes placed along the height, plus an additional ground probe. It must have been either a resistive or capacitive sensor, though it could only quantize the volume to five levels: empty, 1/4, half, 3/4, full.
reply
Cool hacking there: . I like the DIN rail mounted box, it should keep the electronics warm, dry and comfy. Speaking of which, I really love your Hager distribution box. Clean and elegant. The legendary German quality!
At some point I did a repair job on my friend's old VW LT28 camper, where he needed the wiring and plumbing fixed and ready for a trip around Europe. I don't remember the exact manufacturer and model of the system controller in that thing, but it featured a water level meter that used four screws in the tank's wall as probes placed along the height, plus an additional ground probe. It must have been either a resistive or capacitive sensor, though it could only quantize the volume to five levels: empty, 1/4, half, 3/4, full.
reply
moeburn
Why did you use ultrasonic and not time-of-flight sensor I use this for my water softener tank to know how high the salt level is. It was so easy and cheap. Just an ESP32 and a VL6180X glued to the top lid, and that's it. The VL6180X measures the distance to the salt in mm just like your ultrasonic sensor, only it doesn't suck.
They are actually ideal for this situation - a sealed container in total darkness. It is in areas with other light sources like sunlight or artificial lighting, like a backup sensor for a car, where the ultrasonic sensor is better. But in total darkness you have no reason not to use the superior ToF technology.
reply
Why did you use ultrasonic and not time-of-flight sensor I use this for my water softener tank to know how high the salt level is. It was so easy and cheap. Just an ESP32 and a VL6180X glued to the top lid, and that's it. The VL6180X measures the distance to the salt in mm just like your ultrasonic sensor, only it doesn't suck.
They are actually ideal for this situation - a sealed container in total darkness. It is in areas with other light sources like sunlight or artificial lighting, like a backup sensor for a car, where the ultrasonic sensor is better. But in total darkness you have no reason not to use the superior ToF technology.
reply
gutrali
I can see that the cable you were trying to extend was coaxial cable. Coax is used for high frequencies and to ensure low loss, which is perfect for RF. You probably could have extended that cable with a grossly higher specked cable like common RG6 (cable TV wire. But you might have needed to add another conductor beyond the center signal, and the ground shield, if you need power and ground as well. Ive seen coax wire out there that has an external moulded third wire attached to the coax! I'm pretty sure that it's used for giving power and getting signal back from analog surveillance cameras. Would have been perfect for this!
reply
I can see that the cable you were trying to extend was coaxial cable. Coax is used for high frequencies and to ensure low loss, which is perfect for RF. You probably could have extended that cable with a grossly higher specked cable like common RG6 (cable TV wire. But you might have needed to add another conductor beyond the center signal, and the ground shield, if you need power and ground as well. Ive seen coax wire out there that has an external moulded third wire attached to the coax! I'm pretty sure that it's used for giving power and getting signal back from analog surveillance cameras. Would have been perfect for this!
reply
someguy2741
An easily analog/digital approach is to take a thin narrow bar of the same length as the depth of your tank. Twist it 270 degrees. Then take 2 guide rods and take a cork float and drill two holes such that the guide rods pass through. Mount the spiral plate between the guide rods. Cut a slot in the cork float that matches the the profile of the spiral plate.
As the float raises the spiral plate gets twisted. You can mount a potentiometer or a pointer on top.
This system has been used on fuel tanks a very long time.
Look up snowmobile fuel tank gauge for examples.
reply
An easily analog/digital approach is to take a thin narrow bar of the same length as the depth of your tank. Twist it 270 degrees. Then take 2 guide rods and take a cork float and drill two holes such that the guide rods pass through. Mount the spiral plate between the guide rods. Cut a slot in the cork float that matches the the profile of the spiral plate.
As the float raises the spiral plate gets twisted. You can mount a potentiometer or a pointer on top.
This system has been used on fuel tanks a very long time.
Look up snowmobile fuel tank gauge for examples.
reply
noctis1672
Love this solution, but please, for the love of your chosen deity, remove the pin headers and solder to the board directly. Or get ESP boards without headers.
Those headers aren't meant to be soldered to. It's a bit sloppy, and I've had to troubleshoot way too many issues with wires getting loose or short circuit because they were soldered to pin headers.
I honestly don't want to be a keyboard warrior or anything like that, but if people follow this video as a guide, they will run into a lot of issues. Really love your content, so I figured it might be worth mentioning.
reply
Love this solution, but please, for the love of your chosen deity, remove the pin headers and solder to the board directly. Or get ESP boards without headers.
Those headers aren't meant to be soldered to. It's a bit sloppy, and I've had to troubleshoot way too many issues with wires getting loose or short circuit because they were soldered to pin headers.
I honestly don't want to be a keyboard warrior or anything like that, but if people follow this video as a guide, they will run into a lot of issues. Really love your content, so I figured it might be worth mentioning.
reply
greatscott
For an Ex Wife I created something very similar using a water proof ultrasounds sensor set. they required a sensor on three tanks and a means to have all three displayed in the house. After several mods to her barn, water collection system and installing a slightly altered copy of the Home Assistant (that took longer than expected due to misunderstanding the software setup) I was able to get is up and running. When I get a chance to return to their small ranch, I will get images and maybe even make the schematic on the discord. That is when I can.
Peace
reply
For an Ex Wife I created something very similar using a water proof ultrasounds sensor set. they required a sensor on three tanks and a means to have all three displayed in the house. After several mods to her barn, water collection system and installing a slightly altered copy of the Home Assistant (that took longer than expected due to misunderstanding the software setup) I was able to get is up and running. When I get a chance to return to their small ranch, I will get images and maybe even make the schematic on the discord. That is when I can.
Peace
reply
FreakGene
I will say anyone who live in Eurasia definitely have more access to niche things than anyone who live in the Americas, though sites like Temu, Wish, and AliExpress have kind of bridge that gap a bit.
For example a project I was thinking of was to make use of one of those Battery-less, self powering, wireless electrical switches. However I wanted to use one that used separate On/Off signals. The only ones I could find won't ship to the Americas. So I'm stuck with models that just send the same signal to toggle.
reply
I will say anyone who live in Eurasia definitely have more access to niche things than anyone who live in the Americas, though sites like Temu, Wish, and AliExpress have kind of bridge that gap a bit.
For example a project I was thinking of was to make use of one of those Battery-less, self powering, wireless electrical switches. However I wanted to use one that used separate On/Off signals. The only ones I could find won't ship to the Americas. So I'm stuck with models that just send the same signal to toggle.
reply
eimparas
Cool project, but I'm not really comfortable with how this Cat7 cable is routed within a water pipe and where the sensor PCB is located.
Also, the box concerns me. I have worked with these boxes before, and they are definitely not suited for this. In my experience, they can only handle drops of water (there is an IP rating for this, but I cannot recall it off the top of my head. Regarding the wire, if it is not a PET wire, it needs to be a PET/THWN wire from my experience, or else it will eat up the plastic.
reply
Cool project, but I'm not really comfortable with how this Cat7 cable is routed within a water pipe and where the sensor PCB is located.
Also, the box concerns me. I have worked with these boxes before, and they are definitely not suited for this. In my experience, they can only handle drops of water (there is an IP rating for this, but I cannot recall it off the top of my head. Regarding the wire, if it is not a PET wire, it needs to be a PET/THWN wire from my experience, or else it will eat up the plastic.
reply
nathanielmoore87
I had the same problem a few years ago. My septic tank would overflow during heavy rains from ground water leaking in. My solution was the same, but the hard work was done for me with the RaspiSump project on Github. I also found that the A02YYUW sensor works with the same accuracy as the HC-SR04 and is waterproof. Eventually, I replaced my septic system and installed a backflow valve to keep the poo water out of my basement, but my code brown early warning system worked perfectly in the meantime.
reply
I had the same problem a few years ago. My septic tank would overflow during heavy rains from ground water leaking in. My solution was the same, but the hard work was done for me with the RaspiSump project on Github. I also found that the A02YYUW sensor works with the same accuracy as the HC-SR04 and is waterproof. Eventually, I replaced my septic system and installed a backflow valve to keep the poo water out of my basement, but my code brown early warning system worked perfectly in the meantime.
reply
susugar3338
The fact that I made a project similar to yours just 2 weeks ago. But i chose a different way to measure water level. I used hx710b sensor (2$) and ESPHome supports it as HX711. The seller calls it as a liquid pressure sensor but i think it would cause leak over time. Instead of water i used it to measure pressure of air at the bottom of the tank. After some of calibration, it appeared to very accurate, maybe to every 1/10 litter. Now I just wait to see is the sensor drift over time or not.
reply
The fact that I made a project similar to yours just 2 weeks ago. But i chose a different way to measure water level. I used hx710b sensor (2$) and ESPHome supports it as HX711. The seller calls it as a liquid pressure sensor but i think it would cause leak over time. Instead of water i used it to measure pressure of air at the bottom of the tank. After some of calibration, it appeared to very accurate, maybe to every 1/10 litter. Now I just wait to see is the sensor drift over time or not.
reply
pandrosof
I Have been using the same ultrasonic sensor for 2 years. In my experience it works very well, depending on the application you will need to apply some sort of signal processing. Once in a while condensation might be an issue but I just clean the sensor. By the way, the first transmissor comes in RS485 and works very well at big distances with 24V power. I have a couple of tanks with these RS485 transmitters since 1 year and so far everything is ok with no maintenance need.
reply
I Have been using the same ultrasonic sensor for 2 years. In my experience it works very well, depending on the application you will need to apply some sort of signal processing. Once in a while condensation might be an issue but I just clean the sensor. By the way, the first transmissor comes in RS485 and works very well at big distances with 24V power. I have a couple of tanks with these RS485 transmitters since 1 year and so far everything is ok with no maintenance need.
reply
unionse7en
i'm wondering what happens if you have the sensor mounted in a stilling tube , vs the cone angle of the transducer in many cisterns it would be more ideal to not ever let the transducer get wet (even though it is supposedly waterproof ) Ideally i would mount this in the 2 IU. D vent tube above the water surface. There are many elctro/mechanical sensors one could make with potentiometers too. Maybe Time-Of-Flight sensors have a narrow beam angle.
reply
i'm wondering what happens if you have the sensor mounted in a stilling tube , vs the cone angle of the transducer in many cisterns it would be more ideal to not ever let the transducer get wet (even though it is supposedly waterproof ) Ideally i would mount this in the 2 IU. D vent tube above the water surface. There are many elctro/mechanical sensors one could make with potentiometers too. Maybe Time-Of-Flight sensors have a narrow beam angle.
reply
sefalibhakat143
I had an application where I need to measure water level of an overhead water tank. and turn off the pump when it is full( if i don't turn off then tank starts to overflow which i don't want, at the same time I don't want my tank to be under filled. is ultrasonic sensor accurate enough I mean velocity of sound changes based on tank's temperature. wouldn't it cause error in your measurement And what about sloshing(can use some filters.
reply
I had an application where I need to measure water level of an overhead water tank. and turn off the pump when it is full( if i don't turn off then tank starts to overflow which i don't want, at the same time I don't want my tank to be under filled. is ultrasonic sensor accurate enough I mean velocity of sound changes based on tank's temperature. wouldn't it cause error in your measurement And what about sloshing(can use some filters.
reply
fluffyfloof9267
I've worked for a company that sells cisterns - 0: 48 - i can tell you, right now - you want an ultrasound distance measurement - easy-peasy to figure out the current/remaining volume level! Especially with rain water, there's gonna be lots of contamination and growth in your tank, so conductive sticks won't work long-term - those tend to get eaten. (fine-mesh rain water filters are a thing, as you're undoubtedly aware)
reply
I've worked for a company that sells cisterns - 0: 48 - i can tell you, right now - you want an ultrasound distance measurement - easy-peasy to figure out the current/remaining volume level! Especially with rain water, there's gonna be lots of contamination and growth in your tank, so conductive sticks won't work long-term - those tend to get eaten. (fine-mesh rain water filters are a thing, as you're undoubtedly aware)
reply
wiedapp
You didn't have any problems with the sensor being placed that close to the cistern wall
In the company I work for we had problems with that placment of industrial ultrasound sensors. The manufacturer specified a minimum distance of 0. 5m - which prior to planning nobody seemed to look up in the manual. As usual.
(I don't plan that stuff, I 'just' have to work with what they come up with and fix it so it works)
reply
You didn't have any problems with the sensor being placed that close to the cistern wall
In the company I work for we had problems with that placment of industrial ultrasound sensors. The manufacturer specified a minimum distance of 0. 5m - which prior to planning nobody seemed to look up in the manual. As usual.
(I don't plan that stuff, I 'just' have to work with what they come up with and fix it so it works)
reply
Flying0Dismount
Those wires for the ultrasonic transducer are actually transmission lines not just DC signal line therefore you can't spice them but have to replace the entire length of cable. The joints in the wires caused by spices cause reflections in the signals which can cause all of the erroneous readings. You can use any random coax as a replacement but you have to replace the entire length you just can't splice them
reply
Those wires for the ultrasonic transducer are actually transmission lines not just DC signal line therefore you can't spice them but have to replace the entire length of cable. The joints in the wires caused by spices cause reflections in the signals which can cause all of the erroneous readings. You can use any random coax as a replacement but you have to replace the entire length you just can't splice them
reply
AndyKarpenko
Thinking about all this, another solution comes to my mind - the way how Xiaomi measures the water amount in the tank of their evaporative humidifiers. Look it up! Not saying that this is better than your solution, but it's just another interesting alternative. They use metal rods submerged into the water, and I have no idea what they actually measure and how they calculate it, but it's pretty accurate
reply
Thinking about all this, another solution comes to my mind - the way how Xiaomi measures the water amount in the tank of their evaporative humidifiers. Look it up! Not saying that this is better than your solution, but it's just another interesting alternative. They use metal rods submerged into the water, and I have no idea what they actually measure and how they calculate it, but it's pretty accurate
reply
Add a review, comment
Other channel videos















