How do I sample a -2 V to +2 V analog signal with a PIC microcontroller?

Started by kynix, July 13, 2016, 10:13:12 AM

Previous topic - Next topic


I am using a PIC micro with a 10bit ADC to take readings from an analog signal with a frequency less than 300 hz. However that analog signal is in the range of -2 V and +2 V. How can I condition the signal to get it into a usable range (assuming the input to the ADC has to be positive) Also I do not have a positive and negative power supply.



You need to shift the input voltage from the range -2...2V into the range of the ADC which I suppose is 0...5V or so. Google this: voltage adder resistor network

Are you sure that you are using a 16C711 PIC? I mean it is a C, then usually it is only one time programmable. One time programmable uC-s are not suitable for development. Consider to change a F type.
According to microchip page:
Not Recommended for new designs
Please consider this device PIC16F716

So do not use this, you will need a lot of them to develop code.

I think 20 years ago was the last time I used one time programmable uC. I also had windowed one which could be erased with UV light. Huhh... 1 minute less in the UV eraser, and it was fun to realise that it was only partly erased :)