Calculator & MeasurementSensors - Tranducers Circuits

ATM18 and Three 1-Wire Thermometers Schematic Circuit Diagram

Master-Slave Temperature Measurement System

In this setup, the Elektor ATM18 [1] assumes the role of the master unit, overseeing communications, while the DS18S20 sensors act as slave units. These DS18S20s respond to the master’s commands by transmitting the temperatures they measure back to it.

Wide Temperature Range Measurement

Our circuit enables the measurement of temperatures ranging from -55 °C to +125 °C (-67 °F to 257 °F) with 9-bit resolution. Additionally, it ensures accuracy within ±0.5 °C from -10 °C to +85 °C (14 °F to 185 °F). However, there’s a possibility to enhance the resolution further, a technique elaborated on later and incorporated into the firmware developed in BASCOM-AVR [2].

ATM18 and Three 1-Wire Thermometers Schematic Circuit Diagram

Powering 1-Wire Sensors

The sensors derive their power from the bus through ‘parasite power’ mode, utilizing instances when the bus is at logic high. Since most of them consume less than 100 µA, monitoring the total number of devices on this bus is essential. Yet, specific Dallas devices can be locally powered by maintaining a constant voltage of 3–5.5 V.

Unique Identifiers and Sensor Types

Each 1-Wire component possesses a distinct 64-bit key for identification, with the eight Least Significant Bits (LSBs) representing the family identifier. For instance, the code 10h corresponds to the DS18S20 sensor family, enabling differentiation between 1-Wire sensor types from various families present on the same bus. The DS18S20 contains an internal memory (scratchpad) housing data necessary for temperature calculation.

Initialization and Data Retrieval

Initially, the program calculates the number of sensors on the bus and stores their unique identifiers, sent from Most Significant Bit (MSB) to Least Significant Bit (LSB), in a memory table, displaying this information on Hyperterminal.

Executing commands CCh + 44h prompts all sensors to perform temperature conversion, updating their scratchpads automatically with new values. Each sensor can then be accessed individually using its unique identifier followed by the command BEh. This approach allows storing the nine scratchpad bytes of each sensor in a table. Temperature values may be negative, requiring the utilization of two’s complement to express the result in the sensor memory. The ninth bit signifies tenths. For temperatures with higher than 9-bit resolution, calculations can be made using the ‘countremain’ and ‘count per C’ data, bytes 6 and 7 of the scratchpad. The ‘count per C’ value, initially set to 16 (10h), is involved in accurate temperature calculations using a specific equation.

T = temp read − 0.25 + (‘count per C’ − ‘count remain’) / ‘count per C’

This is the value that is calculated and sent to the Hyperterminal for each of the three sensors.

Internet Links




Related Articles

Leave a Reply

Your email address will not be published.

Back to top button