GPIO Plug in Analog input module not communicating via i2c

Hello,
I am trying to setup a HW-660 analog input module that plugs into the GPIO pins. It is designed to communicate via i2c with a raspberry pi and plugs right onto the GPIO pins.

I’ve verified with a meter that i have a good 4-20 ma signal going to channel 0 of the board.

this is the output of i2cdetect

[code]ubuntu@aml-s905x-cc:~/analogio$ i2cdetect -l

i2c-0 i2c Meson I2C adapter I2C adapter
i2c-1 i2c DesignWare HDMI I2C adapter
i2c-2 i2c Meson I2C adapter I2C adapter
[/code]
i can see the address i have selected on i2c-2
to get to that point i had to add it via

 sudo ldto enable i2c-ao

and device 48 shows up (default address of device)

i tried adding an overlay (probably incorrectly)

 sudo ldto enable i2c-ao-ds3231

i did that before/after i enable i2c-ao
before I add it, there is no adapter 2 and no 48 address registered on 0 or 1.
after regular ao is added nothing changes.

This is the results of i2cdump

ubuntu@aml-s905x-cc:~/analogio$ i2cdump -y 2 0x48
No size specified (using byte-data access)
     0  1  2  3  4  5  6  7  8  9  a  b  c  d  e  f    0123456789abcdef
00: 00 85 80 7f 00 00 03 00 XX XX XX XX XX XX XX XX    .???..?.XXXXXXXX
10: XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX    XXXXXXXXXXXXXXXX
20: XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX    XXXXXXXXXXXXXXXX
30: XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX    XXXXXXXXXXXXXXXX
40: XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX    XXXXXXXXXXXXXXXX
50: XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX    XXXXXXXXXXXXXXXX
60: XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX    XXXXXXXXXXXXXXXX
70: XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX    XXXXXXXXXXXXXXXX
80: XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX    XXXXXXXXXXXXXXXX
90: XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX    XXXXXXXXXXXXXXXX
a0: XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX    XXXXXXXXXXXXXXXX
b0: XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX    XXXXXXXXXXXXXXXX
c0: XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX    XXXXXXXXXXXXXXXX
d0: XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX    XXXXXXXXXXXXXXXX
e0: XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX    XXXXXXXXXXXXXXXX
f0: XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX    XXXXXXXXXXXXXXXX

the values on the first line do not change based on analog input, or whether the power to device (feeding A0) is on or off.
it is a 16 bit adc and has 4 channels so the first 2 numbers should correspond to the ma reading

Any help would be appreciated . Thank you

Do you have a picture of how it is hooked up?

Don’t enable the random overlay that does not match your hardware as the driver will probe on the bus.

PI ADC Converter

Sorry about the delay. That’s the card. it plugs onto the whole gpio

Reset your overlays and reboot. Then only apply that one overlay for the I2C you want. Then run i2cdump and provide the output. You are on our Ubuntu images?

Yes, I’m on the ubunutu image.

Here is the output with only i2c-ao overlay active:

ubuntu@aml-s905x-cc:~$ ldto status
#Overlays active:
i2c-ao
ubuntu@aml-s905x-cc:~$ i2cdetect -l
i2c-0	i2c       	Meson I2C adapter               	I2C adapter
i2c-1	i2c       	DesignWare HDMI                 	I2C adapter
i2c-2	i2c       	Meson I2C adapter               	I2C adapter

ubuntu@aml-s905x-cc:~$ i2cdump -y 2 0x48
No size specified (using byte-data access)
     0  1  2  3  4  5  6  7  8  9  a  b  c  d  e  f    0123456789abcdef
00: 00 85 80 7f 00 00 03 00 XX XX XX XX XX XX XX XX    .???..?.XXXXXXXX
10: XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX    XXXXXXXXXXXXXXXX
20: XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX    XXXXXXXXXXXXXXXX
30: XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX    XXXXXXXXXXXXXXXX
40: XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX    XXXXXXXXXXXXXXXX
50: XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX    XXXXXXXXXXXXXXXX
60: XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX    XXXXXXXXXXXXXXXX
70: XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX    XXXXXXXXXXXXXXXX
80: XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX    XXXXXXXXXXXXXXXX
90: XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX    XXXXXXXXXXXXXXXX
a0: XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX    XXXXXXXXXXXXXXXX
b0: XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX    XXXXXXXXXXXXXXXX
c0: XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX    XXXXXXXXXXXXXXXX
d0: XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX    XXXXXXXXXXXXXXXX
e0: XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX    XXXXXXXXXXXXXXXX
f0: XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX    XXXXXXXXXXXXXXXX

no change in the first 2 bytes, with or without power to the sensor and applying pressure. mA reading still looks good from sensor

Here is the output of the i2cdetect for the other channels

ubuntu@aml-s905x-cc:~$ i2cdetect -y 0
     0  1  2  3  4  5  6  7  8  9  a  b  c  d  e  f
00:                         -- -- -- -- -- -- -- -- 
10: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
20: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
30: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
40: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
50: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
60: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
70: -- -- -- -- -- -- -- --                         
ubuntu@aml-s905x-cc:~$ i2cdetect -y 1
     0  1  2  3  4  5  6  7  8  9  a  b  c  d  e  f
00:                         -- -- -- -- -- -- -- -- 
10: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
20: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
30: 30 -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
40: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
50: 50 -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
60: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
70: -- -- -- -- -- -- -- --                         
ubuntu@aml-s905x-cc:~$ i2cdetect -y 2
     0  1  2  3  4  5  6  7  8  9  a  b  c  d  e  f
00:                         -- -- -- -- -- -- -- -- 
10: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
20: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
30: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
40: -- -- -- -- -- -- -- -- 48 -- -- -- -- -- -- -- 
50: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
60: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
70: -- -- -- -- -- -- -- --                         

Have you tried the HAT on a Pi? The HAT could be defective. The dump looks right.

No PI to try, going to try switching channels. Will let you know if I see any changes. Thanks for your help

Found the issue. A i2cdump will never work with this card as there is a MCR you need to trigger via Adafruit_ADS1x15 program (Installed with pip for me) to read each channel.
The regular ldto i2c-ao overlay is what worked.

Also had to change one of the downloaded files because it was looking for a PI and checking channel 0 or 1. That was in the site packages Adafruit_GPIO/I2C.py

the platform returned is 0 so i just changed

raise RuntimeError('Could not determine default I2C bus for platform.')
and added a return 2 before that line. (2 is the channel that the board is registered on)