I’ve now come to realise that you probably meant gamebuino, not gameduino, which is why I was confused (but never mentioned it) when you talked about it monitoring a battery.
I’ve now taken a look at the Game b uino schematics. The reason that the Gamebuino can monitor the battery voltage accurately enough to determine its charge state is because it was designed to be able to do so.
It always runs the CPU from a regulated 3.3V supply, regardless if running from battery or USB. Actually it only runs from battery but can do so while it’s being charged. Having a stable and accurate 3.3V (+/- 1%) powering the CPU means it can use this as an exact reference for the ADC. The Gamebuino also has the raw battery positive terminal connected to an analog input through a resistor divider (as I proposed doing for the Arduboy), allowing the ADC to take a reading and calculate the battery’s true voltage accurately. The 3.3V is also connected to AREF but I don’t think it’s required.
However, @bateske has mentioned that the Arduboy’s CPU will be running at 3.7V, suggesting that it will be powered by the raw, unregulated voltage directly from the battery. Therefore Vcc cannot provide the accurate known reference voltage that we need to determine the battery state. And, we already know that the internal reference and bandgap are not precise enough either.
With no precise, stable reference, we’re left with individually calibrating and saving a value for each individual Arduboy, as I proposed.
However, I’ve realised that even if the Arduboy’s CPU is run direct from the battery, it may be easy to avoid needing individual calibration, with just a few simple, inexpensive hardware changes:
There appears to be a linear LDO regulator on the Arduboy in the photos shown on Kickstarter. It’s the small, black, chip with five leads, surrounded by C7, C10 and R7, in the lower left corner. I’m guessing it’s a 3.3V regulator required for powering the display. If this is the case, its output could be connected to the CPUs AREF pin, giving us the accurate reference that we need. Now all we need to do is tie the positive lead of the battery to an unused analog input through a two resistor voltage divider. (The resistors should have a tolerance of 1% or better.) Who knows?.. Maybe this is already part of the design. @bateske has been pretty quiet about some of the production Arduboy’s specific hardware and wiring.