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

Asking for Help #2

Open
Bra1nsen opened this issue May 6, 2022 · 4 comments
Open

Asking for Help #2

Bra1nsen opened this issue May 6, 2022 · 4 comments

Comments

@Bra1nsen
Copy link

Bra1nsen commented May 6, 2022

Hey Iam a Beginner. And Iam looking for help. Maybe you can.

I would like to use the waveshare high precision adc hat with raspberry pi4.

I goal is measure voltage (screw terminal)

Solar Cell:
GND --> COM
V --> IN0

Now i want to save the measured values in choosable timestamps (for example 30s)

happy greetings
Paul

@AnnaKnapp
Copy link
Owner

AnnaKnapp commented May 7, 2022

Hi, I would recommend that you start by taking a look at the file "readADCdataAndSaveToFile.py" in the examples folder - most of the functionality you need will be in that file.

You will need to change a few things:

  • the pins used for communication with the pi - see the waveshare datasheet to know which to use.
  • The input pins on the ADC - see line 83 for an example of how to set these. They are set by changing the values sent to the INPMUX register.
  • Use pulse conversion instead of continuous like in the example. To set pulse conversion you need to set the MODE0 register to MODE0_RUNMODE_PULSE, and use the function read_Data_By_Command_CHK instead of read_Continuous_CHK (Documentation here: https://annaknapp.github.io/python_piadcs/piadcs.ads126x.html#piadcs.ads126x.ads126x.read_Data_By_Command_CHK)

A note about the waveshare ADS1263 hat - this hat has 2 flaws in my opinion that will prevent you from getting the most out of the ADC.

  • The hat design situates the ADC right above the Pi's CPU which will cause temperature gradients that will impact performance
  • There is no isolation between the ADC and the the Pi and the ADC just uses the Pi's power supply which is ok, but not the cleanest.
    Of course the waveshare hat will still work and is great for developing with this ADC but you will not get the highest possible resolution measurements.

@Bra1nsen
Copy link
Author

Thank you for the detailed words.

In principle, I just want a small program that records the global radiation in a table every 30 seconds. (volt meter)

image

What exactly do the numbers in brackets mean?

@Bra1nsen
Copy link
Author

Unfortunately, I don't quite see through it and would rather continue to work on algorithmics. You seem to have enough experience. Of course, I would transfer you something to Paypal for your effort.

@Bra1nsen
Copy link
Author

image

Thats my setup. The cpu gets cooled. <55*C

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