Rainbow Pup Cooler🐾🌈


Introduction
A fan and a night light in the shape of an adorable Samoyed, this little creature can be clipped onto your cup to cool down your drink. Powered by ESP32's dual-core processing capabilities, it employs gradient-infused 3D printing and programmable RGBW LEDs to generate spectral transitions. The integrated silent fan accelerates heat dissipation by having the Samoyed "blow" on your drink, while a custom BLE app enables real-time control of lighting patterns and cooling intensity.
Why This Project?
The goal was to create something which celebrates color as both an artistic medium and a functional component. The "Rainbow Pup Cooler" embodies this vision through cutting-edge innovations:
Highlights of the Lighting System
• Random PWM Dimming: RGB LEDs generate dynamic color displays through randomized pulse-width modulation.
• Precision Gradient Printing: 0.02mm layer-aligned 3D printing achieves seamless chromatic transitions.
Downloads
Supplies

Electronic Components
- ESP32-WROOM-32D
- Dual-core 240MHz processor
- 4MB Flash memory
- Quantity: 1
- WS2812B-5050 RGBW LED Strip
- 144 LEDs per meter
- IP67 waterproof rating
- Length: 30cm
- Noctua NF-A4x10 Fan
- 5V PWM control
- Ultra-low noise (14dB)
- Quantity: 1
- Motor Drive Module
- Compatible with DC/stepper motors
- Integrated H-bridge circuitry
- Overcurrent protection
3D Printing Materials
- Polymaker PolyTerra Gradient PLA
Software Ecosystem
- Arduino IDE v2.3.2 with ESP32 v3.0.0+
- MIT App Inventor with Custom BLE Extension
- Blender
3D Design & Printing
Design Features
- Dog Body:
- Hollow snout for fan airflow
- Clip mechanism for cup attachment
- Internal channels for wiring
- Rainbow Gradient:
- Slicer settings:
- PrusaSlicer: "Fuzzy Skin" texture for light diffusion
- Filament: Eryone Rainbow PLA (layer height 0.16mm)
- Modular Parts:
- Removable snout for fan access
- Magnetic back panel for battery replacement
Attached is the model I used to print the version you see here, as well as a quick time-lapse of the printing process.
Hardware Programming



This section implements the basic functionality of controlling a fan and RGB LED strip using the ESP32. Upon power-up, the fan will start immediately (running at full speed), while the RGB LED strip automatically cycles through random colors every second (R/G/B values are randomised between 0-255).
1、Wiring Diagram
ESP32 PinComponentConnection
GPIO 12 Fan PWM Control Mosfet Gate
GPIO 13 LED Strip Data DIN (First LED)
GPIO 34 Thermistor Voltage Divider
VIN Fan+ & LED V+ 5V Regulator Output
GND Common Ground All GND Pins
2、Assembly Guide
- Mount Electronics:
- Secure ESP32 in dog’s body with hot glue
- Attach fan inside snout with vibration pads
- Install LEDs:
- Embed LED strip along spine (diffuse with translucent PETG layer)
- Power System:
- Connect 18650 → TP4056 → 5V Buck Converter → ESP32/Fan/LEDs
3、Uploading the Code
- Install the FastLED library (for controlling the RGB LED strip) in the Arduino IDE.
- Upload the following code to the ESP32.
Code Explanation
- random(256): Generates a random integer between 0-255 for RGB values.
- fill_solid(): Sets all LEDs to the same color.
- FastLED.show(): Updates the LED display.
APP Development & IoT Communication

I developed an Android/iOS app based on the MQTT protocol to remotely control the RGB LED strip colours and fan switch.
Steps
- Communication Protocol Design
- MQTT Topic: device/[MAC address]/control (for sending control commands).
- APP Development (Example: MIT App Inventor)
- UI Design:
- Color Picker
- Toggle button (switch between random/fixed mode)
- Device connection status display
- Logic Implementation:
- Scan and bind the device's MAC address.
- Send control commands via an MQTT broker (e.g., HiveMQ).
APP Features
Custom Color Selection: Choose colors from a palette and sync them to the hardware in real time.
Mode Switching: Toggle between fixed colors and random cycling.
Device Management: Save multiple device MAC addresses for quick switching.
Final Verification


- Hardware Test
- Upon power-up, the fan should start immediately, and the RGB LED strip should begin cycling through random colors.
- The serial monitor should print new RGB values every second.
- APP Test
- After sending {"cmd":"set_color","r":255,"g":0,"b":0}, the LED strip should turn red.
- After sending {"cmd":"random_mode"}, it should revert to random colors.
Notes
- If using WiFi, ensure the ESP32 and phone are on the same local network.
- For the MQTT broker, use a public server (e.g., HiveMQ) or self-hosted Mosquitto.
- High-power RGB LED strips require an external power supply to avoid overloading the ESP32.
Conclusion



The Rainbow Pup Cooler project integrates ESP32-based hardware control with IoT-enabled mobile interaction to create a dynamic, user-adjustable RGB lighting and cooling system. By combining FastLED for colour generation, MQTT for wireless control, and fan speed management, this project becomes both functional, and absolutely adorable.
Notable features include:
- Real-time color customization via a mobile app, allowing users to set fixed colors or enable random mode.
- Seamless IoT communication using MQTT, ensuring reliable remote control.
- Modular firmware design, making it easy to extend features (e.g., temperature-based automation).
Future improvements could include:
- Voice control integration (e.g., Alexa/Google Assistant).
- Energy-saving optimizations (adaptive brightness based on ambient light).
- Multi-device synchronization for group lighting effects.
This project serves as a foundation for smart lighting systems, IoT prototyping, and interactive hardware design, all wrapped up in the package of a cute little Samoyed.