Labs / Electronic modules

GraftSense - An Infrared Transmitter Module Based on IR333C (Open Version)

Author: Li Zisheng · Source: FreakStudio open documentation, v1.4 · License: CC BY 4.0 · Driver code (communication/irtranslation_driver): MIT License

Contents
GraftSense - An Infrared Transmitter Module Based on IR333C (Open Version)
GraftSense - An Infrared Transmitter Module Based on IR333C (Open Version)

I. Module Introduction

IR Transmitter Module Based on IR333C takes IR333C infrared emitting diode as the core, integrates a driving circuit and a filtering unit, can emit infrared light with a wavelength of 850–950nm (typically 940nm), supports 38kHz carrier modulation, operates at a voltage of 3–5V, and has a transmission distance of approximately 1.3 meters (at 5V).The module is equipped with GND, VCC, DOUT and other pins. It connects to the main control device (such as Arduino, microcontroller) via digital signals (high-level triggered transmission), and is applicable to scenarios including infrared remote control (TV / air conditioner), non-contact sensing, short-range infrared data transmission, featuring low power consumption, fast response and high reliability.

II. Introduction to Main Chips

The core component is IR333C infrared emitting diode.

2.1 Chip Overview

GraftSense - An Infrared Transmitter Module Based on IR333C (Open Version)

2.2 Pin Definition

GraftSense - An Infrared Transmitter Module Based on IR333C (Open Version)
GraftSense - An Infrared Transmitter Module Based on IR333C (Open Version)

IR333C The pins of the infrared emitting diode are similar to those of a common diode: Pin 1 is the anode and Pin 2 is the cathode.

2.3 Functional Block Diagram

None.

2.4 Performance Parameters

2.4.1 Electrical Parameters

GraftSense - An Infrared Transmitter Module Based on IR333C (Open Version)

2.4.2 Optoelectronic Properties

GraftSense - An Infrared Transmitter Module Based on IR333C (Open Version)

The following is an interpretation of the key optoelectronic characteristic parameters of IR333C infrared emitting diode:

GraftSense - An Infrared Transmitter Module Based on IR333C (Open Version)

2.5 Reference Circuit

None.

2.6 Chip Configuration

None.

None.

2.8 PCB Routing Notes

None.

III. Circuit Engineering

3.1 Circuit Source Engineering

To obtain the circuit source project, please follow the official account [Freak Embedded]

3.2 Module Usage Instructions

The schematic diagram of this module is shown below:

SCH_Schematic1_Infrared Emitter Module Based on IR333C_v1.1_2025-09-18.pdf 1.3 MB

GraftSense - An Infrared Transmitter Module Based on IR333C (Open Version)

This module provides a digital input interface:

The core circuit of the module is the infrared transmitting circuit: with IR333C infrared emitting diode (U1) as the core, it is driven by S8050 triode (Q1). VCC supplies power to R2 (62Ω) to U1; the base of the triode Q1 receives the R4 (4.7kΩ) via DATA control signal, and R3 (10kΩ) is the base pull-down resistor (to ensure reliable cut-off of Q1 when there is no input). When DATA is at high level, Q1 turns on, and IR333C is powered on to emit infrared light;When DATA is at a low level, Q1 is cut off, the infrared emitting diode stops emitting light, thus realizing the conversion from "digital signal to infrared light".

3.3 Application Experiment

Here, we use the GraftPort-RP2040 development board for testing, and connect the IR333C-based infrared transmitting module and the TSOP34138-based infrared receiving module to communicate with the main controller via the DIO interface.

Here, we first use the HY2.0-4P connection cable to connect the module to the GraftPort-RP2040 development board's DIO0 and DIO1 interfaces:

GraftSense - An Infrared Transmitter Module Based on IR333C (Open Version)

The module connections are shown in the following table:

IR333C-based infrared transmitting module:

Development Board Pins

Module Pins

Description

Pin 6

DOUT

Infrared signal transmission output pin

Pin 7

NC

-

Infrared receiving module based on TSOP34138:

Development Board Pins

Module Pins

Description

Pin 14

DIN

- Infrared signal receiving input pin

Pin 15

NC

-

Here, we need to search for the relevant driver packages on uPyPI: https://upypi.net/zh/

GraftSense - An Infrared Transmitter Module Based on IR333C (Open Version)

Enter irtranslation_driver to search, and the following will be displayed:

GraftSense - An Infrared Transmitter Module Based on IR333C (Open Version)

Click to copy the local installation command:

GraftSense - An Infrared Transmitter Module Based on IR333C (Open Version)

Here, we can use the mip tool to import module driver library code. Below are the usage commands for the mpremote tool:

mpremote mip install github:FreakStudioCN/GraftSense-Drivers-MicroPython/communication/irtranslation_driver

Here, before conducting communication, we need to align the infrared transceiver units between the modules as precisely as possible:

GraftSense - An Infrared Transmitter Module Based on IR333C (Open Version)

Import the IR transceiver driver - MicroPython driver code, then copy the following main.py code into our project:

# Python env   : MicroPython v1.23.0
# -*- coding: utf-8 -*-
# @Time    : 2025/8/26 10:11 PM
# @Author  : 缪贵成
# @File    : main.py
# @Description : Test file for the nec_16 protocol on the Raspberry Pi Pico

# ======================================== Import Modules =========================================

import time
from machine import Pin
from ir_tx.nec import NEC
# nec_16 has three parameters in the callback function
from ir_rx.nec import NEC_16

# ======================================== Global Variables ============================================

# ======================================== Functions ============================================

# If using nec_8, pass variable-length arguments; this is nec_16

def ir_callback(addr: int, cmd: int, repeat: bool) -> None:
    """
    NEC protocol receive callback function (3-parameter version).

    Args:
        addr (int): Received address
        cmd (int): Received command code
        repeat (bool): Whether this is a repeat code (True = yes, False = no)

    Notes:
        The callback is called by the NEC receive module and is not ISR-safe.
        Output the received data to the serial port.

    ==========================================

    NEC IR signal receive callback (3-parameter version).

    Args:
        addr (int): Received address
        cmd (int): Received command
        repeat (bool): Repeat flag (True = yes, False = no)
    Notes:
        Called by NEC IR receiver. Not ISR-safe.
        Prints received data to REPL.
    """
    print(f"[RX] Address=0x{addr:04X}, Cmd=0x{cmd:02X}, Repeat={repeat}")

# ======================================== Custom Classes =============================================

# ======================================== Initialization configuration ===========================================

# Power-on delay of 3 s
time.sleep(3)
print("FreakStudio:Infrared transceiver test")

# Transmitter connected to GP6
TX_PIN = Pin(6, Pin.OUT)
# Receiver connected to GP14
RX_PIN = Pin(14, Pin.IN)
# 38kHz transmit
ir_tx = NEC(TX_PIN, freq=38000)
# Receive NEC
ir_rx = NEC_16(RX_PIN, ir_callback)
print("[System] Ready... TX=GP6, RX=GP14")

# ========================================  Main Program  ===========================================
while True:
    print("[TX] Sending NEC signal...")
    # Address=0x10, command=0x20
    ir_tx.transmit(0x10, 0x20)
    time.sleep(2)

Burn the code, open the terminal, and use the mpremote tool to connect to the main controller; the output is as follows:

GraftSense - An Infrared Transmitter Module Based on IR333C (Open Version)

It can be seen that when the infrared receiving module based on TSOP34138 receives the data sent by the infrared transmitting module based on IR333C, it will trigger the callback function to print[RX]content.

IV. Drivers

irtranslation_driver.zip 27 KB

Only the NEC protocol will be tested as follows:

irtranslation.rar 29 KB

For more remaining protocols, you can refer to the following for reference:

micropython_ir-master.rar 897 KB

You can also go through this document to understand the driver code of the infrared transceiver module:

Lesson 3: How to Use AI Tools to Quickly Read Unfamiliar Code

None.

VI. Revision History

Document Version

Date of Revision

Modifier

Modify Content

v1.0

2025.8.20

Miu Guicheng

Initialize the document

v1.1

2025-09-18

Li Zisheng

Added Section 2.8 PCB Routing Notes

Revised Section 3, Instructions for Circuit Source Engineering and Module Usage, and added a secondary heading:

3.1 Circuit Source Engineering, 3.2 Module Usage Instructions, 3.3 Application Experiments

The BOM sheet has not been finally checked, the driver has not been re-verified, and the 3.3 application experiment

Not yet specified.

v1.2

2025-12-29

Li Zisheng

Added application experiments and production files

v1.3

2025-12-31

Xin Ruili

Create an open version of the document based on the internal document version v1.2.

v1.4

2026-03-29

Xin Ruili

Modified the application experiment section.

VII. Relevant Materials

7.1 Chip Datasheet

XYC-IR333C-L4 Emitter Datasheet.pdf 763 KB

7.2 Unique Icons for PCB Silk Screen

GraftSense - An Infrared Transmitter Module Based on IR333C (Open Version)