WIZM-IR

The WIZM-IR is a 3.3V infrared transceiver module from WIZnet featuring an onboard IR emitter and IR receiver with direct IO control (IN / IR-IN and OUT / IR-OUT). It supports transmitting modulated infrared carrier bursts and receiving/demodulating infrared signals, making it well suited for remote control decoding, infrared communication prototypes, and embedded automation.
The WIZM-IR pairs an onboard IR Emitter and IR Receiver on a compact 3.3V module with exposed IO pins (3.3V, GND, IN / IR-IN, OUT / IR-OUT, and NC). When wired to a 3.3V MicroPython-enabled microcontroller, you can drive IN (IR-IN) with a modulated carrier signal (such as 38 kHz PWM) to transmit IR bursts and read OUT (IR-OUT) via GPIO polling or pin interrupts to capture and decode incoming IR signals such as NEC remote frames.
Features
Integrated IR Emitter & Receiver: Onboard infrared transmitter and receiver for sending and receiving IR signals.
Direct IO Interface: Exposes
IN(IR-IN) for emitter control andOUT(IR-OUT) for receiver output.3.3V Logic Operation: Powered from a
3.3Vsupply rail with commonGNDreference.Protocol & Pulse Decoding Ready: Compatible with MicroPython GPIO interrupts and timing (
time.ticks_us()) for decoding IR protocols like NEC.Dual Breakout Options: Includes a 5-pin connector (
NC,OUT,IN,GND,3.3V) alongside silkscreened breakout pads (NC,IR-OUT,IR-IN,GND,3.3V) and a center mounting hole for straightforward bench testing and mounting.
Specifications
Parameter |
Value |
|---|---|
Part Number ( |
|
Function ( |
IR Transceiver (IR Emitter + IR Receiver) |
Interface ( |
IO ( |
Operating Voltage |
3.3V DC |
Carrier Frequency (Typical IR) |
~38 kHz (common consumer IR / NEC standard) |
Connector Pitch |
Standard 2.54mm (P1) / Keyed Horizontal (J1) |
Pin Count |
5 Pins ( |
Pinout & Hardware Overview
The module provides a 5-pin connector and corresponding silkscreened breakout labels for power, ground, transmit drive, receive output, and an unconnected pin.
Pin |
Type |
Description |
|---|---|---|
NC |
— |
No Connection; leave floating |
OUT / IR-OUT |
Output |
IR receiver output (typically active-low when modulated IR is detected) |
IN / IR-IN |
Input |
IR emitter control input (drive with modulated IR carrier, e.g., 38 kHz PWM) |
GND |
Power |
Ground supply reference (common ground with MCU board) |
3.3V |
Power |
3.3V positive supply input (keep logic levels at 3.3V) |
Top View & Bottom View

Platforms Supported
MicroPython |
|---|
|
Getting Started
Materials Required (excluding IR module)
W55MH32L-ADK
NEC-compatible IR remote (for receive/decode testing)
5-pin female-female JST PH-Style Cable
USB Type-C Cable

Hardware Connection
Connect the WIZM-IR to the W55MH32L-ADK with the JST PH-Style Cable to J6:

Then use a USB Type-C cable to connect the WIZ-LINK Port on the W55MH32L-ADK board to your PC.
Sample Code Demo
Software
We will be using Thonny IDE to run the MicroPython script.
Open Thonny IDE on your PC.
Select the COM port corresponding to your board.
Set the interpreter to MicroPython (generic).
Refer to the WIZnet documentation page for detailed instructions under the “Basic Setup” section.
MicroPython
# Receiver
import time
from machine import Pin
# Adjust to the GPIO connected to module OUT / IR-OUT
IR_OUT_PIN = "PD12"
ir_out = Pin(IR_OUT_PIN, Pin.IN, Pin.PULL_UP)
# Ring buffer for edge intervals (microseconds)
BUF_SIZE = 128
durations = [0] * BUF_SIZE
levels = [0] * BUF_SIZE
head = 0
tail = 0
last_edge_us = time.ticks_us()
def _ir_irq(pin):
global head, last_edge_us
now = time.ticks_us()
dt = time.ticks_diff(now, last_edge_us)
last_edge_us = now
next_head = (head + 1) % BUF_SIZE
if next_head != tail:
durations[head] = dt
levels[head] = 1 - pin.value()
head = next_head
ir_out.irq(trigger=Pin.IRQ_FALLING | Pin.IRQ_RISING, handler=_ir_irq)
def pop_pulse():
global tail
if tail == head:
return None
dt = durations[tail]
lvl = levels[tail]
tail = (tail + 1) % BUF_SIZE
return (lvl, dt)
def in_range(val, target, tol=0.25):
return target * (1 - tol) <= val <= target * (1 + tol)
def decode_nec():
while True:
item = pop_pulse()
if item is None:
return None
lvl, dt = item
if lvl == 0 and in_range(dt, 9000, 0.25):
t0 = time.ticks_ms()
nxt = pop_pulse()
while nxt is None and time.ticks_diff(time.ticks_ms(), t0) < 20:
nxt = pop_pulse()
if nxt is None:
return None
s_lvl, s_dt = nxt
if s_lvl == 1 and in_range(s_dt, 2250, 0.25):
return ("REPEAT", None, None)
if not (s_lvl == 1 and in_range(s_dt, 4500, 0.25)):
continue
raw = 0
for bit_idx in range(32):
mark = None
space = None
t_bit = time.ticks_ms()
while (mark is None or space is None) and time.ticks_diff(
time.ticks_ms(), t_bit
) < 20:
p = pop_pulse()
if p is not None:
if mark is None:
mark = p
else:
space = p
if mark is None or space is None:
return None
m_lvl, m_dt = mark
sp_lvl, sp_dt = space
if m_lvl != 0 or not in_range(m_dt, 562, 0.45) or sp_lvl != 1:
return None
if in_range(sp_dt, 1687, 0.35):
raw |= 1 << bit_idx
elif in_range(sp_dt, 562, 0.45):
pass
else:
return None
addr = raw & 0xFF
addr_inv = (raw >> 8) & 0xFF
cmd = (raw >> 16) & 0xFF
cmd_inv = (raw >> 24) & 0xFF
is_standard = ((addr ^ addr_inv) == 0xFF) and ((cmd ^ cmd_inv) == 0xFF)
full_addr = addr if is_standard else (raw & 0xFFFF)
return ("DATA", full_addr, cmd)
print("Listening for NEC IR remote on pin", IR_OUT_PIN)
try:
while True:
res = decode_nec()
if res is not None:
kind, addr, cmd = res
if kind == "REPEAT":
print("NEC REPEAT")
else:
print(f"NEC -> Address: 0x{addr:04X}, Command: 0x{cmd:02X}")
time.sleep_ms(5)
except KeyboardInterrupt:
print("\nTest stopped.")
# Emitter
import time
from machine import Pin, PWM
# --- Configure pin, frequency, and step timing ---
PWM_PIN = "PD12"
FREQ_HZ = 1000
STEP_DELAY_MS = 500
pwm = PWM(Pin(PWM_PIN))
pwm.freq(FREQ_HZ)
def set_duty_percent(percent):
"""Set duty cycle from 0.0 to 100.0 percent using 16-bit resolution."""
clamped = max(0.0, min(100.0, float(percent)))
duty = int((clamped / 100.0) * 65535)
pwm.duty_u16(duty)
return duty
def main():
print(f"PWM test started on pin {PWM_PIN} at {FREQ_HZ} Hz")
levels = [0, 10, 25, 50, 75, 100, 50, 0]
try:
while True:
for pct in levels:
raw_duty = set_duty_percent(pct)
print(f"Duty: {pct:3d}% (duty_u16={raw_duty})")
time.sleep_ms(STEP_DELAY_MS)
except KeyboardInterrupt:
pwm.duty_u16(0)
pwm.deinit()
print("\nPWM stopped and deinitialized.")
if __name__ == "__main__":
main()
Schematic
Download: WIZM-IR Schematics
