Skip to main content

DIY Laptop Cooling Pad

A cooling Pad for laptops that can be controlled wirelessly or using buttons.

info

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.

architecture

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:

kicad_schematic

  • In Reality: hardware pic 1

hardware pic 2

hardware_pic 3

Bill of Materials

DeviceUsagePrice
Rapspberry Pi Pico WHThe Microcontroller1 x 56.23 RON
Data Micro USB CablePC-Microcontroller Communication (Debugging or Flashing Program)1 x 3.48 RON
Motor DriverPowering Cooling Fans1 x 11.49 RON
12V 80mm Cooling FanCooling2 x 10.84 RON
1602 LCD with I2C AdaptorPhysical User Interface1 x 16.34 RON
6x6x6 Push ButtonsPhysical User Interface4 x 0.36 RON
5mm LEDsPhysical User Interface4 x 0.45 RON
830 Points BreadboardConnectivity1 x 10.14 RON
Set of Female-Male WiresConnectivity1 x 5.79 RON
Set of Male-Male WiresConnectivity2 x 2.69 RON
Set of Rigid Jumper WiresConnectivity1 x 12.49 RON
Set of ResistorsCurrent Modulation1 x 12.29 RON
DIY Cooling Pad FrameFrame That Holds Fans & Laptop[50 RON]
TOTAL-[208.55 RON]

Software

LibraryDescriptionUsage
lcd1602-driverDisplay driver for LCD1602Used to write strings to LCD display
embassy-timeTime management libraryDelays & debouncing between button pressings
embassy-rpAccessing peripheralsInteracting with peripherals (pins)
embassy-executorAn async/await executor designed for embedded usageRunning multiple tasks simultaneously
logLogging interfaceLogging info or warning messages
embassy-usb-loggerUSB implementation of the log crateLogging info or warning messages over USB
embassy-pwmPWM driver for embassyControlling rotation speed of coolers
embassy-netNetworking functionalities for embassyCreating TCP connections with laptop
embedded-io-asyncAsync IO traits for embedded systemsAsync writing to buffers
embassy_futuresNo-std compatible futuresEvent handling such as button presses or data received through wifi
embassy_syncSynchronization data structures with async supportCreating MPMC channels for event handling
static_cellStatically allocated, initialized at runtime cellStatic variables intialized at runtime
cyw43_piono-std Rust driver for cyw43 WIFI chip on RP Pico WConnecting to WIFI network hosted by Laptop
heaplessHeapless data structuresCreating strings that will be displayed on the LCD
TTKBootstrapPython UI-library based on Tkinter & Bootstrap CSSBuilding the UI of the desktop app
socketLow level networking interface for PythonHandling data exchanges and connections with RP Pico W
keyboardPython library for hooking global keyboard eventsDetecting if the shortcuts for increasing or decreasing the power were used