Closed charlespax closed 9 years ago
I double check on Atmega32u4 datasheet. It seem we connected the AREF to 3.3V of the regulator. It means the MCU ADC conversion is base on 3.3V as reference voltage. Otherwise, I should connect the AREF to a filter capacitor only and software required to set register using 2.56 internal reference.
Should I disconnect the AREF to 3.3V?
I was incorrect in my understanding that the AREF is different from the 2.56 V internal reference and they can be used independently. It seems we can select between INTERNAL or AVcc in software. That's probably better than AVcc being hard-wired to VREF. I think you're right and we should hook AREF to a capacitor. @cibomahto what do you think? It affects the software, so I don't want to make a change unless you give the okay.
The idea on the table is to use the internal 2.56 V internal reference to partially calibrate the AREF value. From further reading I see that it will not make things generally more accurate. See http://www.skillbank.co.uk/arduino/measure.htm and http://www.re-innovation.co.uk/web12/index.php/en/information/electronics-information/accurate-voltage-measurement
However, the internal 2.56 V internal voltage reference may be useful as a reference for measuring the battery voltage as the battery voltage drops below approximately 3.5 V. As the battery voltage decreases the MIC5219 output voltage will be affected. The problem is that the battery voltage affects the reference voltage from which we are measuring the battery voltage.
MIC5219 output V versus input V:
Fromt he 32u4 datasheet:
Do you want me disconnect 3.3V from ARef pin and use internal 2.56V reference?
This is Rev 0.8 connection:
Yeah, let's do it and add the bypass cap.
Here is the issue to address this int he firmware: https://github.com/PaxInstruments/t400-firmware/issues/21
Disconnected to 3.3V
Nice. Closing issue.
In Rev 0.10, the ARef Pin measured 2.508V while software selected internal voltage reference. However, the ARef Pin measured 3.269V while software selected default voltage reference. It seem the internal voltage reference has high tolerance then using default voltage reference.
@samchoy88 I don't understand what you mean. The internal voltage reference of the ATmega32U4 has a 2.56 V nominal voltage.
As the Reference voltage is critical for calculating the VBAT voltage value. I expect using internal 2.56V voltage reference. and calculate the VBAT level by ADC x 2.56V / 1023. However, I found the VBAT value does not match with measuring point.
After checking the circuit and ARef pin, the internal voltage reference only supply 2.508V and causing incorrect result in calculation.
See https://github.com/PaxInstruments/t400-electronics/issues/44