NastyThermostat.cc
NastyThermostat overview

01 — Parts & Tools

Gather all parts and tools before you start. Check the list below.

All parts overview

Tools required

Screwdriver Scissors Hot glue gun Hex keys Multimeter
⬇ Download parts list (Excel)
Component Description Qty
ESP32-C6 LCD 1.47ESP32-C6 dev board with 1.47" Waveshare display1
DRV8825 Stepper DriverMicrostepping driver module (heatsink included)1
Stepper Driver Expansion Board4-channel driver carrier board1
NEMA17 Stepper Motor1.8°, 17 Ncm, 1A, 23mm body length1
DS18B20 Temperature SensorDigital 1-Wire temperature module1
KY-040 Rotary Encoder360° encoder with push button1
GT2 Belt 320mmClosed loop 2GT-320-6mm belt1
GT2 Pulley 20T20 teeth pulley, 5mm bore1
12V 3A Power Adapter5.5x2.1mm DC output adapter1
DC-DC Buck Converter12V to 5V 5A step-down module1
USB-C 90° AdapterPower the ESP321
12V Power Cable (thick)14cm red/black cable for stepper 12V supply1
Dupont Jumper Wires pack10 cm Female to Female1
2 in 1 USB C - Micro USB Cable0.2m Split cable1
Stepper Motor Cable10-15cm JST XH2.54mm female (black, green, blue, red)1
M3x8 ScrewsMetric screw, 8mm length8
M3 WashersM3 flat washer6
M2x8 ScrewsMetric screw, 8mm length2
GT2 Pulley 138T 3D PRINTCustom pulley for Nest thermostat1
Mounting Plate 3D PRINTBaseplate for electronics and Nest mounting1
Stand 3D PRINTStand for the Mounting Plate1
💡 Lay out all parts in an organised way before you start. This prevents confusion during assembly.

02 — Wiring Diagram

The steps below explain how to connect each component and which cables are needed. Below is a complete overview.

Wiring diagram

03 — Nest Baseplate

  1. Remove the outer front cover of the Nest, leaving only the Nest baseplate.
  2. The 3D-printed mounting plate has 2 oval protruding pieces with a hole in them.
  3. Place the Nest on top and secure it with 2 M3 bolts.
Nest baseplate

04 — Mounting Components on Baseplate

The white 3D-printed frame is the base on which all electronics are mounted. Place the frame flat in front of you.

STEP 01

Buck Converter & Temperature Sensor

Place the DC-DC Buck Converter and the DS18B20 Temperature Sensor and secure them with hot glue.

USB port must face upward.
Step 1a Step 1b
STEP 02

Stepper Driver Expansion Board

Mount the Stepper Driver Expansion Board and secure it with 2 bolts, 2 washers and 2 nuts. Make sure to place the DRV8825 Stepper Driver in the correct orientation on the expansion board. See photo.

Step 2
STEP 03

12V Power Wires

Attach the 2 thicker wires (14cm) for positive and negative of the 12V stepper driver supply, and secure them at the top with hot glue.

Step 3
STEP 04

Jumper Cables — Stepper Driver Board

Before adding the other components, we start with the jumper cables. First, connect the jumper cables to the Stepper Driver Expansion Board.

Left: orange (EN), yellow (STEP), green (DIR). Below that 3 red jumper wires and at the bottom 3 black jumper wires.

Step 4
STEP 05

Jumper Cables — DS18B20 Temperature Sensor

Next, connect the jumper cables to the DS18B20 Temperature Sensor: Red (VCC), blue (DQ), black (GND).

Step 5
STEP 06

Jumper Cables — KY-040 Rotary Encoder

Now take the KY-040 Rotary Encoder and connect the jumper wires: Black (GND), red (VCC), purple (SW), grey (DT), white (CLK).

Step 6
STEP 07

Mount ESP32-C6 & Connect Wires

Now mount the ESP32-C6 LCD 1.47. The USB port faces outward and is secured with M2x8 bolts. Then connect the jumper wires.

Do not use the 5V pin!
WireESP32 PinConnects toLabel
BlackGNDStepper Driver Expansion BoardG
Red3V3Stepper Driver Expansion BoardV
White0KY-040 Rotary EncoderCLK
Grey1KY-040 Rotary EncoderDT
Yellow2Stepper Driver Expansion BoardSTEP
Green3Stepper Driver Expansion BoardDIR
Purple4KY-040 Rotary EncoderSW
Orange5Stepper Driver Expansion BoardEN
Blue9DS18B20 Temperature SensorDQ
Step 7 wiring
STEP 08

Power On Test

Now connect the USB cable to the ESP32 and plug the 12V adapter into the DC-DC Buck Converter. LEDs should now light up on the DC-DC Buck Converter, DS18B20 Temperature Sensor and Stepper Driver Expansion Board.

Step 8 power on

05 — Gears and Belt

STEP 01

Mount the Stepper Motor

Flip the baseplate and mount the stepper motor. Use 4x M3x8 bolts and 4 M3 washers. Do not fully tighten the bolts so you can slide the stepper motor back and forth.

Mount stepper motor
STEP 02

Attach the Large Gear to the Nest

Apply thin double-sided tape at 3 points on the large 3D-printed gear and press it onto the bottom of the metal Nest ring. Then place it onto the already mounted Nest wallplate.

Attach gear 1 Attach gear 2
STEP 03

Mount the Pulley on the Stepper

Mount the pulley onto the stepper motor shaft using the hex key.

Mount pulley
STEP 04

Install and Tension the Belt

Place the belt over both pulleys. The stepper motor needs to be slid upward for this. Once the belt is in place, carefully tension it by sliding the motor downward and tightening the bolts.

Belt installation

06 — Connecting the Stepper Motor

The stepper motor still needs to be connected to the Stepper Driver Expansion Board. The board is labeled 2b, 2a, 1a, 1b. The pin order may vary per motor. For this stepper motor, connect as follows:

🔌 black → 2b  ·  blue → 2a  ·  green → 1a  ·  red → 1b
The stepper motor has 6 connectors; the outermost and innermost ones are used.
Left: black  ·  left middle: green  ·  right middle: blue  ·  right: red
Stepper motor connection Stepper motor connection detail

07 — Microstepping & Current Limiting

Microstepping

A standard NEMA17 motor has 200 steps per full revolution. With microstepping, the driver divides each step into smaller increments. At 1/32 microstepping, each step is split into 32 micro-steps, resulting in 6400 steps per revolution. This produces smoother and quieter movement.

Set the microstepping to 1/32 by setting all 3 mini jumpers to 1.

MS1MS2MS3Microsteps
LowLowLowFull step
HighLowLowHalf step
LowHighLow1/4 step
HighHighLow1/8 step
LowLowHigh1/16 step
HighLowHigh1/32 step ← use this
LowHighHigh1/32 step
HighHighHigh1/32 step
Microstepping jumpers

Current Limiting

Make sure the LED on the Stepper Driver Expansion Board is on before following the steps below.

The DRV8825 limits the current to the motor via an internal current-limiting circuit. You set how much current the motor receives via a small trimpot on the DRV8825.

Too little current = missed steps.  Too much = overheating.

The rated current is printed on the label of your stepper motor (e.g. 1A or 1.5A). Set the current to 70–90% of this value.

📐 I use a Vref of 0.45V, which is on the high side but works well.
Vref = (90% of 1A) × 0.5 = 0.45V

Make sure the system is fully powered on. Use a small Phillips screwdriver. When you hold the positive probe of your multimeter against the screwdriver and the negative probe on GND, you can see the current Vref live.

Trimpot adjustment Measuring Vref

08 — Final Steps

ROTARY ENCODER

Secure the Rotary Encoder

Before the firmware can be flashed to the ESP, the KY-040 Rotary Encoder must be secured. Simply insert it through the hole and tighten the ring and nut. Finally, press the knob onto the rotary encoder.

CHECK

Final Cable Check

Then carefully check that all cables are connected and place the baseplate in the Stand.

Final assembly
FIRMWARE

Flash Firmware via USB

Connect the USB cable and go to nastythermostat.cc/webflash — then follow the steps in the webflasher to install the firmware.

💡 On Windows 11 no driver installation is needed. If the device is not recognised, find the driver at waveshare.com.
Firmware flashing
▶ Watch: Flash firmware & configure settings