DIY Laptop Cooling Pad
A cooling Pad for laptops that can be controlled wirelessly or using buttons.
Author: Sakka Mohamad-Mario
GitHub Project Link: https://github.com/UPB-FILS-MA/project-mmswflow-upb.git
Description
There are 2 possible ways of using it:
-
Physically: The fans are controlled through a tactile UI made up of a screen which displays info and buttons with which we increase or decrease the speed of the fans.
-
Wirelessly: A user can interact with the microcontroller through a desktop app which sends commands to it through WIFI.
Motivation
The average temperature around the globe has been on the rise for quite a while, and personally I'm very sensitive to heat, so the first thing that came to my mind was making a fan. After a while I realised that, because I use my laptop for long periods of time doing multiple things including gaming, I also wanted to cool down my laptop's since its keyboard gets pretty hot sometimes when playing games, so I've moved on to this idea. I also wanted the coolers to be controlled using an app on my laptop through wireless connection, without necessarily having to open it, instead I could use key bindings that are preset for the app and I could have the app running in the background.
Architecture
-
The application on the laptop will act as a server, the RP Pico W will establish a connection and it will exchange data with it via TCP to ensure reliable communication between the two. This app will be written in Python using the TTKBootstrap & Socket modules and it will be converted into an executable. The RP PICO W will connect to a network with preset name & password which must be hosted by the laptop. The program running on the RP Pico W will be written using the embassy-rs framework.
-
The physical UI (buttons & LCD) will be used to establish the connection, increase or decrease fan speed, power on or off the setup, with all necessary info being displayed on the LCD.
Log
Week 6 - 12 May
I made a laptop pad out of a wood planck, cut 2 holes for the fans and glued the fans into it. I also tested some code that made communication between the RP Pico W & my laptop possible through TCP, and I tested the motor driver. I also tested the firmware for controling the LCD.
Week 7 - 19 May
I assembled a mini remote with 4 buttons and LEDs that respond to the tactile input or show the status of the circuit, then I connected the MCU to the motor driver and the fans to the motor driver. I wrote the firmware that handles the tactile input and implemented a debouncer for the push buttons, I also wrote the part of the firmware which displays text on the LCD & controls the motors using PWM. The TCP connection part was partially done and I created the UI for the Python app on the laptop to control the fans through WIFI.
Week 20 - 26 May
I fixed a bug which did not allow the laptop and MCU to disconnect properly, now the TCP connection can be broken from any of the two sides without any issue, and I've set up the shortcuts for increasing and decreasing the power for the laptop's app, they are set as Left CTRL + I or D for increasing and decreasing the power. I also moved all the buttons and LEDs on the same breadboard which the MCU sits on to save up space. Finally, I have changed the way the currently set power is displayed, I created 3 levels of power (low, medium , high) instead of showing percentages.
Hardware
-
Raspberry Pi Pico W: Detecting input and controlling the fans' speed.
-
Breadboard: Connecting components.
-
Push Buttons Controlling the speed of the fans.
-
LEDs: Displaying the status of the cooling pad such as WIFI connection status, powered on or off, increasing or decreasing speed.
-
Rigid Jumper WIres: Connecting components to breadboard.
-
LCD 1602 I2C: Displaying info when changing speed, powering on and establishing connection with PC.
-
Cooling Fans: Used to cool down the laptop.
-
Motor Driver: Setting the power of the fans through PWM.
Schematics
- The KiCAD schematic:
- In Reality:
Bill of Materials
Device | Usage | Price |
---|---|---|
Rapspberry Pi Pico WH | The Microcontroller | 1 x 56.23 RON |
Data Micro USB Cable | PC-Microcontroller Communication (Debugging or Flashing Program) | 1 x 3.48 RON |
Motor Driver | Powering Cooling Fans | 1 x 11.49 RON |
12V 80mm Cooling Fan | Cooling | 2 x 10.84 RON |
1602 LCD with I2C Adaptor | Physical User Interface | 1 x 16.34 RON |
6x6x6 Push Buttons | Physical User Interface | 4 x 0.36 RON |
5mm LEDs | Physical User Interface | 4 x 0.45 RON |
830 Points Breadboard | Connectivity | 1 x 10.14 RON |
Set of Female-Male Wires | Connectivity | 1 x 5.79 RON |
Set of Male-Male Wires | Connectivity | 2 x 2.69 RON |
Set of Rigid Jumper Wires | Connectivity | 1 x 12.49 RON |
Set of Resistors | Current Modulation | 1 x 12.29 RON |
DIY Cooling Pad Frame | Frame That Holds Fans & Laptop | [50 RON] |
TOTAL | - | [208.55 RON] |
Software
Library | Description | Usage |
---|---|---|
lcd1602-driver | Display driver for LCD1602 | Used to write strings to LCD display |
embassy-time | Time management library | Delays & debouncing between button pressings |
embassy-rp | Accessing peripherals | Interacting with peripherals (pins) |
embassy-executor | An async/await executor designed for embedded usage | Running multiple tasks simultaneously |
log | Logging interface | Logging info or warning messages |
embassy-usb-logger | USB implementation of the log crate | Logging info or warning messages over USB |
embassy-pwm | PWM driver for embassy | Controlling rotation speed of coolers |
embassy-net | Networking functionalities for embassy | Creating TCP connections with laptop |
embedded-io-async | Async IO traits for embedded systems | Async writing to buffers |
embassy_futures | No-std compatible futures | Event handling such as button presses or data received through wifi |
embassy_sync | Synchronization data structures with async support | Creating MPMC channels for event handling |
static_cell | Statically allocated, initialized at runtime cell | Static variables intialized at runtime |
cyw43_pio | no-std Rust driver for cyw43 WIFI chip on RP Pico W | Connecting to WIFI network hosted by Laptop |
heapless | Heapless data structures | Creating strings that will be displayed on the LCD |
TTKBootstrap | Python UI-library based on Tkinter & Bootstrap CSS | Building the UI of the desktop app |
socket | Low level networking interface for Python | Handling data exchanges and connections with RP Pico W |
keyboard | Python library for hooking global keyboard events | Detecting if the shortcuts for increasing or decreasing the power were used |