---
title: "vscp-demo-pico-fridge-ctrl"
url: "https://maker.wiznet.io/Grace_Koo/projects/vscp-demo-pico-fridge-ctrl/"
markdown_url: "https://maker.wiznet.io/Grace_Koo/projects/vscp-demo-pico-fridge-ctrl/md"
type: "UCC: User Created Content"
author: "grodansparadis"
author_url: "https://github.com/grodansparadis/vscp-demo-pico-fridge-ctrl"
editor: "WIZnet"
editor_url: "https://maker.wiznet.io/"
original_author: "grodansparadis"
original_url: "https://github.com/grodansparadis/vscp-demo-pico-fridge-ctrl"
published: "2026-04-06"
language: "en"
hardware: ["WIZnet W55RP20-EVB-Pico"]
likes: 0
views: 321
comments: 0
source: "WIZnet Makers (https://maker.wiznet.io/)"
---

# vscp-demo-pico-fridge-ctrl

> A W55RP20-EVB-PICO monitors fridge temperature via NTC thermistor, controls a compressor relay, and publishes VSCP events to MQTT over Ethernet.

Original author: grodansparadis (source: https://github.com/grodansparadis/vscp-demo-pico-fridge-ctrl)

## Components

- **WIZnet W55RP20-EVB-Pico** x 1 ([docs](https://wiznet.io/products/powered-by-raspberry-pi/w55rp20-evb-pico))

## Article

## VSCP Fridge Controller on the W55RP20-EVB-PICO

A network-connected fridge temperature controller — built on WIZnet's **W55RP20-EVB-PICO**.

An NTC thermistor measures fridge temperature in real time. The controller turns the compressor on or off based on a configurable setpoint. Temperature readings and alarms are automatically published to an MQTT broker, so the fridge can be monitored and configured remotely without touching the hardware.

The communication layer uses **VSCP (Very Simple Control Protocol)**, an open IoT automation framework. The project was developed by Åke Hedman (grodansparadis), who is also the creator of VSCP itself.

---

### 1. Background: What Is VSCP?

![](https://maker.wiznet.io/upload/ckeditor5/425649697%5F1776076713%2Epng)

*<https://github.com/grodansparadis/vscp>*

**VSCP (Very Simple Control Protocol)** is an open, free IoT/M2M automation framework designed for resource-constrained devices. VSCP is an application-level protocol that uses CAN, RS-232, Ethernet, TCP/IP, MQTT, or other transport mechanisms, and works over both cable and wireless connections.

Key characteristics relevant to this project:

- **Event-driven** — nodes publish typed events (temperature readings, alarms) rather than raw data

- **Standardized event classes and types** — e.g., class=10/type=6 for temperature, class=1/type=2 for alarms

- **Register-based configuration** — each node exposes a register map for reading/writing configuration over the network

- **GUID-based addressing** — each node has a globally unique 16-byte identifier, derived here from the W55RP20's MAC address

- **Transport-agnostic** — this project uses MQTT as the transport layer (VSCP Level II)

---

### 2. Project Overview

The firmware implements a closed-loop temperature controller with the following behavior:

- Reads temperature from an NTC thermistor using the **Steinhart–Hart equation**

- Compares current temperature against a configurable setpoint with hysteresis

- Controls a compressor relay (on/off)

- Publishes temperature readings periodically to an MQTT broker as VSCP events

- Publishes alarm events when temperature exceeds high or low thresholds

- Exposes a register map for remote configuration via MQTT subscribe

**Hardware:**

| Component | Role |
| --- | --- |
| WIZnet W55RP20-EVB-PICO | Main controller — RP2040 MCU + W5500 Ethernet |
| NTC thermistor | Temperature measurement |
| Compressor relay | Cooling control output |
| KiCad schematic | Custom interface board (included in repo) |

---

### 3. System Architecture

![](https://github.com/grodansparadis/vscp-demo-pico-fridge-ctrl/raw/main/images/IMG_20241028_211113.jpg)

*https://github.com/grodansparadis/vscp-demo-pico-fridge-ctrl*

```plaintext
[NTC Thermistor]
      │ ADC
      ▼
[W55RP20-EVB-PICO]
  RP2040 — reads ADC, applies Steinhart-Hart equation
  W5500  — hardware TCP/IP, handles Ethernet
      │
      │  MQTT over TCP
      ▼
[MQTT Broker]
      │
      ├── publish: /vscp/GUID/1040/6/#   (temperature events)
      └── publish: /vscp/GUID/1/2/#      (alarm events)
      │
      └── subscribe: /vscp/GUID          (register read/write commands)
```

---

### 4. VSCP Event Mapping

VSCP defines standardized event classes and types. This project uses:

| Event | VSCP Class | VSCP Type | MQTT Topic Pattern |
| --- | --- | --- | --- |
| Temperature reading | 1040 (Measurement float) | 6 (Temperature) | `/vscp/GUID/1040/6/#` |
| Alarm | 1 (Alarm) | 2 (Alarm) | `/vscp/GUID/1/2/#` |

The GUID is derived from the W5500 MAC address (default: `FF:FF:FF:FF:FF:FF:FF:FE:00:08:DC:12:34:56:00:01`), making each device addressable by its hardware identity on the MQTT broker.

---

### 5. WIZnet's Role: W55RP20 as the Network-Connected Controller

The W55RP20 integrates the RP2040 MCU and W5500 Ethernet controller in a single SiP package. The W5500's hardwired TCP/IP stack handles the MQTT TCP connection and packet processing independently of the RP2040, which focuses on the control logic — ADC readings, Steinhart–Hart calculations, setpoint comparisons, and VSCP event construction.

The project uses WIZnet's **WIZnet-PICO-C** library (included as a submodule) for W5500 Ethernet driver support on the RP2040/pico-sdk stack.

---

### 6. Project Info

|  |  |
| --- | --- |
| **Author** | Åke Hedman (grodansparadis) |
| **Repository** | [github.com/grodansparadis/vscp-demo-pico-fridge-ctrl](https://github.com/grodansparadis/vscp-demo-pico-fridge-ctrl) |
| **License** | MIT |
| **WIZnet hardware** | W55RP20-EVB-PICO |
| **Protocol** | VSCP Level II over MQTT |
| **Language** | C (84%), CMake (16%) |
| **MDF** | [eurosource.se/w55rp20_frc01.xml](https://www.eurosource.se/w55rp20_frc01.xml) |

- VSCP GitHub : <https://github.com/grodansparadis/vscp>

- W55RP20 VSCP Fridge Controller : <https://github.com/grodansparadis/vscp-demo-pico-fridge-ctrl>

---

Source: https://maker.wiznet.io/Grace_Koo/projects/vscp-demo-pico-fridge-ctrl/
