0% found this document useful (0 votes)
9 views6 pages

Temperature Control With Arduino and PWM Fans

This document outlines a DIY project for temperature control using Arduino and PWM fans for a server/network rack. It details the components used, the construction of the control panel and case, and the coding required to manage fan speed based on temperature readings. The project aims to provide efficient cooling while minimizing dust intake and noise, with a total estimated cost of €74 for the components.

Uploaded by

n23chte001
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
9 views6 pages

Temperature Control With Arduino and PWM Fans

This document outlines a DIY project for temperature control using Arduino and PWM fans for a server/network rack. It details the components used, the construction of the control panel and case, and the coding required to manage fan speed based on temperature readings. The project aims to provide efficient cooling while minimizing dust intake and noise, with a total estimated cost of €74 for the components.

Uploaded by

n23chte001
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 6

instructables

Temperature Control With Arduino and PWM Fans

by Bonny97

Temperature control with PID on Arduino and PWM fans for least, being >100€ for 4 230V ceiling-mounted fans
DIY server/network rack cooling
with a thermostat control. I didn't like the thermostat
A few weeks ago I needed to setup a rack with
drive because it sucks in a lot of dust when powered,
network devices and a few servers.
because of the fans going full power, and gives no
ventilation at all when unpowered.
The rack is placed in a closed garage, so the
temperature range between winter and summer is
So, unsatisfied with these products, I decided to go
pretty high, and also dust could be a problem.
the DIY way, building something that can smoothly
mantain a certain temperature.
While browsing the Internet for cooling solutions, I
found out that they're pretty expensive, in my place at

1. Fans are up there


2. The panel is mounted with 2/3cm spacers behind it to make clearance for
the fans

Temperature Control With Arduino and PWM Fans: Page 1


Step 1: How it works

To make things a lot easier I went for DC fans: they're them through PWM.
much less noisy than AC fans while baing a bit less
powerful, but they're still more than enough for me. The temperature and fan speed are reported through
a 4-digit 7-segment display, fitted on a rack-mounted
The system uses a temperature sensor to control four aluminium bar. Besides the display there are two
fans that are driven by an Arduino controller. The buttons for tuning the target temperature.
Arduino throttles the fans using PID logic, and drives

4
3

5 6
1

1. Control panel
2. Control board
3. PSU
4. The thermometer is under here
5. Power switch and light are on the front of the box
6. Control cable, USB and reset button

Temperature Control With Arduino and PWM Fans: Page 2


Step 2: What I used

Note: I tried to realize this project with things I had lying in the house, so not everything can be ideal. Budget was a
concern.

Here are the components I used:

Hardware
One acrylic panel: used as the base (€ 1.50);
Four 3.6x1cm L shaped PVC profiles (€ 4.00);
One aluminum panel: cut at 19" in width (€ 3.00);

Electronics
Four 120mm PWM fans: I went for Arctic F12 PWM PST because of the ability to stack
them in parallel (4x € 8.00);
One Pro Micro: Any ATMega 32u4 powered board should work fine with my code (€
4.00);
One relay board: to switch off the fans when they're not needed (€ 1.50);
One 8 digit 7-segment MAX7219 display module (€ 2.00);
Three momentary push buttons, 1 is for reset (€ 2.00);
One 3A power switch (€ 1.50);
One LAN cable coupler: to easilly disconnect the main assembly to the display panel
(€ 2.50);
One 5V and 12V dual output power supply: You can use 2 separated PSUs or a 12V
with a step down converter to 5V (€ 15.00);

Cables, screws and other minor components (€ 5.00);

Total cost: € 74.00 (if I had to buy all the components on Ebay/Amazon).

1. That's a SparkFun Pro Micro. It's a tiny Arduino compatible board. I used a 1. That's a standard DHT22 temperature and humidity sensor. A
clone of this in the project and it has worked well so far. DHT11 should also work fine

Temperature Control With Arduino and PWM Fans: Page 3


1
1

1. 8-digit MAX7219 module. You can find plenty of these on ebay for cheap 1. These profile is 36mm tall, 10mm in width and
2mm thick. They're made of PVC

Step 3: The case

The case is made of 4 thin L-shaped plastic profiles doesn't have a reset button, and sometimes it's useful
glued and riveted to an acrylic board. in order to upload a program onto it).

All the components of the box are glued with epoxy. The box is held up by 4 screws passing through holes
the acrylic base.
Four 120mm holes are cut in the acrylic to fit the fans.
An additional hole is cut for letting the thermometer The front panel is made of a brushed aluminum
cables pass through. panel, cut at 19" in width and with a height of ~4cm.
The display hole was made with a Dremel and the
The front panel has a power switch with an indicator other 4 holes for screws and buttons were made with
light. On the left, two holes let the front panel cable a drill.
and the USB cable go out. An additional reset button
is added for easier programming (the Pro Micro

3
1
1

1. 2 holes for USB and ethernet cable 1. Mounting holes. These hold the box to
the rack's ceiling.
2. That's the thermometer, obviously
3. These rivets reinforce the side panels

Temperature Control With Arduino and PWM Fans: Page 4


1

1. Using a RJ45 coupler for easy unplug

Step 4: Electronics

The control board is pretty simple and compact. and fixed to the panel with double-sided tape. The
During the making of the project, i found out that display is also fixed to the panel with tape.
when I supply 0% PWM to the fans, they will run at
full speed. To completely stop the fans from spinning, As you can see in the schematics, I've used some
I added a relay that shuts off the fans when they're external pullup resistors. These provide a stronger
not needed. pullup than the arduino's.

The front panel is connected to the board through a The Fritzing schematics can be found on my GitHub
network cable that, using a cable coupler, can be repo.
easilly detached from the main enclosure. The back
of the panel is made of a 2.5x2.5 electrical conduit

3
5 2
6 8
7 1
4

1. The Pro Micro


2. Fan connector
3. Thermometer connector
4. 5V in
5. Cable to control panel
6. Reset button
7. USB
8. Relay board to shut the fans on/off

Temperature Control With Arduino and PWM Fans: Page 5


1
4

1 3 2

2
1. Little board with soldered connection. 1. This is in the front panel
2. That's the display connection 2. The original file can be found on my github repo. Link
3. These are the 2 buttons in the code step
4. That's a standard 8-pin RJ45 plug

Step 5: The code

Intel's specification for 4-pin fans suggests a 25KHz A little note on LedControl library: to make it work
target PWM frequency and 21 kHz to 28 kHz with my code, you need to include this pull request
acceptable range. The problem is that Arduino's #13 which simply extends the default character map
default frequency is 488Hz or 976Hz, but the ATMega of the library. This is only neccessary to display the
32u4 is perfectly capable of delivering higher startup screen and the "Set" word when setting the
frequencies, so we only need to set it up correctly. I temperature, so it can be easily avoided.
referred to this article about the Leonardo's PWM to
clock the fourth timer to 23437Hz which is the closest The full updated code can be found on my GitHub
it can get to 25KHz. repo.

I used various libraries for the display, the


temperature sensor and the PID logic.

Step 6: Conclusion

So here it is! I have to wait till this summer to actually see it in action, but I'm pretty confident it'll work fine.

I'm planning on making a program to see the temperature from the USB port that I connected to a Raspberry Pi.

I hope that everything was understandable, If not let me know and I will explain better.

Thanks!

Temperature Control With Arduino and PWM Fans: Page 6

You might also like