Support Forum

Share your projects and post your questions

Register   or   Sign In
The Forum

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

DDH69 Avatar

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.

25/06/2019

Posted by:
andrew

andrew Avatar

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.

forum image

25/06/2019

Posted by:
DDH69

DDH69 Avatar

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

25/06/2019

Posted by:
andrew

andrew Avatar

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

DDH69 Avatar

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

andrew Avatar

i2cdetect should return a result like in the image below, assuming that the ADC Pi is the only device plugged into the GPIO header.

forum image

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

DDH69 Avatar

forum image

It took me a moment, but here is the output of i2cdetect

25/06/2019

Posted by:
DDH69

DDH69 Avatar

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

DDH69 Avatar

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.

26/06/2019

Posted by:
andrew

andrew Avatar

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?

26/06/2019

Posted by:
DDH69

DDH69 Avatar

Damn - rebuild from scrach it is then! I will report back ....... probably tomorrow by the time I redownload, image, etc.

Thank you.

27/06/2019

Posted by:
DDH69

DDH69 Avatar

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 :-)

18/07/2019

Posted by:
Openair

Openair Avatar

Do you have an electrical circuit for this board?

18/07/2019

Posted by:
andrew

andrew Avatar

You can find the circuit schematic at schematic-adc-pi.pdf

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.

Home

Shop

Learn

Forum

FAQ

Contact

0 item

Your cart is empty

Please browse our shop to order from the wide range of Raspberry Pi boards and accessories.

Subtotal:£0.00
View Basket Continue to Checkout