- Tue Jan 20, 2015 2:18 am
#7775
Yep, my point was to trigger some others to make similar measurements so we can find out variations between idividual modules/chips.
Schematic is quite simple - resistor divider on the ADC input. See here for reference:
http://www.learningaboutelectronics.com/Articles/Voltage-divider-calculator.php- 1KOhm from ADC pin to GND (R2 on the link above)
- 4.7KOhm from ADC pin to the test voltage (R1 on the link above)
This divider allows me to choose from wider range of input voltages (1.5V battery, 3V battery, etc.). Could not find variable resistor (pot) yesterday.
This 4.7K are important to be safe - it limits the current that might flow into the ADC pin if somethings goes wrong.
Ths idea is dead simple - provide several different test voltages to the input of the divider (or to the ADC pin directly if you know what you are doing) and get the readings with simple test program.
My program is also quite simple - a loop stores 16 reading from system_adc_read() and then I print the average. This repeats every 100ms (a timer ticking).
Feed the test voltage - measure the actual voltage on the ADC pin (because of the divider) - write down the printed measurement.
Best way is to get one reading close to 0 (e.g. without any input - short circuit the ADC pin to ground - if you have put the divider that there is no need to do it because the pull-down resistor makes this). Than feed some values incrementally until the ADC reading reaches the maximum - 1023. Post the data here, but also specify the module type and actual (measured) supply voltage. Also it might be nice to know the environment temperature. Mines were done at about 21 degrees celcius.