I need help with something.I"m using a sensor which can output -6Vdc to 6Vdc. I'm using a potential divider to get max of +5V entering my PIC18f452. I would like to be able to safe guard my PIC for negative voltages and voltages greater than +5V. What should I do to protect the PIC?
You're trying to read a -6 to 6V signal by the AD input of PIC18, rigth?
To read this you need to change the sensor signal form -6 to 6V to 0 to 5V, to do it use Operationals Amplifier, attached is a block diagram for it. To protect the PIC you can put a OP with Gain = 1, suplyed by the 5V circuit, like us showed in the picture attached.
If the case is a positive/negative symmetric wave (maybe a sine wave) and you can look only at the positive cycle, a way is in picture.
With this the errors added to you wave supplied to the ADC are minimized....
NOTE: You must calculate the voltage divisor related to the ADC reference, and resistors should have 1% tolerance.
Thank you for all your help.I've attached the spec sheet for the sensor. The sensor can measure +/-600Amps. The output is +/-6V. If I'm measuring only 0-600Amps, should I cater for the -600Amps? Would the 0-600Amps output only 0-6V?
I would then use a potential divider onto PIC,so maximum it can recievce is 5V.
The spec sheet isn't too user friendly,so I wrote the manufacturer and asked him some questions,the answers are on the side of the questions.
Code:
1. Is the input range +/-600 or 0 - 600Amps? +/-600 ADC or Peak AC
2. Is the output +/-6V or 0 - 6V? +/-6VDC or Peak AC
3. Is the power supply +/-15Vdc or 0 - 15Vdc? +/-15Vdc
Regards,
Jim McHan
Senior Applications Engineer
Export Compliance Officer
Sypris Test & Measurement, Inc.
6120 Hanging Moss Rd.
Orlando, Fl. 32807
It looks a 6V peak, so if you are measuring sine power line, you can only care about the positive peak. You algorithm should calculate the RMS (I suspect) value…
A note is, be careful with the reference of ADC, normally +5v power supply have high float level, so, power the sensor with same source(but source needs 15v) or use a high resolution reference (maybe using LE45)