-
Notifications
You must be signed in to change notification settings - Fork 58
Strange output #38
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Can you provide more details about what is actually connect to the ADC channels and how. I can not recreate this. I wired up an ADS1115 to Pi Zero W and setup a 10k trim pot to voltage divide VCC (3.3V) wired in to channel 0. Set the divider to be about ~0.5V and ran your sketch above. Here's the output: pi@pizerow:~ $ python3 ads_test.py
2642 0.495 | 3964 0.495 | 7927 0.495 | 15856 0.495 | 31710 0.495 | 32767 0.256
2642 0.495 | 3963 0.495 | 7928 0.496 | 15855 0.495 | 31710 0.495 | 32767 0.256
2642 0.495 | 3963 0.496 | 7927 0.495 | 15854 0.495 | 31707 0.495 | 32767 0.256
2642 0.495 | 3963 0.496 | 7927 0.496 | 15856 0.496 | 31708 0.495 | 32767 0.256
2642 0.495 | 3963 0.496 | 7928 0.496 | 15857 0.495 | 31709 0.495 | 32767 0.256
2642 0.496 | 3964 0.496 | 7928 0.496 | 15855 0.495 | 31710 0.496 | 32767 0.256
2643 0.496 | 3964 0.495 | 7927 0.495 | 15855 0.496 | 31709 0.495 | 32767 0.256
2643 0.496 | 3965 0.496 | 7927 0.495 | 15856 0.496 | 31710 0.495 | 32767 0.256 The raw values increase as expected with the last gain setting being saturated, which is also expected for ~0.5V input. The voltage values (except for the saturated case) are all about the same, since the voltage math takes into account the gain setting. |
I have a PH probe directly connected with BNC connector on channel 0 and nothing connected to channel 1
and connecting GND to it:
those seem more reliable but what's going on with that probe? |
Those do look more reasonable. Unknown what is happening but this sounds more like a hardware issue. You can try posting in the forums: |
what readings do you get if you execute the script on a channel with nothing connected? |
In that case I do seem to get odd results similar to yours: pi@pizerow:~ $ python3 ads_test.py
3119 0.590 | 4740 0.589 | 4516 0.285 | 8786 0.274 | 62 0.001 | 45 0.001
3111 0.597 | 4706 0.586 | 4566 0.284 | 8779 0.275 | 42 0.001 | 122 0.000
3164 0.584 | 4726 0.592 | 4528 0.282 | 8802 0.275 | 42 0.001 | 44 0.000
3103 0.591 | 4735 0.587 | 4529 0.285 | 8776 0.275 | 62 0.000 | 84 0.001
3160 0.589 | 4694 0.591 | 4560 0.282 | 8801 0.275 | 43 0.001 | 124 0.001
3180 0.586 | 4703 0.593 | 4547 0.281 | 8810 0.275 | 42 0.001 | 45 0.001
3099 0.595 | 4722 0.586 | 4532 0.285 | 8777 0.275 | 62 0.000 | 44 0.001 |
You are right. It's a hardware problem related to impedance. Thanks for your time |
I'm using Raspberry Pi 3B+ with Raspbian Stretch.
Using this code:
I get following readings:
from a probe which gives a few millivolts on channel0
and these:
on channel1 without anything connected.
Those readings don't seem to me congruent because the growing gain should give growing values. Or it shouldn't? I'm a little bit confused, can anybody help?
Thank you :-)
The text was updated successfully, but these errors were encountered: