Contents
- I. Module Introduction
- 2. Introduction to Main Chips
- 2.1 Chip Overview
- 2.2 Pin Definition
- 2.3 Functional Block Diagram
- 2.4 Performance Parameters
- 2.5 Reference Circuit
- 2.6 Chip Configuration
- 2.7 Communication Interfaces and Related Protocols
- 2.8 PCB Routing Precautions
- III. Circuit Engineering
- 3.1 Circuit Source Engineering
- 3.2 Module Usage Instructions
- 3.3 Application Experiment
- 4. Drivers
- 5. BOM & Recommended Alternative Parts
- VI. Revision History
- VII. Relevant Materials
- 7.1 Chip Datasheet
- 7.2 PCB Silkscreen Specific Icons

I. Module Introduction
Digital temperature sensor module based on MY18E20, which adopts the MY18E20 digital temperature sensor solution from Minsensor, can directly output ambient temperature data and is compatible with DS18B20; the module is equipped with an LDO voltage regulator circuit, power filter and indicator circuit, powered by 3.3V and communicates with the main controller via the 1-Wire protocol, supports multi-chip networking, achieves ±0.5℃ accuracy measurement in the range of -10℃ to + 85℃, features low power consumption, and is suitable for multi-point temperature measurement, temperature monitoring and low-power device scenarios.
2. Introduction to Main Chips
MY18E20 is a single-bus digital temperature sensor chip launched by Minya Sensing, TO‑92 packaged, powered by 1.8~5.5V, with a temperature measurement range of -55℃~+ 125℃, an accuracy of ±0.5℃ within -10℃~+ 85℃, a default 12-bit ADC (configurable to 14 bits), low power consumption, and a built-in unique 64-bit ID and 80-bit EEPROM.
2.1 Chip Overview

MY18E20 is a single-bus digital temperature sensor chip from Minsensor, featuring a temperature measurement range of -55℃ to + 125℃, an accuracy of ±0.5℃ within -10℃ to + 85℃, a default 12-bit ADC (configurable to 14 bits), low power consumption, multi-point networking support, and compatibility with TO-92 packages. It is widely used in scenarios such as industrial monitoring and smart homes.
2.2 Pin Definition

MY18E20 (TO-92 package) is a 3-pin device: Pin 1 GND is connected to ground, Pin 2 DQ serves as a 1-Wire digital interface (bidirectional I / O), and Pin 3 VDD is connected to the power supply.
2.3 Functional Block Diagram

MY18E20 integrates built-in power management, a 1-Wire interface, digital control logic, a temperature sensor and an analog-to-digital conversion module; it is equipped with an EEPROM containing a unique 64-bit ROM ID, and a scratchpad, communicates via the 1-Wire DQ pin with external pull-up, and supports multi-node networking, user data storage and temperature alarm configuration.
2.4 Performance Parameters


MY18E20 has the following electrical parameters: its power supply voltage ranges from 1.8V to 5.5V, the temperature measurement range is -55°C to + 125°C, the typical accuracy is ±0.5°C, and the limit voltage and temperature range of its pins are also specified; the maximum write cycle of the non-volatile memory is 40ms.

MY18E20 features an E²PROM with a erase/write endurance of no less than 50,000 cycles and a data retention period of at least 10 years; in terms of AC characteristics, its temperature conversion time ranges from 15ms to 500ms (configurable), and the key timing parameters required for 1-Wire communication such as reset, read and write are also specified.
2.5 Reference Circuit


MY18E20 a typical application circuit of the digital temperature sensor. The MCU shares the 1.8V~5.5V power supply and ground with the sensor, and communicates via the single-bus DQ pin;the DQ line is pulled up by a 10kΩ pull-up resistor to implement the standard single-bus protocol, and the MCU sends commands and reads temperature data through this pin.
2.6 Chip Configuration
None.
2.7 Communication Interfaces and Related Protocols

MY18E20 in terms of its 1-Wire hardware configuration, the DQ pin features an internal open-drain structure, which requires an external pull-up resistor of approximately 4.7kΩ to maintain a high level when the bus is idle; the host connects to the bus via an open-drain / tri-state port to enable multi-device shared communication. If the bus is pulled low for more than 480μs, all devices will be reset.

MY18E20 follows the "Initialization → ROM Command → Function Command" sequence for 1-Wire access. The initialization process consists of a master reset pulse and a slave presence pulse;ROM commands (such as Read ROM, Match ROM) implement addressing based on the device's unique 64-bit ID, supporting single-point/multi-point networking and alarm device query.

MY18E20 single-bus instructions include:
ROMCommand:Skip ROM (CCh)can address all devices on the bus simultaneously,while Alarm Search (ECh)only responds to devices that meet the alarm conditions.- Function Commands:
Convert T (44h)starts temperature conversion;Write Scratchpad (4Eh)writes data to the TH/TL and configuration registers;Read Scratchpad (BEh)reads scratchpad data to implement core functions including temperature reading and alarm configuration.

MY18E20 has a 1-Wire function instruction set, which includes instructions such as temperature conversion, scratchpad read/write, E²PROM backup and restore, and power supply mode query. Each instruction defines the specific function, opcode and bus interaction mode, and the host can implement temperature reading, configuration saving and status detection through these instructions.

MY18E20 has a 1-Wire bus timing that consists of three types of signals: initialization, write time slot and read time slot. For initialization, the host needs to pull down the bus for no less than 480μs to perform a reset, then release the bus and wait for 15-60μs; the device will subsequently pull down the bus for 60-240μs to send a presence pulse. A write time slot (writing 0 / writing 1) is initiated by the host pulling down the bus, which lasts for no less than 60μs with an interval of no less than 1μs, and the device samples within 15-60μs after the bus is pulled down;For a read time slot, the host pulls the bus low for ≥1 μs and then releases it; the device outputs data within 15 μs after the bus is pulled low, and the host must sample within this window. All time slots must strictly comply with the timing requirements to ensure reliable communication.




2.8 PCB Routing Precautions
None.
III. Circuit Engineering
3.1 Circuit Source Engineering
ProPrj_Digital Temperature Sensor Module Based on MY18E20_v1.0.0_2026-05-12.epro2 2.9 MB
Digital Temperature Sensor Module Based on MY18E20-V1.0.0.rar 3.3 MB
3.2 Module Usage Instructions
The schematic diagram of this module is shown below:
SCH_Schematic1_Digital Temperature Sensor Module Based on MY18E20_v1.0.0_2026-05-12.pdf 2.3 MB

This module provides a single-bus (1-Wire) communication interface DAT: compatible with the DS18B20 protocol, supports standard single-bus multi-point networking, and can stably transmit the digital temperature data collected by MY18E20, achieving ±0.5°C accuracy measurement in the range of -10°C to + 85°C. It is suitable for scenarios such as multi-point temperature measurement, temperature monitoring and low-power equipment, and provides the system with reliable single-bus temperature sensing data interaction capability.
3.3 Application Experiment
Here, we use the GraftPort-RP2040 development board for testing, and the MY18E20-based digital temperature sensor module uses the DIO interface to communicate with the main controller.
Here, we first use the HY2.0-4P connection cable to connect the module to the GraftPort-RP2040 development board's DIO0 interface:

The module connections are shown in the following table:
Development Board Pins | Module Pins | Description |
Pin 6 |
| 1-Wire communication pin |
Pin 7 |
| - |
Here, we need to search for the relevant driver packages on uPyPI: https://upypi.net/zh/

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

Click to copy the local installation command:

Import the module driver library code via the mip tool. Below are the usage commands for the mpremote tool:
mpremote mip install https://upypi.net/pkgs/my18e20_driver/1.0.0Import the MicroPython driver code for the MY18E20-based digital temperature sensor module, then copy the following main.py code into our project:
# Python env : MicroPython v1.23.0
# -*- coding: utf-8 -*-
# @Time : 2024/7/22 15:01
# @Author : Li Qingshui
# @File : main.py
# @Description : Code for testing the MY18E20 temperature sensor driver class
# @License : MIT
# ======================================== Import Modules =========================================
# Import hardware-related modules
from machine import Pin
# Import time-related modules
import time
# Import modules for single-bus communication
from onewire import OneWire
# Import the temperature sensor class
from my18e20 import MY18E20
# ======================================== Global Variables ============================================
# Print interval (ms)
PRINT_INTERVAL_MS = 500
# ======================================== Functions ============================================
# ======================================== Custom Classes ============================================
# ======================================== Initialization ==========================================
# Wait for the device to power up and stabilize
time.sleep(3)
print("FreakStudio: Using MY18E20 OneWire temperature sensor ...")
# Initialize the 1-Wire pin and sensor object
ow_pin = OneWire(Pin(6))
sensor = MY18E20(ow_pin)
# Scan the bus for devices and get the list of ROM addresses
roms_list = sensor.scan()
# Print the ROM addresses of all devices
for rom in roms_list:
print("Detected sensor ROM ID: %s" % str(rom))
# Start the first temperature conversion
sensor.convert_temp()
# ======================================== Main Program ===========================================
try:
while True:
# Wait for the conversion to finish (up to 750 ms at 12-bit resolution)
time.sleep_ms(PRINT_INTERVAL_MS)
# Read and print the temperature of each sensor
for rom in roms_list:
temp = sensor.read_temp(rom)
print("Sensor %s temperature: %s C" % (str(rom), str(temp)))
# Start the next temperature conversion
sensor.convert_temp()
except KeyboardInterrupt:
print("Program interrupted by user")
except OSError as e:
print("Hardware communication error: %s" % str(e))
except Exception as e:
print("Unknown error: %s" % str(e))
finally:
print("Cleaning up resources...")
del sensor
del ow_pin
print("Program exited")Burn the code, open the terminal, and the output is as follows:

The MY18E20 single-bus temperature sensor has completed normal initialization, the ROM ID has been successfully identified, and it can stably output temperature data with readings fluctuating slightly within the range of 26.625°C to 26.875°C, featuring a stable operating status.
4. Drivers
my18e20_driver-1.0.0.zip 14 KB
5. BOM & Recommended Alternative Parts
BOM_Digital Temperature Sensor Module Based on MY18E20_v1.0.0.xlsx 11 KB
ModAcc_Digital Temperature Sensor Module Based on MY18E20_v1.0.0.xlsx 10 KB
VI. Revision History
Document Version | Date of Modification | Modifier | Revised Content |
v1.0 | 2026-05-12 | Ling Gaoxing | Initialize Document |
VII. Relevant Materials
7.1 Chip Datasheet
MY18E20.pdf 1.8 MB
7.2 PCB Silkscreen Specific Icons
