On 22/11/2010 05:19, V G wrote: > Hi all, > > I want to construct a simple device for plotting discharge curves for > batteries. I want to be able to measure voltage to the nearest > millivolt. > > How would I go about doing this? Would an ADC on a PIC suffice? It depends. Most PICs have a 10bit ADC so for say (if you use 5V full=20 scale reference) 5V/1024 you are only getting around 4 mV resolution. However, if you have a front end that only selects part of the voltage,=20 (say 1V -> 1/1024 =3D ~1mV) that is of interest to you then you can=20 achieve 1mV or higher. For instance, if the battery is at 3V, you can=20 just monitor the 2.5-3.5 range using an opamp to amplify (and level=20 shift if necessary) so the full range of the ADC is used, whatever that=20 may be (of course you could set the ADC reference to 1V full scale too) Implementing this and possibly needing some way of tracking/adjusting=20 the "window" might be a pain though, depending on your requirements. Having said that, there are plenty of cheap, high resolution, low=20 speed ADCs out there that would provide a far higher resolution (likely=20 better SNR etc than the onboard ADC too though I have not checked) I would be tempted to go for something that provides the required=20 resolution over the full range of the voltages you wish to measure, thus=20 simplifying things a bit. Microchip make 16 and 18 bit I2C Delta-Sigma ADCs for less than =A32, so=20 they may be worth considering, for say 5V, you get around a 80uV=20 resolution (obviously you need a front end that is accurate/noise free=20 enough to make use of this) Something like this: http://uk.rs-online.com/web/search/searchBrowseAction.html?method=3DgetProd= uct&R=3D6696098=20 What kind of batteries do you want to measure? How often do you want to sample and for how long? How do you want the data to be stored/displayed? EEPROM/SD card? LCD?=20 USB/Serial to PC? --=20 http://www.piclist.com PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist .