2
\$\begingroup\$

I need to build a humidity sensing circuit that feeds an analogue to digital converter. (This converter is then going to send its signals to a raspberry pi for analysis etc). The sensor will be about 0.5m away from the amplifier circuit (As it will be inside a climate cabinet, and the circuitry will be outside) and I have seen in my research that having a distance between the circuits causes further complications.

I have found a capacitive humidity sensor that fits my temperature range needs (IST MK33). This has a range of capacitance of approx 290pF to 340pF (showing 0% relative humidity through to 100%). I need to then convert this somehow into a suitable input for an MCP3008 ADC, I'm assuming a range of 0v-5v will work. This will then communicate via SPI to the Raspberry Pi.

I have a 24VDC supply originally but I shall also have 5V, and 3.3VDC supplies available to drive this circuit because of the raspberry pi. I looked at the circuit and answers in this question: Converting variable capacitance value to variable DC voltage level but what with the difference in the range of the capacitance value I wondered if this is still suitable?

So my question is: is the circuit in the above link still suitable? or can someone suggest a different circuit with suitable values that would work? I'm very new to all this so I've been struggling and the data sheet for the sensor hasn't got any example circuits, which normally save me! Thanks in advance. :)

\$\endgroup\$
1
\$\begingroup\$

The way to to this with an absolute minimum of support circuitry is to use a DIO output to charge/discharge an RC circuit consisting of your capacitive sensor and some resistor to produce a time constant that makes sense for your application.

Start with the DIO low, leaving enough time to bring the resistor voltage to zero. Turn the output on and start a timer at the same time, and time how long it takes for the resistor voltage to reach some predetermined level. Many microcontrollers have a comparator peripheral. If you use one of these, you need NO external parts.

I don't believe the Pi has such capabilities, but an external comparator is not that big a deal.

Indeed, the need to build circuitry to create an analog voltage proportional to capacitance isn't the best way to go. the methods I like most for capacitive sensors all involve counters, not ADC's. If this isn't Pi-friendly, adding an 8-pin microcontroller to use the technique I describe, and then generate a PWM signal that you can capture with the Pi.

You can certainly use the circuit in the answer you point to (with suggested modifications as described in answers, as the original won't work), but it's parts intensive. It's also nonlinear, and you would need to use a curve fit or look up table to get your capacitance value.

\$\endgroup\$
0
\$\begingroup\$

It depends on what accuracy you need. The capacitive sensor is most accurate, but it also requires more circuitry, especially to reduce the potential of line noise. A balanced signal is paramount. Drive the capacitor with a fairly high voltage (so SNR is high) balanced sine wave signal through two precision resistors (one to each leg). The frequency has to be notably less than half the sampling frequency (well below Nyquist). Say 10kHz or so for a 200ksps ADC. The resistors should allow a decent level signal level to make it to the ADC. Twist the line fairly tightly, but then you'll have to consider the line capacitance as well. Of course, use the ADC in balanced mode. Calculate the peak-peak you should get per humidity. The code would take an average of many peak-peak measurements.

\$\endgroup\$
  • \$\begingroup\$ I suppose you could also drive it with a square wave if you could calculate everything correctly. If you had a known humidity source then you could calibrate that way. \$\endgroup\$ – Digiproc Jul 13 '16 at 12:08

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.