Circuit ‐ EN - gajdipajti/fan-control GitHub Wiki

Circuit

The documentation, drawings, and circuit diagrams are available under the CC BY-SA-4.0 license.

Arduino Nano circuit

This is the end result in case of the Arduino Nano circuit. You don't have to do everything, only what is necessary for the task. The current circuit is just an example.

fan-control-nano

How to start

Graphite pencil on paper. Before I start a job, I plan the functions on paper, what I want to connect and to which pin. A grid sheet helps a lot. Here you can see such a drawing as I started the project, and if it has changed.

  • At first I thought that I would use a separate thermometer for each PWM channel. But that was unnecessary.
  • I also left the plan for expansion if I connected a display to it.

nano-notes

Note: I drew the Arduino Nano outputs on the sheet rotated by 180°. When I worked on the circuit, I acted out a related scene from the movie Independence Day.

Test panel

  1. What I usually start with is the location of the Arduino Nano. From this I build radially outwards. I start usually with the sockets. We prepare the socket so that the Arduino Nano can be removed at any time. Most of the parts will be on the right side, leave some space there. Only the temperature measurement will be on the left side. nano-circuit-01

  2. I continue with two resistors, let's follow the line as long as we can. First, I insert two 1k resistors, I put them in the row of pins D5 and D6 of the Arduino Nano. Here I am building the 2 PWM controls for the 2- and 3-wire fans. With 4-wire fans, we won't need so many components. nano-circuit-02

  3. Here I inserted two transistors, I tried 2N3904 and BD139-16. The former got very hot during testing, so I recommend that you only use the latter. Pay attention to the different pin configuration, keep the datasheet open all the time! In case of the BD139-16, the metal back should face us, so the left leg (1, Base) can be connected to the resistor, the 3rd leg, on the right is the Emitter, which must be connected to the ground of the external power supply. Connect the third pin of both transistors together. nano-circuit-03

  4. As I use a different transistor, it looks different from the other side. Just a trick, if you mirror the picture, you can compare it with the top page. nano-circuit-04

  5. I put 3 fan connectors near the BD139-16 transistor. Here, you have to make sure that pin 1 of the connector, which is GND, is towards the transistor. Pin 2 of the connector will be connected to the power supply. Solder the 3 by itself. If necessary, update our memories with the corresponding subsection of the building blocks wiki page. nano-circuit-05

  6. I repeat the same for the Other channel. If you used a BD139-16 transistor here, then turn the fan connector 180° so that its pin 1 faces the transistor. I also installed is the connector for the external +12 V power supply. For the DS18B20 sensor, I put the 4k7 pull-up resistor between the +5 V and D4 pins of the Arduino Nano. nano-circuit-06

Final result

I would like to jump ahead. Things have gone bad. The disadvantage of the through-hole technology is that we only have one plane to connect our components neatly. We can't cross solder paths. Reminds me of the open source game armagetron. In such cases, the trick is to bridge the appropriate parts with bodge wires.

  • On the left is the resistor for the NTC and the voltage divider. The NTC is connected to the +5V pin of the Arduino Nano. The middle of the voltage divider is connected to the A6 pin of the Arduino Nano.
  • The 1N4001 diode is connected to the VIN pin of the Arduino Nano, and I can disconnect it with a row of pins. Safety reasons.
  • I wired the DS18B20 further away, I didn't want to solder too much at the bottom of the panel.
  • Moving to the right side, the Arduino Nano and the power supply must be on a common ground (GND). I can connect them by shorting two pins.
  • D2 and D3 pins are for interrupts. D9 and D10 pins are the speed control.

nano-circuit-08 nano-circuit-09

I left room on the panel for the following:

  • LM35 and AD22100KTZ temperature sensors.
  • Low-pass filter - op.amp. circuit for advanced fan power control.
  • LCD Display
  • For the MCP3202 external A/D converter 2 fan channels out of five must be sacrificed, as well as the LED feedback. SPI communication requires pins D10, D11, D12, D13. An example.

Good advice

You don't have to implement everything, only what is necessary.

  • If you only want to use 4-wire fans, just implement four of them.
  • If you only want to deal with 2- or 3-wire fans, you need to add outputs to the Arduino Nano. The code does not need to be changed.
  • Choose a temperature measurement of your choice and implement it.

Raspberry Pi circuit

The Raspberry Pi circuit is being tested. Don't forget the isolating 1 uF capacitor.

fan-control-rpi

⚠️ **GitHub.com Fallback** ⚠️