Thanks both for your replies and your advice !
Indeed, when I try to enter the physical pin number (21/20), the yaml file tells me that these pin numbers are not supported for the 8266 platform. However, I tried both GPIO4 & GPIO5 / D1 & D2, but unfortunately without any luck.
Unfortunately, I don’t have another I2C device to test with :-/
Please find enclosed the requested pictures. The pictures with the usb cable attached is the Wemos D1 mini, the little one is the INA219
Connections on INA219:
If I look at the picture of the INA sensor I would suggest to resolder the SCL and SDA pins. The soldering of these pins looks not so good, try to cover the whole puch hole with solder.
Resoldering the pins did the trick !!! you are hero’s !
[18:30:15][VV][scheduler:195]: Running interval 'update' with interval=10000 last_execution=17664 (now=27670)
[18:30:15][VV][i2c.arduino:126]: 0x40 TX 02
[18:30:15][VV][i2c.arduino:102]: 0x40 RX 07AA
[18:30:15][V][sensor:074]: 'INA219 Bus Voltage': Received new state 0.980000
[18:30:15][D][sensor:124]: 'INA219 Bus Voltage': Sending state 0.98000 V with 2 decimals of accuracy
[18:30:15][VV][i2c.arduino:126]: 0x40 TX 01
[18:30:15][VV][i2c.arduino:102]: 0x40 RX 0000
[18:30:15][V][sensor:074]: 'INA219 Shunt Voltage': Received new state 0.000000
[18:30:15][D][sensor:124]: 'INA219 Shunt Voltage': Sending state 0.00000 V with 5 decimals of accuracy
[18:30:15][VV][i2c.arduino:126]: 0x40 TX 04
[18:30:15][VV][i2c.arduino:102]: 0x40 RX 0000
[18:30:15][V][sensor:074]: 'INA219 Current': Received new state 0.000000
[18:30:15][VV][sensor.filter:014]: Filter(0x3fff1ecc)::input(0.000000)
[18:30:15][VV][sensor.filter:021]: Filter(0x3fff1ecc)::output(0.000000) -> SENSOR
[18:30:15][D][sensor:124]: 'INA219 Current': Sending state 0.00000 mA with 5 decimals of accuracy
[18:30:15][VV][i2c.arduino:126]: 0x40 TX 03
[18:30:15][VV][i2c.arduino:102]: 0x40 RX 0000
[18:30:15][V][sensor:074]: 'INA219 Power': Received new state 0.000000
[18:30:15][D][sensor:124]: 'INA219 Power': Sending state 0.00000 W with 5 decimals of accuracy
[18:30:15][V][component:199]: Component ina219.sensor took a long time for an operation (0.11 s).
[18:30:15][V][component:200]: Components should block for at most 20-30ms.
The only thing is, I wired my sensor using the scheme in this thread by @kimocal , but my voltages (see this log & Watts) are very low. I drowned it in a bucket of water and there is no movement of the values.
My sensor is powerd by 12V only, is this enough or should be 24V ?
Could this be the reason ? Or is the bucket no reference ?
I have both current and voltage versions and see drift.
However, my understanding is that the ‘drift’ comes from atmospheric pressure changes. I’m moving towards detecting the level using a TOF sensor rather than pressure, for that reason.
that ‘some HA user’ is me
I have two of these:
One is in my pond and has been rock solid so far.
One is in my rain water citern and has started drifting now and for the life of my I can’t figure out why
I don’t think it’s atmospheric pressure changes as the pressure sensor includes a red air tube that is connected to the outside air so that it takes in the atmospheric pressure.
i even kept the red air tube outside or even in ip68 box no luck it drift lot my water tank is outdoor .
i can across these two youtube videos recently using single shelly uni and less wiring try this if you have shelly uni
Thanks! Doing fine indeed
I had a look at your videos. It appears that they are using the voltage based version of the pressure sensor.
That didn’t work in my case as I am using wires that are ± 20 meters long. This would cause a significant voltage drop. Therefore I resorted to using the current based pressure sensor which does not suffer from a voltage drop.
No the same amount of wires.
The difference is that the voltage version will change the voltage based on how much pressure there is while the current version will change the current based on how much pressure there is.
One benefit of 4-20 over 0-10 is that cable length is less of a factor with 4-20.
The other thing to bear in mind is that with a pressure sensor you may need to take changes in atmospheric pressure into account, depending on the accuracy you require.
Thanks mate, im not 100% across what this means, but I guess ill google it
I’ll place the ESP32 nearby (but possible i’ll run the cable up the tank, then down into the water). Its a fairly hefty tank, 115,000L I think. 4-20ma might be a better option if i needed to extend the cable and place all electronics at the base of the tank outside wall.
As per what Ash said, 4-20mA is definitely better. That’s why it’s the industry standard for industrial instrumentation.
Just have a look at the example in the link I provided above, it’s super easy.
A sensor like this provides the atmospheric compensation tube, just be sure not to kink or block it. Also, choose a sensing range as close as possible to your requirement. ie: don’t use a 5m depth range if your tank is only 2m deep, however ensure it’s not too small a range either.