cell-monitor icon indicating copy to clipboard operation
cell-monitor copied to clipboard

Voltage calibration not working

Open scttnlsn opened this issue 6 years ago • 2 comments

Removed the voltage calibration for now: https://github.com/scttnlsn/cell-monitor/commit/21d121bcfd4a57f2c269019b0e8e7706dea3398e

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 avatar Jun 14 '18 15:06 scttnlsn

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

Jff011 avatar Sep 04 '18 20:09 Jff011

@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.

scttnlsn avatar Sep 04 '18 23:09 scttnlsn