Programming sensors

MrChips

Joined Oct 2, 2009
30,824
Before we go down the rabbit hole, let us get a few questions answered.

1) Why do you want to measure relative humidity?
2) Is this associated with some bigger project?
3) If so, what is the project?
4) If not, why not start with something simpler such as measuring temperature?
5) Is this for a school assignment or project?
 

Thread Starter

man111111

Joined Mar 15, 2020
9
Before we go down the rabbit hole, let us get a few questions answered.

1) Why do you want to measure relative humidity?
2) Is this associated with some bigger project?
3) If so, what is the project?
4) If not, why not start with something simpler such as measuring temperature?
5) Is this for a school assignment or project?
Hi, I don't study electronics at school it is just a hobby and an eager to learn different electronic components.

In addition, I've just looked into temeprature sensors and it seems like i can make one by just using a potential divider circuit so i will be willing to do this considering it is needed for a humidity sensor.

Thanks
 

SamR

Joined Mar 19, 2019
5,054
Which uC (microcontroller) are you using? Can you post a photo of the RH sensor? If you are using Arduino, do you know how to use the serial monitor? You have 3 separate major parts here, sensor, uC, display. Each has it's own set of datasheets. Your task is to first learn what each part is and how it functions. Then how to integrate them in order to input the data to the uC. Manipulate the data in the uC to a usable format. Then output the data from the uC to the display.
 

jpanhalt

Joined Jan 18, 2008
11,087
If you want a very nice analog chip that you can use with a thermocouple (you can't use a simple divider with that) , I suggest the MAX31855. A digital version is MAX31856. Breakout boards for each are at Adafruit (w/ Arduino code) and maybe SparkFun. You can also order those BOB's from distributors like DigiKey.
 

MrChips

Joined Oct 2, 2009
30,824
As you are now learning about electronics and electronic components and circuitry, it is important to keep an open mind and learn that there are many different ways to arrive at your goal.

There are many different temperature sensors and different ways to utilize them. A voltage divider is not necessarily the only way or even best way to measure a given parameter.

Here are some common electrical/electronic temperature sensors:

1) Thermocouple
2) Thermistor
3) Semiconductor device

From category (3) above, look up LM35 temperature sensor.

Once you have selected a sensor, determine how you are going to extract the desired parameter, what you are going to do with it, and how you are going to display that information if required to do so.
 

Thread Starter

man111111

Joined Mar 15, 2020
9
Chill out fellas. This is a new member who is just getting his/her feet wet.

The datasheet for HCZ-J3 is available here.

View attachment 201644

Now you need a system that will measure impedance and temperature.
How much experience do you have to tackle this?
Hello again,

I just completed the temperature sensor and it seems to be working but needs more testing... :)

How should I use the graph? The only way i can think of doing it, is by having many lines of code comparing the input with the provided data but that will take me a very long time to complete. And not all humidity values are given for each temperature; data sheet goes up by 5°C
 

LesJones

Joined Jan 8, 2017
4,191
If you used a different sensor (A BME280) Then you do not need to calibrate it. When it is manufactured it has a set of calibration correction values programed into it. The raw reading together with these correction values give an accurate reading.

Les.
 

dendad

Joined Feb 20, 2016
4,481
Have you got an Arduino writing stuff to a display yet?
If not, do that first.
I prefer I2C LCDs or OLED displays. As mentioned earlier, these I2C devices require only 2 wires, other than 5V and gnd.
Build your project in steps. Arduinos are very good starting devices.
Let us know how you go with getting a display running.
 

Thread Starter

man111111

Joined Mar 15, 2020
9
Have you got an Arduino writing stuff to a display yet?
If not, do that first.
I prefer I2C LCDs or OLED displays. As mentioned earlier, these I2C devices require only 2 wires, other than 5V and gnd.
Build your project in steps. Arduinos are very good starting devices.
Let us know how you go with getting a display running.
Hi i've already got the LCD display working with the temperature sensor that i just got working
 

OBW0549

Joined Mar 2, 2015
3,566
How should I use the graph? The only way i can think of doing it, is by having many lines of code comparing the input with the provided data but that will take me a very long time to complete. And not all humidity values are given for each temperature; data sheet goes up by 5°C
Do yourself a BIG favor and abandon that wierd sensor; it's going to prove WAY too hard for you to use.

Take @LesJones advice and use a BME280 temperature/pressure/humidity sensor that can communicate digitally with your Arduino. Adafruit sells a breakout board for the BME280 and provides both a driver library for it and a tutorial on how to use it.

Do things the smart, easy way first and learn to walk before you try to run, so to speak.

Later, as you learn more about electronics, then you can tackle oddball sensors like the HCZ-J3 if you still want to.
 

MrChips

Joined Oct 2, 2009
30,824
What are you using to measure and display temperature?

1) What is the temperature sensor?
2) What is the electronics platform, Arduino?
3) What displays are you using?

Your approach to temperature calibration will depend on:

1) the temperature sensor
2) the electronics platform
3) the range, resolution, and accuracy of displayed temperature

In the simplest scenario, the sensor output vs temperature relationship is linear.
In most cases, the sensor output is non-linear. Depending on how non-linear is the relationship, you can use different techniques such as:

1) table look up
2) table look up with extrapolation
3) piece-wise linear fit
4) transformation to a linear fit
5) non-linear curve fit
 
Top