Wiznet makers

jaden

Published June 21, 2026 ©

128 UCC

18 WCC

59 VAR

0 Contests

0 Followers

0 Following

Original Link

AC control timer

Rpi pico timer

COMPONENTS
PROJECT DESCRIPTION

How to Build a 4-Channel AC Timer Switch with W5500 and Raspberry Pi Pico?

Summary

This project implements a programmable 4-channel AC timer switch using Raspberry Pi Pico, WIZnet W5500 Ethernet, DS3231 RTC, SSD1306 OLED, and a joystick interface. The W5500 is used for NTP-based network time synchronization, allowing the controller to maintain accurate schedules while the DS3231 provides backup timekeeping during network outages.

What the Project Does

The system controls four independent AC outputs through photo-triac and triac circuits.

The hardware consists of:

Raspberry Pi Pico

WIZnet W5500 Ethernet module

DS3231 RTC

SSD1306 128×64 OLED

Analog joystick

4-channel photo-triac output stage

Each channel supports two independent timer programs, resulting in eight programmable schedules. The scheduler evaluates multiple programs using OR logic, allowing overlapping schedules without conflict.

Configuration data is stored as CSV files and can be edited directly from a PC through the Pico USB mass-storage interface.

Key functions include:

NTP network time synchronization

RTC backup clock

OLED-based user interface

CSV configuration storage

Four-channel AC load switching

Where WIZnet Fits

The W5500 provides Ethernet connectivity for automatic time synchronization.

According to the original project description, the SPI pin assignment follows the W5500-EVB-Pico-PoE design:

GP16

GP17

GP18

GP19

GP20

GP21

The primary role of the W5500 is to connect to an NTP server and obtain accurate network time. This removes the need for manual clock adjustment and allows the DS3231 RTC to remain synchronized.

For timer-based control systems, network-synchronized time is important because schedule accuracy directly affects switching behavior. The W5500 provides a stable wired Ethernet connection that is less susceptible to interference than Wi-Fi.

Implementation Notes

The project uses the following architecture:

W5500 Ethernet
→ NTP Server
→ Raspberry Pi Pico
→ DS3231 RTC Update
→ Timer Evaluation Engine
→ Photo-Triac Driver
→ AC Load Control

Timer configuration is stored in CSV format:

ch,prg,enabled,sun,mon,tue,wed,thu,fri,sat,startHour,startMin,endHour,endMin
0,0,1,1,1,1,1,1,1,1,8,30,17,15

Each channel contains two timer programs.

The scheduler combines the results using logical OR evaluation, allowing multiple active periods for the same output.

The OLED display provides local configuration while the joystick handles menu navigation and parameter editing.

Practical Tips / Pitfalls

Verify NTP synchronization before enabling critical schedules.

Use a battery-backed DS3231 to preserve time during power outages.

Ensure proper heat sinking for triacs when switching high-current loads.

Confirm isolation spacing around AC mains circuitry.

Avoid editing CSV files simultaneously from both USB host and Pico firmware.

Check Ethernet link status before requesting NTP updates.

FAQ

Why use W5500 in this project?

The W5500 provides reliable Ethernet connectivity for NTP time synchronization. Accurate time is essential for timer-based switching applications.

How does W5500 connect to Raspberry Pi Pico?

The module uses SPI. The project follows the same SPI assignment used by W5500-EVB-Pico-PoE, simplifying software reuse.

What role does W5500 play in this timer controller?

It retrieves accurate network time from an NTP server and keeps the timer schedules synchronized.

Can beginners reproduce this project?

Intermediate embedded development experience is recommended because the project combines Ethernet, RTC, OLED UI, file storage, and AC power control.

Why use Ethernet instead of Wi-Fi?

A wired Ethernet connection provides predictable connectivity and avoids wireless interference, which is beneficial for long-term automation systems.

Source

Original Project:
https://seisaku-memocyou.blog.jp/archives/34533327.html

Author:
製作メモ帳 (Seisaku Memocho)

License:
Not specified

 

Related WIZnet Ecosystem Projects

1. W5100S/W5500 RP2040 SNTP Network Time

Source:
https://maker.wiznet.io/ronpang/projects/9-w5100s-w5500-rp2040-raspberry-pi-picosntp-get-network-time/

Why It Is Similar

Uses Raspberry Pi Pico (RP2040)

Uses W5100S/W5500 Ethernet controllers

Implements SNTP/NTP-based network time synchronization

Focuses on obtaining accurate system time through Ethernet

How It Differs

This project focuses primarily on retrieving network time from an SNTP server.

In contrast, the 4-channel AC timer switch extends this concept by synchronizing a DS3231 RTC and using the synchronized time to drive an automated scheduling engine for AC load control.

Extension Opportunity

The SNTP implementation from this project could be adopted to further improve the robustness and accuracy of network time synchronization in the timer controller.


2. RP2040 + W5500 + TM1637 NTP Clock

Source:
https://maker.wiznet.io/scott/projects/rp2040w5500tm1637-ntp/

Why It Is Similar

RP2040-based platform

W5500 Ethernet connectivity

NTP server integration

Dedicated time display functionality

How It Differs

The primary goal of this project is to build a network-synchronized digital clock.

The timer switch project goes beyond time display by using synchronized time to control four independent AC outputs according to user-defined schedules.

Extension Opportunity

Combining the OLED-based interface from the timer controller with a dedicated clock-style display could improve usability for industrial or facility automation deployments.


3. GPS-Synchronized NTP Time Server with W5500-EVB-Pico

Source:
https://maker.wiznet.io/Benjamin/projects/how-to-build-a-gps-synchronized-ntp-time-server-with-w5500-evb-pico-and-micropython/

Why It Is Similar

Uses W5500 Ethernet hardware

Time synchronization is a core design objective

Demonstrates a practical NTP-related application

How It Differs

The GPS-synchronized project acts as an NTP server, generating and distributing accurate time across a network.

The timer switch project acts as an NTP client, consuming network time and applying it to automated scheduling and AC load control.

Extension Opportunity

A factory or building automation network could deploy a local GPS-based NTP server while multiple timer switch nodes synchronize against it, eliminating dependence on external internet time sources.


4. W5100S-EVB-Pico Basic Operation in Arduino Environment (LED, Passive Buzzer, Relay, OLED)

Source:
https://maker.wiznet.io/matthew/projects/w5100s-evb-pico-basic-operation-in-arduino-environment-led%2C-passive-buzzer%2C-relay%2C-oled/

Why It Is Similar

RP2040-based hardware

OLED display integration

Buzzer functionality

Relay and output-control examples

How It Differs

This project demonstrates fundamental I/O capabilities of the W5100S-EVB-Pico platform.

The timer switch integrates Ethernet, RTC synchronization, OLED UI, buzzer feedback, file-based configuration storage, and triac-based AC control into a complete automation system.

Extension Opportunity

The relay, buzzer, and OLED examples can be leveraged to add status notifications, alarms, and diagnostic functions to the timer switch platform.


Differences and Extension Value

Most Maker projects related to W5500 and RP2040 focus on one of two areas:

Network time synchronization (NTP/SNTP clocks)

Basic Ethernet-connected I/O demonstrations

The 4-channel AC timer switch combines both concepts into a single application.

Architecture of Related Projects:

W5500
  ↓
NTP Server
  ↓
Clock Display

Architecture of This Project:

W5500
  ↓
NTP Server
  ↓
DS3231 RTC
  ↓
Scheduling Engine
  ↓
Triac Control
  ↓
AC Load

Rather than using Ethernet solely for communication, the W5500 serves as the source of accurate system time that drives the entire automation workflow.

This makes the project a practical example of how Ethernet connectivity can be integrated into real-world control systems rather than functioning only as a networking demonstration.

Presentation Summary

While reviewing this project, I compared it with several Maker projects that use RP2040 and W5500 for network time synchronization.

Most of those projects focus on obtaining and displaying accurate time through NTP. This project takes the next step by connecting synchronized time to real-world control logic through a scheduling engine and four AC output channels.

One particularly interesting extension path is combining this project with a GPS-synchronized NTP server. In that configuration, a facility could maintain highly accurate time synchronization without relying on external internet connectivity, while multiple timer controllers operate from the same local time reference.

This project demonstrates how W5500 can serve not only as a networking device, but also as a foundation for reliable time-based industrial and building automation systems.

 

Tags

#W5500 #RaspberryPiPico #TimerSwitch #NTP #DS3231 #Ethernet #IndustrialAutomation #Triac #OLED #IoT

Documents
Comments Write