Quick Reference For WIZio-SEN

WIZio-SEN

WIZio-SEN is a multifunctional transmitter development board developed by WIZnet’s W55MH32Q chip, specifically designed for industrial field applications. With its flexible power supply options, extensive interface configurations, and reliable control core, it meets diverse industrial automation control requirements.

Purchase link: WIZio-SEN

Download Hex file: WIZio-SEN hex

Firmware Information:

MicroPython version

V 1.27.0

Release date

2026/09/18

Release notes

First release.

Pinout

The pinout diagram below shows the available pins on the WIZio-SEN.

WIZio-SEN pinout

Frozen Modules

🧊 Click to expand – full list of frozen modules


Basic Setup

Flash firmware

Important

You will need WizISP Tool before using MicroPython on this board.

  1. Connect the ISP & Debug section’s GND, RXD and TXD pins to your PC through a USB-to-TTL adapter.

  2. Unzip and open WizISP.exe.

  3. Select the correct COM port and choose the firmware file you want to flash.

  4. Click Erase && Flash.

  5. To enter boot mode, press and hold the BOOT0 button first, then press the RESET button.

  6. Once flashing is finished, open your preferred MicroPython REPL tool. You should see the MicroPython terminal start successfully. You can verify the firmware by running:

print("hello world!")

HTTP Configuration

Important

Visit WIZio-SEN HTTP Configuration for the source code of this project.

The WIZio-SEN HTTP Configuration Server runs a lightweight web server on the board, allowing users to configure and control the device from a web browser or HTTP client.

Through the web interface, users can configure network settings, control I/O channels, read analog values, send and receive serial data, access EEPROM storage, measure weight and read temprature values.

After cloning the WIZio-SEN HTTP Configuration Server repository to your PC, upload all project files to the device. Once the upload is complete, reset the device to start the HTTP configuration program.

Warning

Sometimes Syntax Error may arise due to bad file writes. If you found this error, just reupload the given file and it should be good to go.


Startup Flow

  1. main.py enables garbage collection and imports http_app.py.

  2. http_app.py creates a Device object for hardware access.

  3. http_app.py also creates a Server object and registers all HTTP routes.

  4. server.run() initializes the WIZnet network interface.

  5. The server listens on TCP port 80.

  6. For every HTTP request, the server reads the header, reads the body if a Content-Length is present, matches the route, and sends a response.


HTTP Config Table of Contents

Web Page Demonstration

Network Config

DHCP:

static-to-dhcp

Static:

dhcp-to-static

The Network Configuration tab allows users to view and change network details of the WIZio-SEN board.

When accessed, the tab first retrieves the current network settings from the device.
If DHCP mode is selected, the network information cannot be edited manually.
If Static mode is selected, you need to enter the correct network addresses before submitting the configuration.

After submission, the redirect behavior depends on the selected mode:

  • In DHCP mode, click the URL shown in the MicroPython REPL terminal to open the new web page.

  • In Static mode, the web page will automatically redirect to the new IP address.

Digital I/O

WIZio-SEN HTTP Digital IO demo

The WIZio-SEN provides two relay outputs (RY1 and RY2) and two digital inputs (IN1 and IN2). The I/O Control page lets you switch each relay and shows the current input states. Input states are refreshed by the browser once per second.

Analog I/O

WIZio-SEN HTTP Analog demo

The Analog I/O page displays the two analog-input channels, AI0 and AI1. Both channels are configured as 0–20 mA inputs by the supplied application. The page retrieves the latest reading from the board at regular intervals.

Serial

WIZio-SEN HTTP serial demo

The Serial Test page sends text to and displays text received from the configured UART. Serial support is optional: the application shows this page only when the board is configured for UART rather than CAN in config.py.

Storage

WIZio-SEN HTTP EEPROM demo

The Storage Test page reads and writes text in the onboard I2C EEPROM. The application reads and writes from EEPROM address 0; each HTTP request is limited to 1000 bytes by the device implementation.

Load Cell

WIZio-SEN HTTP Load Cell demo

The Load Cell Sensor page displays real-time weight in kilograms or grams. The default configuration is for a 10 kg, 2 mV/V load cell with 10 V excitation. Adjust LOADCELL_CAPACITY_KG and LOADCELL_RATED_OUTPUT in config.py to match the connected load cell before using the reading.

Type K Thermocouple

WIZio-SEN HTTP KType demo

The Thermocouple Temperature page displays the two K-type channels, K1 and K2. The supplied configuration accepts readings from 0 to 1300 Β°C. Temperature data is measured asynchronously so that the HTTP server remains responsive while conversions are in progress.

Customizing the HTTP Application

The HTTP server uses http_app.py to define the web routes and the behavior behind each page or API request. Edit it when you need to add or change a page, an API endpoint, or peripheral behavior. server.py provides the HTTP and WebSocket servers, while device.py contains the hardware access functions.

For the route list, request formats, and WebSocket telemetry messages, see the following reference.

MQTT Device

Important

Visit WIZio-SEN MQTT Device for the source code of this project.

The MQTT version provides the same core WIZio-SEN functions as the HTTP application, but exposes them through an MQTT broker instead of a web page. It is useful for remote monitoring, automation systems, dashboards, and other applications that already use MQTT.

The supplied MQTT application supports:

  • Network configuration and status

  • Relay output control for RY1 and RY2

  • Digital input monitoring for IN1 and IN2

  • Analog input monitoring for AI0 and AI1

  • RS485/UART transmit and receive

  • EEPROM read, write, and wipe operations

  • Load-cell weight telemetry

The MQTT application uses retained state messages by default. Subscribe to a state topic before sending commands so that the current device state is available immediately after the device connects.

Visit MQTT Topics Summary for the default topics.

Note

To test the MQTT functionalities of the board, you can run the MQTTDashboard script under the above repo.
Make sure you download Eclipse Mosquitto on your PC and start your MQTT Broker.


MQTT Demonstration

MQTT device Table of Contents

MQTT Setup

Clone the project and upload all files except mqtt.default.json to the device. The application starts from main.py, which imports mqtt_app.py and runs the MQTT device loop.

Before starting the application:

  1. Copy mqtt.default.json to mqtt.json if mqtt.json is not already present.

  2. Set the MQTT broker address and port in mqtt.json.

  3. Add the MQTT username and password when the broker requires authentication.

  4. Check the hardware settings in config.py. The supplied configuration uses DHCP and RS485/UART at 9600 baud, with 8 data bits, no parity, and 1 stop bit.

  5. Upload the Python files and JSON configuration to the board, then reset it.

Example mqtt.json:

{
    "host": "192.168.1.100",
    "username": null,
    "password": null,
    "port": 1883
}

The MQTT client uses the WIZnet chip MAC address as its MQTT client ID. On startup it connects to the broker, subscribes to all command topics, publishes the initial device states, and then checks for commands and hardware changes continuously.

Network Configuration

Publish a JSON object to network_config/set to change the Ethernet configuration. Set dhcp to true to request an address automatically:

{
    "dhcp": true
}

For static addressing, set dhcp to false and provide all four IPv4 settings:

{
    "dhcp": false,
    "ip": "192.168.1.50",
    "mask": "255.255.255.0",
    "gateway": "192.168.1.1",
    "dns": "192.168.1.1"
}

The device validates the IPv4 values, reconnects the WIZnet interface, and publishes the active configuration to network_config/state:

{
    "ip": "192.168.1.50",
    "mask": "255.255.255.0",
    "gateway": "192.168.1.1",
    "dns": "192.168.1.1",
    "dhcp": false
}

Digital I/O

The two relay outputs are controlled with a pin-specific topic. The <pin> value is RY1 or RY2:

Topic: digital_output/RY1/set
Payload: {"value": 1}

Use 0 to turn the relay off. After the output is changed, the board publishes its resulting value to digital_output/RY1/state. The two digital inputs are monitored by the device and publish a new value when their state changes:

digital_input/IN1/state
{"value": 1}

The initial states for all digital inputs and relay outputs are published when the MQTT connection is established.

Analog I/O

The board periodically samples AI0 and AI1, averages ten readings, and publishes the result to analog_input/state:

{
    "AI0": {"value": 12.4, "mode": 1},
    "AI1": {"value": 4.8, "mode": 1}
}

In the supplied configuration both analog inputs use 0-20 mA mode, which is represented by mode 1. Voltage mode is represented by mode 0 and is calculated according to the board configuration.

The MQTT handler includes an analog-output command topic, but the supplied WIZio-SEN device configuration defines no analog-output channels. Therefore analog output is not available in the default application.

Serial

When CAN is not configured, the board uses UART4 for the RS485 interface. The default settings are 9600 baud, 8 data bits, no parity, and 1 stop bit.

Publish UTF-8 text to uart/write to transmit it through RS485:

Topic: uart/write
Payload: temperature=25.4

Data received from the UART is published as UTF-8 text on uart/read. Match the external serial device settings with the values in config.py.

(mqtt-storage)

EEPROM Storage

WIZio-SEN MQTT EEPROM demo

The application uses the onboard I2C EEPROM and limits each read and write to 1000 bytes. The supplied handlers use address 0 for writes.

Write UTF-8 text with:

Topic: eeprom/write
Payload: device-name=WIZio-SEN

Request a read from a starting index with JSON:

Topic: eeprom/read/request
Payload: {"index": 0}

The response is published as raw bytes on eeprom/read/response. To erase the EEPROM, publish the exact UTF-8 payload True to eeprom/wipe.

Load Cell

The load-cell reader publishes averaged weight values in kilograms to loadcell/weight. The supplied configuration expects a 10 kg, 2 mV/V load cell with 10 V excitation. Change LOADCELL_CAPACITY_KG and LOADCELL_RATED_OUTPUT in config.py to match the connected sensor before using the readings.

Type K Thermocouple

The MQTT runtime can publish two K-type thermocouple readings to temp/k1 and temp/k2 when the CS1237/CS1238 driver and temperature limits are enabled in config.py. The sensor is polled without blocking the MQTT loop, and each topic carries the latest temperature value in degrees Celsius.

Customizing MQTT Behavior

Edit mqtt_app.py when adding or changing command topics. Use client.add_topic() to register a handler, decode the payload, call the appropriate Device method, and publish a state or response when one is available.

The main files have these responsibilities:

  • mqtt_app.py defines subscribed command topics and their handlers.

  • device_mqtt.py manages the broker connection, subscriptions, polling, and published state topics.

  • device.py provides the WIZio-SEN hardware functions.

  • setup.py initializes the WIZnet Ethernet interface.

  • mqtt.json stores the broker connection settings.

  • main.py starts the MQTT application.

For most application changes, only mqtt_app.py and config.py need to be edited.

Below you can find a more detailed explanation of each section of the WIZio-SEN MQTT application.


WebREPL

Important

Visit the W55MH32 WebREPL repository to download the source code for this project.

MicroPython WebREPL allows you to connect to and control your device remotely through a web browser.

Use the official MicroPython WebREPL client page to connect to and test your device.

Note

The network interface uses DHCP by default. To use a static IP address instead, open setup.py, update the network configuration values, and set the dhcp parameter to False.

  1. Clone the repository and upload all .py files to the MicroPython device.

  2. Open the terminal in your preferred MicroPython editor and run: import webrepl_setup

  3. Follow the instructions shown in the terminal. After setup is complete, you will be asked whether you want to reboot the device.

  4. If WebREPL on boot is enabled, webrepl_w55mh32.py will run automatically after the device restarts.

  5. When WebREPL starts successfully, the terminal will display a WebSocket address for connecting to the device.

  6. Open the MicroPython WebREPL client page. Replace the default WebSocket address with the address displayed in the terminal: ws://IP_ADDRESS:PORT

  7. Click Connect and enter the WebREPL password configured during setup.

  8. After the connection is established, the MicroPython REPL prompt should appear in the browser.

WIZio-RTU WebREPL Setup

Attention

Some MicroPython editors, such as Thonny, use Raw REPL mode. While Raw REPL is active, commands entered through the browser may not affect the device terminal.

To resolve this issue, close Thonny and reset the board before connecting through WebREPL. Alternatively, use mpremote to monitor and interact with the device.

Monitoring WebREPL with mpremote

mpremote can be used to monitor the device through its USB or serial REPL while testing a WebREPL connection from a browser. This is useful for viewing startup messages, connection attempts, and any errors reported by the board.

Install mpremote

  1. Install mpremote by following the official MicroPython mpremote installation guide.

  2. After installation, start mpremote using the command appropriate for your operating system.
    On Linux: mpremote
    On Windows: python -m mpremote

  3. If the board is connected and recognized by your computer, mpremote should automatically connect to its serial REPL.

Note

Remeber to close any Raw-REPL terminal that uses the device.

Keep mpremote open so that you can monitor messages from the device.

Then, on the MicroPython WebREPL page in your browse, test the connection with:

print("Hello, world!")

WIZio-RTU Hello World test

File transfer using WebREPL

WebREPL supports more than remote REPL access. It can also transfer files between the browser and the device.

The WebREPL interface provides two file-transfer operations:

  • Download a file from the device.

  • Upload a file to the device.

Important

Avoid modifying or replacing a file while it is being executed by the device. Stop the running program or return to the REPL before transferring application files.

For the following demonstration, I will use Thonny instead of WebREPL, since file transfer works also when Raw REPL is present and it is much more clearer.

Download a File from the Device

Enter the name of the file stored on the device and use the WebREPL download control to save it to your computer.

WIZio-RTU get file test

Upload a File to the Device

Select a file from your computer and use the WebREPL upload control to transfer it to the device.

You can also run

import os
os.listdir()

to view if the file appeared in the system.

WIZio-RTU send file test

General Board Controls

You can find similar scripts as in W55MH32L-EVB.

Network

See Networking.

Delay and timing

See Delay and timing.

Pins and GPIO

Since some pins are being attached already to input/output/analog circuit, Most pins are being limited to its own functions.

for example, since IN1 is binded to an input circuit,

from machine import Pin
pin = Pin('IN1', Pin.OUT)

This will causes error:

>>> Pin('IN1', Pin.OUT)
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
ValueError: invalid pin mode: 1

Timer

See Timers.

RTC (real time clock)

See RTC (real time clock).

ADC

See ADC (analog to digital conversion).

Note

ADC pins are only available on AI0/PA0, AI1/PA3.

SPI

See SPI bus

Attention

SPI is not available on the board except for the network interface of the W55MH32 chip.

I2C

See I2C bus

Note

I2C are only available on I2C(1) and I2C(2).

I2C(1) is used by the onboard EEPROM. I2C(2) is not connected by default. To use it, populate the required resistors on the board.

UART

See UART (serial bus)

Note

UART are only available on UART(3) and UART(4).

UART(4) is connected to the onboard RS485 circuit. UART(3) shares its pins with I2C(2). Therefore, they cannot be used at the same time.