Maker Pro
Maker Pro

Opamp to pic a/d

Hi
I just wanted some advice. I have a signal of 25mV. This i want to feed to a PIC A/D pin. However i eant to amplify this to say 2.5V. Would it be ok for me to use a non inverting opamp and suitable resistors to provide the gain/amplification? Do i need any care in selecting the resistor values?
Thanks in advance
Raj
 
Your opamp output must not exceed the maximum allowed input voltage of the PIC, it must not go negative and it must not go above the positive supply voltage of the PIC. Few opamps operate at such low power supply voltages (maybe 5V powered rail-to-rail opamp will be fine) so you will probably use a higher supply voltage for the opamp and a resistor attenuater to feed the PIC.
 
Hi
Thanks for your reply.
I was going to use a 5V single sided op amp. The gain i need is roughly 100.
I am now confused when you mention resistor attenuator?
If i did have a negative signal for example (say -0.7 to 1V), how could i use it with the PIC? What techniwue voukd i use to bring the signal up sonit stsrts from 0V? Would that mean using a inverting op amp.
Thanks in advance
Raj
 
Adder circuit.
I was thinking in the lines of diode clipper circuit fed into the A/D so the negative part of the signal is nit tajen into account.
Does that sound reasonable?
 
I thought you could measure negative voltages if your PIC has a -Vref pin. As long as you don't exceed the voltage range of the A/D then it should be fine. You will have to do some math in the software because if you have a reference supply of say +/- 1.5 V then at 0 V in the A/D will read half the full range of the A/D which is set by the reference used.
Thanks
Adam
 
Oh thanks for this. I thoughtbthst you cant exceed the levels of the pic by +/-0.3V of Vdd and Vss. So you cant go to 5.3V or -0.3V
 
Oh thanks for this. I thoughtbthst you cant exceed the levels of the pic by +/-0.3V of Vdd and Vss. So you cant go to 5.3V or -0.3V

You can't exceed any of the limits on any ports. You need to read the data sheet to find out what you are allowed to do with each port.
Adam
 
If you use a 5V rail to rail op amp, Microchip makes some good ones, then you have no worries, the output signal of the opamp will be between 0 and 5V. The PIC inputs also have clamping diodes to Vss and Vdd, so, if you put a resistor, say 1K between the output and PIC you are well protected against even noise spikes.

Bob
 
Is the A/D on the PIC measuring AC? Does it matter if maximum signal levels of the AC are clipping?
Is it OK to rectify the signal so that no signal produces 0V, medium signal produces +2V and maximum signal produces +4V?
 
Thanks for the replies. I have just learned that the signal is DC only after doing some work.
So my question is the bedt rechniques to bring 7V down to a readable input of the PIC A/D?
1. Is it ok to use a potential divider and the centre pin of the resistors straight to the PIC A/D?
2. The PIC A/D has source inpedance of 10K. Should my impedance of resistors be less than this. For example if i used a voltage divider of 2 x 3K9 resistors, my impedance would be 3K9 x 2, which is less than 10K of the PIC. Does thst seem correct? Or is the impedance calculated by 2 x 3K9 in parallel?
3. Would i need a voltage follower circuit using a opamp (rail to rail 5V) after the potential divider?
Thanks in advance
Raj
 

(*steve*)

¡sǝpodᴉʇuɐ ǝɥʇ ɹɐǝɥd
Moderator
Depending on what you want to so, you might want to amplify the signal and then feed it into a peak and hold circuit.

This then gives you a DC voltage to read which corresponds to the peak voltage on one half of the waveform.
 
Thanks for the replies. I have just learned that the signal is DC only after doing some work.
So my question is the bedt rechniques to bring 7V down to a readable input of the PIC A/D?
1. Is it ok to use a potential divider and the centre pin of the resistors straight to the PIC A/D?
2. The PIC A/D has source inpedance of 10K. Should my impedance of resistors be less than this. For example if i used a voltage divider of 2 x 3K9 resistors, my impedance would be 3K9 x 2, which is less than 10K of the PIC. Does thst seem correct? Or is the impedance calculated by 2 x 3K9 in parallel?
3. Would i need a voltage follower circuit using a opamp (rail to rail 5V) after the potential divider?
Thanks in advance
Raj

It would be better to divide the voltage down with a potential divider as you mention and then buffer the voltage with an op-amp into the A-D..
Thanks
Adam
 
Yes i was going to divide using voltage divider then feed into a voltage follower.
If i choose my impedance (voltage divider resistors in parallel) to be less than 10K. Then would that seem reasonable?
 
You don't have to worry about the resistor values too much because you are using a buffer. In the region of 10 K will be fine. Add a small capacitor across the lower resistor to help stabilise the divider. A 1 uF should be fine.
Adam
 
Yes, very low compared ti the 10K max that the PIC specifies.

BTW: you are the second person to state here recently that the PIC has an input impedance of 10K. That is incorrect. The datasheet specifies that the output impedance of the driving signal should be less than 10K, which is quite different.

Bob
 
Top