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

Voltage calibration not working #3

Open
scttnlsn opened this issue Jun 14, 2018 · 2 comments
Open

Voltage calibration not working #3

scttnlsn opened this issue Jun 14, 2018 · 2 comments
Labels

Comments

@scttnlsn
Copy link
Owner

Removed the voltage calibration for now: 21d121b

Was causing issues with the voltage readings for some reason. Returned voltage values would slowly decrease to some fixed point below the actual voltage. I was not sending any write requests to my knowledge. Voltage can still be calibrated manually by writing the reference voltage value.

@scttnlsn scttnlsn added the bug label Jun 14, 2018
@Jff011
Copy link

Jff011 commented Sep 4, 2018

Hi Scott
I wonder if your problem with the voltage calibration is related to this: https://www.avrfreaks.net/forum/attiny-adc-using-internal-ref-measure-vcc-problem

@scttnlsn
Copy link
Owner Author

scttnlsn commented Sep 4, 2018

@Jff011 Thanks for the link! There's already a delay after selecting the reference voltage (https://github.com/scttnlsn/cell-monitor/blob/master/src/adc.cpp#L17). Are you thinking that I need to discard some samples? The thing is, the ADC readings all seem to work just fine (even after calibrating the internal voltage reference) so I don't think the issue involves any hardware subtleties. I suspect the issue has something to do with my calculations (i.e. calculating the interval voltage reference given the VCC value). I haven't invested much time in this yet since it's easy enough to calibrate the voltage reference instead of the VCC reading (calculating the voltage reference manually). Let me know if you have any ideas.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants