This thread has been locked.
If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.
I need to connect mentioned HCZ-H8 humidity sensor to MSP430-based system.
HCZ-H8 is a resistive AC-rated sensor ( http://www.fenghua.com/pdf/humidsensor/HCZ-H8.pdf ). To measure the humidity using the one, you should power it with a sinewave 1kHz, 1Vrms, pure AC without DC component, to obtain it's impedance |Z|. The sensor is resistive, not capacitive, so the main goal of AC supply is not to degrade the sensor with DC. 1KHz is used as it's datasheet already contains calibration table "impednace-humidity" @ 1KHz .
The similar sensor is well described in this document: http://www.produktinfo.conrad.com/datenblaetter/175000-199999/182630-da-01-en-Feuchtesensor.pdf
I'm going to solve my problem this way:
1)Set voltage of current sinewave's step (1KHz) using DAC
2)Pass DAC output through the filters (remove DC)
3)Split filtered sine between:
a)ADC CH0 directly
b)Humidity sensor then to ADC CH1
4)From CH0, CH1 calculate |Z|
5)From tables obtain humidity
Am I on the right way? Any ideas how to make this in a simpliest way?
Ilia V. Davidov
Ilia DavidovThe sensor is resistive, not capacitive, so the main goal of AC supply is not to degrade the sensor with DC.
Anyway, the approach looks good so far.
Some things to be added: for simultaneously sampling both, the applied and the resulting voltage, you need an ADC that supports simultaneous sampling.If you use an ADC10 or ADC12, the samples are take one after another (also for most devices with an SD16, only the devices for energy metering support simultaneous sampling).And if you're already samling one after another and have to calculate the time shift, you can as well just sample the result, as it was you who created the input signal with the DAC, so you KNOW the input voltage (calibration provided).It makes things a bit easier.
For resistive sensors, however, I would go a different approach: set up a small constant current source that can be switched on and off by an MSP port pin. Every millisecond switch it on, take a sample of the resulting voltage across the sensor, then switch it off again, to avoid sensor heating. if your current source forces 1mA through the sensor and the voltage reading is 1V then the sensor resistance is 1kOhm.
I guess the calibration table takes the sensor heating caused by the measuring voltage into account. but only for a given environment temperature. To simulate it, calculate the power applied to the sensor under the the conditions of the calibration table, and apply a constant current that causes the same power loss on the sensor. The readings should be equal. Then the current source does not need to be switche on and off (except to save power, but then the first readings after turnign it on again will be inaccurate) and things are even easier: read teh voltage and convert it into a temperature by a table.
Time to say goodbye - I don't have the time anymore to read and answer forum posts. See my bio for details.Before posting bug reports or ask for help, do at least quick scan over this article. It applies to any kind of problem reporting. On any forum. And/or look here.I'm sorry that I can no longer provide help in the forum or by private conversation.
We are glad that we were able to resolve this issue, and will now proceed to close this thread.
If you have further questions related to this thread, you may click "Ask a related question" below. The newly created question will be automatically linked to this question.
In reply to Jens-Michael Gross:
Thanks a lot, Jens-Michael,
I'll think about your approach - I like it :)
Some words about sensor degrading:
It seems (I'm not sure) that the problem is not sensor's heating - it looks like sensor becomes "polarized" after long-term DC appliance. If pure AC (without DC) is applied, the summary "polarization" gets 0: after one half of period it polarizes "positive" the next half of a period it "depolarizes".
I think that in your approach 1mA of DC periodically applied to the sensor will not degrade it too much as it will self depolarize during the period of inactivity.
Also some words about simultaneously sampling:
As I understand (may be I'm wrong) the momentary input voltage (DC for a small period of measurement) will be a constant for both direct and indirect channels, as the DAC output will synchronously change only after both measurements are finished (will be implemented in software). Is this approach acceptable (in theory)?What is it's weak side?
In reply to Ilia Davidov (UA):
Ilia Davidov it looks like sensor becomes "polarized" after long-term DC appliance.
Ilia DavidovI think that in your approach 1mA of DC periodically applied to the sensor will not degrade it too much as it will self depolarize during the period of inactivity.
Ilia Davidovas the DAC output will synchronously change only after both measurements are finished
If you apply the current pulse, then of course you have all the time until the pulse ends (which you control) to take the two samples. But where to get the second sample from? You do not apply a voltage, you apply a current. So there is only one voltage to be sampled: the product of current and sensor impedance.You could add a base resistor and measur eboth values, voltage over base resistor and voltage over both (as the same current flows through both). Then the relation of the two measurements goves the resistor impedance in relation to the base reistor value. It will eliminate the variation of the current source, but for an absolute result, it will require a calibrated base resistor.
Thanks a lot for attention to my problem, Jens-Michael :)
Jens-Michael Grossyou can apply inverted pulses
I was also already think about this, may be this will be my way.
Jens-Michael Grosssampling two voltages would be from two different input channels, and calibrations differences between the two channels would affect your result too
Thanks a lot :) This really was a problem for me :) Now I'm OK :) I've realized that sampling twice is wasting of resources without any benefit. Even more - total accuracy of this sensor is too low (less than 10% for full scale of relative humidity (RH)), so it's not needed to measure it with a great precision.
At this moment I have some unsolved points:
1)Is it a good idea to directly measure signal from sensor using ADC? The problem is that sensor has a logarithmic characteristics, so we need too wide dynamical range to measure it's signal with acceptable accuracy for the full scale of possible humidity. For T=+20C, for example, the resistance changes from 5KOhm (80% RH) to 14MOhm (20% RH). So, for constant 1mA source this will give us 5V to 14KV!!! (it's not easy to implement such source, IMHO)
2)May be it's a good idea to implement some external hardware, based on OpAmp, as noted in mentioned PDF (please take a look at it)? Also AC generation may be implemented via hardware. I've also found some strange thing there: they say that the error depends on frequency, and the more frequency - the less accurate result will be. But the calibration results are presented for 1KHz, while the AC source used in reference schematics is "outlet" - 50/60Hz.
Waiting for ideas :)
In reply to Ilia Davidov:
Ilia DavidovIs it a good idea to directly measure signal from sensor using ADC?[...]the resistance changes from 5KOhm (80% RH) to 14MOhm (20% RH). So, for constant 1mA source this will give us 5V to 14KV!!!
Ilia DavidovPDF (please take a look at it)?
Ilia Davidov they say that the error depends on frequency, and the more frequency - the less accurate result will be. But the calibration results are presented for 1KHz
Possibly the worst case. Results are better flor lower frequency and then go suddenly haywire when it comes to DC. I didn't have the time to read through the whole document. It's much too large and also too bad quality to read and understand it in reasonable time (they definitely need a better OCR software for their scanned documentation - or put more effort into the conversion process).
Thanks for your help.
I've decided to check both methods and then report the results:
1) MCU driven 1mkA source of pulsed bipolar DC & directly connection to MSP430 (may be via OpAmp as a buffer)
2)External circuit as noted in this PDF, p.46 : http://cds.linear.com/docs/Application%20Note/an67f.pdf . The schematics is:
Jens-Michael GrossIn fact, with 10% base precision, I guess I can estimate humidity almost as good with my nose :)
I'll forward this wise thing to my customer ASAP :)
The problem is a total cost of solution: if the amount of external ICs will cost more (or equal, or even a bit cheaper) than "normal" calibrated digital sensor with I2C interface - it's not good solution. As I've understood, resistive sensors are good for controlling of known presetted value of humidity, but not for measuring. As I need to measure the humidity, it's may be a better solution to use capacitive sensors.
BTW, I've seen (in some datasheets) modules based on resistive sensors, so called "Signal Conditioners", that provide semi-linear (or known) Vout(RH). Unfortunately, I can nowhere find their schematics, but on photo we can see one IC (may be ASIC, of course), and a couple of discrete elements. Does anybody know ther schematics?Please share it to me, if possible...
Ilia DavidovI'll forward this wise thing to my customer ASAP :)
Ilia Davidov As I've understood, resistive sensors are good for controlling of known presetted value of humidity, but not for measuring.
We had a similar problem with NTC temperature sensors. They have an exponential characteristic (not linear nor logarighmic). By adding top and bottom resistors, we were able to straighten a part of the temperature curve to be fairly linear in the range of interest (-5 to +70°C). It required, however, an OpAMP for impedance changing and some more circuitry to be supply-voltage independent.
Maybe a capacitive humidity sensor would indeed be better suited for this project.
"Maybe a capacitive humidity sensor would indeed be better suited for this project."
Do you have a sensor reference of such type "capacitive humidity sensor"
In reply to INSATien:
You may take a look at HIH-40xx models by Honeywell ( http://sensing.honeywell.com/index.cfm/ci_id/140570/la_id/1/document/1/re_id/0 )
Thanks for the info, ilia.
In my statement, I was just referring to you mentioning them.Personally, I have never used one nor evaluated one for possible use.
All content and materials on this site are provided "as is". TI and its respective suppliers and providers of content make no representations about the suitability of these materials for any purpose and disclaim all warranties and conditions with regard to these materials, including but not limited to all implied warranties and conditions of merchantability, fitness for a particular purpose, title and non-infringement of any third party intellectual property right. No license, either express or implied, by estoppel or otherwise, is granted by TI. Use of the information on this site may require a license from a third party, or a license from TI.
TI is a global semiconductor design and manufacturing company. Innovate with 100,000+ analog ICs andembedded processors, along with software, tools and the industry’s largest sales/support staff.