DS18B20 is the latest series of digital temperature sensors from Maxim IC (formerly made is Dallas Semiconductor, then annexed by Maxim Integrated Products). The sensor is capable of reading temperatures with precision of 9 to 12-bit, range -55 ° C to 125 ° C with accuracy (+/- 0.5 ° C). Each sensor produced has a unique 64-Bit code embedded on each chip, enabling the use of a large number of sensors via a single wire data bus (1-wire protocol). It is a remarkable component, and is the cornerstone of many of the data-based logging and temperature control projects out there.
Features of DS18B20 temperature sensor
As reference and supporting information, this sensor has the following main features:
The interface uses only one cable as a communication (using the Unique 1-Wire protocol)
Each sensor has a unique 64-bit identifier code embedded in the onboard ROM
Multidropical capabilities that simplify distributed temperature sensing applications
No additional components required
It can also be fed through the data path. Its power range is 3.0V to 5.5V
Can measure temperatures from -55 ° C to +125 ° C
Has an accuracy of +/- 0.5 ° C in the range -10 ° C to + 85 ° C
The sensor resolution can be selected from 9 to 12 bits
Can convert temperature data to 12-bit digital word in just 750 milliseconds (maximum)
Has an adjustable alarm configuration (nonvolatile)
Can be used for alarm search feature and sensor address that temperature is outside the limit (temperature alarm condition)
Its use may be in a thermostatic control environment, industrial systems, home products, thermometers, or any system requiring temperature readings.
Sensor DS18B20 has two types of casing, which is commonly circulated in the market that is casual casing and waterproof casing (left).
Interfacing Sensor Temperature DS18B20 in Raspberry Pi
In this article I will try to share how to interfacing sensor DS18B20 in Raspberry Pi. The purpose of this paper is to understand how to read DS18B20 sensor in Raspberry Pi connected via 1-wire communication, using Python 3 programming language.
The first step is, we do hardware assembly. The component we need here is the sensor itself, either the waterproof or the usual type and a resistor / resistance with a value of 4.7KΩ.
DS18B20 is a "1-wire" sensor that can be connected in parallel. If more than one is installed, all sensors share the same pin, but the 4.7K resistor should be installed just one.
The function of this resistor is as a 'pullup' of the data path, and is needed to help ensure the data transfer process remains stable and good.
Caution: in spite of the usual three-legged form of the DS18B20, much like the LM35 analogue temperature sensors or other types of sensors such as the TMP36, they do not match the paper at all, so do not try to use another type as it may damage the sensor And Raspberry Pi itself.
Single / Multi DS18B20 Wiring Scheme in Raspberry Pi
Red wire is positive voltage 3.3V, black is negative / ground, and blue is Data.
Coding Temperature Sensor Program DS18B20 with Python 3
On the Raspberry console pi, we first need to install the library w1thermsensor . This library supports digital 1-wire sensor readings not only DS18B20 but also sibling sensors such as DS18S20 * DS1822 * DS18B20 * DS28EA00 * DS1825 / MAX31850K.
First we activate the 1-wire kernel module first. Open the Raspberry Pi configuration file,
$ Sudo nano /boot/config.txt
Find the line that says #Additional overlays and parameters are documented ... and add underneath dtoverlay = w1-gpio, gpiopin = 4 so that it becomes:
# Additional overlays and parameters are documented / boot / overlays / README
dtoverlay = w1-gpio, gpiopin = 4
Press CTRL + X + Y enter to exit nano. Then reboot Raspi:
$ Sudo reboot
After reboot, we can install w1thermsensor :
$ Sudo apt-get -y install python3-w1thermsensor
Wait the download and installation process is complete. After that, we open a console Raspi again to figure out the unique code of the installed sensors. The trick is to go to the directory w1_bus_master1 using the command ls:
$ Ls / sys / devices / w1_bus_master1 /
The results will appear as follows:
28- 000005504c8b w1_master_attempts w1_master_remove
driver w1_master_max_slave_count w1_master_search
subsystem w1_master_name w1_master_slave_count
uevent w1_master_pointer w1_master_slaves
w1_master_add w1_master_pullup w1_master_timeout
It can be seen that I bold and underline is the unique code of the sensor. We take the code after the (-) mark , the number 28 we ignore. So my sensor code is 000005504c8b .
After getting the sensor's unique code, then open Python 3, and try typing the following command to make sure the temperature sensor is installed properly:
$ Sudo python3
>>> from w1thermsensor import W1ThermSensor as ReaderSensor
>>> sensorWater = ReaderSensor (ReaderSensor.THERM_SENSOR_DS18B20, "000005504c8b")
>>> sensorSuhu.get_temperature ()
32688
From the above results, can be seen the temperature is 32,687 degrees celsius. Furthermore, the program can be developed indefinitely.
Sourch : http://kl801.ilearning.me/2017/02/26/pelajari-tentang-sensor-suhu-ds18b20-dan-bagaimana-penyambungan-alat-tersebut-sebagai-input-pada-perangkat-raspberry-pi-sebagai-sensor-suhu-sebuah-ruangan/
Features of DS18B20 temperature sensor
As reference and supporting information, this sensor has the following main features:
The interface uses only one cable as a communication (using the Unique 1-Wire protocol)
Each sensor has a unique 64-bit identifier code embedded in the onboard ROM
Multidropical capabilities that simplify distributed temperature sensing applications
No additional components required
It can also be fed through the data path. Its power range is 3.0V to 5.5V
Can measure temperatures from -55 ° C to +125 ° C
Has an accuracy of +/- 0.5 ° C in the range -10 ° C to + 85 ° C
The sensor resolution can be selected from 9 to 12 bits
Can convert temperature data to 12-bit digital word in just 750 milliseconds (maximum)
Has an adjustable alarm configuration (nonvolatile)
Can be used for alarm search feature and sensor address that temperature is outside the limit (temperature alarm condition)
Its use may be in a thermostatic control environment, industrial systems, home products, thermometers, or any system requiring temperature readings.
Sensor DS18B20 has two types of casing, which is commonly circulated in the market that is casual casing and waterproof casing (left).
Interfacing Sensor Temperature DS18B20 in Raspberry Pi
In this article I will try to share how to interfacing sensor DS18B20 in Raspberry Pi. The purpose of this paper is to understand how to read DS18B20 sensor in Raspberry Pi connected via 1-wire communication, using Python 3 programming language.
The first step is, we do hardware assembly. The component we need here is the sensor itself, either the waterproof or the usual type and a resistor / resistance with a value of 4.7KΩ.
DS18B20 is a "1-wire" sensor that can be connected in parallel. If more than one is installed, all sensors share the same pin, but the 4.7K resistor should be installed just one.
The function of this resistor is as a 'pullup' of the data path, and is needed to help ensure the data transfer process remains stable and good.
Caution: in spite of the usual three-legged form of the DS18B20, much like the LM35 analogue temperature sensors or other types of sensors such as the TMP36, they do not match the paper at all, so do not try to use another type as it may damage the sensor And Raspberry Pi itself.
Single / Multi DS18B20 Wiring Scheme in Raspberry Pi
Red wire is positive voltage 3.3V, black is negative / ground, and blue is Data.
Coding Temperature Sensor Program DS18B20 with Python 3
On the Raspberry console pi, we first need to install the library w1thermsensor . This library supports digital 1-wire sensor readings not only DS18B20 but also sibling sensors such as DS18S20 * DS1822 * DS18B20 * DS28EA00 * DS1825 / MAX31850K.
First we activate the 1-wire kernel module first. Open the Raspberry Pi configuration file,
$ Sudo nano /boot/config.txt
Find the line that says #Additional overlays and parameters are documented ... and add underneath dtoverlay = w1-gpio, gpiopin = 4 so that it becomes:
# Additional overlays and parameters are documented / boot / overlays / README
dtoverlay = w1-gpio, gpiopin = 4
Press CTRL + X + Y enter to exit nano. Then reboot Raspi:
$ Sudo reboot
After reboot, we can install w1thermsensor :
$ Sudo apt-get -y install python3-w1thermsensor
Wait the download and installation process is complete. After that, we open a console Raspi again to figure out the unique code of the installed sensors. The trick is to go to the directory w1_bus_master1 using the command ls:
$ Ls / sys / devices / w1_bus_master1 /
The results will appear as follows:
28- 000005504c8b w1_master_attempts w1_master_remove
driver w1_master_max_slave_count w1_master_search
subsystem w1_master_name w1_master_slave_count
uevent w1_master_pointer w1_master_slaves
w1_master_add w1_master_pullup w1_master_timeout
It can be seen that I bold and underline is the unique code of the sensor. We take the code after the (-) mark , the number 28 we ignore. So my sensor code is 000005504c8b .
After getting the sensor's unique code, then open Python 3, and try typing the following command to make sure the temperature sensor is installed properly:
$ Sudo python3
>>> from w1thermsensor import W1ThermSensor as ReaderSensor
>>> sensorWater = ReaderSensor (ReaderSensor.THERM_SENSOR_DS18B20, "000005504c8b")
>>> sensorSuhu.get_temperature ()
32688
From the above results, can be seen the temperature is 32,687 degrees celsius. Furthermore, the program can be developed indefinitely.
Sourch : http://kl801.ilearning.me/2017/02/26/pelajari-tentang-sensor-suhu-ds18b20-dan-bagaimana-penyambungan-alat-tersebut-sebagai-input-pada-perangkat-raspberry-pi-sebagai-sensor-suhu-sebuah-ruangan/
Itulah tadi Artikel Learn about the DS18B20 Temperature Sensor and how to connect the device as input on Raspberry Pi devices as a room temperature sensor.
Semoga artikel Learn about the DS18B20 Temperature Sensor and how to connect the device as input on Raspberry Pi devices as a room temperature sensor. yang saya bagikan kali ini, mudah-mudahan bisa memberi manfaat buat anda semua. Oke, sampai disini dulu yaaaah....Lain kali jumpa di postingan artikel berikutnya.
Oh ya... , sebelum anda meninggalkan halaman ini mungkin beberapa artikel yang sengaja kami pilihkan pada halaman di bawah ini juga tertarik untuk membacanya. Jika anda tidak sedang terburu buru saya akan merasa sangat bahagia jika anda berkenan mampir dulu pada beberapa artikel yang telah saya pilih kan dibawah ini.