How to log the water level in a well pipe

Moderators: grovkillen, Stuntteam, TD-er

Message
Author
ingoiot
Normal user
Posts: 79
Joined: 15 Aug 2019, 22:09

Re: How to log the water level in a well pipe

#51 Post by ingoiot » 25 Apr 2021, 13:16

what type of sensor is it?
i´ve never seen a pressuresensor with a resistor output.

TD-er
Core team member
Posts: 4672
Joined: 01 Sep 2017, 22:13
Location: the Netherlands
Contact:

Re: How to log the water level in a well pipe

#52 Post by TD-er » 25 Apr 2021, 13:32

As a rule of thumb, when using a capacitor for filtering is that you place the ones meant for higher frequencies as close as possible to where they are intended to filter the signal.

For example a capacitor meant to stabilize the power to a sensor (typical 100 nF) you place close to the sensor.
When used to stabilize power lines due to sudden changes in current you call them "decouple capacitors" as they allow for delivering short spikes in current without causing a (local) drop in voltage and also do not introduce noise on the power lines.
A typical power line does have a number of small capacitors (e.g. 100 nF) close to the consumers of power and only a few higher capacity caps which don't have critical requirements for placement. You often place them close to the power supply, but often it doesn't really matter as long as the traces to them do not limit the max. current they can deliver.

For noise filtering the same applies.
Small capacitors close to the sensing input and larger ones are less critical.
The exemption is that you should not place the larger ones far away (at the sensor, connected over a long wire) as the noise is likely to be picked up at this long wire.

Usually just a single 100 nF is enough for analog signals, but since your signal is likely to hardly change over a few days you can add some larger capacitors too to stabilize it even more.

chromo23
Normal user
Posts: 64
Joined: 10 Sep 2020, 16:02
Location: germany

Re: How to log the water level in a well pipe

#53 Post by chromo23 » 26 Apr 2021, 15:13

bastler11 wrote: 25 Apr 2021, 09:47 Here is the circuit. I don't know the resistance from the pressure sensor, but I think I could take the voltage divider 1:5 or 1:10. Than I'm sure that the voltage at the ESP ADC is max. 1V.
Jutst connect the sensor directly to 3,3v, ADC0 and ground. (never tried it myself but some people did this successfully)
You will not need any extra components.

bastler11
Normal user
Posts: 35
Joined: 11 Jan 2021, 21:58
Location: Luebeck

Re: How to log the water level in a well pipe

#54 Post by bastler11 » 26 Apr 2021, 16:22

Thanks, I will try it. Hope Amazon delivers soon😃.

bastler11
Normal user
Posts: 35
Joined: 11 Jan 2021, 21:58
Location: Luebeck

Re: How to log the water level in a well pipe

#55 Post by bastler11 » 03 May 2021, 12:26

Hello,

I got the sensor and made the first test, here are some pictures.

First I had to build an adapter between the copper pipe and the sensor. Then I assembled all. The copper pipe is 4,25m. The actual water level is 2,45m. The copper pipe should stay 1,8m in the water and the sensor output I got is 745mV. Then I started the pump from the new well. The level goes down and the output also to 638mV. To calibrate the system I will check the water level when the pump is running.

What I could see is that the value of the sensor output is fluctuating between 3-8mV. I hope if I add some capacities it would be less. Next step I will isolate and to fix the cable. The length to the esp is about 6m. I think I could use the analog input without any voltage divider. I the moment after the winter time the water level is at the maximum and during summer it would go down, so the output will also go down. Only if the water level goes down more than 4,25m I have to make the copper pipe longer. But this will see in the summer.

Best regards!
Attachments
0C9BA4D5-A16D-4A7E-BC2A-FBA7A686883F_1_201_a.jpeg
0C9BA4D5-A16D-4A7E-BC2A-FBA7A686883F_1_201_a.jpeg (1.95 MiB) Viewed 290 times
D5C3E714-BF16-42C5-B4D2-4717F50ED0FA_1_201_a.jpeg
D5C3E714-BF16-42C5-B4D2-4717F50ED0FA_1_201_a.jpeg (2.76 MiB) Viewed 290 times
D3CAEE11-63DB-4077-88C8-1332914DE1A4_1_201_a.jpeg
D3CAEE11-63DB-4077-88C8-1332914DE1A4_1_201_a.jpeg (1.9 MiB) Viewed 290 times
97D44E60-D146-45FA-960F-14A82C39AD48_1_201_a.jpeg
97D44E60-D146-45FA-960F-14A82C39AD48_1_201_a.jpeg (630.93 KiB) Viewed 290 times

TD-er
Core team member
Posts: 4672
Joined: 01 Sep 2017, 22:13
Location: the Netherlands
Contact:

Re: How to log the water level in a well pipe

#56 Post by TD-er » 03 May 2021, 12:51

Thanks for the update.
For such low voltage signals, it is best to have the wires carrying the signal as short as possible and maybe it also helps to twist the cables.
This twisting will help reducing the noise picked up along the line as the induced voltage will be negated a few cm further along the line.
Adding a capacitor may also help, but keep in mind that an empty capacitor will act as a "short circuit" when a voltage is applied.
So have a good look at the schematic to see if any part can be shorted to GND without issues.

bastler11
Normal user
Posts: 35
Joined: 11 Jan 2021, 21:58
Location: Luebeck

Re: How to log the water level in a well pipe

#57 Post by bastler11 » 03 May 2021, 13:18

I want to connect the sensor with a cat 6 cable and fix the esp is in the greenhouse.
May be there are two other possibilities:
1. I put the esp in a water resistant box directly near the sensor and take the 5V from the greenhouse?
2. I take an adc directly near the sensor in a small water resistant box and connect it with the esp in the greenhouse?

What do you think ?

One more thing: I extend the copper pipe to have more output voltage? This is only possible if I use the adc, because of the 1V limitations at the esp.

TD-er
Core team member
Posts: 4672
Joined: 01 Sep 2017, 22:13
Location: the Netherlands
Contact:

Re: How to log the water level in a well pipe

#58 Post by TD-er » 03 May 2021, 13:36

5V over a long wire is also not a good idea as the voltage will probably have a significant drop.
So if you place the ESP close to the sensor, you should use a higher voltage (e.g. 12V) and use a switching DC/DC converter to turn it into 5V for the ESP.

Regardless of how you make it, you must make sure there is no electrical connection between your setup and some circuit somewhere else.
So I guess it is best to use a single transformer/adapter to power this circuit and do not connect anything else or you may get strange currents flowing over longer distances.
This can cause some offset in the readings, or even worse, fry electronics.
You now have it connected to the water in your copper pipe, so it is as earth-grounded as can be. However "ground" does not have the same potential if you compare it to some other location. This may lead to unexpected currents and even may damage the copper pipe over time.

HomeJCL
Normal user
Posts: 81
Joined: 03 Feb 2018, 10:42

Re: How to log the water level in a well pipe

#59 Post by HomeJCL » 03 May 2021, 14:00

If I understand :

Pressure TX is at the end (upper end) of a pipe, immersed in the water.
The range of the TX = 30 psi = 21000mmWC (we forget the last digits)

Output = 0,5 - 4,5V for 21000 mmWC

Your reading 0,784V

First thing to check.
Does the TX have 0 at atmospheric pressure, if not you will need to correct your “zero”.
Zero Acc. Specs : 0 psi = 0,5V full scale 4,5V
So when reading 0,784V, in fact measure = 0,784-0,5 = 0,284mV so 0,284/(4,5-0,5) = 7,1% = 1491mm


Your install will need to be absolutely pressure/gas tight, or you reference will fluctuate and could “escape” form you pressurised leg above the water level in you leg (copper pipe)

We will forget about temperature influence on the air in your leg but could have funny impact on your measured value.
Belgium and land of ESP ... counting :D

User avatar
Ath
Normal user
Posts: 808
Joined: 10 Jun 2018, 12:06
Location: NL

Re: How to log the water level in a well pipe

#60 Post by Ath » 03 May 2021, 14:14

HomeJCL wrote: 03 May 2021, 14:00 We will forget about temperature influence on the air in your leg but could have funny impact on your measured value.
Most of the pipe is in a quite narrow pipe in the ground, and there the temperature is quite stable (changes only very slowly, and only for a rather small upper part, max. 50-100 cm, possibly even less if the cover is closed).
/Ton

HomeJCL
Normal user
Posts: 81
Joined: 03 Feb 2018, 10:42

Re: How to log the water level in a well pipe

#61 Post by HomeJCL » 03 May 2021, 15:25

Yes, but it is not water, but air in the upper part, that will be subject to temperature change.

Gas volume > change in pressure …
Belgium and land of ESP ... counting :D

bastler11
Normal user
Posts: 35
Joined: 11 Jan 2021, 21:58
Location: Luebeck

Re: How to log the water level in a well pipe

#62 Post by bastler11 » 03 May 2021, 15:55

The sensor could be set 20cm in the whole. The temperature difference I think is not so big. To check how big is the difference I could take a DS18B20. But I think 80cm in the earth the temperature will stay constant. So only the area between -80cm to -20cm will change the temperature and may be influence the pressure.

User avatar
Ath
Normal user
Posts: 808
Joined: 10 Jun 2018, 12:06
Location: NL

Re: How to log the water level in a well pipe

#63 Post by Ath » 03 May 2021, 16:00

HomeJCL wrote: 03 May 2021, 15:25 Yes, but it is not water, but air in the upper part, that will be subject to temperature change.

Gas volume > change in pressure …
Yes, but as the temperature change will be small en slow, it won't matter much, the jitter that he's already experiencing now is probably a bigger issue

You can always lower the entire pipe + sensor construction another 50 to 80 cm below the top of the outer pipe to rule out those temperature fluctuations
/Ton

bastler11
Normal user
Posts: 35
Joined: 11 Jan 2021, 21:58
Location: Luebeck

Re: How to log the water level in a well pipe

#64 Post by bastler11 » 03 May 2021, 16:03

@HomeJCL

It is right, the output signal is 0,5V with atmospheric pressure.

I tried to get a data sheet from the sensor, I got no information from the seller. Does anyone has mor technical information about the sensor?

Post Reply

Who is online

Users browsing this forum: No registered users and 15 guests