Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

Embedded C - Humidity Sensor Interaction

Status
Not open for further replies.

05026652

New Member
Hi guys,

First off I am very new at electronics and embedded systems. I have come from a Computing background but aiming expand my knowledge base.

Now the question in mind, I have an embedded project that uses a humidity sensor - now I am trying to figure out from a linear chart representing Typical Output Voltage vs Relative humidity, how I can achieve a value that would be used inside a lookup table.

Apologise if this doesnt make sense, I will try and clarify certain things as we go along.

Heres the datasheet where the linear chart is on, page 4
**broken link removed**

Thanks
 
Ai thats right, and no I haven't achieved yet. I have done something similar before (in class) where a datasheet was provided for a thermistor - and we needed to find the ADC value for temperatures ranging from 0 -40. We used an excel spreadsheet and using gradient values from the datasheet was able to do this. Now I need to be able to do this for the humidity sensor, however im not sure what I can do with the datasheet provided.
 
Here's the Voltage versus %RH graph:
**broken link removed**

But I'm not sure by what you meant by "how I can achieve a value that would be used inside a lookup table."... It looks like you just have to read the graph and re-produce the table for a certain range/resolution?

Regarding ADC, there are issues regarding reference voltage, so as to say if the Vref is 4V, therefore at 100% RH the ADC value is 255 for an 8-bit digital value. That is if you have to address to such issues. :)
 
Last edited:
Some notes.

Looks like table 2 has much of what you need to use a formula rather than a lookup table.

The zero offset is .826V and the slope is 31.483 mV/%RH.

Next you have to determine the voltage to ADC output. That has been done many times. If you want better results use an external voltage reference.
 
Ah thanks guys for sorting me out....I was just a bit concerned that simply using the graph to produce the answers.....needed to think inside the box this time :)!

Thanks
 
Status
Not open for further replies.

Latest threads

New Articles From Microcontroller Tips

Back
Top