CCS C Software and Maintenance Offers
FAQFAQ   FAQForum Help   FAQOfficial CCS Support   SearchSearch  RegisterRegister 

ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

CCS does not monitor this forum on a regular basis.

Please do not post bug Reports on this forum. Send them to support@ccsinfo.com

HS1101 capacitance to humidity formula
Goto page Previous  1, 2
 
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion
View previous topic :: View next topic  
Author Message
Ömer Faruk



Joined: 15 Nov 2018
Posts: 42
Location: Çanakkale

View user's profile Send private message Send e-mail

PostPosted: Thu Sep 24, 2020 1:57 pm     Reply with quote

Ttelmah wrote:
The formula is correct. Your capacitance reading is wrong, as I suspected
a long time ago. Their data gives the capacitance at 100RH as 193.1pF
201pF is well above this.


Thanks for your reply. I have attached the graph of sensor. 201pF is the last value in the RH side of the graph. Could you please check it.

https://ibb.co/8P0J5Hg
temtronic



Joined: 01 Jul 2010
Posts: 7674
Location: Greensville,Ontario

View user's profile Send private message

PostPosted: Thu Sep 24, 2020 2:29 pm     Reply with quote

That graph is a 'typical response curve' NOT valid for all sensors, in all conditions... There are several factors that will affect the readings and the 'curve'. Temperature, frequency, time, PCB/wiring capacitance, etc.

Ideally, you need to bench test the sensor and record the readings for every 10% increase in RH, compare those numbers to the 'typical response lookup table' vs the calculated 'reverse polynomial equation'. Be sure to adjust for temperature, frequency, etc. and wait at least 5 seconds for each reading. I'd also take 8 samples and average them, per reading.

As this is an analog sensor, I'd expect quite a variation between several sensor, unless they were from the same 'batch' of production. Even then, the spec sheet says +-2% deviation in RH over 10-90%RH.
Unless you're running 10KHz, you will have to do some 'math' (as supplied), same hold true for temperature (they supply the formula).

The easiest solution, would be to create a 'spreadsheet', with ALL the formula and SEE what the results are. Maybe your workstation in only 20*C and sampling is 4KHz. We don't know BUT that does affect the %RH. I don't know what range of variation will happen, just that you must consider all factors.

Every analog sensor needs to be calibrated against KNOWN standards, this is something you will have to do, especially with capacitance based sensors !

Jay
Ttelmah



Joined: 11 Mar 2010
Posts: 16408

View user's profile Send private message

PostPosted: Thu Sep 24, 2020 11:56 pm     Reply with quote

and (of course), if you do this, most spreadsheets can then calculate the parameters for the best fit polynomial for your sensor.

My guess would be that in fact you have a very significant fixed capacitance
in parallel with the sensor, so all the values are perhaps at least 10pF
high. The curve will then be flatter than the example calculations,

You need to understand they are giving you 'typical' figures, but the
real figures will differ. These are not 'calibrated from the factory'.
temtronic



Joined: 01 Jul 2010
Posts: 7674
Location: Greensville,Ontario

View user's profile Send private message

PostPosted: Fri Sep 25, 2020 7:20 am     Reply with quote

I'd like to see the results from actually testing the sensor, preferably in an 'environmental chamber' where you can control the humidity, from 0 to 100%.
A very simple test though, is to read/record and show us what the reading is 'on the bench' and what 2 %RH testers/meters say.
That at least would be a starting point to determine why the reading is high.
Ttelmah



Joined: 11 Mar 2010
Posts: 16408

View user's profile Send private message

PostPosted: Fri Sep 25, 2020 11:18 am     Reply with quote

There is another factor, that unless the code generating the capacitance
reading has itself been calibrated by actually using some high accuracy
capacitors instead of the sensor, it may well simply be returning an
incorrect reading. There are tolerances in every component used to
generate this.
Ttelmah



Joined: 11 Mar 2010
Posts: 16408

View user's profile Send private message

PostPosted: Sat Sep 26, 2020 12:08 am     Reply with quote

It's worth perhaps pointing out that this is one of the inherent problems
with this type of sensor. They need calibration, so if you are building a
device to use them, you will have to calibrate the device. This is made
worse by the tolerances inherent in the circuits to actually read the
capacitance, so you have an uncalibrated circuit reading an uncalibrated
sensor....
The alternative is to buy a sensor that is calibrated from the factory,
and even better use one where the output is digitally sensed rather than
depending on capacitance. Result is that you have a 'reading' out of the
box. A chip like the HIG6130 for example. These are available in SPI and
I2C versions, and give temperature and RH.
temtronic



Joined: 01 Jul 2010
Posts: 7674
Location: Greensville,Ontario

View user's profile Send private message

PostPosted: Mon Sep 28, 2020 6:56 pm     Reply with quote

The problem often boils down to pricing. A 'simple' analog sensor is say $1, the 'good' analog (calibrated) is $2, the 'great' digital one $5. For $5 you can buy 100 and they're ALL the same...cut some code and they all report the same numbers. Buy 100, $1 units and they ALL need to be calibrated,recorded,and software is UNIQUE to the sensor (gain, range, slope, etc.). Sigh..you save on the cheap part, pay for the R&D time and cost.

Reminds me of the 'communications module' for the remoter energy control system I design/install 4 decades ago,used a simple opamp oscillator for 24Hz clock. R had a +5ppm temp coff, C had a -5ppm temp coff so they tended to balance each other when it got cold....usually...However accounts 30+ 31 would go 'missing' or funny when at the end of 10 miles of copper wire. The cure was to design/build/refit a crystal based clock. That consisted of xtal, caps and 3 4000 CMOS devices. Deadly accurate no matter how hot or cold it got.
Ah the good old days....

I no longer use LM34s either..... DS18B20s....are my temp sensors today.

Jay
Display posts from previous:   
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion All times are GMT - 6 Hours
Goto page Previous  1, 2
Page 2 of 2

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group