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

Preliminary thermistor abstraction implementation #47

Merged
merged 6 commits into from
May 14, 2024

Conversation

samderanova
Copy link
Contributor

@samderanova samderanova commented May 11, 2024

Resolves #37 through the following:

  • Create new LimTemperature abstraction in components/
  • Add simple demo in demo.rs that reads from the ADS1015

To test the component individually, comment out the code in demo.rs that creates an instance of PressureTransducer, as not doing so will cause an I2C error. Build and run the pod operation executable on a Raspberry Pi 4B and observe the values being printed in millivolts.

Note: A slight issue is that when the voltage drop across the thermistor approaches smaller values, the readings are off by a certain number of millivolts.

@samderanova samderanova requested a review from taesungh May 11, 2024 22:03
@samderanova samderanova linked an issue May 11, 2024 that may be closed by this pull request
2 tasks
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 start on reading a single value. We can take the issue in two steps if you feel adding multiple input pins (and multiple ADCs?) would be a big step, but would like to at least see the conversion equation.

pod-operation/src/components/lim_temperature.rs Outdated Show resolved Hide resolved
pod-operation/src/components/lim_temperature.rs Outdated Show resolved Hide resolved
pod-operation/src/demo.rs Outdated Show resolved Hide resolved
@samderanova samderanova force-pushed the feature/thermistor-measurements branch 2 times, most recently from 748fa99 to 8b301f6 Compare May 13, 2024 06:43
@samderanova samderanova requested a review from taesungh May 13, 2024 06:58
@samderanova
Copy link
Contributor Author

samderanova commented May 13, 2024

As mentioned in this comment, there are currently some issues with the thermistor's resistances not following what is shown on the datasheet. However, the code to read the values from the ADS1015 works, since we tested in lab with the multimeter.

For now, I'll unlink #37 so that the issue doesn't get closed as completed when this PR is merged but I'll mark the first bullet point as completed when this PR gets merged.

@samderanova samderanova force-pushed the feature/thermistor-measurements branch from fbe2240 to 1a2e4e3 Compare May 13, 2024 19:52
@samderanova samderanova force-pushed the feature/thermistor-measurements branch from a0f2520 to 95485b4 Compare May 13, 2024 22:21
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.

Works out for now. As discussed, next step is adding the actual temperature conversion.

@samderanova samderanova merged commit f657984 into main May 14, 2024
2 checks passed
@taesungh taesungh deleted the feature/thermistor-measurements branch May 29, 2024 03:50
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 temperature measurements from thermistor via ADC
3 participants