Skip to content

caseyhartnett/KilnDisplay

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Kiln Display Monitor

ESP32-based display monitor for TheKilnGod kiln controller. Displays real-time temperature, status, and a temperature graph on a 3.2" ST7789P3 TFT display.

Hardware Requirements

  • LCDWIKI E32R32P/E32N32P ESP32-32E Integrated Display Board (3.2" 240x320 ST7789P3 display)
    • Or compatible ESP32 development board with ST7789P3 display
  • Wiring connections (see pin configuration below)

Note: This project is configured for the LCDWIKI E32R32P/E32N32P board. For other boards, adjust pin configuration in config.h.

Pin Connections

For LCDWIKI E32R32P/E32N32P ESP32-32E Integrated Display Board:

The display is already wired internally. The pin configuration is set according to the official specification:

Function ESP32 Pin Description
CS GPIO 15 (IO15) LCD screen selection control signal, low level effective
DC GPIO 2 (IO2) LCD command/data selection control signal (High: data, Low: command)
SCLK GPIO 14 (IO14) SPI bus clock signal (shared by LCD and touch screen)
MOSI GPIO 13 (IO13) SPI bus write data signal (shared by LCD and touch screen)
RST GPIO 4 LCD reset control signal (EN pin is shared with ESP32-32E master)
BL GPIO 27 (IO27) LCD backlight control signal (HIGH = backlight on, LOW = backlight off)

Note: The backlight pin is GPIO 27, not GPIO 21 or 15 as some other boards use. Make sure TFT_BL is set to 27 in config.h.

For Other Integrated ESP32 Display Boards:

If you have a different integrated board, you may need to adjust the pins in config.h. Common alternatives:

  • CS: GPIO 5 or GPIO 21
  • SCLK: GPIO 18
  • MOSI: GPIO 23
  • BL: GPIO 15 or GPIO 21

For External Displays:

Display Pin ESP32 Pin Function
VCC 3.3V Power
GND GND Ground
SCL/SCK GPIO 14 or 18 SPI Clock
SDA/MOSI GPIO 13 or 23 SPI Data
DC GPIO 2 Data/Command
CS GPIO 15 or 5 Chip Select
RST GPIO 4 Reset
BL GPIO 27, 21, or 15 Backlight

Configuration

Edit include/config.h to modify:

  • WiFi credentials (already configured)
  • Kiln API URL and port (default: 10.0.0.252:8081)
  • Display pins (if different from defaults)
  • Update intervals

Building and Uploading

  1. Install PlatformIO (VS Code extension recommended)
  2. Connect ESP32 via USB
  3. Build and upload:
    pio run -t upload
  4. Monitor serial output:
    pio device monitor

API Endpoints

The code tries multiple API endpoints to find the correct one:

  • /api/status
  • /api/state
  • /status.json
  • /api/temperature

The API should return JSON with the following fields (flexible naming):

  • temperature or temp - Current temperature
  • target_temperature or target_temp or target - Target temperature
  • status or state - Kiln status (RUNNING, PAUSED, IDLE)
  • profile_name or profile - Current profile name
  • time_remaining or time_remaining_seconds - Time remaining in seconds
  • runtime or runtime_seconds - Total runtime in seconds
  • heat_rate or heating_rate - Heating rate in degrees/hour

Display Layout

  • Status Bar (Top): Shows "KILN MONITOR" and WiFi connection status
  • Temperature Display: Large current temperature and target temperature
  • Graph Area: Real-time temperature graph showing last 3 minutes of data
  • Status Line (Bottom): Kiln status, profile name, and time remaining

Troubleshooting

  1. Display not showing:

    • For LCDWIKI E32R32P/E32N32P boards: Verify pins in config.h match the specification:
      • CS = 15, DC = 2, SCLK = 14, MOSI = 13, RST = 4, BL = 27 (important!)
    • Check that backlight pin is correct - for this board, BL is GPIO 27 (HIGH = on)
    • Try different rotation values in display.cpp (0-3)
    • Verify the display initializes by checking serial monitor for errors
    • The serial monitor will show color tests (red, green, blue, white) - if you don't see these, the display isn't initializing
    • Some boards may need tft.init(240, 320, SPI_MODE3) - check Adafruit library docs
  2. WiFi not connecting:

    • Verify SSID and password in config.h
    • Check serial monitor for connection errors
    • Ensure ESP32 is within WiFi range
  3. API not responding:

    • Verify kiln controller is running at the configured IP
    • Check serial monitor for HTTP error codes
    • Try accessing the API URL in a browser to verify it's working
    • The code will try multiple endpoints automatically
  4. Graph not updating:

    • Wait for at least 2 data points (6 seconds)
    • Check that temperature data is being received (see serial monitor)

Serial Monitor

The serial monitor (115200 baud) will show:

  • WiFi connection status
  • API request results
  • Temperature updates
  • Error messages

Features

  • Real-time temperature display
  • Temperature graph (last 3 minutes)
  • WiFi connection status indicator
  • Automatic reconnection on WiFi loss
  • Multiple API endpoint fallback
  • Error handling and display

License

This project is provided as-is for use with TheKilnGod kiln controller.

About

KilnDisplay is an ESP32-based monitor that connects to TheKilnGod kiln controller via WiFi and displays real-time temperature, target temperature, status, and a temperature history graph on a 3.2" ST7789 TFT display. It uses HTTP polling and WebSocket connections to fetch kiln data and provides visual feedback with color-coded status indicators.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors