Skip to content
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

I can not use it on my Rasp pi4 64bits with python3.11? what's the reason? #95

Open
augustine829 opened this issue Apr 23, 2024 · 12 comments

Comments

@augustine829
Copy link

Hi,
I am trying to run the libs, but I encounter the issue that it can not detect INA219 or the Likes issue. I am using the Rasp pi4 64bits with the python3.11 version. but in the other same environment, python3.9, it's working. what's the reason? differency?

@caternuson
Copy link
Contributor

This repo is for the ADS1015 and ADS1115 ADC's. Are you using either of those? You only mention the INA219, which is something different.

@augustine829
Copy link
Author

Sure, I am using the ADS 1X15 module for ADC checking. I can not detect it when I run my code.

@caternuson
Copy link
Contributor

If you run the basic example from this library:
https://github.com/adafruit/Adafruit_CircuitPython_ADS1x15/blob/main/examples/ads1x15_simpletest.py
what output are you seeing in the serial output?

@augustine829
Copy link
Author

The output from my terminal here:
raw v
16 0.002
16 0.002
16 0.002
16 0.002
16 0.002
16 0.002
16 0.002
16 0.002
16 0.002
16 0.002
16 0.002
16 0.002
16 0.002
16 0.002
16 0.002
16 0.002

@caternuson
Copy link
Contributor

It's working, so it looks like it's detecting the ADS? It's unclear what the issue is?

@augustine829
Copy link
Author

No, it can not initialize the ADS module, but I checked the voltage from the ADC pins with a multimeter.

@caternuson
Copy link
Contributor

It's not clear what "can not initialize" means. If there were issues initializing, some form of error message(s) would be expected.

Is the issue that the values are not changing in the output?

@augustine829
Copy link
Author

The output from my program is here:

sudo python3 SilverGuiTester.py
UicWorker: run - start fixtureAdcThread
ERROR: TF FAILURE! - Power Monitor INA219 0x40 Initialization Failed - fix TF
ERROR: HW FAILURE! - ADS1115 Not Supported - fix TF
ERROR: HW FAILURE! - RELAY Not Supported - fix TF
Enter User ID...
3..9 characters and press Enter
ERROR: TF FAILURE! - Power Monitor ADS1115 0x48 Initialization Failed - fix TF
Enter Board Serial #...
3..9 characters and press Enter
Select CPU Model...
ERROR: TF FAILURE! - Power Monitor ADS1115 0x49 0x49 0x4B Initialization Failed - fix TF
ERROR: TF FAILURE! - Power Monitor INA219 0x41 Initialization Failed - fix TF
Select CPU Board Revision...
Verify M5K CPU Board Alignment, RPI DACs in Fixture
Press Setup...
Verifying:
M5K CPU Board Alignment
RPI DACs
Display LVDS Interface
M5K CPU Board Alignment - OK
Error: Discrete ADS_48 Configuration Failed
Error: Discrete ADS_49 Configuration Failed
Error: Discrete ADS_4A Configuration Failed
Error: Discrete ADS_4B Configuration Failed
M5K UIC:UIC_READY: 9, adcReady=15, boardReady=0
ADC_4B Fail, ADC_4A Fail, ADC_49 Fail, ADC_48 Fail
Failed M5K Fixture Setup
ADC_4B Fail, ADC_4A Fail, ADC_49 Fail, ADC_48 Fail
Please fix Test Fixture!

@caternuson
Copy link
Contributor

Is the basic example from the library working as expected? Are the ADC values changing?

Trouble shoot with the library example. Make sure it works before moving to your code.

It looks like you are using the ADS1115 and not the ADS1015, so try this example:
https://github.com/adafruit/Adafruit_CircuitPython_ADS1x15/blob/main/examples/ads1x15_ads1115_simpletest.py

Change the channel being used as needed:

chan = AnalogIn(ads, ADS.P0)

@augustine829
Copy link
Author

ok, thanks. let me do it now.

@augustine829
Copy link
Author

I check my address 0x49 with channel-0, it outputs here:

raw v
275 0.034
276 0.034
276 0.034
276 0.034
275 0.034
273 0.034
278 0.035
279 0.035
269 0.034
274 0.034
276 0.035
273 0.034
269 0.034
276 0.034
276 0.034
275 0.035
265 0.034
277 0.035
276 0.034
273 0.035

@caternuson
Copy link
Contributor

Are you able to apply a varying voltage as well? To confirm the ADC is reading the changes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants