DIY Capacitive Water Level Sensor using ESP32 Touch Read function

  Переглядів 24,242

KRIS -นายกิด ซอย.14

KRIS -นายกิด ซอย.14

3 роки тому

In this video I will show you how to create the Capacitive Water Level sensors to be used with ESP32.
You can find the source code for ESP32 here:
github.com/kj831ca/touch_read...
and source code for Cereal Potter here:
github.com/kj831ca/CerealPotter

КОМЕНТАРІ: 70
@CHXO2010
@CHXO2010 2 роки тому
Thank you, Kris, the experiences you so well shared in your video not only led me to making capacitive sensors with an iron on my desktop, but a way to achieve measuring soil moisture to provide water to maintain plants. I encountered difficulties with my python-version mess in the mac, so until I figure out the paths, I use a primary arduino code averagaing and mapping the readings (my equaly primary micropython dind't improve the readings that much), monitored wirlessly using virtuino. So, while I must hold to see the whole-grain stuff in my bowl, I found the sensors potentially functinal to operate a water supply sytem to a kitchen herb garden, so, I am much grateful to you for the spoonfull!
@oliver1978
@oliver1978 2 роки тому
I couldn't wait to replicate your idea, Kris. I am impressed how well the thing works. I used 5mm stainless steel rods 50cm inserted into PVC pipes. The result is quite linear function. I am not friend with ESP-IDF, hence used Arduino. Each centimeter was around 1 point on the 0..50 scale.
@hernanvassallo9902
@hernanvassallo9902 Рік тому
You have to make another circuit?
@oliver1978
@oliver1978 Рік тому
@@hernanvassallo9902 yes, the circuit is different. I made a pcb for the rods and modified to have 12V supply and few other things.
@evanlane1690
@evanlane1690 2 роки тому
This was very helpful! Thank you.
@hernanvassallo9902
@hernanvassallo9902 Рік тому
Great experiment. I'd like to build a water level sensor with this principie.
@robertlongoria765
@robertlongoria765 3 роки тому
Thanks I have been looking for exactly this answer for weeks. Your description and guidance have made the reproduction of this process possible to me a person with somewhat limited tech skills. Thanks, I will be using the touch sensors for a + or - application. They will give me a binary signal describing a true or false condition; so the ardunio IDE will be just fine (I hope). Thanks for the knowledge, I respect your dedication to this project.
@richardangelo8344
@richardangelo8344 2 роки тому
you all probably dont care at all but does anybody know of a way to log back into an Instagram account?? I was dumb forgot my login password. I would appreciate any assistance you can give me!
@devincarl8120
@devincarl8120 2 роки тому
@Richard Angelo instablaster :)
@richardangelo8344
@richardangelo8344 2 роки тому
@Devin Carl i really appreciate your reply. I found the site through google and I'm in the hacking process atm. Seems to take a while so I will reply here later when my account password hopefully is recovered.
@richardangelo8344
@richardangelo8344 2 роки тому
@Devin Carl It did the trick and I finally got access to my account again. I'm so happy! Thank you so much you really help me out!
@devincarl8120
@devincarl8120 2 роки тому
@Richard Angelo you are welcome :D
@bhMaker963
@bhMaker963 3 роки тому
About arduino range and reading speed you have function touchSetCycles(range,sleep), you can play with values for different range and reading times...
@bhMaker963
@bhMaker963 3 роки тому
also for instability of arduino readings i think averaging readings example for 10 readings will improve stability a lot !
@str8upkickyaindanuts289
@str8upkickyaindanuts289 2 роки тому
@@bhMaker963 I found that reading multiple channels somehow makes the reading more stable, only reading the channels I used in the code caused random drops, reading more than needed fixed the issue. Discovered after chasing my tail with random glitches even with averaging, which created a time delay that was undesirable. I wrote a program to read all touch pins to test which were stable, to my amazement the glitches went away on the channels that were previously an issue. So now I just include extra touch sensor function calls until I get stable performance on the pins I'm actually using.
@ssrisunt
@ssrisunt 3 роки тому
Cool ... I will try it
@whiteking80
@whiteking80 Рік тому
Awesome demo! May I know what freq signal injected onto the copper pad?
@kris-.1439
@kris-.1439 Рік тому
Sorry, I don't know the answer. I used the Touch sensor function call of ESP-IDF. You can find more information here: docs.espressif.com/projects/esp-idf/en/latest/esp32/api-reference/peripherals/touch_pad.html
@mohammedhammouda2692
@mohammedhammouda2692 2 роки тому
Hello, Thank you for the video. I have a question, I have no background in using this type of application. I am trying to use this as an FDC1004 contactless sensor because I cant get an FDC1004 at the moment, I only have the ESP32, do you think this will work? Thank you again.
@clasperj
@clasperj Рік тому
Hi Kris, thanks for the detailed and amazing tutorial. Do you think the sensor will still work well in salted or mineral water? or "grey water". I would like to apply this design to monitor the water level of a water garden
@kris-.1439
@kris-.1439 Рік тому
Yes, I tested it and it seems working.
@mksmurff
@mksmurff 3 роки тому
What a great video thank you. I am looking at starting a project to measure two-stroke petrol mix in a plastic tank. So I won't be immersing the probe but sticking it to the outside. What're your thoughts on this? Furthermore, do you have any idea why the Arduino library doesn't work well? It's all I have ever used for my ESP32. Thanks
@kris-.1439
@kris-.1439 3 роки тому
If your plastic tank wall is not too thick, it should work. I saw some people using aluminum foil with a glass bottle and it works as well. The reasons that I'm not using Arduino IDE are 1. Reading resolution, Arduino IDE will report reading around 50 counts with my sensor not touching anything compare to ESP-IDF that would read around 700. Thus I will get more resolution in depth-sensing using ESP-IDF. 2. As shown in my video when I plotted Arduino readings, sometimes the reading suddenly becomes zero. I haven't played with Arduino IDE for quite some time, maybe their software gets updated and these issues have been fixed. Thanks for watching the video.
@mksmurff
@mksmurff 3 роки тому
@@kris-.1439 Thank you for the reply. My initial tests reveal the same as yours. Have you posted these findings anywhere?
@kris-.1439
@kris-.1439 3 роки тому
@@mksmurff Only in my video around 5:16 mentioned why I did not use Arduino IDE.
@hermannsonnleitner4645
@hermannsonnleitner4645 2 роки тому
To fix the problem with the measurement error (spikes) and also to get a higher resolution, simply call the function 'touch_pad_init ()' in the setup () routine.
@hermannsonnleitner4645
@hermannsonnleitner4645 2 роки тому
correction: the 'touch_pad_init()' function needs to be executed each time before reading the cap-value.
@kbouwman64
@kbouwman64 2 роки тому
I would like to use this to measure the water level in a 55-gallon drum. The sensing range would be nearly a meter tall. As I want to move this sensor from barrel to barrel, I was thinking to apply copper foil tape strips to an 18mm OD plastic pipe and covering that with heat shrink tubing. I would then 3D print an enclosure for the electronics at the top of the pipe. I would like the best resolution I can get but am ok with whatever that turns out to be. Do you have a recommendation for how wide the copper strips should be and what the gap between them should be? I get the relationship between wider and narrower but for a 1-meter long sensor...where would you start to best utilize the touch input? What resolution would you expect is possible? I know I could stack sensors (and will if I have to) but I would like to keep this as simple as possible.
@nichtverstehen2045
@nichtverstehen2045 8 місяців тому
just use two-wire isolated electric cable. no need to mess with laminating and soldering. hotglue or otherwise isolate wire ends and be done.
@drankenkorps
@drankenkorps Місяць тому
I wonder if that can work for other fluids.. probably is just individual kalibrering. Second question is how it will work if you have metal tankand glue it on a side?
@ProEvilPriest
@ProEvilPriest Рік тому
Great Video, i was wondering if it is possible to use the sensors with an RPI and without the ESP32 module. Do all the code in Python and connect the sensor to the GPIO Pins.
@BlondieSL
@BlondieSL Рік тому
This looks very interesting. I'm just now getting into ESP32 and I'm liking it a lot. I have a question, however, about the lamination thing. Have you found that after 2 years, the lamination stays waterproof? Or has water seeped in?
@kris-.1439
@kris-.1439 Рік тому
The laminated copper strip that I have in the box still look shinny. But I don't know what would happen if it is submerged in the water for 2 years.
@BlondieSL
@BlondieSL Рік тому
@@kris-.1439 If I go this route instead of using the computer ribbon cable method, I'll have to confirm that no water seeps into the laminate. Perhaps putting silicone along the edges will assure this. In my case, this is for my "humidifier" project. I need something stable to monitor and display the water level in a linear fashion. The HC-SR04 ultrasonic sensor, that I was using has failed... well, the sensor is ok, so the problem is in the wiring or the Arduino board itself. Long story. I hope to get this built shortly. Thanks for your video.
@skinkebuen
@skinkebuen 2 роки тому
Great project. I am looking for a way to measure level in a fuel tank. Do you think it is possible to replace the strips with a tube with a rod in senter? The tube will act as a capacitor. My plan is to immerse the tube into the tank. The tank is metal, and I can not use strips on the surface og tank to make the capacitor.
@AlienRelics
@AlienRelics 2 роки тому
Concentric tubes is precisely how I added level sensing to a gas tank. If it is a fluid that is not a conductor, no insulating layer is needed. This was back in the early '80s, I used a couple of 555 timers and an LM3914 wired to show continuous level rather than just 10 steps. The outer tube is the ground and shields it from outside interference and any parasitic capacitances from the tank or things outside a nonconductive tank. I have done the same with water based fluids, in those cases I coat the tube with epoxy or polyurethane. It is important there be no flaws to allow water through.
@chibimarukochan9462
@chibimarukochan9462 3 роки тому
Great I have a few questions. 1. Can you put the sensor outside the container. I.e. not submerged in the water and totally contactless to the water? 2. Can it sense the water decreasing? 3. Can it support 1 litre of water?
@kris-.1439
@kris-.1439 3 роки тому
You may want to check on this one .. ukposts.info/have/v-deo/e3SooaNnnoektas.html
@charlesrg
@charlesrg 3 роки тому
I put the strips on the outside to test and it works as well, ukposts.info/have/v-deo/mmiHbJeJnImboqc.html
@NeoBelerophon
@NeoBelerophon 3 роки тому
Very nice idea! Is there any reason why the IDF project is not longer available on github?
@kris-.1439
@kris-.1439 3 роки тому
Please check again. I forgot to make it public.
@nasserghouse9119
@nasserghouse9119 Рік тому
Hi..can you tell me where exactly is the IDF onboarding file, please? I get errors every time I try to run the program. It says the path is not found etc..
@Tom-ku8bu
@Tom-ku8bu 3 роки тому
Maybe could even use a double wire instead of those sensors as an capacitor? Just close the end with glue.
@user-xg4rm7fg1y
@user-xg4rm7fg1y 3 місяці тому
I want to ask- as depth increases, why capacitance is decreasing ? it should increase with depth right?
@charlesrg
@charlesrg 3 роки тому
I'm trying to understand what do you mean with dynamic ranges related to the width. I'm using wide strips and it's working well. over 1 inch width. What are your thoughs on width ?
@kris-.1439
@kris-.1439 3 роки тому
Basically it is the depth of water level that ESP32 can read until the touch read becomes saturated. For example the 1 inch width copper tapes will not decrease the touch read after the immersed into the water more than 10 cm, however the 0.5 inch copper tapes, you can immersed much deeper into the water until the ESP32 touch read becomes saturated.
@charlesrg
@charlesrg 3 роки тому
@@kris-.1439 interesting, I'm using almost 2 inches outside of the water and I've full readings. I guess I don't get saturation because I've a larger bag between water and the electrodes
@Damalycus
@Damalycus 2 роки тому
This is so cool. Never knew spreadsheets had this feature.
@Cyruscosmo
@Cyruscosmo 2 роки тому
Would it be possible to place the copper tape on the outside of an aquarium and have it function as a water level indicator?
@kris-.1439
@kris-.1439 2 роки тому
It is hard to say because there are so many factors such as the thickness of aquarium tank and the type of material of the aquarium wall. If wall too thick, ESP32 may not be able to detect the different in capacitive change.
@akiljoko6796
@akiljoko6796 Рік тому
hi kris,thank you for sharing amazing idea, but i have problem when build and flash the program, when im trying to flash it says "Variable ${config:idf.pythonBinPathWin} can not be resolved because setting 'idf.pythonBinPathWin' not found".what should i do?
@nasserghouse9119
@nasserghouse9119 Рік тому
Hi.. I have the same problem.. I see that you have commented three months ago.. could you tell me if you found a solution to the problem ?
@tomsaavedra6920
@tomsaavedra6920 2 роки тому
I flashed the code on my wroom dev module. The Cereal Potter does not start at 600-700 and go down when touching the sensor. Mine starts at 0 and goes up to around 6 when touching either sensor. Any idea what's causing this?
@tomsaavedra6920
@tomsaavedra6920 2 роки тому
I had to comment out the EnableScale in app_main
@deesimon1693
@deesimon1693 Рік тому
Can you use an arduino uno microcontroller instead of esp32 and achieve similar results?
@kris-.1439
@kris-.1439 Рік тому
I'm don't think UNO has touch read pins as ESP32.
@stefanvasilevski8724
@stefanvasilevski8724 Рік тому
Which language do you use to write the Serial monitor?Python, C++ or another?
@kris-.1439
@kris-.1439 Рік тому
C#
@robertlongoria765
@robertlongoria765 3 роки тому
Kris I have been thinking about this since I saw it last week. I have a question. Can I use this technique to measure the increasing width of a persons waistline? Can you see this sensor (the copper tape soldered to esp32 GPIOs) as a type of belt? How would it work? Would you put it against the skin?
@kris-.1439
@kris-.1439 3 роки тому
Robert, I have not experimented with this aspect, so I don't know. But one thing to know is that the sensor is very sensitive to moisture, so if the people are sweating, it probably will affect the result.
@robertlongoria765
@robertlongoria765 3 роки тому
@@kris-.1439 thanks for the tip!
@borgteknoloji
@borgteknoloji 2 роки тому
CerealPotter program gives zedgraph error. i am using 5.1.5 i have to use an old library.....
@kris-.1439
@kris-.1439 2 роки тому
I got the same error when using 5.1.5. You can just comment out line that gave you an error if you can't use ZedGraph 5.1.7. //this.zedGraphControl1.UseExtendedPrintDialog = true;
@mubasherazam8972
@mubasherazam8972 3 роки тому
The content of video and knowledge which have been shared, are awesome.I appreciate your efforts.I have few questions 1. Can this sensor be used in 5 feet deep water tank? 2. Will it work for dirty water, e.g lake water? 3. Will these sensor be corrosion over the period of time? 4. Are these sensor Arduino compatible because i have bought arduinos ? 5. Does temperature and humidity effect sensor reading ? 6. How long wire from sensor to board is recommended?
@kris-.1439
@kris-.1439 3 роки тому
Thanks very much for the comment. I will try to answer some of your question. When I discover this sensor it is quite new to me too, so I may not have answer for all of your questions. 1. You may try to use very small electrode area to expand the range but you will lose the resolution or you can use multi channels of touch read to achieve this. Let say you have 5 of water level sensors stack them up. 2. I did some experiment to see if the calibration stay the same with tap water, 5% salt water and 7% salt water. To my surprise the calibration doesn't seem to be changed at all. 3. This type of sensor is using capacitive not electro conductivity thus there will be no corrosion from electrolysis. But I don't know how long the will the laminate sheet last. 4. I'm using this sensor with ESP32 which is compatible with Arduino but as in my video the Arduino touch read has some bug. 5. I don't have an answer for this. But I left the sensor run couple days, the reading seem fluctuate little bit but not significant. 6. If you want to try very long wire you may need a wire with very good shield.
@mubasherazam8972
@mubasherazam8972 3 роки тому
@@kris-.1439 What if i use Crystal resin coating on almunium tape instead of lamination ?
@charlesrg
@charlesrg 3 роки тому
@@kris-.1439 you could just have taped the foil to the outside of the bottle ukposts.info/have/v-deo/mmiHbJeJnImboqc.html
@purplegirl6103
@purplegirl6103 2 роки тому
Hi, can you give code of arduino ide platform
@kris-.1439
@kris-.1439 2 роки тому
Sorry I don't have it.
@mohammedhammouda2692
@mohammedhammouda2692 2 роки тому
Asalamu Alykum, please check this ukposts.info/have/v-deo/mmiHbJeJnImboqc.html the code is in the description of the video. InshAllah it helps !
You’ve Never Seen A Race Like This 🚀
00:21
Red Bull
Переглядів 38 млн
Diy touch sensors
9:25
Esperienze elettroniche
Переглядів 31 тис.
Capacitive Liquid Level Sensing (1): Sensor Basics
32:53
Robert's Smorgasbord
Переглядів 4,7 тис.
Water level/fluid level capacitive sensor - How it works and how to make one
10:06
How The Capacitive Liquid Level Sensor Works
4:16
DFRobot
Переглядів 19 тис.
Wi-fi Soil Moisture Sensor with ESPHome
7:58
Tech Dregs
Переглядів 11 тис.
Revolutionize Your ESP32 Projects with Live GPIO Pin Monitoring!
8:08
The Last Outpost Workshop
Переглядів 137 тис.
WiFiManager - An Essential ESP32 library!
12:50
Brian Lough
Переглядів 29 тис.
What is a Level Sensor?
9:12
RealPars
Переглядів 490 тис.
How Capacitive Liquid Level Sensors Work: GILLSC.com
4:28
Gill Sensors & Controls
Переглядів 491 тис.
ЭТО САМЫЙ МОЩНЫЙ ИГРОВОЙ СМАРТФОН ЗА 270$ 🔥
13:33
Thebox - о технике и гаджетах
Переглядів 30 тис.
МОЙ ПЕРВЫЙ ТЕЛЕФОН - Sony Erricson T280i
18:02
ЗЕ МАККЕРС
Переглядів 53 тис.
Как установить Windows 10/11?
0:56
Construct PC
Переглядів 532 тис.
ИГРОВОЙ ПК c WILDBERRIES за 40 тысяч рублей
30:17
Ремонтяш
Переглядів 483 тис.