element14 Community
element14 Community
    Register Log In
  • Site
  • Search
  • Log In Register
  • About Us
  • Community Hub
    Community Hub
    • What's New on element14
    • Feedback and Support
    • Benefits of Membership
    • Personal Blogs
    • Members Area
    • Achievement Levels
  • Learn
    Learn
    • Ask an Expert
    • eBooks
    • element14 presents
    • Learning Center
    • Tech Spotlight
    • STEM Academy
    • Webinars, Training and Events
    • Learning Groups
  • Technologies
    Technologies
    • 3D Printing
    • FPGA
    • Industrial Automation
    • Internet of Things
    • Power & Energy
    • Sensors
    • Technology Groups
  • Challenges & Projects
    Challenges & Projects
    • Design Challenges
    • element14 presents Projects
    • Project14
    • Arduino Projects
    • Raspberry Pi Projects
    • Project Groups
  • Products
    Products
    • Arduino
    • Avnet Boards Community
    • Dev Tools
    • Manufacturers
    • Multicomp Pro
    • Product Groups
    • Raspberry Pi
    • RoadTests & Reviews
  • Store
    Store
    • Visit Your Store
    • Choose another store...
      • Europe
      •  Austria (German)
      •  Belgium (Dutch, French)
      •  Bulgaria (Bulgarian)
      •  Czech Republic (Czech)
      •  Denmark (Danish)
      •  Estonia (Estonian)
      •  Finland (Finnish)
      •  France (French)
      •  Germany (German)
      •  Hungary (Hungarian)
      •  Ireland
      •  Israel
      •  Italy (Italian)
      •  Latvia (Latvian)
      •  
      •  Lithuania (Lithuanian)
      •  Netherlands (Dutch)
      •  Norway (Norwegian)
      •  Poland (Polish)
      •  Portugal (Portuguese)
      •  Romania (Romanian)
      •  Russia (Russian)
      •  Slovakia (Slovak)
      •  Slovenia (Slovenian)
      •  Spain (Spanish)
      •  Sweden (Swedish)
      •  Switzerland(German, French)
      •  Turkey (Turkish)
      •  United Kingdom
      • Asia Pacific
      •  Australia
      •  China
      •  Hong Kong
      •  India
      •  Korea (Korean)
      •  Malaysia
      •  New Zealand
      •  Philippines
      •  Singapore
      •  Taiwan
      •  Thailand (Thai)
      • Americas
      •  Brazil (Portuguese)
      •  Canada
      •  Mexico (Spanish)
      •  United States
      Can't find the country/region you're looking for? Visit our export site or find a local distributor.
  • Translate
  • Profile
  • Settings
Experimenting with Thermal Switches
  • Challenges & Projects
  • Design Challenges
  • Experimenting with Thermal Switches
  • More
  • Cancel
Experimenting with Thermal Switches
Challenge Blog Blog 3: The final demo
  • Challenge Blog
  • Forum
  • Documents
  • Files
  • RoadTests
  • Mentions
  • Sub-Groups
  • Tags
  • More
  • Cancel
  • New
  • Share
  • More
  • Cancel
Group Actions
  • Group RSS
  • More
  • Cancel
Engagement
  • Author Author: vishwasn
  • Date Created: 29 Mar 2022 8:05 PM Date Created
  • Views 1114 views
  • Likes 5 likes
  • Comments 3 comments
  • Experimenting with Thermal Switches.
Related
Recommended

Blog 3: The final demo

vishwasn
vishwasn
29 Mar 2022

As I have already described in my last blog, we will be testing and recording the temperature and magnetic field values for all the sensors where the
state changes from make to break or vice-versa.
For cooling purposes, I'm using a compressed liquid nitrogen can. For heating, I'm using a soldering iron, a hot gun and also a lighter.
The use of the Grove module helped me to reduce the wiring mess I already have 2 sensors and 2 actuators.
But while experimenting I found a funny thing in the grove sensor kit which wasted my 2 hours. I was blaming my Arduino uno for not working, later
by cleaning up the code and writing for one sensor at a time I found the issue in the I2C based sensor unit. There was an open connection between A4, A5 of Arduino Uno and
I2C breakouts of the grove shield. I had to solder the jumper to complete the connection. Without this I2C connection, I observed spurious behaviour of the microcontroller such as not
resetting etc. Grove sheild with open I2C pins

This is provided because in case someone wants to connect the shield to Arduino mega etc, there the I2C might be different eg 20 and 21.
After bridging that jumper everything worked without any issue. Here's a code to test this simple experimental setup.
Pre requisites:

TLV493D arduino library

Grove LCD library

#include "TLV493D.h"
#include <Wire.h>
#include "rgb_lcd.h"
#include <math.h>

int a;
float temperature;
int B = 3975;                //B value of the thermistor
float resistance;
rgb_lcd lcd;

const int colorR = 255;
const int colorG = 10;
const int colorB = 200;
TLV493D sensor1;


const int sensor1_pwr_pin = A3;
const int i2c_sda = A4;
const int buttonPin = 7;     // This is where we connect our sensor across the pushbutton
const int buzzPin =  8;
int buttonState = 0;
void setup()
{
  Serial.begin(9600);
  lcd.begin(16, 2);
  pinMode(buttonPin, INPUT);
  pinMode(buzzPin, OUTPUT);
  pinMode(A0, INPUT);
  lcd.setRGB(colorR, colorG, colorB);
  pinMode(sensor1_pwr_pin, OUTPUT);
  pinMode(i2c_sda, OUTPUT);

  delay(500);

  //init sensor1
  digitalWrite(sensor1_pwr_pin, HIGH);
  digitalWrite(i2c_sda, HIGH); //0x5E
  delay(500);
  Wire.begin(); // Begin I2C wire communication
  sensor1.init(HIGH);
}

void loop()
{

  buttonState = digitalRead(buttonPin);

  // check if the pushbutton is pressed. If it is, the buttonState is HIGH:
  if (buttonState == HIGH) {
    lcd.clear();
    lcd.setCursor(0, 0);
    // Serial.print("sensor1: 0x");
    lcd.print("Connected");
    sensor1.update();
    a = analogRead(A0);
    resistance = (float)(1023 - a) * 10000 / a; //get the resistance of the sensor;
    temperature = 1 / (log(resistance / 10000) / B + 1 / 298.15) - 273.15; //convert to temperature via datasheet ;
    // Serial.print("Current temperature is ");
    Serial.println(temperature);
    lcd.setCursor(0, 1);
    lcd.print("T:");
    lcd.print(temperature, 2);
    Serial.println(sensor1.m_dBz);
    lcd.setCursor(7, 1);
    lcd.print("B:");
    lcd.print(sensor1.m_dBz);
    lcd.print("mT");
    digitalWrite(buzzPin, HIGH);
    delay(2000);
  } else {
    // turn buzzer off:
    lcd.setCursor(0, 0);
    lcd.print("Disconnected");
    digitalWrite(buzzPin, LOW);
    sensor1.update();
    a = analogRead(A0);
    resistance = (float)(1023 - a) * 10000 / a; //get the resistance of the sensor;
    temperature = 1 / (log(resistance / 10000) / B + 1 / 298.15) - 273.15; //convert to temperature via datasheet ;
    lcd.setCursor(0, 1);
    lcd.print("T:");
    Serial.println(temperature);
    lcd.print(temperature, 2);
    lcd.setCursor(7, 1);
    lcd.print("B:");
    Serial.println(sensor1.m_dBz);
    lcd.print(sensor1.m_dBz);
    lcd.print("mT");
  }


}

Code is self-explanatory. The void loop consists of an if function to check whether there is a connection in the thermal switch.
If yes then it will update the display, updates the temperature reading and buzzes the buzzer. The magnetic field required to make the connection
complete is measured by moving the magnet on the scale and recording the distance and measuring the magnetic field experienced by the sensor at
the same distance. Thereby we can calculate both magnetic and thermal thresholds or tipping points.
Here's a table of recorded values.

Sl.No MPN Temperature( °C) Magnetic Field (mT) Distance(mm)
1 M-TRS5-30B 29.1 15 7
2 TRS1-120BPR001. 118.5    
3 OHD5R-90B 89.4    
4 OHD1-30B 30.04 7 10
5 OHD1-50B 49.8 16.1 6
6 OHD1-90M 90.1 14.3 8
7 OHD5R-105B 104.7    
8 OHD3-115M 115.6 6.3 11
9 M-TRS5-60B 59.8    
10 OHD1-110M 109.6 5.68 12
11 TRS5-30BLR00 29.41 5.09 14

The higher temperature temperature sensor's magnetic field could not be measured since they were conductive in room temperature. 

Here is  a graph showing the same data. 

image

Here we can see that the increase in the distance between the magnet and the sensor decreases the magnetic field effect on the sensor.
Here's a complete demo video explaining the setup and the experiment

You don't have permission to edit metadata of this video.
Edit media
x
image
Upload Preview
image

image

Thermal runaway causing E vehicle to catch fire  Source: The financial express 

Application of this would be 

1. Thermal Run Away protection to prevent events like this, electric vehicle fire accident that happened recently in India

For a healthy and long life of Li-ion batteries, it has to be kept cool to do that we can use these thermal switches to 

do actions like turning on the fan or Peltier cooling tiles etc. 

2. In the semiconductor industry

3. In the heavy electrical industry to reduce power loss due to resistance increase (due to increased temperature)

4. Prevent CPUs and other devices from overheating using simple NOT gate based FAN control circuits

Thanks for reading. 

  • Sign in to reply
  • vishwasn
    vishwasn over 3 years ago in reply to DAB

    Thanks DAB

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • More
    • Cancel
  • DAB
    DAB over 3 years ago

    Nice test results.

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • More
    • Cancel
  • DAB
    DAB over 3 years ago

    Nice test results.

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • More
    • Cancel
element14 Community

element14 is the first online community specifically for engineers. Connect with your peers and get expert answers to your questions.

  • Members
  • Learn
  • Technologies
  • Challenges & Projects
  • Products
  • Store
  • About Us
  • Feedback & Support
  • FAQs
  • Terms of Use
  • Privacy Policy
  • Legal and Copyright Notices
  • Sitemap
  • Cookies

An Avnet Company © 2025 Premier Farnell Limited. All Rights Reserved.

Premier Farnell Ltd, registered in England and Wales (no 00876412), registered office: Farnell House, Forge Lane, Leeds LS12 2NE.

ICP 备案号 10220084.

Follow element14

  • X
  • Facebook
  • linkedin
  • YouTube