Ambient temperature and fan speed controller

Hi all.

I am interested in the Arduino platform for a little project I am trying to set up at home. This post is just to explore possible options for my project and to write a bill of materials. I apologize in advance if my questions may sound extremely stupid or naive, but I have never touched an Arduino and I have done a little bit of electronics in the past so feel free to RTFM me if I deserve it :slight_smile:

I have a cupboard in my living room, and I want to set up one of its cabinet as a little "server cabinet". The cabinet has 2 shelves, one taller, at the bottom, and one shorter, at the top. This cabinet will contain 2 servers, one slimmer on the top shelf and one fatter on the bottom shelf.

|   ------------   |
|   | SERVER 1 |   |
|                  |
|    ----------    |
|   | SERVER 2 |   |
|   |          |   |

The board that separates the two shelves is a little shallower than the full depth of the cabinet, so air can flow between the two shelves.

This cabinet needs ventilation, and for this I am planning to install two fans: one on the rear panel of the bottom shelf, and one on the "ceiling" of the cabinet. This way, air can flow in through the fan at the rear, go all the way to the front, to the upper floor and out through the fan on the ceiling.

When I was looking at a way to control the fan speeds to minimize noise, it occurred to me that an Arduino board would make a great controller for the fans: by combining 2-3 temperature sensors in the right places around this cabinet, I can measure temperature and speed up/down the fans to keep the best temperature.

Down to business: I want to buy 2 4-pin 120mm silent PC case fans. I understand that of the 4 pins, 1 is for +12V, 1 is for GND, 1 for tacho and 1 for a PWM signal to regulate speed. I would like to use all signals, i.e. I would like to control the speed of the fans from the Arduino and read the tacho measurements. I plan to follow these instructions for setting the whole thing up.

I would also like to run both the Arduino and the fans from a single 12V power supply. Since I have to buy all the equipment I need, I can easily buy a 1.5A power supply, enough to power both the Arduino and 2-3 fans.


  1. Is the Arduino UNO enough to drive 2 fans? I understand the UNO has 3 PWM pins, but I just want to make sure.
  2. How do I power the Arduino off the same power supply as the fans? I understand the UNO takes 5V, so there will need to be some resistor somewhere. But I have no idea where to start to find which resistor I need to use...
  3. Using the same power supply means I can connect both the grounds of the Arduino and of the fans together, which should make life easier. Correct?
  4. From here I understand I also need a resistor between the PWM pin on the Arduino and the control cable on the fan. Is that correct? And if so, why?
  5. For the temperature sensor, I have seen that the LM35 seems to be a popular choice for Arduino projects. I was planning to measure temperature in at least 2 different places in the cabinet, possibly 3. Can I connect the ground to the common ground, the +5V to the +12V power supply (with some resistor), and just the output PIN to the Arduino? If so, which resistor should I use?
  6. At this point, I am afraid I am running out of PINs: to read the tacho, I will need to connect that to 2 digital input PINs and read the lows. So 2 pins - tacho and PWM - x 2 fans, plus 1 pin x 3 sensors = 7 pins in total, and I am not sure whether I will have enough PINs on the UNO since some of them are reserved.
  7. Possibly, just possibly, I would like to drive an LCD monitor to provide temperature and RPM readings. I still feel I don't have enough PINs for this...

Thank you all for your help.

First few answers

  1. yes
  2. the Arduino power plug can handle 12V as it has a 7805 voltage converter to make 5V.
  3. you must connect grounds to get a common reference
  1. aha. I don't know where I got my previous notion from, as the Uno data sheet clearly says that. I see it also says you can use the Vcc pin to get the same voltage you put in. In that case, how much current can you draw from Vcc? Up to the power supply's limit minus what the Arduino draws (so if the PSU is 1.5A and the Arduino draws 0.1A I can still draw 1.4A from Vcc) or is there a lower limit for that?