====== NT18B07: 7 Kanal RS485 Temperatur Sensor with Modbus RTU ====== {{ :sensor:nt18b07_1.png?160|}} The NT18B07 is a 7-channel NTC temperature sensor interface board/module that uses the MODBUS RTU communication protocol over an RS485 interface for industrial and automation applications. Requires external **B3950 10K 1% NTC** thermistors **NT18B07 Description** * Operating current ranges from 8 to 13 mA, depending on external connections. * The device supports MODBUS RTU commands using function codes 03 and 06. * By adjusting the R485 address, up to 247 modules can be cascaded; if exceeding 16, an R485 repeater is recommended. * A maximum of 8 temperature sensors can be connected at once. * Temperature measurement spans from -55°C to +125°C (-67°F to +257°F), with an accuracy of ±0.5°C between -10°C and 85°C. * Resistance value: 10K * Resistance accuracy: ±1% * Resistance B value: 3950 ±1% * Wire specification: 2651 26# parallel resistance, temperature resistance 105°C * Connector model: XH2.54-2P * Probe: without mounting holes * Supply voltage: 6-24V ===== B3590 10K 1% NTC thermal sensor ===== {{ :sensor:nt18b07_3.png?120|B3590 10K 1% NTC thermal sensor}} * Product type: NTC 10K / B3590 1% * Temperature range: -50°C to 125°C (-58°F to 257°F) ==== NT18B07 Modbus settings ==== Default settings: SlaveID: 1, 9600 baud, parity: N,8,1 ^holding register addresses^Number of registers^Description^Unit^Note| |0x0|1|CH1 temperature sensor|0.1 °C|0xF555 (-2731): Sensor Error| |0x1|1|CH2 temperature sensor|0.1 °C|0xF555 (-2731): Sensor Error| |0x2|1|CH3 temperature sensor|0.1 °C|0xF555 (-2731): Sensor Error| |0x3|1|CH4 temperature sensor|0.1 °C|0xF555 (-2731): Sensor Error| |0x4|1|CH5 temperature sensor|0.1 °C|0xF555 (-2731): Sensor Error| |0x5|1|CH6 temperature sensor|0.1 °C|0xF555 (-2731): Sensor Error| |0x6|1|CH7 temperature sensor|0.1 °C|0xF555 (-2731): Sensor Error| |0x8|1|CH1 temperature correction value|0.1 °C|>0: increase, <0: decrease, default:0| |0x9|1|CH2 temperature correction value|0.1 °C|>0: increase, <0: decrease, default:0| |0xA|1|CH3 temperature correction value|0.1 °C|>0: increase, <0: decrease, default:0| |0xB|1|CH4 temperature correction value|0.1 °C|>0: increase, <0: decrease, default:0| |0xC|1|CH5 temperature correction value|0.1 °C|>0: increase, <0: decrease, default:0| |0xD|1|CH6 temperature correction value|0.1 °C|>0: increase, <0: decrease, default:0| |0xE|1|CH7 temperature correction value|0.1 °C|>0: increase, <0: decrease, default:0| |0x00FD|1|Automatic temperature report|Second|0: (default) query function, 1-255 report time (1 - 10 seconds)| |0x00FE|1|RS485 address (station address)|-|Read address: 0x00FF, write address 1-247, default: 1| |0x00FF|1|Baud rate|-|0:1200, 1:2400, 2:4800, 3:9600 (default), 4:19.200, 5: factory reset| {{page>:tarhal}} ==== Arduino ==== The NT18B07 is a 7-channel NTC thermistor temperature acquisition module that communicates via RS485 Modbus RTU. Unlike the MAX31865 (which is SPI-based), the NT18B07 requires an RS-485-to-TTL converter (e.g., a [[max485|MAX485 module]]) to interface with an Arduino. **Wiring Diagram** To connect the NT18B07 to an Arduino Uno using a standard MAX485 module: * **NT18B07 A+ to MAX485 A** and **NT18B07 B- to MAX485 B**. * **MAX485 VCC/GND:** 5V and GND. * **MAX485 RO:** Arduino Pin 2 (RX). * **MAX485 DI:** Arduino Pin 3 (TX). * **MAX485 DE & RE:** Tied together to Arduino Pin 4 (Direction Control). * **NT18B07 Power:** DC 6V–24V. **Arduino Example Code** This code uses the **ModbusMaster library** to read temperatures from the first 7 channels. #include #include #define MAX485_RE_DE 4 SoftwareSerial rs485(2, 3); // RX, TX ModbusMaster node; void preTransmission() { digitalWrite(MAX485_RE_DE, 1); } void postTransmission() { digitalWrite(MAX485_RE_DE, 0); } void setup() { pinMode(MAX485_RE_DE, OUTPUT); digitalWrite(MAX485_RE_DE, 0); Serial.begin(9600); rs485.begin(9600); // Default NT18B07 baud rate node.begin(1, rs485); // Default Slave ID is 1 node.preTransmission(preTransmission); node.postTransmission(postTransmission); } void loop() { // Read 7 registers starting at 0x0000 (Channels 1-7) uint8_t result = node.readHoldingRegisters(0x0000, 7); if (result == node.ku8MBSuccess) { for (int i = 0; i < 7; i++) { int16_t rawTemp = node.getResponseBuffer(i); // Temperature is stored as raw value x 10. Handle negative values. float celsius = (rawTemp > 32767) ? (rawTemp - 65536) / 10.0 : rawTemp / 10.0; Serial.print("CH"); Serial.print(i+1); Serial.print(": "); Serial.print(celsius); Serial.println(" C"); } } else { Serial.print("Modbus Error: 0x"); Serial.println(result, HEX); } delay(2000); } ===== Modbus topics on lamaPLC ===== {{topic>Modbus}} \\ \\ {{tag>NT18B07 sensor Modbus RTU RS-485 communication Platine }} \\ This page has been accessed for: Today: {{counter|today}}, Until now: {{counter|total}}