Support Forum

Share your projects and post your questions

Register   or   Sign In
The Forum

ADC Pi stopped working (IOError)

5232 Views - Created 12/10/2015

12/10/2015

Posted by:
Krystian

Krystian Avatar

Me and my group are using the ADC Pi board for a group project in University. We're basically using the board to read battery voltage levels with the Raspberry Pi. We installed all the libraries needed and got were successful in reading and logging the voltage. I doubt this is relevant but I will add that we are using Apache and PHP to read the voltage log file and display it on a PHP website. (Local for now)
Everything was working fine till a couple of days later we try to read the voltage again and an error appeared. There were no changes made whatsoever to the Pi, any software or hardware in the meantime when it stopped working. Below is the error pops up:
Here is a picture of the error that is getting throwed up whenever we try to run demo-readvoltage.py or demo-logvoltage.py. For the sake of clarity I will copy the error code.

Traceback (most recent call last):
File "demo-readvoltage.py", line 28, in <module>
adc = ADCPi (bus, 0x68, 0x69, 12)
File "/home/pi/ADCPiABElectronics_Python_Libraries/ADCPi/ABE_ADCPi.py", line
106, in __init__
self.set_bit_rate(rate)
File "/home/pi/ADCPiABElectronics_Python_Libraries/ADCPi/ABE_ADCPi.py", line
262, in set_bit_rate
self._bus.write_byte(self.__address2, self.__config2)
IOError: [Errno 5] Input/output error


We have also noticed that when "i2cdetect -y 1" is called only the 0x68 address of the board is displayed, but the 0x69 address is absent. Below is a picture of our i2cdetect:

Any help with this issue would be extremely appreciated as the project is nearing its due date and this error just appeared suddenly out of the blue, which could possible jeopardize the whole project for us.

12/10/2015

Posted by:
andrew

andrew Avatar

Location:
United Kingdom

andrew Twitter  andrew Website  

From what you have described and the error message it looks like one of the ADC chips has stopped responding to the i2c commands. The most common cause for this is an over-voltage spike on one of the inputs which damage the ADC chip.

I have sent you a private message via the forum regarding the problem.

21/06/2017

Posted by:
dreshmaker

dreshmaker Avatar

He there,i tried to setup a Rasberry PI with the ADC Pi and i got the same error.But when i check the "i2cdetect -y 1" its called both address. my setup is is very rudimentary. i just pluged the ADC Pi on the Raspberry Pi without a real analog signal. so the over voltage case is not applicable?hope someone can help me

21/06/2017

Posted by:
andrew

andrew Avatar

Location:
United Kingdom

andrew Twitter  andrew Website  

Hi

If the ADCs are showing up on I2C detect then it could be a software issue causing the problem. Can you try going through all of the steps on our I2C tutorial to make sure all of the necessary libraries are installed?

22/06/2017

Posted by:
dreshmaker

dreshmaker Avatar

Hey Andrew, thanks for the fast reply.i followed the steps on your tutorial and i forgot the dist-upgrade and in the file "/boot//config.txt" i added the line "dtparam=i2c1=on". but i wondered about that the line "dtparam=i2c_arm=on" already existed.i treid it again and now i get another error message:python demo-readvoltage.pyTraceback (most recent call last): File "demo-readvoltage.py", line 28, in <module> adc = ADCPi(bus, 0x68, 0x69, 12) File "/home/pi/ABElectronics_Python_Libraries/ADCPi/ABE_ADCPi.py", line 106, in __init__ self.set_bit_rate(rate) File "/home/pi/ABElectronics_Python_Libraries/ADCPi/ABE_ADCPi.py", line 261, in set_bit_rate self._bus.write_byte(self.__address, self.__config1)IOError: [Errno 121] Remote I/O error

22/06/2017

Posted by:
andrew

andrew Avatar

Location:
United Kingdom

andrew Twitter  andrew Website  

When you run "i2cdetect -y 1" is it coming up with 0x68 and 0x69?

IOError: [Errno 121] Remote I/O error means that it is having problems talking to the ADC chips so could you try changing the line in the demo-readvoltage.py script from

adc = ADCPi(bus, 0x68, 0x69, 12)

to

adc = ADCPi(bus, 0x68, 0x68, 12) and then try adc = ADCPi(bus, 0x69, 0x69, 12)

This will try running the script on a single ADC so we can check if it is one of the ADCs that is at fault.

If it still shows the same error on both ADCs then that could either mean both chips are not working or there is a problem with Linux that is stopping it from connecting to the I2C bus correctly. Do you have a spare SD card you could use to set up a clean install of Raspbian Linux just to make sure it isn't a problem with your current Raspbian install?

It may be worth checking the solder joints on the ADC Pi's GPIO header and the address select header to make sure that there are no dry joints or solder bridges.

22/06/2017

Posted by:
dreshmaker

dreshmaker Avatar

Man im stupid, i checked the the script adressing only one chip, same error, then the next chip.. error. Then i checked i2cdetect again and i´ve seen the default adress 0x6d and 0x6f... :D everthing is working fine. thanks a lot for your fast support!!!cheers, Jan

Sign in to post your reply

Note: documents in Portable Document Format (PDF) require Adobe Acrobat Reader 5.0 or higher to view, download Adobe Acrobat Reader or other PDF reading software for your computer or mobile device.