Greetings,
I've been working on a pool automation project since the pandemic started!!!
Measuring pressure has been a tough nut to crack...
After ordering a new set of cheap pressure transducers (10 and 80psi), things seemed to finally settle and I was getting the proper readings.
I'm working with an Arduino Mega, using the default internal reference. All 4 sensors, 2 each 10 and 80psi are supplied by the onboard 5V, which operates at 4.995V, very steady... Consumption of each of them is in the single mA...
At 5V, the sensors go from 0psi at 0.5V to MAXpsi at 4.5V... that's basically 102 to 921/1024...
After powering up and letting the system stabilize, all sensors (32 reading avg) read about 90/1024...
This lasted for about two days. Then they all started drifting up in unison, to about 100, and two days later drifted down to about 70... All of them!
Initially I thought "cheap sensors", but then I figured they can't ALL drift by exactly the same amount... then I thought it's temperature sensitivity... Then I thought it's atmospheric pressure (just entered a period of heavy rains)...
Then I replaced one of the sensors with a 1k potentiometer and set it to 100ohms (10%, equivalent to 0psi). Lo and behold, the arduino returned the exact same drifted offset of 70 instead of showing 102! From that I concluded that the sensors are stable and the ADC/ARef drifted...
So I added analog reference(EXTERNAL) in setup() and a wire straight from the sensor board 5V to AREF... I'm back to reading 90. It should be 102...
I had monitored the 5V the entire time. It didn't drift more than 10mV.
Grounds are set in Star layout... BUT, I noticed that when I connect the ethernet cable, all outputs drift up a bit as well. The unit will always be connected to the local network, so I'm not too worried about that, but it is an indication that there are some ground loops involved...
Questions:
1- is it normal for the internal ARef to drift, when the regulated 5V stays stable?
2- will using external fix this problem or does the ADC itself drift?
3- if 2 is correct, should I go with an external I2C based multiplexed delta-sigma ADC, like the MCP34xx?
Cheers!