mLink NTC Temperature Sensor (HCMODU0186)

mLink serial I2C modules
Post Reply
admin
Site Admin
Posts: 866
Joined: Sun Aug 05, 2012 4:02 pm

mLink NTC Temperature Sensor (HCMODU0186)

Post by admin » Thu Mar 24, 2022 4:47 pm

Image




The mLink NTC temperature sensor is a serial (I2C/IIC) module that interfaces to a wired remote NTC temperature sensor probe (supplied with module). The module continuously takes measurement from the sensor probe and provides the results as a temperature in degrees centigrade via its serial I2C interface. It is compatible with other mLink or standard I2C modules allowing you to daisy-chain several different types of modules together using only the two I2C pins of your microcontroller. Its default I2C address can be changed via software so that multiple NTC modules can be connected to one microcontroller.


For Arduino users you can use the mLink library (see below) to control any type of mLink module. Only one single instance of the library is needed to control multiple types of mLink modules resulting in very little resources overhead and therefore making it great for Arduinos with small amounts of memory and pin counts.

For Raspberry Pi users we have a Python module which can be installed via pip or downloaded and installed directly from our forum. Please see the mLink Python forum thread for requirements and download link here: viewtopic.php?f=131&t=3062&p=8592#p8592


Module specifications:

Module code: 					HCMODU0186
Supply Voltage (VDD): 			3.3V to 5.5V
Operating range (recommended):	-5 to 105oC
Temperature resolution:			±0.7oC @ 0oC / ±0.1oC @ 25oC / ±1.5oC @ 100oC 
Current consumption (idle):		5.6mA
Current consumption (sleep):		0.5mA
Interfaces:					I2C, NTC (10K 3950) sensor
I2C Interface speed: 				400kbits/s (fast mode)
I2C default address (HEX): 		0h54
Maximum number of modules: 		5 with pullups fitted, 112 with pullups removed*
Module dimensions (inc headers):	40mm x 10.6mm x 10mm (sensor not fitted)


*Note the maximum number of connected modules will depend on cable lengths and power requirements of each module. Do not exceed 5 mLink modules connected in series with all pullups fitted.


NTC sensor specifications:

Operating range:				-20 to 105oC *
Type:						NTC 10K 3950
Accuracy:						+-1% (10K) **
Probe insulation:				>100MOhm
Sensor material:				Stainless steel waterproof
Cable length:					2 metres


* See module specifications for recommended operating range
**Sensor accuracy is limited by the module's resolution. See module specification or module resolution table in this document.



Arduino Connection Example:

Image

Image


Because the modules use an I2C interface this also means multiple modules can controlled from a single Arduinos I2C interface simply by daisy-chaining them together. Note to control multiple mLink modules of the same type requires changing the default I2C address of the additional modules. See mLink Library Quick Start Guide for how to do this.


Image




Read temperature example

Arduino Temperature Example:

This sketch uses the mLink library to read the temperature (in oC) from the mLink NTC temperature sensor module (SKU: HCMODU0186).

  1. #include "mLink.h"                          // Include the library
  2.  
  3. mLink mLink;                                // Create an instance of the library
  4.  
  5. #define I2C_ADD 0x54                        // Default I2C address
  6.  
  7. void setup()
  8. {
  9.   Serial.begin(9600);
  10.  
  11.   mLink.init();                             // Initialise the library
  12. }
  13.  
  14.  
  15. void loop()
  16. {
  17.   float temp = mLink.NTC_Temp(I2C_ADD);     // Get the temperature in oC
  18.  
  19.   Serial.print("Temperature: "); Serial.println(temp);
  20.  
  21.   delay(1000);                              // Wait a second before reading again
  22. }

Low power mode example

Arduino Low Power Mode Example:

This sketch uses the mLink library to read the temperature (in oC) from the mLink NTC temperature sensor module (SKU: HCMODU0186). Once the sensor has been read the sketch will then put the module back into a low power sleep mode.
  1. #include "mLink.h"                          // Include the library
  2.  
  3. mLink mLink;                                // Create an instance of the library
  4.  
  5. #define I2C_ADD 0x54                        // Default I2C address
  6.  
  7. void setup()
  8. {
  9.   Serial.begin(9600);
  10.  
  11.   mLink.init();                             // Initialise the library
  12. }
  13.  
  14.  
  15. void loop()
  16. {
  17.   while(mLink.busy(I2C_ADD));               // Wait for the new measurement
  18.   float temp = mLink.NTC_Temp(I2C_ADD);     // Get the temperature in oC
  19.  
  20.   mLink.sleep(I2C_ADD);                     // Put the module to sleep
  21.   Serial.print("Temperature: "); Serial.println(temp);
  22.  
  23.   delay(1000);                              // Wait a second before reading again
  24. }



Raspberry Pi Connection Example:

Image


Read Temperature Example

Raspberry Pi Temperature Example:
This Python script uses the mLink python library module to read the temperature (in oC) from the mLink NTC temperature sensor module (SKU: HCMODU0186).

This program requires the mLink Python library module to be installed. Please see the following forum thread for more information on how to install the Python module and requirements:

viewtopic.php?f=131&t=3062

  1. from mLink import mLink             # Import the mLink module
  2. import time
  3.  
  4. ml = mLink.mLink(1)                 # Create an instance of the module
  5.  
  6. I2C_ADD = 0x54                      # Default I2C address is 0x54
  7.  
  8.  
  9. while 1:
  10.     print(ml.NTC_Temp(I2C_ADD))     # Read and print out the current temperature
  11.     time.sleep(1)
  12.  



Image

mLink Arduino library
viewtopic.php?f=58&t=3001


mLink Raspberry Pi Python module
The mLink python module can be installed with the following terminal command:

  1. pip install hc-mlink

Alternatively the library can be manually installed by downloading it from the forum and unzipping it to your project folder. See the Python module forum thread for more information and download link:
viewtopic.php?f=131&t=3062&p=8592#p8592

Please note that in some cases there may be additional configuration required. If you have issues getting your Raspberry Pi to communicate with the mLink module then please see the Python module forum thread here: viewtopic.php?f=131&t=3062


mLink Library Quick Start Guide For Arduino Users
https://hobbycomponents.com/downloads/m ... _Guide.pdf


mLink Library Reference Guide For The NTC Temperature Sensor Module
https://hobbycomponents.com/downloads/m ... _Guide.pdf


mLink Specifications and Register Map For The NTC Temperature Sensor Modul
https://hobbycomponents.com/downloads/m ... er_Map.pdf


Libraries, example code, and diagrams are provided as an additional free service by Hobby Components and are not sold as part of this product. We do no provide any guarantees or warranties as to their accuracy or fitness for purpose.

Descriptions and diagrams on this page are copyright Hobby Components Ltd and may not be reproduced without permission.

Post Reply

Return to “mLink”