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

PGA (Programmable Gain Amplifier) is confusing to many #6

Open
tomjoro opened this issue Apr 10, 2022 · 0 comments
Open

PGA (Programmable Gain Amplifier) is confusing to many #6

tomjoro opened this issue Apr 10, 2022 · 0 comments

Comments

@tomjoro
Copy link
Collaborator

tomjoro commented Apr 10, 2022

The PGA is confusing a lot of folks. Maybe we could update the readme to explain it a little more clearly.

Firstly, the range of the number never changes for the chip, i.e 12bits in 2's complement. The gain number changes the actual voltage range that is "zoomed" in.

For example if the gain is at 2048, then +-2.048 is the maximum voltage that can be measured. Anything beyond that will be clipped according to the specification. The actual 12 bit range covers that voltage range so that the maximum positive 12bit number is 2.048 volts.

So, if you want to measure 5V then you have to set the PGA to 6144.

If you are converting the FSR reading that is returned to voltage, then you need to know what gain was used when the value was read.

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

1 participant