First use of ADCPi and can not get a reading
The ADC Pi is an Analogue to Digital converter for the Raspberry Pi
25/06/2019
Posted by:
DDH69
I am a first time user of the ADCPi connected to a Pi Zero WH. I think I've followed all of the correct instructions but find that I am getting readings of 0.0V from all 8 inputs.
Around the house I've got about 10 Pi's running a variety of things and have written Python scripts for a house alarm and a watering system, so reasonably familiar with Pi's. This is my first use of the ADCPi which I plan to use for analogue temperature reads. (I've got 3) I haven't got that sophisticated yet, just trying to read any analogue voltage at present.
This is what I've done:
Installed the github software as per ADC Pi Instructions
Enabled the SPI interface as per ABE link
Enabled I2C interface
Installed
Using the default addresses - configuration #1
For testing, placed a 10K variable pot from 0v to 3V3 with the wiper going to input #1 (also tried #2 and #5)
Run the demo program, runs without error, but 0.0 read
Wriiten a simple Python script but still get 0.0v read
I think that's a fair summary of where I am (other than frustrated :-) ). Any suggestions are most welcome.
Around the house I've got about 10 Pi's running a variety of things and have written Python scripts for a house alarm and a watering system, so reasonably familiar with Pi's. This is my first use of the ADCPi which I plan to use for analogue temperature reads. (I've got 3) I haven't got that sophisticated yet, just trying to read any analogue voltage at present.
This is what I've done:
Installed the github software as per ADC Pi Instructions
Enabled the SPI interface as per ABE link
Enabled I2C interface
Installed
Using the default addresses - configuration #1
For testing, placed a 10K variable pot from 0v to 3V3 with the wiper going to input #1 (also tried #2 and #5)
Run the demo program, runs without error, but 0.0 read
Wriiten a simple Python script but still get 0.0v read
I think that's a fair summary of where I am (other than frustrated :-) ). Any suggestions are most welcome.
25/06/2019
Posted by:
andrew
Try connecting a wire directly between the 3.3V on the GPIO header and the channel 1 input as shown in the image below. You should get a reading of 3.3V. Make sure you don't connect the 3.3V to the ground pin next to the input as that could damage the Raspberry Pi.
25/06/2019
Posted by:
DDH69
Thanks for the reply.
I have now made the connection. Using both my program (intialise, read) and the demo_adcread.py I get the return 0.0
I have now made the connection. Using both my program (intialise, read) and the demo_adcread.py I get the return 0.0
25/06/2019
Posted by:
andrew
If you run the command "sudo i2cdetect -y 1" does the ADC Pi appear on the I2C bus on addresses 0x68 and 0x69?
25/06/2019
Posted by:
DDH69
I have run this (and just ran it again). I am unsure what the correct result is. I get a grid of hexademinal results from 0x03 to 0x77. Each position on the grid has the respective hexidecimal result, ie colum 1, row 70 has 71, etc.
25/06/2019
Posted by:
andrew
i2cdetect should return a result like in the image below, assuming that the ADC Pi is the only device plugged into the GPIO header.
If your Raspberry Pi is showing numbers on all of the columns then there is probably a problem with the configuration of the I2C bus, in which case I would suggest going through all of the steps in our I2C tutorial again to make sure everything is configured correctly.
Also, try running the i2cdetect command without anything plugged into the I2C bus and with a different ADC Pi connected to see if you get any different results.
If your Raspberry Pi is showing numbers on all of the columns then there is probably a problem with the configuration of the I2C bus, in which case I would suggest going through all of the steps in our I2C tutorial again to make sure everything is configured correctly.
Also, try running the i2cdetect command without anything plugged into the I2C bus and with a different ADC Pi connected to see if you get any different results.
25/06/2019
Posted by:
DDH69
It took me a moment, but here is the output of i2cdetect
25/06/2019
Posted by:
DDH69
Sorry, posts "crossed in the mail". I will follow-up on your suggestions (prehaps tomorrow here in Oz) and report back - thank you again.
26/06/2019
Posted by:
DDH69
OK, back at it again tonight.
I have:
Removed the ADCPi - still reporting all addresses
Openned another brand new Pi Zero WH, swapped over the SD card (I didn't really want to do another Raspbian load from scratch - yet, the current one has been built over the last few days) - still reporting all addresses
Went through the steps in the Raspberry Pi I2C tutorial again, very carefully, and twice - still reporting all addresses
Any further thoughts are most welcome as I'm struggling.
I have:
Removed the ADCPi - still reporting all addresses
Openned another brand new Pi Zero WH, swapped over the SD card (I didn't really want to do another Raspbian load from scratch - yet, the current one has been built over the last few days) - still reporting all addresses
Went through the steps in the Raspberry Pi I2C tutorial again, very carefully, and twice - still reporting all addresses
Any further thoughts are most welcome as I'm struggling.
26/06/2019
Posted by:
andrew
As the I2C bus is showing all addresses on two different Raspberry Pis without anything connected my best guess would be that the Raspbian image is corrupted in some way.
Do you have a spare SD card you could use to set up a new version of Raspbian Linux?
Do you have a spare SD card you could use to set up a new version of Raspbian Linux?
26/06/2019
Posted by:
DDH69
Damn - rebuild from scrach it is then! I will report back ....... probably tomorrow by the time I redownload, image, etc.
Thank you.
Thank you.
27/06/2019
Posted by:
DDH69
So, definately something in the image. Built a new setup from scratch, now working perfectly.
Thank you for your help. Now its time to finish the new image and get back to coding :-)
Thank you for your help. Now its time to finish the new image and get back to coding :-)
18/07/2019
Posted by:
Openair
Do you have an electrical circuit for this board?
18/07/2019
Posted by:
andrew
You can find the circuit schematic at schematic-adc-pi.pdf
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.