0% found this document useful (0 votes)
17 views11 pages

P6 Transducers

The document describes a project to build an Arduino-based calorimeter interfaced with LabVIEW. It includes a circuit diagram and Arduino code to measure temperature using a thermistor and display the values in Celsius on the serial monitor. The code uses constants and mathematical formulas to calculate temperature based on the thermistor's resistance-temperature relationship. Integrating microcontrollers into calorimetry enhances precision, automation, and data analysis capabilities for heat measurement applications.

Uploaded by

n35708lopez
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
17 views11 pages

P6 Transducers

The document describes a project to build an Arduino-based calorimeter interfaced with LabVIEW. It includes a circuit diagram and Arduino code to measure temperature using a thermistor and display the values in Celsius on the serial monitor. The code uses constants and mathematical formulas to calculate temperature based on the thermistor's resistance-temperature relationship. Integrating microcontrollers into calorimetry enhances precision, automation, and data analysis capabilities for heat measurement applications.

Uploaded by

n35708lopez
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 11

UNIVERSIDAD AUTÓNOMA DE NUEVO LEÓN

FACULTAD DE INGENIERÍA MECÁNICA Y ELÉCTRICA

Transducers Laboratory

Arduino-based Calorimeter interfacing with LabVIEW

M.C. DANIELA TURRUBIATES GUTIERREZ

Nombre:

Itzel Sarahy Díaz López Matricula: 2077673

Andrea Rebeca García Cantú Matricula: 1971529

Néstor Javier López García Matricula:1908570

Liam Jesus Rodríguez García Matricula: 1954090

Guillermo Antonio Zavala Flores Matricula: 2077354

Gonzalo Antonio Rodríguez García Matricula: 1949767

Semestre en curso Agosto-Diciembre 2023


Días de la clase y Hora: Jueves V3-V4
Brigada: 405
Objectives

Build a simple interface for a working calorimeter using Arduino and LabVIEW.Instead of
using a speaker, the values will now be shown on the screen.

Introduction

A calorimeter is a device used to measure the amount of heat involved in a chemical or


physical process. It is a device for measuring the heat developed during a mechanical,
electrical, or chemical reaction and for calculating the heat capacity of materials.
Calorimetry measurements are important in understanding the heat transferred in reactions
involving everything from microscopic proteins to massive machines.

LabVIEW is a powerful simulation tool for developing a data acquisition system. It supports
serial communication with other devices. In this report, we have used the LabVIEW 2013
version with the support of NI-Visa version 5.1. for serial communication with the Arduino
board.

The name LabVIEW is a shortened form of its description: Laboratory Virtual Instrument
Engineering Workbench. LabVIEW is a visual programming language: it is a system-design
platform and development environment that was aimed at enabling all forms of system to
be developed. LabVIEW was developed by National Instruments as a workbench for
controlling test instrumentation. However its applications have spread well beyond just test
instrumentation to the whole field of system design and operation.

In this project, we will be building an Arduino-based calorimeter that can measure the
amount of heat produced. We will be using LabVIEW, a graphical programming language
that is widely used in scientific and engineering applications, to interface with the Arduino
and collect data.

The LabVIEW software will be used to control the Arduino-based calorimeter and collect
data from the temperature sensor. We will be able to monitor the temperature changes
during the reaction and calculate the heat produced or absorbed using the data collected.

Physical Circuit
Circuit diagram

Program sketch

#include<math.h>
const int Rc= 1000;
const int Vcc=5;
const int SensorPIN=A0 float A= 1.11492089e-3; float B= 2.372075385e-4; float C=
6.954079529e-8; float K=2.5;
void setup()
{
Serial.begin (9600);
}
void loop()
{
float raw= analogRead(SensorPIN)
float V=raw/1024*Vcc;
float R=(Rc*V)/(Vcc-V);
float logR=log(R);
float R_th=1.0/(A+B*logR+C*logR*logR*logR); float kelvin= R_th-V*V/(K*R)*1000;
float celsius= kelvin-273.15;
Serial.print(“T=”);
Serial.print(celsius);
Serial.print(“C\n”);
delay(1000);
}
Code explanation
Certainly! Let's break down the code step by step to understand what it does.

#include <math.h>
This line includes the math.h library, which provides mathematical functions like logarithm,
exponentiation, and trigonometric functions. It allows you to use these functions in your
code.

const int Rc = 1000;


const int Vcc = 5;
These lines declare two constant integer variables, `Rc` and `Vcc`, and assign them the
values 1000 and 5, respectively. These variables are used later in the code for calculations.

const int SensorPIN = A0;

This line declares a constant integer variable `SensorPIN` and assigns it the value `A0`. In
Arduino, `A0` represents the analog pin 0. It is likely used to connect a temperature sensor
to the Arduino board.

float A = 1.11492089e-3;
float B = 2.372075385e-4;
float C = 6.954079529e-8;
float K = 2.5;

These lines declare four float variables, `A`, `B`, `C`, and `K`, and assign them specific
floating-point values. These variables are likely constants used in the calculations later in the
code.

void setup()
{
Serial.begin(9600);
}

This is the setup function, which is called once when the Arduino board is powered on or
reset. Inside the setup function, `Serial.begin(9600)` initializes the serial communication at a
baud rate of 9600 bits per second. This allows you to communicate with the Arduino board
via a serial connection.

void loop()
{
float raw = analogRead(SensorPIN);
float V = raw / 1024 * Vcc;
float R = (Rc * V) / (Vcc - V);
float logR = log(R);
float R_th = 1.0 / (A + B * logR + C * logR * logR * logR);
float kelvin = R_th - V * V / (K * R) * 1000;
float celsius = kelvin - 273.15;
Serial.print("T=");
Serial.print(celsius);
Serial.print("C\n");
delay(1000);
}

This is the main `loop` function, which runs repeatedly after the `setup` function. It contains
the actual code that performs temperature conversion calculations and outputs the result to
the serial monitor.

Here's an overview of what happens inside the `loop` function:

1. `float raw = analogRead(SensorPIN);` reads the analog value from the pin specified by
`SensorPIN` (A0 in this case) and assigns it to the variable `raw`. This value represents the
analog voltage from a connected temperature sensor.
2. `float V = raw / 1024 * Vcc;` calculates the voltage `V` based on the raw analog value. It
divides the raw value by 1024 (the resolution of the ADC on Arduino) to obtain a value
between 0 and 1, and then multiplies it by `Vcc` (5V in this case) to get the actual voltage
value.
3. `float R = (Rc * V) / (Vcc - V);` calculates the resistance `R` using the voltage `V` and the
constant `Rc`. It uses the voltage divider formula to calculate the resistance.
4. `float logR = log(R);` calculates the natural logarithm of the resistance `R` and assigns it to
the variable `logR`.
5. `float R_th = 1.0 / (A + B * logR + C * logR * logR * logR);` calculates the resistance of the
thermistor `R_th` using the Steinhart-Hart equation. It uses the constants `A`, `B`, and `C`
defined earlier.
6. `float kelvin = R_th - V * V / (K * R) * 1000;` calculates the temperature in Kelvin using the
Steinhart-Hart equation and the voltage `V`. It uses the constant `K` defined earlier.
7. `float celsius = kelvin - 273.15;` converts the temperature from Kelvin to Celsius by
subtracting 273.15.
8. `Serial.print("T=");` prints the string "T=" to the serial monitor.
9. `Serial.print(celsius);` prints the temperature value in Celsius to the serial monitor.
10. `Serial.print("C\n");` prints the string "C\n" (indicating the end of the temperature value) to
the serial monitor.
11. `delay(1000);` adds a delay of 1000 milliseconds (1 second) before the next iteration of
the loop.

Conclusions

Guillermo Antonio Zavala Flores


Certainly. Employing microcontrollers to power a calorimeter represents a significant leap in
precision and efficiency within the realm of heat measurement. By integrating these small yet
powerful devices, researchers gain unprecedented control over experimental conditions,
allowing for meticulous adjustments and accurate data acquisition. The real-time monitoring
capabilities of microcontrollers not only streamline the calibration process but also facilitate
automation, reducing human error and enhancing experimental reproducibility.

Furthermore, the integration of microcontrollers provides a platform for sophisticated data


analysis, enabling researchers to extract valuable insights from complex heat transfer
patterns. The modularity and versatility of microcontroller-based systems make them
adaptable to various calorimetry setups, accommodating diverse research needs. In
essence, the marriage of microcontrollers and calorimetry not only refines the precision of
heat measurements but also opens avenues for innovation and exploration in understanding
thermal phenomena. This symbiotic relationship between technology and scientific inquiry
holds great promise for advancing research in fields ranging from chemistry to material
science, ushering in a new era of nuanced and reliable calorimetric investigations.

Gonzalo Antonio Rodríguez García


The script we typed in this lab practice skillfully demonstrates the use of sensor techniques
and mathematical calculations to convert the analog reading of a temperature sensor into an
accurate temperature in degrees Celsius. The inclusion of carefully tuned constants and
variables shows a deep understanding of the relationship between resistance and
temperature in a thermistor. This code may be valuable for those looking to implement a
reliable and accurate temperature measurement system in their electronics projects,
providing a solid foundation for adaptation to various applications.

Liam Jesus Rodríguez García


Thanks to this activity we developed a code which is a clear example of how to use a
temperature sensor along with a thermistor to measure ambient temperature. It implements
a mathematical formula based on the relationship between the thermistor resistance and
temperature to calculate the temperature in degrees Celsius. Furthermore, the temperature
value is displayed on the Arduino serial monitor. This code could be useful in projects that
require precise monitoring of ambient temperature, such as climate control systems or
weather stations.

Néstor Javier López García


In conclusion, the objectives of successfully building a simple interface for a functional
calorimeter using Arduino and LabVIEW were achieved. The implementation included the
creation of a circuit diagram, adaptation of Arduino code to display values on the screen, a
detailed explanation of the code, and screenshots validating the functionality of both the
physical circuit and the LabVIEW simulation model. This project provided valuable learning
by integrating Arduino hardware with LabVIEW software, deepening the understanding of
the interplay between these platforms. The ability to visualize real-time results in LabVIEW
also expanded our monitoring and analysis capabilities. Overall, this experience not only
enhanced technical skills but also underscored the importance of effectively integrating
different tools to achieve more comprehensive and functional solutions.

Andrea Rebeca García Cantú


In conclusion, the Arduino-based calorimeter interfacing with LabVIEW successfully
demonstrated the use of a thermistor as a transducer to measure temperature, which was
then displayed visually on a computer screen through LabVIEW. The combination of the
Arduino and LabVIEW allowed for real-time data acquisition and analysis, making the
system highly efficient and accurate. The project highlighted the importance of transducers
in engineering applications, as well as the significance of data acquisition and processing in
modern scientific research. Overall, the project was a success, and it provided valuable
insights into the implementation of transducers in real-world applications.

Itzel Sarahy Díaz López


By combining the capabilities of Arduino and LabVIEW, it is possible to design a custom
calorimeter system that can accurately measure the heat generated by a chemical reaction
or physical process. The specific design of the system will depend on the requirements of
the experiment and the available equipment, but some key considerations may include
selecting an appropriate temperature sensor, ensuring proper insulation of the calorimeter,
and implementing appropriate data processing algorithms in LabVIEW. Overall, an
Arduino-based calorimeter interfaced with LabVIEW can be an effective solution for
measuring heat flow and calculating calorimetric values, and can be particularly useful in
educational or research settings where cost and flexibility are important considerations.

References

Britannica, T. Editors of Encyclopaedia (2022). calorimeter. Encyclopedia Britannica.


https://www.britannica.com/technology/calorimeter

Flowers, P., Theopold, K., Langley, R., & Robinson, W. R. (2019). 5.2 Calorimetry.
OpenStax. Recuperado 2 de mayo de 2023, de
https://openstax.org/books/chemistry-2e/pages/1-introduction

J. Zhang, X. Liu, Y. Cheng, L. Shi, & M. Zhang. (2016). A simple and low-cost
Arduino-based educational calorimeter. Journal of Chemical Education, 93(5),
916-920. doi: 10.1021/acs.jchemed.5b0075.

You might also like