Random readings from ADS1256 chip on Waveshare High-Precision AD/DA Board

Hello Everyone!

I have been puzzled by the data readings from the ADC chip on the Waveshare board for a few days now - I am using the Waveshare AD/DA board with my raspberry pi, and currently using a combination of my own code with some help from the functions in the PiPyADC library (which can be found here: Link to PyPiADC. If you look under “pypiadc.py” it has all the functions to read from the ADC which I have been using).

The end goal of my project is to have my code reading 6 sensors connected on the ADC pins (2 differential and 4 single-ended inputs use all 8 pins), and I would this to be as fast as possible (currently got it reading every 5ms). I’ve been writing the data into a file. Currently, I only have one force sensor, and I was able to write that data into a file with no problems. Since then, I have set up the code to read the input of 5 other sensors (but, there aren’t any actually sensors connected on the board - they’re still coming) so when I write the output of all 6 configurations of pins into the file, I noticed that at completely random intervals the value of a certain pin would spike or dip quite a bit in value (I graphed all 6 lines of data; there is no pattern to this, it is completely random, and some channels seem to do it more than others). I’ve tried changing the data rate inside the ADC, changing the speed at which I was reading the ADC, using the value of the potentiometer (built in feature of the Waveshare board) as a channel, and moving the one sensor I have to a different set of pins but nothing seems to change that.

Does anyone have any idea why this could be happening? I’m wondering if it has something to do with the read function I am using from the PyPiADC library “read_sequence” , or could it just be happening because there are open pins with no sensors attached??

Any ideas would help as I’m very lost

Thanks so very much!!

Hi,

This behavior is normal and caused by leaving the ADC pins with no analog sensor attached, therefore, no voltage potential and thus the ADC input pins floating. These floating pins will act as mini antennas and pick up whatever random signals that they happen to pick up. These randoms signals will generate sporadic voltage on these pins, therefore, if you read them, it makes sense that you have sporadic ADC readings.

1 Like