Water pressure sensor and arduino

Thread Starter

Guytas

Joined Apr 29, 2021
32
Ho wow, you guys give me hope and I thank you all for this help.
oK, Before reading your last posts, I have already removed the connectors from the sensor to the arduino and solder these three wires. I also changed pin to use A5 instead of A0 (just in case). and same problem again. Then reconnecting my jumper stop the problem again.

I also discarded the possibility of noise from the power supply because I already tried on 9v battery and the problem was exactly the same.

I like the "k1ng 1337" point number 2. I think I'll try this first, and then proceed further if required.

Simply put a 0 to 10 PSI becomes 0.5 to 4.5 volt signal.
I see that you've played with type of sensor too.... I'll have more questions for you once I get this problem solved. I really need stable reading first.
 

dendad

Joined Feb 20, 2016
4,496
When reading analog inputs on an Arduino, I usually read until two readings are the same. Also, the real tank pressure will not change fast, so if you get a reading that is +/- a certain value from the last one, just drop it.
There are quite a few ways to filter out the erroneous readings.
But, getting to the bottom of the problem is a worthwhile aim.
 

Thread Starter

Guytas

Joined Apr 29, 2021
32
When reading analog inputs on an Arduino, I usually read until two readings are the same. Also, the real tank pressure will not change fast, so if you get a reading that is +/- a certain value from the last one, just drop it.
There are quite a few ways to filter out the erroneous readings.
But, getting to the bottom of the problem is a worthwhile aim.
Yes I do too. I take 300 readings, discard the ones that are too much off, and take the average. But if I can get rid of the errors first, then it would be better. Also, since I put the sensor too close to the pump, the pressure varies a lot when the pump starts. Which is fine. That way I can report when the pump is running and not. ;-)
add a series 10K resistor between the sensor out and A0, then a capacitor 100nF from A0 to GND
Tonight, I did this but without the resistor (as per "k1ng 1337" point number 2 suggested) and so far so good. I'll let it run all night and see tomorrow if it is ok...
 
Last edited:

Thread Starter

Guytas

Joined Apr 29, 2021
32
OK, after one full day, I didn't have any error reading the sensor. Thank you all for your help. I'm extremely graceful to all of you.

what did the trick is the capacitor (no resistor) from the data line to gnd.

Now that I finally fixed this issue, I can rely on the reading. But I would like to understand something else..
I've started a new post:
pressure sensor question
 
Top