Building a smart fan controller with Raspberry Pi

Finished
P.9/9 2023-11-01

Final PCB Assembly and Testing

I've now combined all the circuits we designed onto a single PCB in KiCad. I also rendered most of the components in 3D to visualize the layout. The board is organized with power handling on the right, I/O interfaces on the left, and fan/power control at the bottom.

PCB with all components 3d rendered

The Raspberry Pi is mounted in the center, using the GPIO header rows, essentially serving as a "hat" for the PCB. I chose the Raspberry Pi Zero since it doesn't require much processing power, and the Pi is securely held in place by the pin header—no screws needed. Although I used the Pi Zero, this design should be compatible with any Raspberry Pi that has a GPIO interface.

PCB with all components 3d rendered, other angle

For a bit of fun, I added some custom artwork behind the Raspberry Pi as a hidden easter egg on the silkscreen layer.

PCB with all components 3D components turned off to show the silkscreen

And the different layers of the PCB:

PCB layers layout

Component assembly

Once the design was complete, I ordered the PCB from AISLER. While their prices are higher than some manufacturers, I prefer having the production done in Europe instead of China. The PCB arrived promptly, and I populated it with components sourced from DigiKey and Mouser. I ordered enough parts for two boards, so I'd have a spare in case anything went wrong—one for experimentation, and one for use.

Unpopulated board

I started by placing the surface-mount components and cooking them on a hotplate. This was my first time using low-temperature solder paste, and it worked well—much better than regular paste, which I've previously used to only end up accidentally charring the PCB I have been working on. While it may not be as strong as standard paste, it does the job for this application.

PCB getting cooked on hotplate with smd components

Next, I tested the buck converters to ensure they were working before adding the Raspberry Pi. This way, I could verify the power supplies without risking damage to the expensive and fragile Pi.

Buck converters being tested

Once I confirmed the converters were working, I mounted the Raspberry Pi on the topside of my PCB, but connected the GPIO pin header to the bottom of the Raspberry Pi (rather than the usual top side of the raspberry). I also added a female-pin header to my PCB's top for easy removal and future upgrades, allowing me to swap out Raspberry Pis without reworking my entire board. This design flexibility means I can reuse the more expensive Pis and keep things adaptable.

The raspberry pi mounted to the PCB

Finally, I connected the Ethernet and RJ12 jack, completing the assembly.

Finished product

Final thoughts

I'm really pleased with the final result. Initial testing has been successful: I can SSH into the board, read One-Wire sensors, use the Ethernet interface, control my DAC's over I2C, and control the optocouplers via GPIO pins. Everything is functioning as expected!

Board connected to ethernet and a sensor and some other stuff with computer screen

The next step is to integrate this setup into a real-world application, which I have planned for a future project.

Prev Page.9/9 Next
[1]
Cooling a root cellar
2023-11-01
[2]
Choosing Sensors
2023-11-01
[3]
Fan Control with a Variable Frequency Drive (VFD)
2023-11-01
[4]
Building the Relay and SSR Control Circuit for Fan Direction and Speed
2023-11-01
[5]
Designing a Digital-to-Analog Control Circuit for Fan Speed
2023-11-01
[6]
Building an Ethernet Interface for Raspberry Pi with the ENC28J60T
2023-11-01
[7]
Implementing a 3.3V to 5V Level Shifter for Optimal One-Wire Sensor Performance
2023-11-01
[8]
Powering the Controller Board: Designing 3.3V and 5V Supplies
2023-11-01
[9]
Final PCB Assembly and Testing
2023-11-01

© 2024 Satoma. All rights reserved

An unhandled error has occurred. Reload 🗙