-
Notifications
You must be signed in to change notification settings - Fork 3
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 adc calibration support #88
base: main
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What is the difference between least_squares_calibration.py
and linear_regression.py
?
I think there is a way to get a single calibration function for the entire range rather than have two separate calibration equations. The two equations will use more memory on the FRAM chip and more floating point computations. If the ADC outputs a 24bit full scale number there should be a way to get it to a uint32 with 0 as -3.3V and 2^24 as 3.3V.
calibration/data/config.yaml
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you clarify if any of these settings are being used? They all look like they're from v1 of the board
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
haven't touched this file, so they probably are from v1 of the board
stm32/Src/examples/example_adc.c
Outdated
@@ -143,9 +143,9 @@ int main(void) | |||
reading_len = sprintf(output, "Voltage: %f\r\n", voltage_reading); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we should be able to use SysApp_Init
or whatever it's actually defined as to start the UTIL_Timer
and give us access to APP_LOG
instead of having to use sprintf
which get messy.
stm32/Src/main.c
Outdated
@@ -39,6 +39,7 @@ | |||
#include "phytos31.h" | |||
#include "rtc.h" | |||
#include "sensors.h" | |||
#include "transcoder.h" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why is this included in main?
least_squares_calibration.py is the Jupiter notebook file you made converted directly to a python file. linear regression.py is my file that i started from scratch |
Fix 50-calibrate-adc
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Run linter on python code following the soil_power_sensor_protobuf
module
As talked about move calibration traces to separate repos.
I think we should remove calibration python files that aren't use so make it more accessible. Possible archive them in Google Drive so that if we have a use case in the future they are there.
calibration/data/config.yaml
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this file needed?
git
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Remove
python
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Remove
stm32/cpplint.cfg
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
File name should be all uppercase or else cpplint will not work
calibration/README.MD
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This file should be flushed out and explain what each of the files are and how to use them
calibration/model_testing.py
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This file looks like its not needed anymore
calibration/requirements.txt
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think scipy
and numpy
are included in this requirements.txt
…TS-node-firmware into 50-calibrate-adc
name: Stephen Taylor
about: calibration eqn for the demo
title: 'Junior Specialist'
labels: ''
assignees: 'jmadden173'
reviewers: 'jmadden173'
Name/Affiliation/Title
Stephen Taylor, UCSC, staff
Purpose of the PR
Added a 'calibration' folder for calibration procedure. Integrated the positive voltage calibration for the purposes of the demo
Development Environment
Windows
Test Procedure
Run calibrate adc with a soil power sensor and the 2450 and see if it outputs reasonable values.
Additional Context
N/A