What would be the easiest way of increasing the resolution (1023) of the analog inputs for the arduino diecimila board? For my project, the higher the resolution, the better. This is a great community, and a great product. Although I am a complete noob at the moment, I hope in the future I may be able to better contribute.
The last bits of the ADC may bobble around, over time trending to an intermediate value. You can sort of increase resolution by taking a lot of samples and partially averaging them. Say, for example, you take 16 ADC samples, add them up, and divide by four. The resulting value would range from 0 to 4095, although you wouldn't REALLY have 12 bit resolution, you'd have a little bit of extra idea where the analog value is. Extending the number of samples may increase the accuracy
10-bit ADC may actually be enough resolution for your project, though. Sample averaging is a good idea and even an 8-sample average can really clean up that last bit or two of resolution. I used 10-bit ADC for a drive-by-wire project the other week, and it provided very fine-grained control across the range of the steering wheel.
Also consider your voltage range and analog reference. If you are measuring a 0 to 1 volt signal, you're wasting the ADC resolution normally dedicated to the 1 to 5 volt range. You can only measure 204 values of the available 1023. Supplying a 1 volt reference to the AREF pin may allow you to read 0 to 1023 over the smaller 0 to 1 volt range. Alternately, you can use an op-amp to put your signal into the 0 to 5 volt range.
I currently have a separate circuit board using some avalanche photodiodes and op-amps (LM334). I have it outputting from 0-5V based on the concentration of water-borne E.coli O157:H7. My concern is that a resolution of 0-1023 for my particular setup (taking into consideration the range I require), is along the lines of having a single colony forming unit and then a 1000 colony forming units as the next digital value, the latter being a deadly situation of course. Any ideas would be great! If I need to purchase some different hardware to support a higher analog input resolution, recommendations would also be greatly appreciated.
THe current resolution is 5v/1024 or approx 0.5mV. If you need a finer resolution you may combine two (or more) analog inputs and a pre-amp for your signal.
On the other hand, if you do not have a fast changing signal (just a few Hz or less) then you can use an integration A/D converter (arduino counts the time it takes for a RC network to reach the same voltage as your signal). You use a digital input for that and a comparator. Much higher resolution can be achieved with this method (16 bits). Better resolution would be difficult to be reliable unless electronic design is carefully done.