Wiznet makers

Grace_Koo

Published April 06, 2026 ©

56 UCC

25 WCC

9 VAR

0 Contests

0 Followers

0 Following

Original Link

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.

COMPONENTS Hardware components

WIZnet - W55RP20-EVB-Pico

x 1


PROJECT DESCRIPTION

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://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:

ComponentRole
WIZnet W55RP20-EVB-PICOMain controller — RP2040 MCU + W5500 Ethernet
NTC thermistorTemperature measurement
Compressor relayCooling control output
KiCad schematicCustom interface board (included in repo)

3. System Architecture

https://github.com/grodansparadis/vscp-demo-pico-fridge-ctrl
[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:

EventVSCP ClassVSCP TypeMQTT Topic Pattern
Temperature reading1040 (Measurement float)6 (Temperature)/vscp/GUID/1040/6/#
Alarm1 (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)
Repositorygithub.com/grodansparadis/vscp-demo-pico-fridge-ctrl
LicenseMIT
WIZnet hardwareW55RP20-EVB-PICO
ProtocolVSCP Level II over MQTT
LanguageC (84%), CMake (16%)
MDFeurosource.se/w55rp20_frc01.xml

 

Documents
Comments Write