ZhongSheng NTC Temperature Acquisition (4-channel) Integration Guide
Model catalog
Search for these models in ThinkLink by name or ID.
| Model type | Name | id_name | Platform model ID |
|---|---|---|---|
| RPC | [NTC4 GET] 22113 | ntc4_get_22113 | 126979021039628291 |
| RPC | [NTC4 SET] 22113 | ntc4_set_22113 | 126979021039628290 |
| Template | ZS-NTC4 | 126979021039628292 | |
| Thing Model | [NTC4] | ntc4_22113 | 126979021039628288 |
| Parameter Thing Model | [NTC4-PARA] | ntc4_para_22113 | 126979021039628289 |
EdgeBus code
This is the original EdgeBus code used by the device.
typescript
import { Buffer } from "buffer";
import { buildOtaFile } from "@EBSDK/run";
import { EBModel } from "@EBSDK/EBCompiler/EBModel/EBModel";
import { EventInfoItem } from "@EBSDK/EBCompiler/plugins/EBHelper";
import type { UserConfUPItem } from "@EBSDK/EBCompiler/plugins/EBHelper";
import { CheckbitEnum, getOtaConfig } from "@EBSDK/otaConfig";
// 中盛科技 NTC 温度采集(RS485版,4路)· Modbus-RTU FC04(读输入寄存器)
// 0x0000 第1路温度 (uint16BE, sign-magnitude, 0.1℃)
// 0x0001 第2路温度 (uint16BE, sign-magnitude, 0.1℃)
// 0x0002 第3路温度 (uint16BE, sign-magnitude, 0.1℃)
// 0x0003 第4路温度 (uint16BE, sign-magnitude, 0.1℃)
// 温度符号-幅值编码 + 0xFFFF 故障,均在物模型 payload_parser 解码(EB 仅透传寄存器原始字节)。
// 采集周期 app_74 / 上传周期 app_70 / Modbus 从站地址 app_150(=18)。
const eventInfo: UserConfUPItem[] = [
{
name: "zs-ntc4", port: 22, version: "0x88", dataType: "0x01", upPeriodIndex: 70,
quInfo: [
{
protocol: "modbus", addr: "0x12", code: "0x04", periodIndex: 74,
indexAPP: 150, indexCMD: 0, copySize: 1,
listVal: [
{ start: "0x0000", end: "0x0003" }
]
}
]
}
];
let otaConfig = getOtaConfig({
BaudRate: 9600,
StopBits: 1,
DataBits: 8,
Checkbit: CheckbitEnum.NONE,
Battery: true, // 电池供电,Class A
ConfirmDuty: 60,
BzType: 22113,
BzVersion: 1
});
const MODBUS_TT = (ebModel: EBModel) => {
for (let i = 0; i < eventInfo.length; i++) {
let event = new EventInfoItem(eventInfo[i]);
event.upEventSetup();
event.eventInstall();
}
return JSON.stringify(ebModel, null, 2);
};
buildOtaFile(import.meta.url, otaConfig, MODBUS_TT);1. Sensor Overview
| Item | Value |
|---|---|
| Device | NTC temperature acquisition module (RS485, 4-channel) |
| Series | ZhongSheng NTC Temperature Series V2.0 (1–16 ch selectable; this build 4 ch) |
| Vendor | ZhongSheng Technology (Dongguan) Co., Ltd. |
| Protocol | Modbus-RTU (RS-485) |
| Connectivity | EdgeBus DTU (KC21 battery), LoRaWAN Class A |
| Business code | 22113 |
| Template | ZS-NTC4 |
2. Features
- 1–16 channels selectable (this build: 4), NTC sensor (10K / B3950)
- Range -50℃ to +300℃, resolution 0.1℃, accuracy better than ±0.5℃
- Isolated RS485, standard Modbus RTU; open-sensor / broken-line detection
- STM32 32-bit MCU + 12-bit ADC, industrial protection (over-current / over-voltage / reverse / surge)
3. Applications
Multi-point temperature monitoring for cold chain, server rooms, switch cabinets, HVAC and industrial equipment — wirelessly bringing legacy RS485 temperature modules to the cloud.
4. Gateway Information
4.1 Hardware
| Item | Value |
|---|---|
| DTU model | KC21 (battery) |
| Interface | RS-485 |
| Power | Battery (confirmed), LoRaWAN Class A |
| Template | ZS-NTC4 (based on MT-EB base model) |
| Heartbeat | Set to 24h (86400s) via SET RPC after commissioning for power-save (KB-25) |
| Module supply | DC 6–36V (< 200mW) |
4.2 Wiring
| Terminal | Function | To KC21 (battery) |
|---|---|---|
| + | Supply + (6–36V DC) | KC21 power + (verify voltage) |
| − | Supply − | KC21 GND |
| A | RS485+ | KC21 RS485-A |
| B | RS485− | KC21 RS485-B |
| T1+/T1−…T4+/T4− | 4× NTC probes (non-polar, either lead) | — |
5. Data Acquisition
5.1 Communication Parameters
| Item | Value |
|---|---|
| Slave address | 18 (factory default 1; this unit set to 18) |
| Baud rate | 9600 |
| Data / stop / parity | 8 / 1 / none |
| Function code | 04H (read input registers) |
5.2 Register Map (input registers, read-only)
| Address | Item | Data type | Note |
|---|---|---|---|
| 0x0000 | Channel 1 temperature | 16-bit sign-magnitude (0.1℃) | acquired |
| 0x0001 | Channel 2 temperature | 16-bit sign-magnitude (0.1℃) | acquired |
| 0x0002 | Channel 3 temperature | 16-bit sign-magnitude (0.1℃) | acquired |
| 0x0003 | Channel 4 temperature | 16-bit sign-magnitude (0.1℃) | acquired |
5.3 Temperature Decoding (important)
Each register is 16-bit: bit15 = sign (0 positive / 1 negative), low 15 bits = magnitude, multiplied by 0.1 to get ℃. This is sign-magnitude, NOT two's-complement.
- Examples:
0x01F4→ +50.0℃;0x81F4→ -50.0℃;0x03E8→ +100.0℃ 0xFFFF= channel NTC not connected / open line → shown as empty (fault) on the platform
5.4 Reported Fields
| Field | Name | Unit |
|---|---|---|
| temp_ch1–temp_ch4 | Channel 1–4 temperature | ℃ |
| battery | Battery | V |
| rssi / snr | Signal / SNR | dBm / dB |
6. Parameter Configuration (DTU app parameters)
Sent via [NTC4 SET] RPC, read back via [NTC4 GET]; the parameter thing model (port 214) refreshes values:
| Parameter | Default | Note |
|---|---|---|
| period_up | 3600 s | upload interval |
| period_read | 300 s | DTU polling interval |
| period_heart | 86400 s | battery power-save, 24h |
| pwron_delay | 100 ms | module power-on settle (too short → query timeout) |
| addr_modbus | 18 | this unit's Modbus address |
7. Commissioning Steps
- Derive a device from the
ZS-NTC4template viadeviceAddByTemplateId(EUI 6353012b00047937). - After the device joins, run
[NTC4 GET]to confirm parameters; use[NTC4 SET]to configure periods/address. - Watch telemetry: 4 channels decoded via sign-magnitude; unconnected channels show empty (fault).
- To change device-side address/baud in the field, use eb-debug
mt_debug_modbustransparent FC06 to write holding registers — not part of the standard RPC set.
Note: the series covers 1–16 channels; other channel counts require a separate model (register count and thing-model fields scale with channel count).