How to connect components of a temperature-controlled house project?

Right now, I am making a temperature-controlled house using the following materials:

  • Arduino Uno
  • DHT11 temperature sensor
  • 12V DC fan (4 pins)
  • Switch Drive High Power MOSFET Trigger Module
  • 12V DC power supply

Does anyone have an idea how to connect all of these materials to create the temperature-controlled house? As far as I know, I think that the fan turns on or off and adjusts depending on the temperature of the room. There may be tutorials for how to attach all of them but some materials have been replaced (e.g. replacing DHT11 with a thermistor and the MOSFET with a regular N-channel mosfet with three pins).

Thanks for the help!

Switch Drive MOSFET Trigger Module.jpg

Fan with 4 pins.jpg

Switch Drive MOSFET Trigger Module.jpg

Fan with 4 pins.jpg

I don't see how those materials can control the temperature of a house. There is no source of heating, no source of cooling. Please explain further what you want to achieve. What kind of house is this?

Also please give a link to the spec. of the fan. You say 4 pins, and I see 4 pin molex connectos, but I only see two wires going to the fan. If the fan truly has 4 wires, then you might not need the mosfet module to control it.

Oh I thought it's called pins. My bad.

Here's the schematic diagram of the front side of the fan and the temperature-controlled house. The fan was bought at a local store.

Fan Specs.jpg

Temperature Controlled House.png

Fan Specs.jpg

Temperature Controlled House.png

PaulRB:
I don't see how those materials can control the temperature of a house. There is no source of heating, no source of cooling. Please explain further what you want to achieve. What kind of house is this?

From the schematic diagram, the fan will turn on if the environment is hot and turn off if the environment is cool. There's a source of cool air and a heat source.

When the house gets too hot you want to blow the hot air out into the environment, instead of turning the heat source off? If so, please forgive me, but that is a stupid idea.

Idahowalker:
Your drawing is a good start.

How far away do you plan on placing the sensor from the MCU?

From your drawing, you'll need 2 MCU's. One to control the fan and one to control the environmental sensor. Most likely you want the MCU with WiFI built-in and not some add on thing ( ESP8266 or ESP32). I use BME280's BME680's SPI (for speed). You can put the MCU's in a small box up on the wall and in the hot air out location.

I'd drive the fan with a el-cheapo motor controller.

It depends on the length of the connecting wires since it's a small scale project. The MOSFET will handle the controls of the fan and the DHT11 will be used as a sensor. The problem is how to connect them as I have no idea how to connect them to each other and to the Arduino Uno.

PaulRB:
When the house gets too hot you want to blow the hot air out into the environment, instead of turning the heat source off? If so, please forgive me, but that is a stupid idea.

I'm sorry but I am stuck with this concept for my project. The fan will be used as an exhaust fan and the heat source won't be turned off to demonstrate if the exhaust fan will turn on.

This is not a full size house for people? Is it a model, like a doll's House?

Break the problem down.

First, install a library for your sensor and upload one of the example sketches that comes with the library. It will probably print the temperature to the serial monitor. Connect up the sensor and test it using that sketch. For dht11 I think you may need a pull-up resistor for the data pin.

Next, upload the blink sketch and use that to test your MOSFET module and fan. I'm not sure how to wire your MOSFET module, I have never used one like that, so post a link to a page showing the connections.

PaulRB:
This is not a full size house for people? Is it a model, like a doll's House?

Break the problem down.

First, install a library for your sensor and upload one of the example sketches that comes with the library. It will probably print the temperature to the serial monitor. Connect up the sensor and test it using that sketch. For dht11 I think you may need a pull-up resistor for the data pin.

Next, upload the blink sketch and use that to test your MOSFET module and fan. I'm not sure how to wire your MOSFET module, I have never used one like that, so post a link to a page showing the connections.

Sure sure. I have an idea that I need to install some libraries since I made an Arduino project three years ago. Though I don't understand how to connect the wires in the MOSFET module.

The mosfet module looks easy enough to figure out how to connect. It does not appear to have an opto-isolator, so I guess that the "-DC in" and "signal GND" are connected and the "+DC in" and "+DC out" are connected. Draw how you think you should connect it and we will check it for you.

PaulRB:
The mosfet module looks easy enough to figure out how to connect. It does not appear to have an opto-isolator, so I guess that the "-DC in" and "signal GND" are connected and the "+DC in" and "+DC out" are connected. Draw how you think you should connect it and we will check it for you.

I'm not sure about the PWM and GND tho.

That's OK if you only want to switch the fan on or off. If you want to vary the fan speed, you need to use a pwm pin on the arduino. They are marked with "~". But for your first attempt, on or off will be simpler, so it does not matter for now.

You can also run the Uno from the 12V source. You can connect 12V to the barrel socket or the Vin pin (+GND, of course). Powering Uno from 12V can cause problems, causing the Uno's 5V regulator to overheat. But in your circuit, only the dht11, the mosfet module and the Uno itself need to be powered by 5V, and they only need a little current, so there should be no overheating problems.

PaulRB:
That's OK if you only want to switch the fan on or off. If you want to vary the fan speed, you need to use a pwm pin on the arduino. They are marked with "~". But for your first attempt, on or off will be simpler, so it does not matter for now.

You can also run the Uno from the 12V source. You can connect 12V to the barrel socket or the Vin pin (+GND, of course). Powering Uno from 12V can cause problems, causing the Uno's 5V regulator to overheat. But in your circuit, only the dht11, the mosfet module and the Uno itself need to be powered by 5V, and they only need a little current, so there should be no overheating problems.

Thanks! I will use these connections but first I need to try to switch the fan on or off.
I will come back here if there are any problems.