How to use PIC A/D converter with ACS712 Hall effect current sensor

current measurementhall-effectpic

I have built a one amp power supply and want to use a Sparkfun ACS712 Hall effect current sensor with a PIC and 7 segment LED display to show the current in milli-amps. The PIC A/D input has ground as its lower reference, but the ACS712 gives a positive voltage out at zero amps. I want to use the whole ten bit range of the A/D converter, which will pretty well give me the one milli-amp per step, so what can I do to adjust this voltage so that the range at the PIC starts at zero for zero volts?

Incidentally I found the adjustments on the potentiometers on the ADC712 to be impossibly fiddly to adjust, so I have wired 20 turn pots in their place.

Best Answer

This would be my first design using PIC A/D conversion, so, needing little else in the PIC I chose (one of?) the smallest that had a ten bit A/D converter (ADC), the PIC16F688, assuming that all ADC would be the same, and read in the data sheet that the negative voltage reference is always connected to the ground reference. Now I see that other PICs allow a second data pin to take on this role, so that will solve my problem, at the expense of a larger PIC. With the voltages in my comment to my question, I expect to use 1V as the negative reference on that pin to provide the offset I need. Perhaps I should apologise for taking up the space to ask such a naive question, sorry.