It's pretty simple...let me try & explain.
If your PIC is running at 5V, then you're ADC resolution becomes 5V/1024 (the 1024 being 10 bits)...this results in a resolution of 0.0048828125V (4.9mV) per ADC bit, which sounds great, but not if your sense resitor is very small & therefore the maximum voltage drop will be very small. So at 1000mA & a .47 ohm resistor, your maximum voltage drop will be .47V across it (V=IR). ) .....so if you PIC has the aformentioned resolution of 0.0048828125V, then the maximum ADC reading you'll get is .47V/0.0048828125V ...or a max reading of 96 ...that's with 1A flowing (that's an awful lot of wasted bits, bearing in mind you've got 1024 bits available in your PIC).
To get more resolution, if the PIC is modern & has a P-ref register for the ADC module (16f1828 etc)....you tell the PIC that rather than use 5V as the upper limit for the ADC, to use an internally generated fixed 1.024V instead (again the PIC needs to be up to date & have one onboard) - there are no more components involved, you just need to set a register in the PIC & you're off to the races.
Now your ADC resolution becomes 1.204V/1024 bits ....or 1mV per ADC bit, therefore with 1A flowing through the sense resistor, your maximum ADC reading will be 470 which is a lot healthier amount of 'reading' to play with.
Of course if you want up to 10A, then this is not the way to go (but I thought you were talking of 1A max?)





Bookmarks