View previous topic :: View next topic |
Author |
Message |
andrewg
Joined: 17 Aug 2005 Posts: 316 Location: Perth, Western Australia
|
Analog max impedance |
Posted: Wed Jan 28, 2009 8:23 am |
|
|
I'm looking to connect a few soil moisture sensors that have a 100K impedance to an 18F2580. The PIC data sheet says the maximum recommended impedance is 2.5K. The only downside I can see is the extra length of time taken to acquire the correct voltage before conversion. I don't mind spending many milliseconds waiting for each one.
Is that all and it should work fine with enough acquisition time, or is there something I'm missing? If I actually had a sensor I'd just try it out, but I thought I'd ask before buying them.
Thanks for any advice. _________________ Andrew |
|
|
SherpaDoug
Joined: 07 Sep 2003 Posts: 1640 Location: Cape Cod Mass USA
|
|
Posted: Wed Jan 28, 2009 9:18 am |
|
|
If your sensor can charge a cap over time, that cap can provide the low pulse impedance the A/D needs. As the A/D takes its measurement internal impedances and capacitances will change. The signal source needs to maintain voltage over these changes. Normally a low impedance source does this, but a cap can provide the low impedance for the short duration of the measurement. _________________ The search for better is endless. Instead simply find very good and get the job done. |
|
|
RLScott
Joined: 10 Jul 2007 Posts: 465
|
Re: Analog max impedance |
Posted: Wed Jan 28, 2009 9:22 am |
|
|
It is more than acquisition time. The datasheet says the input leakage current on an input pin can be as high as 1 uA. If your source impedance is 100K, that 1 uA will drop 100 mV, which is 20 counts on your 10-bit A/D converter (running at 5 volts). So if you don't mind a possible 100 mV error on your readings, then I guess 100K source impedance would be OK too.
Edit: SherpaDoug, a capacitor will not address this constant leakage current problem. _________________ Robert Scott
Real-Time Specialties
Embedded Systems Consulting |
|
|
andrewg
Joined: 17 Aug 2005 Posts: 316 Location: Perth, Western Australia
|
|
Posted: Thu Jan 29, 2009 6:39 am |
|
|
Ah, I see now. Thanks. The 2.5K is because beyond that the leakage current will start affecting the read values.
My sensor's minimum output is 500mV, so the drop could be 500mV and I'd still be able to read the full range of the instrument.
I'm just using them in a "wet" vs "dry" capacity, so while I might still work out how to compensate for the leakage current in software, at least I can get away with just experimentally finding the desired threshold ADC reading.
Thanks for all your advice! _________________ Andrew |
|
|
crystal_lattice
Joined: 13 Jun 2006 Posts: 164
|
|
Posted: Thu Jan 29, 2009 8:15 am |
|
|
Alternatively you could buffer them with an OPAMP - and also increase your output voltage swing. |
|
|
SherpaDoug
Joined: 07 Sep 2003 Posts: 1640 Location: Cape Cod Mass USA
|
|
Posted: Thu Jan 29, 2009 8:22 am |
|
|
RLScott has a very valid point. Worse yet the 1uA could be positive or negative and may vary between chips and vary with voltage and with temperature. On the other hand 1uA is the worst case value and you are not likely to see leakage that high, especially at room temp or cooler. 1uA is the value above which Microchip will scrap the PIC rather than sell it. Since they don't want to scrap many you can bet they keep the average leakage lower. They have been using that 1uA spec since at least 1990. I'll also bet they have gotten better since then.
I recommend you test any PICs you have on hand to see what their leakage is and get a feel for what to expect. If you are designing satellites or pacemakers the worst case specs are more important that if it is a home project. _________________ The search for better is endless. Instead simply find very good and get the job done. |
|
|
RLScott
Joined: 10 Jul 2007 Posts: 465
|
|
Posted: Thu Jan 29, 2009 8:57 am |
|
|
andrewg wrote: | Ah, I see now. Thanks. The 2.5K is because beyond that the leakage current will start affecting the read values.
My sensor's minimum output is 500mV, so the drop could be 500mV and I'd still be able to read the full range of the instrument... |
No, I don't think you understand this "drop" business. The leakage current is unknown. It might be zero. In that case there would be no voltage drop at all. The point is you don't know what the leakage is. As SherpaDoug said, it is highly temperature dependent. It is also dependent on the voltage output of your sensor. So it is more like a gain error than an offset error. You cannot simply "make allowances" for it. It is like an unknown addition or subtraction to your readings that you have no control over. So it looks exactly like noise, and directly affects the accuracy of your readings.
With all that said, Doug is probably right. At nice room temperatures most PICs will have much less leakage current than their worst-case specs. And you can perform simple tests to check individual parts, and maybe do a "field calibration" to make those allowances that I said you couldn't make. _________________ Robert Scott
Real-Time Specialties
Embedded Systems Consulting |
|
|
daraos
Joined: 16 Oct 2008 Posts: 18 Location: Chile
|
|
Posted: Thu Jan 29, 2009 10:40 am |
|
|
the safest bet is using an OPAMP as voltage follower such as the classic lm741, or a lm324 (four 741 in one IC) |
|
|
andrewg
Joined: 17 Aug 2005 Posts: 316 Location: Perth, Western Australia
|
|
Posted: Fri Jan 30, 2009 9:27 am |
|
|
Hmmmm. This looks like it is more complicated than I thought. At least, more complicated than the PIC only solution I was hoping for. The LM324 is sounding like the best option by far.
Thanks for everyone's input! _________________ Andrew |
|
|
asmallri
Joined: 12 Aug 2004 Posts: 1634 Location: Perth, Australia
|
|
Posted: Fri Jan 30, 2009 9:35 am |
|
|
andrewg wrote: | Hmmmm. This looks like it is more complicated than I thought. At least, more complicated than the PIC only solution I was hoping for. The LM324 is sounding like the best option by far.
Thanks for everyone's input! |
Use a low power CMOS opamp. Microchip have low power auto zero opamps perfect for this style application. _________________ Regards, Andrew
http://www.brushelectronics.com/software
Home of Ethernet, SD card and Encrypted Serial Bootloaders for PICs!! |
|
|
|