Hi @aherbjornsen with your setup using esp32, ina219 and TL-136 sensor do you see an drift in the TL-136 values based on ambient temperature?
I am using a TL-136 with an ESP8266 and analog current to voltage converter but the output voltage drifts with ambient temperature making the readings unusable.
@rybackisback I don’t really have much data with variable ambient temperature. I see from old graphs that I had it outdooors for a single day when the temperature varied between 14 and 28 degrees without seeing that reflect on my readings.
Sorry. Don’t have a diagram. I just used examples I found on the net.
It is extremely simple, you connect the INA219 to your ESP32, And then you you hook up the TL-136 to the other side of the INA219.
I used a 24V PSU to drive both the TL-136 and a USB-charger that powered the ESP32.
Did you connect ground from the ESP32 to the Vin+ or Vin- on the INA219 with or without a pull up resistor?
EDIT
Disregard the above. Grounding the ESP to the INA219 across Vin causes a short. I might need a pullup resistor across the SCA and SCL if needed. I’ll be testing the TL-136 in my water tank this weekend to see what I get for current measurements and water height. I shared my wiring diagram in a post below.
I am using a M5 Atom Lite which is an ESP32 Pico which is different than the ESP in the diagram above (I haven’t found a Atom Lite item for fritzing yet) but gives you the same idea on how to wire it.:
Hi @kimocal thanks for that. I managed to figure out the wiring myelf. So I changed my setup to now include ADS1115 (analog to digital converter) to combat the fluctuations of the sensor reading with temperature since my setup is setup outdoors in an ip67 enclosure. But I am still getting sensor readings drift with ambient temperature with no water being added or removed from the tank. Do you see that with an INA219 setup?
Thanks @kimocal. I will give this a shot. Once you have sufficient data could you please share your observation on any data drift with a INA219? Is your installation outdoors? Do you have a pull up resistor installed in your setup since INA 219 uses I2C bus?
This is how I wired it as well.
I used a 24V->5V USB buck converter for the ESP, that was powered from the 24V supply. That way I had common ground for both circuits.
Hi @kimocal thanks for posting the data trend. The data seems much more steady compared to the voltage readings that I take.
Does the change in current correspond with water going in and out of the tank and is not affected by any external factors? Are you happy with the accuracy of the readings with respect to the water level?
So far so good. I didn’t calibrate the sensor initially. As I am monitoring the water tank level with a yard stick I am also entering the current value in a spread sheet to better tune my current to water height formula. Maybe this weekend I’ll calibrate them with a wider spread of data points to tune it more. For now it’s working though.
The only external factor I can think of would be the air tube that the TL316 uses and making sure it doesn’t have wind blowing on it to affect the relative pressure compensation.
Definitely a few spikes there that I would assume are from condensation which appears to be the big issue with the sonic sensors.
This thread really seems to be about using pressure sensors. I see that people are adding additional voltage or current sensor hardware, one of the pressure sensors linked above looks to output RS485, curious why no one has gone that route? Looks like you’d need something like a MAX485 to read it in an ESP / Arduino device anyway, but feels like reading digital data might be easier?
So I connected up my INA219 breakout board to my throw in level sensor and I have noticed the fluctuation with temperature is almost non existent but the downside is with INA219 the accuracy is approx 2% (for me that’s ~100L) compared with the ADS1115 of 0.15%. Is there any way of increasing the accuracy of the INA219, replace the shunt resistor possibly?