JamesSmith
- Nov 15, 2024
- 6
- Joined
- Nov 15, 2024
- Messages
- 6
Hello everyone,
After experimenting with Arduino for some time, I decided to create something a little more practical this time. I want to design a fan system that is temperature-controlled (sounds interesting
).
The strategy is:
To keep an eye on the room temperature, use a DHT11 sensor. If the temperature goes above, let’s say, 30°C, the fan should turn on.
If it goes below 30°C, the fan should turn off. (A cool but optional concept) I want to use an LCD to show the temperature.
The problem is that, although I had assumed this would be easy, I've encountered a few obstacles. When the temperature approaches 30°C, the fan continues to turn on and off too frequently.
Is it possible to prevent this abrupt switching? The fan I'm using has a 5V DC motor, however, when I switch it on via the Arduino pin, it doesn't spin correctly. Is a relay or something else required? I'm considering adding a color-changing LED (blue for normal, red for hot), but I'm not sure how to get it to work with the DHT11 and fan simultaneously. How can I prevent the fast ON/OFF problem? I'm not sure what "hysteresis" is or how to use it, but someone suggested it. Is there any method to supply the fan with power? It appears that the Arduino pin is not strong enough to manage it directly. I would be very grateful for some advice. I feel like I’m close, However, there are too many little problems preventing me from completing this project.
Thank you very much in advance!
P.S. It would be great if someone could provide a nice, beginner-friendly instruction on hysteresis or how to utilize relays with Arduino. I can share my project if required.
After experimenting with Arduino for some time, I decided to create something a little more practical this time. I want to design a fan system that is temperature-controlled (sounds interesting
The strategy is:
To keep an eye on the room temperature, use a DHT11 sensor. If the temperature goes above, let’s say, 30°C, the fan should turn on.
If it goes below 30°C, the fan should turn off. (A cool but optional concept) I want to use an LCD to show the temperature.
The problem is that, although I had assumed this would be easy, I've encountered a few obstacles. When the temperature approaches 30°C, the fan continues to turn on and off too frequently.
Is it possible to prevent this abrupt switching? The fan I'm using has a 5V DC motor, however, when I switch it on via the Arduino pin, it doesn't spin correctly. Is a relay or something else required? I'm considering adding a color-changing LED (blue for normal, red for hot), but I'm not sure how to get it to work with the DHT11 and fan simultaneously. How can I prevent the fast ON/OFF problem? I'm not sure what "hysteresis" is or how to use it, but someone suggested it. Is there any method to supply the fan with power? It appears that the Arduino pin is not strong enough to manage it directly. I would be very grateful for some advice. I feel like I’m close, However, there are too many little problems preventing me from completing this project.
Thank you very much in advance!
P.S. It would be great if someone could provide a nice, beginner-friendly instruction on hysteresis or how to utilize relays with Arduino. I can share my project if required.



