![]() | ![]() | ![]() |
| |||||||
| General Electronics Chat This forum is for general chat about electronics, eg: Dont know what a part does? Dont know how to read a circuit? Want to get an opinion? |
![]() |
| | Tools |
| | #1 |
|
Hi. I need help from experts. I'm doing a project on reading analogue voltage humidity sensor (HIH 4000) using PIC16F917 (datasheet) and then showing the converted value on a LCD. I'm using the built in ADC in the PIC for the value conversion. The problem is I cannot get the accurate reading from the PIC. A quick check up on the Humidity sensor datasheet,I found that the sensor's maximum settling time is 70ms. Meanwhile the AD acquisition time (page 183) Tacq with 10kHz source of impedance and 50degreesC temperature is 4.67us. So I suspect the causes of the inaccurate reading are because of high possible transient amplitude and slow settling time. I have read somewhere that I need to build an RC circuit in between the output voltage,Vout, of humidity sensor and input of the ADC in order to rectify this problems. Now, my problem is I do not know how to build one and the theories behind it. I just know the basic design of RC circuit: What value of resistor and capacitance should I used in my RC circuit? | |
| |
| | #2 |
|
The Pic input impedance should be 10K or less, so try a series 10K, with the Pic ADC pin shunted to ground with a 100nF. That will give a settling time of about 3msec. If you need longer, increase the cap to 1uF.
__________________ Mike ML. | |
| |
| | #3 |
|
May I know how did you get the value of settling time of 3ms from the resistance and capacitor value?What is the formula?
| |
| |
| | #4 |
| 2.2*R*C, I used three time-constants: 3*1*10^4*100*10^-9 = 300*10^-5 = 3ms
__________________ Mike ML. | |
| |
| | #5 | |
| Quote:
Maybe 5 would be better?
__________________ Mike ML. Last edited by MikeMl; 6th November 2009 at 03:13 PM. | ||
| |
| | #6 |
|
But the AD acquisition time,Tacq,is 4.67us. I'm supposed to make a settling time below 4.67us right?Let say I take 4 time-constants and 10K source impedance,so the value for capacitor is 0.1nF which will equal the Tacq time.
| |
| |
| | #7 |
|
The important thing is not the acquisition time, but the sampling rate. e.g., ff you were only doing a conversion once per second, the sample has the whole second to settle, even though it might only take 3us to actually do the conversion.
__________________ Mike ML. Last edited by MikeMl; 9th November 2009 at 06:01 AM. | |
| |
| | #8 |
|
Meaning the longer sampling rate the better AD conversion value?
| |
| |
| | #9 |
|
it might be electrical noise on the adc power supply, try averaging 128 readings.
| |
| |
|
| Tags |
| capacitor, choose, circuit, helphow, resistor |
| Thread Tools | |
| Display Modes | |
| |
Similar | ||||
| Title | Starter | Forum | Replies | Latest |
| Resistor and Capacitor in Parallel | mark_3094 | General Electronics Chat | 9 | 8th April 2009 12:57 PM |
| DC Circuit - Parallel Capacitor and Resistor | Shelton | General Electronics Chat | 5 | 15th December 2007 11:37 AM |
| Capacitor across resistor? | BeëlzeM | General Electronics Chat | 12 | 15th November 2007 10:36 PM |
| Capacitor and resistor needed | moody07747 | Datasheet/Parts Requests | 2 | 8th June 2006 12:52 PM |
| resistor and capacitor assortments | jrz126 | General Electronics Chat | 5 | 8th September 2005 05:28 PM |