Difference between revisions of "BPI LM75 Temperature Sensor Module"

From Banana Pi Wiki
Jump to: navigation, search
(How to use)
(Introduction)
 
(12 intermediate revisions by the same user not shown)
Line 1: Line 1:
 
=Introduction=
 
=Introduction=
 +
 +
[[File:LM75 Temperature Sensor Module 2.JPG|thumb|Overview ]]
 +
 
This module is designed specifically for the Banana Pi. The module use the NXP LM75 Temperature chip. The temperature register always stores an 11-bit 2's complement data giving atemperature resolution of 0.125°C. The module use I2C bus to connect to Banana PI.
 
This module is designed specifically for the Banana Pi. The module use the NXP LM75 Temperature chip. The temperature register always stores an 11-bit 2's complement data giving atemperature resolution of 0.125°C. The module use I2C bus to connect to Banana PI.
  
Line 23: Line 26:
 
*5. Temperature accuracy of: ±3°C from−55°C to +125°C
 
*5. Temperature accuracy of: ±3°C from−55°C to +125°C
  
*How to use on BPI-M1:  
+
How to use on BPI-M1:  
  
 
Insert the temperature sensor module to the Banana Pi, Pay attention don’t make the direction reversed! The correct direction of insert module is above the Banana Pi’s PCB, just like the below picture. Then, power up the Banana Pi, open the terminal use the command “ dmesg | grep “lm75” ” to check the module. If the module have been recognized the terminal will show “ lm75 1-0048: hwmon0: sensor 'lm75' ”
 
Insert the temperature sensor module to the Banana Pi, Pay attention don’t make the direction reversed! The correct direction of insert module is above the Banana Pi’s PCB, just like the below picture. Then, power up the Banana Pi, open the terminal use the command “ dmesg | grep “lm75” ” to check the module. If the module have been recognized the terminal will show “ lm75 1-0048: hwmon0: sensor 'lm75' ”
Line 48: Line 51:
  
 
BPI-M3 use LM75 Temperature Sensor Module
 
BPI-M3 use LM75 Temperature Sensor Module
 +
 
OS: BPI-M3 Ubuntu15.10 (Kernel3.4)
 
OS: BPI-M3 Ubuntu15.10 (Kernel3.4)
 +
 
Version: 1.0 HDMI
 
Version: 1.0 HDMI
 +
 
add LM75 Temperature Sensor Module on BPI-M3
 
add LM75 Temperature Sensor Module on BPI-M3
 +
 +
[[File:Lm75_4.jpg]]
 +
 +
Step 1:
 +
 +
Version V1.0 doesn't include LM75 model. The kernel should be recompiled. Open CONFIG_SENSORS_LM75
 +
 +
https://github.com/BPI-SINOVOIP/BPI-M3-bsp/commit/a5f6f3d0547a19b4274ef2bb78aa4e6a7b102571
 +
 +
Version V2.0 is going to support the model by default.
 +
 +
Step 2:
 +
 +
sudo su
 +
sudo apt-get install i2c-tools lm-sensors
 +
 +
Step 3:
 +
 +
Check the LM75 device to see if it's on track.(address 0x48)
 +
 +
(I2c port number for M3: 2 )
 +
 +
i2cdetect -y 2
 +
 +
. 0 1 2 3 4 5 6 7 8 9 a b c d e f
 +
00: -- -- -- -- -- -- -- -- -- -- -- -- --
 +
10: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
 +
20: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
 +
30: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
 +
40: -- -- -- -- -- -- -- -- 48 -- -- -- -- -- -- --
 +
50: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
 +
60: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
 +
70: -- -- -- -- -- -- -- --
 +
 +
Step 4:
 +
 +
Input lm75 address
 +
echo lm75 0x48 > /sys/class/i2c-adapter/i2c-2/new_device
 +
 +
Step 5:
 +
 +
Check Temperature
 +
cat /sys/class/i2c-adapter/i2c-2/0-0048/temp1_input
 +
 +
Step 6:
 +
 +
In order to get the temperature continuously then the watch command can be used with sensors
 +
watch sensors
 +
 +
[[File:Lm75_5.jpg]]
  
 
=Resources=
 
=Resources=
 +
 +
*More information please check:http://www.nxp.com/products/sensors/i2c_temperature_voltage_monitors/series/LM75A.html
 +
*Video demo on youtube:https://www.youtube.com/watch?v=EF6r3IwwfxU
 +
*forum pthread:http://forum.banana-pi.org/t/bpi-m3-bpi-temperature-lm75-and-how-to-use/1075

Latest revision as of 04:28, 14 May 2018

Introduction

Overview

This module is designed specifically for the Banana Pi. The module use the NXP LM75 Temperature chip. The temperature register always stores an 11-bit 2's complement data giving atemperature resolution of 0.125°C. The module use I2C bus to connect to Banana PI.

Key Feature

  • 1. 11bit high resolution ADC in chip
  • 2. temperature resolution of 0.125°C.
  • 3. Connect through I2C bus

Typical Application:

  • 1. Industrial controllers
  • 2. Environmental monitoring
  • 3. Smart home
  • 4. Interactive devices

Hardware

Product Parameters:

  • 1. Working voltage: 2.8V-5.5V
  • 2. Temperatures range from−55°C to +125°C
  • 3. Supply current of 3.5µA in shutdown mode for power conservation
  • 4. Temperature accuracy of: ±2°C from−25°C to +100°C
  • 5. Temperature accuracy of: ±3°C from−55°C to +125°C

How to use on BPI-M1:

Insert the temperature sensor module to the Banana Pi, Pay attention don’t make the direction reversed! The correct direction of insert module is above the Banana Pi’s PCB, just like the below picture. Then, power up the Banana Pi, open the terminal use the command “ dmesg | grep “lm75” ” to check the module. If the module have been recognized the terminal will show “ lm75 1-0048: hwmon0: sensor 'lm75' ”

Lm75 1.png

More information:

The LM75A is a temperature-to-digital converter using an on-chip band gap temperature sensor and Sigma-delta A-to-D conversion technique. The device is also a thermal detector providing an overtemperature detection output. The LM75A contains a number of data registers: Configuration register (Conf) to store the device settings such as device operation mode, OS operation mode, OS polarity and OS fault. Temperature register (Temp) to store the digital temp reading, and set-point registers (Tos and Thyst) to store programmable over temperature shutdown and hysteresis limits, that can be communicated by a controller via the 2-wire serial I2C-bus interface. The device also includes an open-drain output (OS) which becomes active when the temperature exceeds the programmed limits. There are three selectable logic address pins so that eight devices can be connected on the same bus without address conflict. The temperature register always stores an 11-bit 2's complement data giving a temperature resolution of 0.125°C. This high temperature resolution is particularly useful in applications of measuring precisely the thermal drift or runaway. The device is powered-up in normal operation mode with the OS in comparator mode, temperature threshold of 80°C and hysteresis of 75°C, so that it can be used as a stand-alone thermostat with those pre-defined temperature set points. OS response to temperature:

Lm75 2.png

Testbench:

  • 1. Install i2c-tools: sudo apt-get install i2c-tools
  • 2. Read the device address: sudo i2cdetect –y –a 1
  • 3. If the address is 0x48, the module has running

Schematic diagram

Lm75 3.png

How to use

BPI-M3 use LM75 Temperature Sensor Module

OS: BPI-M3 Ubuntu15.10 (Kernel3.4)

Version: 1.0 HDMI

add LM75 Temperature Sensor Module on BPI-M3

Lm75 4.jpg

Step 1:

Version V1.0 doesn't include LM75 model. The kernel should be recompiled. Open CONFIG_SENSORS_LM75

https://github.com/BPI-SINOVOIP/BPI-M3-bsp/commit/a5f6f3d0547a19b4274ef2bb78aa4e6a7b102571

Version V2.0 is going to support the model by default.

Step 2:

sudo su
sudo apt-get install i2c-tools lm-sensors

Step 3:

Check the LM75 device to see if it's on track.(address 0x48)

(I2c port number for M3: 2 )

i2cdetect -y 2
. 0 1 2 3 4 5 6 7 8 9 a b c d e f
00: -- -- -- -- -- -- -- -- -- -- -- -- -- 
10: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
20: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
30: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
40: -- -- -- -- -- -- -- -- 48 -- -- -- -- -- -- -- 
50: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
60: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
70: -- -- -- -- -- -- -- --

Step 4:

Input lm75 address

echo lm75 0x48 > /sys/class/i2c-adapter/i2c-2/new_device

Step 5:

Check Temperature

cat /sys/class/i2c-adapter/i2c-2/0-0048/temp1_input

Step 6:

In order to get the temperature continuously then the watch command can be used with sensors

watch sensors

Lm75 5.jpg

Resources