I have an issue with I2C detection of my sensors. I have several of these sensors (from Atlas scientific) measuring pH,EC,temp,CO2 etc… I have them connected on the same I2C bus on Raspberry pi 400 and powered from 3.3V ( measured current draw about 250mA).
I have experienced some issues with stability (sometimes the readings went 0 and I had to disconnect/reconnect VCC for them to restart) and wondered if it might be an issue with somewhat high current draw and a bit of messy wiring. So I disconnected them all but when I started to reconnect them I could not manage to detect them, either via Mycodo or i2cdetect on my terminal. I have tried:
a) Checking continuity of all of the connected wires and correct position.
b) Connecting a single sensor (Atlas pH) and it was not found. It was working fine on Arduino.
c) Reinstalling both raspberrypi OS (32bit) and Mycodo.
The strange thing is that when I go to system properities in Mycodo (which takes a very long time, about 5mins) it does not show anything on I2C bus 1, but a lot of devices on buses 20,21 but there is only 1 device connected (Atlas pH), nothing else (screenshot attached). I have no clue why this is happening, I am quite new to all this so I hope it is a simple mistake.
I am more then welcome for any suggestions on how to fix this.
Is the device in I2C mode?
Yes they are. When I tested the pH circuit I ran it on Arduino using the Atlas Scientific I2C code. Then I reconnected it to my Raspberrypi and it could not find it.
Also the circuit has the blue LED on and when connected to arduino it blinks green when taking a measurment, but when connected to pi running Mycodo (sampling rate 10s) the LED does not blink green only glows blue.
And is it still detected and measurements are acquired on an Arduino?
This is not normal. This occurs with a fresh install of the OS and no devices connected?
Edit: Actually, this may be normal. A scan time that takes more than a second or two is not, though.
The device works properly on Arduino, measurements are taken and everything seems normal.
Yes the devices on bus 20,21 appeared after a fresh install of both OS and Mycodo. They might have been there before the reinstall because I have noticed a lag when trying to open “System information” in Mycodo, it took about 15 min to open and then timed out. After that I tried the reinstall. Now it takes about 5mins to open and there are these buses 20,21 full of devices.
It sounds like you have an OS or hardware issue. There should not be corrupted I2C buses like that and it should not take more than a fraction of a second to scan an I2C bus.
OK thanks, I don’t know what more to do about the software, but I am thinking about trying a different pi.
The strange thing about the scanning is that if I use the i2cdetect -y 1, it takes a long time and it does scan each adress one by one, but when I try i2cdetect -y 20 or 21 it takes a fraction of a second and the devices appear instantly. It’s very strange.
Then what’s slowing down the loading of the page is a different command being used to acquire data for the page. It can also be any of the buses between 1 and 20 that causes the delay.
I got a new raspberry pi 400 and it is working now. But the buses 20 and 21 are still there full of devices.
I do have some other issues but they are separate issues and I will post them as new questions.
Thanks for the support.