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

PAC195X #51

Merged
merged 25 commits into from
Jun 4, 2024
Merged

PAC195X #51

merged 25 commits into from
Jun 4, 2024

Conversation

linguini1
Copy link
Collaborator

This PR implements a driver for the PAC195X family of current sensors. The PAC1952-2 also has a collector thread implementation (because the MCU board contains that variant).

This PR also inter-ops with the new voltage encoding for telemetry. It includes a change that allows sensor data types (TAG_*) to implicitly be associated with a numerical ID. This is useful for sensors that measure localized data.

For example, right now it doesn't matter which sensor temperature is measured on, because the temperature being sensed should be roughly consistent across all sensors. However, the voltage sensor measures voltages on a specific trace. It is important to track which measurements are connected with which trace, or it will be difficult to detect voltage changes and match up the measurements with certain components/traces.

…2 channels. Also fixed bug in block write DCMD selection.
… after each read, a refresh command must be sent to get new data.
…Vpower measurements to explanation in the datasheet: product is taken using signed numbers for vbus and vsense and chip uses more bits than the reported vbus and vsense values.
…need to fix this for other block reads as well. This correctly yields the bus values now.
… sure our Rsense resistors are 0 ohms, so I'm keeping full scale current at 100mV. Not sure how much current to look for.
…wer during time of testing. Must test again with battery connected.
…urements (i.e. it matters which sensor took them).
@linguini1
Copy link
Collaborator Author

Co-PR of CarletonURocketry/packager#71 in packager to make sure no interoperability is broken with this change.

@linguini1 linguini1 merged commit 0ef6b65 into main Jun 4, 2024
1 check passed
@linguini1 linguini1 deleted the pac195x branch June 4, 2024 01:58
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

Successfully merging this pull request may close these issues.

1 participant