Open Bed Cooler is an ESP32-based controller for a water-cooled bed pad. It reads the water-basin temperature through the refrigerator's original NTC thermistor and controls an MCP41010 digital potentiometer to simulate the temperature signal expected by an Alpicool-style compressor refrigerator.
The refrigerator continues to manage its compressor, fan, electrical protections, and refrigeration system. The controller only connects to the low-voltage temperature-sensor circuit.
bedcooler/bedcooler.ino— ESP32-S3 firmware for temperature measurement, thermostat control, scheduling, the local web interface, and optional cloud reporting.bedcooler/arduino_secrets.example.h— template for local Wi-Fi and cloud credentials.cloudflare/— optional Cloudflare Pages dashboard and Pages Functions used for remote status and settings.BUILD.md— hardware, wiring, calibration, assembly, and troubleshooting guide.
The tested prototype uses:
- Waveshare ESP32-S3-Zero
- MCP41010 10 kΩ digital-potentiometer breakout
- 4.7 kΩ resistor for the thermistor divider
- Original refrigerator NTC thermistor
- An Alpicool-style compressor refrigerator with a compatible low-voltage thermistor input
See BUILD.md for the complete parts list, pin assignments, wiring, calibration values, and safety notes. Verify the sensor connector and pinout on your own refrigerator before connecting the controller.
- Install ESP32 board support in Arduino IDE and select the board settings appropriate for the ESP32-S3-Zero.
- Copy
bedcooler/arduino_secrets.example.htobedcooler/arduino_secrets.h. - Edit the copied file with your local configuration.
- Open
bedcooler/bedcooler.inoin Arduino IDE, then compile and upload it.
The firmware's thermostat function does not depend on Wi-Fi. If
arduino_secrets.h is absent, the sketch still compiles and runs with Wi-Fi and
cloud reporting disabled.
Arduino IDE builds every credential directly into the firmware image; it does
not provide a desktop secret store. This project therefore keeps private build
configuration in bedcooler/arduino_secrets.h, which is excluded by
.gitignore.
The local header defines:
| Setting | Purpose |
|---|---|
SECRET_WIFI_SSID |
Local Wi-Fi network name |
SECRET_WIFI_PASSWORD |
Local Wi-Fi password |
SECRET_CLOUD_REPORT_URL |
Optional deployed dashboard report endpoint |
SECRET_CLOUD_API_KEY |
Optional device API key matching the Cloudflare secret |
Commit arduino_secrets.example.h, but do not commit arduino_secrets.h.
Leaving both cloud settings empty disables cloud reporting.
The cloudflare/ directory contains a Pages site with Functions and KV-backed
device state. The ESP32 periodically posts status to it and receives queued
settings changes in the response. The dashboard is not required for local
thermostat operation.
Deployment and secret configuration are documented in cloudflare/README.md.
Work only with the refrigerator's low-voltage sensor connector. Do not connect this controller to AC mains, compressor wiring, high-current circuits, or the refrigerant system. Test the temperature-sensor and digital-potentiometer circuits independently before connecting them to the refrigerator.