## How to use full ADC resolution with voltage divider

I want to use a voltage divider to read the voltage from a 5 cell Lipo. However I want to use the full resolution of the ADC with analogRead() but across a limited voltage range. The maximum voltage being 4.2V per cell and although I do not want to discharge past 3.0V per cell I would like to range it to read down to 2.7V per cell. If I use a voltage divider with a 5K6 tied to VCC (Max = 5 x 4.2 = 21V, min = 5 x 2.7 = 13.5V) in series with a 1K I should get 3.18 or thereabouts when the battery is fully charged (21V) and 2.05V when the battery was at 13.5V. Is there a mechanism I can use to offset this so that I can use the full ADC resolution between these 2 voltages? As I see it using the Teensy LC with 12 bit ADC I have 3.3V/4096 = 0.8mV resolution. 2.05V/3.3V x 4096 = 2544 to 3.18V/3.3V x 4096 = 3947. So as I see it I am using 3947-2544 = 1403 of the available 4096 resolution. Can I somehow offset this so that I can use the full 12 bit resolution to read from 2.7V to 3.18V coming from my voltage divider?