View previous topic :: View next topic |
Author |
Message |
mesuty Guest
|
0..10 mV measurement with PIC |
Posted: Tue Jul 12, 2005 11:41 am |
|
|
Hi friends;
I must measure an 0..10mV DC signal with PIC micro. The system must have two set points and two relay outs for each. I am planning use 4x20 LCD display and 18F452 or similar device.
The most important trouble for me is input amplifier to PIC.
does anybody have an idea ?
Many thanks. |
|
|
MikeValencia
Joined: 04 Aug 2004 Posts: 238 Location: Chicago
|
valemike |
Posted: Tue Jul 12, 2005 11:53 am |
|
|
If 5V was your reference, you do get 4.88mV granularity in your readings. i haven't tried it before, but if you make, say 2.5V as your reference, you can get 2mv granularity in your readings.
If that is so, then you might not even need an op-amp. |
|
|
Calamar
Joined: 07 Sep 2003 Posts: 60 Location: Buenos Aires (Argentina)
|
|
Posted: Tue Jul 12, 2005 11:59 am |
|
|
You should use a simple non-inverter amplifier,
sure it�ll necesary a +/- power source, maybe
with a intrumentacion amplifier could you avoid it.
any rail-to rail coul do the same ? _________________ Best Regards
Daniel H. Sagarra
La Plata (Argentina) |
|
|
kender
Joined: 09 Aug 2004 Posts: 768 Location: Silicon Valley
|
|
Posted: Tue Jul 12, 2005 12:47 pm |
|
|
Calamar wrote: | You should use a simple non-inverter amplifier,
sure it�ll necesary a +/- power source, maybe
with a intrumentacion amplifier could you avoid it.
any rail-to rail coul do the same ? |
Well, rail-to-rail op-amp doesn't require a (-) supply less then ground. Take a look at LMC6462, for example. You can tie pin 8 to +5V and pin 4 to GND, and you�ll get a dynamic range from ground to +5V. |
|
|
rwyoung
Joined: 12 Nov 2003 Posts: 563 Location: Lawrence, KS USA
|
|
Posted: Tue Jul 12, 2005 12:55 pm |
|
|
How much resolution do you need?
It was suggested that you add a non-inverting op-amp. That is your best bet, one with sufficient gain to map your 0 to 10mV to 0 to VREF.
Select an op-amp with rail-to-rail input and output. Go look at National Semiconductor, TI and Microchip (but I'm not sure Microchip as rail-to-rail Input AND Output models but it has been a while since I've looked).
Keep in mind too that your op-amp will add error and so select the type and "grade" appropriately.
TI has a nice program called Op-Amp Pro that will help you as well as a VERY good application note written by Ron Mancini called "Op-Amps for Everybody" (or something similar). National Semi's WebBench has been adding to their design tools and I believe they also have some good op-amp design tools. Both tools require very little gray matter on your part. _________________ Rob Young
The Screw-Up Fairy may just visit you but he has crashed on my couch for the last month! |
|
|
Calamar
Joined: 07 Sep 2003 Posts: 60 Location: Buenos Aires (Argentina)
|
|
Posted: Tue Jul 12, 2005 2:14 pm |
|
|
Yes Kender it doesn't requiere, but with 10mv I dont't now, the threshold for the most rail-to-rail op-amp is in the order of few mV, anyway for a conventional op-amp shouldn't be necessary if it keep away form ground (or Vss) _________________ Best Regards
Daniel H. Sagarra
La Plata (Argentina) |
|
|
languer
Joined: 09 Jan 2004 Posts: 144 Location: USA
|
|
Posted: Tue Jul 12, 2005 7:15 pm |
|
|
As already suggested I would use an OPAMP to boost the voltage. Things to watch for:
*Stable Reference (either internal from regulated supply, or external reference)
*Stable OPAMP (watch out for enormous gain factors)
*R-R Output (R-R input is most likely not a big issue with your input requirements)
*Low drain current for battery operation
Currently I have been using the following OPAMPs quite a bit:
*AD820
*OP340
*The CMOS OPAMPs (like LMC6462) offer very low drain currents |
|
|
kender
Joined: 09 Aug 2004 Posts: 768 Location: Silicon Valley
|
|
Posted: Tue Jul 12, 2005 8:30 pm |
|
|
Calamar wrote: | �the threshold for the most rail-to-rail op-amp is in the order of few mV� |
You are right. Here are some numbers for threshold (aka input offset) voltage from the datasheets:
LMC6462 0.25mV 2.5% of your 10mV range
LM6132 0.25mV 2.5%
MAX4242 -200mV Yes. It�s negative.
LT1782 0.40mV 4%
What do you guys think?
Kender |
|
|
languer
Joined: 09 Jan 2004 Posts: 144 Location: USA
|
|
Posted: Wed Jul 13, 2005 1:08 am |
|
|
Kender,
I believe you're confusing the terms here:
Quote: | threshold (aka input offset) voltage |
You can view the input offset voltage as a (fixed) error term in the input pin. It will offset all your readings by this much (precision OPAMPs have very low offsets, and some OPAMPs have an offset pin to trim this offset to zero). You should still be able to resolve the measurement, but there will be an offset in it.
For measurements down to 0V, the OPAMP must be able to respond to some value below 0V (i.e. the common mode input voltage must include 0V with some margin below). There are quite a list of single-supply OPAMPs that should resolve the 0-10mV range. Since the offset for each OPAMP is (for the most part) fixed, the measurements would be fairly precise, but because there is an offset their accuracy could be questionable (instrumentation OPAMPs are best suited for very precise measurements; accuracy still requires calibration, or some factory trimming).
I am including the offset voltage and common-mode-input-range for the OPAMPs I listed before (for 0 to +5V supply):
Device, Offset, Vcm
AD820, 1mV, -0.2 to +4
OP340 , 0.15mV, -0.3 to +5.3 |
|
|
Calamar
Joined: 07 Sep 2003 Posts: 60 Location: Buenos Aires (Argentina)
|
|
Posted: Wed Jul 13, 2005 8:46 am |
|
|
languer wrote: | (i.e. the common mode input voltage must include 0V with some margin below)[/list] |
I don't understand, are you saying that a better common mode
rejection could be reach with a 0V for - supply ? _________________ Best Regards
Daniel H. Sagarra
La Plata (Argentina) |
|
|
Ttelmah Guest
|
|
Posted: Wed Jul 13, 2005 10:24 am |
|
|
He did not mention the word 'rejection'.
There are two seperate figures. Common mode rejection, is the ability of an op-amp to reject signals where both inputs change together. Common mode input range, is the voltage range over which the inputs can operate. It is the latter that matters, in the context being talked about, and often does not include ground for single rail amplifiers. Seperately, there is also the issue, that the output impedance of many single rail amplifiers rises if the output is driven close to ground, which introduces errors in the ADC converter on the PIC, whic requires quite a low drive impedance to work properly. Adding an offset voltage may be worth considering if linearity right to ground is important.
Look at the Texas intruments INA122, for a reasonably priced single supply op-amp, with in input common mode range, that goes to 0.1v below the -ve supply rail (ground in single supply configurations).
Best Wishes |
|
|
|