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

Add preliminary pressure transducer implementation with INA219 #30

Merged
merged 15 commits into from
May 3, 2024

Conversation

samderanova
Copy link
Contributor

This pull request adds a new module that includes a single function to read current from an INA219 sensor and spawns a new Tokio task that runs this function.

I will be testing the functionality of this code in lab with the sensor soon.

@SM-dot SM-dot marked this pull request as ready for review April 23, 2024 04:57
@samderanova
Copy link
Contributor Author

Rewired the INA219 circuit and tested this code in lab earlier this week with a potentiometer. While we were able to see current readings decrease as we increased resistance and vice versa, the bus voltage reading is somehow above 5V. Perhaps this has to do with the calibration value.

Copy link
Member

@taesungh taesungh left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could we refactor the measurement functionality into a reusable abstraction for a pressure transducer as described in #27?

Copy link
Member

@taesungh taesungh left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice work so far: still looking for the pressure calculation, and some thoughts on the intermediate layer and demo function.

pod-operation/src/components/ina219.rs Outdated Show resolved Hide resolved
pod-operation/src/components/ina219.rs Outdated Show resolved Hide resolved
pod-operation/src/components/pressure_transducer.rs Outdated Show resolved Hide resolved
pod-operation/src/demo.rs Outdated Show resolved Hide resolved
Copy link
Member

@taesungh taesungh left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you fix the rebase/merge? Seeing changes from the other PR mixed in.

@taesungh taesungh changed the title Add preliminary function to read from INA219 Add preliminary pressure transducer implementation with INA219 Apr 30, 2024
@samderanova samderanova requested a review from taesungh May 1, 2024 16:10
Copy link
Member

@taesungh taesungh left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice work on this, please squash during merge.

@samderanova samderanova merged commit 2e318d9 into main May 3, 2024
2 checks passed
@taesungh taesungh deleted the feature/ina219-i2c branch June 2, 2024 04:25
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.

[Pod] Implement pressure measurements from transducers via INA219 over I2C
3 participants