edit

# Grove - High Temperature Sensor

Thermocouples are very sensitive devices. It requires a good amplifier with cold-junction compensation. The Grove - High Temperatire Sensor uses a K-Type themocouple and a thermocouple amplifier that measures ambient temperature using thermistor for cold-junction compensation. The detectable range of this Sensor is -50~600°C , and the accuracy is ±(2.0% + 2°C).

## Version¶

Product Version Changes Released Date
Grove - High Temperature Sensor V1.0 Initial Feb 25, 2014

## Specifications¶

Parameter Value/Range
Operating Voltage 3.3-5V
Max power rating at 25℃ 300mW
Operating temperature range -40 ~ +125 ℃
Temperature measurement range -50 ~ +600 ℃
Amplifier output voltage range 0 ~ 3.3 V
Thermocouple material Glass Fiber
Cold junction compensation Environment temperature measurement
Thermocouple temperature measurement accuracy ±2.0% (+ 2 ℃)
Thermocouple temperature sensor cable length 100cm
Dimension 20mm x 40mm

Tip

## Platforms Supported¶

Arduino Raspberry Pi BeagleBone Wio LinkIt ONE

Caution

The platforms mentioned above as supported is/are an indication of the module's software or theoritical compatibility. We only provide software library or code examples for Arduino platform in most cases. It is not possible to provide software library / demo code for all possible MCU platforms. Hence, users have to write their own software library.

## Getting Started¶

### Play with Arduino¶

#### Hardware¶

• Step 1. We need to prepare the below stuffs:
Seeeduino V4.2 Base Shield Grove-High Temperature Sensor
Get ONE Now Get ONE Now Get ONE Now
• Step 2. Connect the Grove-High Temperature Sensor to A0 on Base Shield.
• Step 3. Plug the base Shield into Seeeduino-V4.2.
• Step 4. Connect Seeeduino-V4.2 to PC by using a USB cable.

Note

If we don't have a Base Shield, don't worry, the sensor can be connected to your Arduino directly. Please follow below tables to connect with Arduino.

Seeeduino Grove-High Temperature Sensor
GND Black
5V Red
A1 White
A0 Yellow

#### Software¶

  1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 #include "High_Temp.h" HighTemp ht(A1, A0); void setup() { Serial.begin(115200); Serial.println("grove - hight temperature sensor test demo"); ht.begin(); } void loop() { Serial.println(ht.getThmc()); delay(100); } 
• Step 4. Open your Serial Monitor and set baud rate as 115200, We will see the temperature in Celsius here.

### Play With Raspberry Pi¶

#### Hardware¶

• Step 1. Prepare the below stuffs:
Raspberry pi GrovePi_Plus Grove - Ultrasonic Ranger
Get ONE Now Get ONE Now Get ONE Now
• Step 2. Plug the GrovePi_Plus into Raspberry.
• Step 3. Connect Grove-Ultrasonic ranger to A0 port of GrovePi_Plus.
• Step 4. Connect the Raspberry to PC through USB cable.

#### Software¶

Tip

In this wiki we use the path ~/GrovePi/ instead of /home/pi/Desktop/GrovePi, you need to make sure Step 2 and Step 3 use the same path.

Note

We firmly suggest you to update the firmware, or for some sensors you may get errors.

• Step 3. Git clone the Github repository.

 1 2 cd ~ git clone https://github.com/DexterInd/GrovePi.git 
- Step 4. Excute below commands to use the ultrasonic_ranger to meansure the distance.

 1 2 cd ~/GrovePi/Software/Python/grove_hightemperature_sensor python high_temperature_example.py 

Here is the grove_ultrasonic.py code.

  1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 import grove_hightemperature_sensor as grovepi # our library from time import sleep # and for the sleep function import sys # we need this for the exception throwing stuff # Don't forget to run it with Python 3 !! # Don't forget to run it with Python 3 !! # Don't forget to run it with Python 3 !! def Main(): room_temperature_pin = 15 # this is equal to A1 probe_temperature_pin = 14 # this is equal to A0 # so you have to connect the sensor to A0 port # instatiate a HighTemperatureSensor object sensor = grovepi.HighTemperatureSensor(room_temperature_pin, probe_temperature_pin) # and do this indefinitely while True: # read the room temperature room_temperature = sensor.getRoomTemperature() # and also what's important to us: the temperature at the tip of the K-Type sensor probe_temperature = sensor.getProbeTemperature() # print it in a fashionable way print('[room temperature: {:5.2f}°C][probe temperature: {:5.2f}°C]'.format(room_temperature, probe_temperature)) # and wait for 250 ms before taking another measurement - so we don't overflow the terminal sleep(0.25) if __name__ == "__main__": try: Main() # in case CTRL-C / CTRL-D keys are pressed (or anything else that might interrupt) except KeyboardInterrupt: print('[Keyboard interrupted]') sys.exit(0) # in case there's an IO error aka I2C except IOError: print('[IO Error]') sys.exit(0) # in case we have a math error (like division by 0 - can happen depending on the read values) # or if the values exceed a certain threshold # experiment and you'll see except ValueError as e: print('[{}]'.format(str(e))) sys.exit(0) 
• Step 4. We will see the temperature display on terminal as below.
 1 2 3 4 5 6 7 8 pi@raspberrypi:~/GrovePi/Software/Python/grove_hightemperature_sensor \$ python high_temperature_example.py [room temperature: 20.47°C][probe temperature: 32.19°C] [room temperature: 20.47°C][probe temperature: 32.19°C] [room temperature: 20.47°C][probe temperature: 32.19°C] [room temperature: 20.47°C][probe temperature: 32.19°C] [room temperature: 20.60°C][probe temperature: 32.19°C] [room temperature: 20.60°C][probe temperature: 32.19°C] [room temperature: 20.60°C][probe temperature: 32.19°C] 

## FAQs¶

Q1: How to do Grove-High temperature sensor calibration?

 1 2 3 10:02:17.792 -> "You have Scucessfully record the sample data,please copy the following line of code to your clipboard and replace the first line of function loop() 10:02:17.935 -> double TMP[]={10.29,10.29,10.29,10.29,10.29,10.29,10.29,10.29,10.29,10.29}; 10:02:18.038 -> double Real_temperature[]={10.00,20.00,30.00,40.00,50.00,60.00,70.00,80.00,90.00,100.00};