Temperature Controlled Switch

Can be used for precise temperature control in areas like sous-vide.

This software was tested on Raspberry Pi Pico. Attached with:

  • DS18B20 temperature sensor
  • I2C 128*64 mono-color display
  • 3 LEDs for displaying status
  • Rotary encoder to set target temperature
  • Relay to control heating element (for example, a cheap rice-cooker that don’t have any built-in microcontroller)


  • Temperature sensor – GP16
  • I2C display: SDA – GP26, SCL – GP27
  • LEDs: GREEN – GP20, YELLOW – GP19, RED – GP18
  • Rotary encoder (no pullup resistor required): GP12, GP13
  • Relay: Share pin with RED LED – GP18.


  • Green: temperature above target (heating off)
  • Red: temperature below target (heating on)
  • Yellow: updating display content

Source code: https://github.com/monoKeith/Temperature-Switch

STL files: https://www.thingiverse.com/thing:4939284

Code & Test
Buttons, Display, Encoder
Soldered on board
3D printed case
3D printed case
Solder input and output wires to 5V power supply
Install power supply in case
Install socket and circuit board
3D printed scroll wheel
Scroll wheel
Solder everything to a RaspberryPi Pico
Test boot
Hot glue in place
Install backplate

Leave a Reply

Your email address will not be published. Required fields are marked *