This very common general purpose module has two sections - temperature and humidity.
Each section has its own volt-free relay contact. The heating section can control either heating or cooling (but not both) and the humidity section can control humidifying or dehumidifying.
If switching mains power or high loads I recommend using an off board relay with a 12V coil switched by the module's relay contact.
For safety reasons I always recommend having an extra safety thermostat in line with heating elements in case of relay or circuit failure. The safety thermostat can be a simple bimetallic one with a fixed limit temperature.
Each section has its own two buttons underneath its three digit display.
To set the heating/cooling mode and temperatures, start by holding the left button down until the display starts to flash. You can then adjust the relay-on temperature, with the left button incrementing and the button next to it decrementing the temperature. Holding a button down makes it count quickly after a slight pause. If you pause between presses too long the setting is stored and the display reverts back to normal mode.
Then set the heat/cool relay-off temperature by holding the second button from the left and adjusting as before.
If the on temperature is lower than the off temperature it will act as a heating control.
If the on temperature is higher than the off temperature it will act as a cooling control.
Then set the humidity settings in the same way using the two right hand buttons under the humidity display.
All settings are stored in non volatile memory.
Pressing the buttons briefly in normal mode will display the current temperature/humidity setting on that button.
To reset all the settings to factory defaults, press all four buttons down together until the display shows 888888.
Take care to mount the sensor module where it can't get wet or contaminated with oils or solvents. The humidity membrane may have its accuracy skewed if it is contaminated.
The search keywords to find these modules are "humidity M452". Typical cost for both the control module and sensor as a pair should be less than £10 shipped.
An interesting use for this module could be to wire the two contacts in series to directly control a small positive pressure ventilation fan. That way it could be programmed to turn the fan off if the air was too cold or humid.
If you enjoy these videos you can help support the channel with a dollar for coffee, cookies and random gadgets for disassembly at:- https://www.bigclive.com/coffee.htm
This also keeps the channel independent of YouTube's algorithm quirks, allowing it to be a bit more dangerous and naughty.
#ElectronicsCreators

Let's take a look at an incredibly useful Temperature and Humidity control module available from your favorite Chinese supplier and what makes this module quite special is its versatility. The heat side can be used for heating or Cooling and the humidity side can be used for humidifying or dehumidifying control systems and the sensor. To avoid all the complications of humidity sensing, they're using a dedicated sensor a very standard chip inside this remote module that then communicates with data to the actual processor. So if you're looking on program instructions for this, I will put a full guide down in this description down below because there's not a lot of information about it online.

But fortunately it's very straightforward. You've got a 12vt supply going into in the middle here. it does have polarity protection. this is good, and you've got two relays and each relay has a normally open uh set of dry contacts with no voltage on them.

I Don't recommend running High loads like heaters or low loads like say, compressors or stuff like that with a high inrush current. If you want to drive those, use the small relay with its contact to switch a 12vt supply to an external relay. Now for programming this, it's very straightforward. You've got two buttons here for the Heat and cooling side and you got two buttons here for the humidity side.

Of those two pairs of buttons, the left one is the temperature the relay will turn on and the right one is the temper. the relay will turn off and depending on where the whether the second temperature you put in is higher or lower will determine whether it's a heating or cooling application. So in this case, uh, pressing the button briefly it shows that it's going to turn on 25 C and press it again. It shows it's going to turn off at 30 C So that is for um Heating and that's why it's lit at the moment cuz it is.

Actually it's a low temperature so so it's one to heat. Likewise, this one, it's designed to turn on at 50% humidity and off at 70% humidity. So it's off because it's already reached that because I've been handling this and it's raised the humidity of the unit, it reacts very quickly. Uh, the chip in there is quite interesting.

to change the settings you uh, press and hold say I want to change this one and it starts flashing and then you can use the left button for up and holding it will make it scan up quickly or you can just do it with one or two stabs just to get it to the Fine value. And likewise, once it sto flashing you can. Then if you wish, you can set the off temperature by holding this one down and running it down if you want or up if you want just whatever you want to set it to, it takes a bit of faffing around. It's quite, uh, tricky with these buttons for setting those uh values, but once it's done, it's done.

If you really mess up, uh, just press all the buttons at once and hold them. This isn't documented, there is no manual uh, hold all of them and it will display all eights. Let go and it does revert to factory defaults now. Uh, I think I've covered just about everything here.
You've got a little red LED for this relay, a green LED for this relay that's more or less it right to I'll put this out the way now and we shall look at the sensor and then the schematic of the unit. So here is what the sensor looks like inside there. It's a very big circuit board, but it's a very small chip. This is a chip here.

It's an Sht20 and the main requirement is that it has a decoupling capacitor in the vicinity and it is designed for 3.3 volts. You've got four connections. You've got the Zer volts which is connected to this large ground plane and also a ground plane the other side, which will, uh, basically provide some screening for the chip so it doesn't pick up uh, noise from adjacent electrical equipment. So you've got your Z volt, your 3.3 volts, and and then you've got data and clock and it is bidirectional.

Uh, the processor sends requests for data and then this sends data back. Uh, things worth mentioning, contaminants and soldering. You want to be careful not to contaminate this little module. It's one of these things.

If you solder it, don't start doing it with isopropyl, alcal or anything like that that can actually damage the little membrane in here. Um, soldering. You have to be very careful not to solder it. Just don't linger with the solder IR too long.

It's just designed for a quick tap of the solder to sold it quite quickly. Um, the pull rate is quite interesting. The Temptation might be to have a very high update speed on your processor by sending a request for the temperature and humidity continually and just going. pull.

Pull Pull Pull Pull Pull pull. But you're better not doing that cuz each time you do that, it wakes this little chip up and it starts processing and testing the sensor. And it actually generates a little bit heat itself. And it can actually skew its temperature settings.

so you're better actually just pulling it just when needed, just very occasionally. Just, uh, refresh the new values. Let's take a look at the main circuit board. You've already seen the module from this side and it's very straightforward.

It's got the Turner blocks, the volt-free contacts going to this relay, the volt free contacts going to this relay, and then it does have polarity protection on the 12vt DC input Supply, and a little bit of smoothing there. It's got the two S segment displays, which are standard modules. Note that it says this is module Hw- M452. It's also sold under the name X- M452.

The main thing is, if you search on your favorite Chinese site for humidity m452, you'll find these and the cost is typically 8. Beware of listings that seem really cheap. They may not include a really important bit. Some of them, uh, just list this sensor, some of them just list the module.
You're better getting the two of them together. There very little difference in price and uh, it would be quite. You know it just simplifies things getting all together. And there are the four buttons at the bottom: uh, temperature setting on uh on relay on temperature really off temperature and the humidity really on uh on humidity and really off humidity, right? Let's take a look at the other side and it does have a mystery bit that had me perplexed.

It took a bit of reverse engineering. Um, I shall Zoom a little bit closer than that I zoomed out a bit more than I was expecting there. Well, that'll do and I'll turn the power supply off as well. So here's the incoming: Supply down here.

there are the relay contacts. You can see there slightly reinforced tracks just going straight over there. but I don't recommend using the relays for switching High Loads the input for the 12vt supply goes through a diode for Po protection and then the 12 volts go straight to the relays and also to the resistor and Led. Arrangement Across the relays, there's the transistors that switch the relays and there are uh back EMF Spike suppression diodes across the coils.

Then it gets a bit weird. there is a 3.3 volt voltage regulator with little stack capacitors and a 5vt regulator with its stack capacitors and the 5vt regulator Powers the microcontroller and this uh Sim4 HC 164 d Uh shift register which basically takes zero data in converts it to parallel and it it does the Uh eight segments of the seven segment display in the decimal point and then the processor just switches each digit on and turn via this Uh 47 Ohm Resistor Here is the port that goes out to the sensor and this circuitry here had me so puzzled for a while because it was new to me. I've never seen it done this way before. It is a level shift shifter circuitry, but it's bir directional level shifter circuitry that can convert between the 5vt logic levels to the 3.3v levels.

Um, after that and I'll show you that in the schematic. Just the buttons and that's it. nothing else. All the bouncing is built in and a little programming port for the factory that makes them right over to the schematic and we can explore it.

and I have abbreviated this because a lot of it is the same secetary repeated multiple times. So here's a 12vt supply. Comm In there's a poor protection dive. that's a great thing.

I'm glad to do that. There is a smoothing capacitor. it's hidden from view, but I Saw the 25 volts and the value was hidden from view. but it started the two.

Given its size 25 volt I would say 220 microfi, it kind of fits that. Then the 12vt rail goes over to the relays and the relays are switched by these transistors from the processor via little 2K base resistor. It's got a optional position in here as if they're basically considering that they might use mosfets at some point. The relay coil has a diode across it uh to shunt the collapsing field Spike when the transistor turns off and then it's got a resistor and led 2K resistor for the green LED which is a Gallum Phosphide one.
uh, low efficiency and 4.7k I think it was for the red LED Then we get the two regulators and interestingly, and I've not shown all the capacitors here. Uh, Interestingly, the they've both got a 20 Ohm resistor in series with them which will limit in rush. I Suppose act have F as well I suppose Really? not really sure that H but it will also most importantly help dissipate some of the power for any current that flows through this. this resistor will take a lot of the strain off these Regulators by dissipating bit heat itself and dropping part the voltage.

So the 5 volts feeds the microcontroller which has four buttons just pulling to the Zer volt. Rail and it's also got the display here with the Sero parallel converter. the Sim4 Hc1 144 classic uh, Seos style Uh TTL chip. Um, but it's got data and clock and it sends the data for the display out for each digit.

So it for the first digit, it will send the data out to represent that number and then it will turn that digit on Via one of six resistors here from direct pins that turns that digit on, Then it displays that number, then it shifts the data for the next digit in and then it lights the next digit up and it just basically keeps scanning across the display. Um, there is the Sh the Sht 20 Uh combined temperature and humidity module. that saves a lot of complexity because measuring humidity from a membrane requires AC sensing. It's very complex, very hard to do with conventional circuitry.

It's nicely put on one tiny, cheap component. Here's a 3.3 Volt Supply And here is the freaky bit. There's two of these. These are Biod directional level shifters.

What these do? They use a single mosfet a Bss1 123 and there's a slight difference to the usual way this is shown in Uh schematics. They've got a 10K resistor to the gate, but a lot of them just tie it straight to 3.3 volt rail. But the main thing is that normally both these pins are pulled up to the Uh appropriate Lo Uh power rails. So the logic level high is 3 .3 Vols here and it's 5 Vol here.

When one of these devices asserts authority over the B BYOD Direction communication and say takes the this low, it basically couples it over so that it basically pulls this pin low as well. I'm not quite sure how that works, don't really know it works, but they both can go to the zero volt Rail and the mosfet is uh, basically just acting as a separator for this of high voltage Uh supplies. But in short, that this chip sees it toggling between 5 Vols and 0 volts. and this one sees it toggling between 3.3 volts and Z volts because you can't put a 5vt logic level straight over to a 3.3 volt chip.

And if you try putting 3.3 volt logic levels to 5vt chip, it may not actually provide reliable Um detecting of that logic level. Um, and that is it. It's a fairly straight forward circuit, so I will include the full instructions. Program this down below because it's one of these things that these modules are very good, but they never seem to have the data for programming them online.
Um, but it's very neat, very functional. I Like the fact it can be configured. say to run a heater or an air conditioner, or a humidifier or a dehumidifier just by um, the difference between the temperatures and the the start and the stop uh modes. But there we have it.

the M452 humidifier module or humidity module Um, if you head down to the description I'll include any data that I've forgotten and also the full instructions on how to program this. Very neat indeed.

11 thoughts on “How to use the xh-m452 temperature and humidity module”
  1. Avataaar/Circle Created with python_avatars @robertcornelius3514 says:

    I heard this Host supports crooked Joe Biden.

  2. Avataaar/Circle Created with python_avatars @Chris_Grossman says:

    This is how the bi-directional logic works. When the sensor is the source the mosfet turns on when the sensor output is low and pulls the microcontroller input low. When the microcontroller is the source and goes low it pulls the input to the sensor low through the body diode in the mosfet. This the low input state for the sensor will be one diode drop above ground, not all the way low. You are correct that the resistor in series with the gate is not needed.

  3. Avataaar/Circle Created with python_avatars @srpacific says:

    Have you considered changing your shutter speed so that you don’t get the rolling digits on displays? Should be able to set it to “180 degrees” or approx 1/48 or 1/50th of a second.

  4. Avataaar/Circle Created with python_avatars @robjal says:

    I wonder why they did not power the complete device by 3.3 Volt only. Saves a level shifter.

  5. Avataaar/Circle Created with python_avatars @TimoNoko says:

    The problem with these Chinese relays seems tobe that there is no spark suppression. I have not had any close-welded since I started using RC quench circuit. 100 ohms and 100 nF.

  6. Avataaar/Circle Created with python_avatars @DeathbyKillerBong says:

    i would like you to test it at -10c, i have the xy-tr01 model of this with the big blue screen and when it goes below -9.9c it displays at c instead of a 1, so -13.2c is recorded as c3.2, does this have same issue? also you forgot to mention the sensor cable can be extended up to like 100 meters

  7. Avataaar/Circle Created with python_avatars @lindonwatson5402 says:

    love this Mr Clive

  8. Avataaar/Circle Created with python_avatars @robertwoodson4175 says:

    I wander if this would work with a low voltage heater, fan and humidifier for something like an animal enclosure. Where it would control a 12v heating lamp or pad. And a piezoelectric humidifier

  9. Avataaar/Circle Created with python_avatars @austinpowers3679 says:

    Thankyou very interesting. Whats the MCU? Guess its an old one working on 5v .

  10. Avataaar/Circle Created with python_avatars @xbahn says:

    Does this dohickey support farfredneugenheit?

  11. Avataaar/Circle Created with python_avatars @tweake7175 says:

    Good timing. I'm in the middle of prototyping a modification to a dehumidifier using a very similar unit.

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.