Arduino desde cero en Español - Capítulo 34 - Termistor NTC 🌡️ como Sensor de Temperatura (100K)

Arduino desde cero en Español - Capítulo 34 - Termistor NTC 🌡️ como Sensor de Temperatura (100K)

Introduction to Thermistors

Overview of Thermistors

  • The video introduces the concept of thermistors, specifically focusing on their resistance variation based on temperature exposure.
  • Previous sensors discussed include digital types like HT11 and HT22, as well as the analog LM35, highlighting the commonality of temperature measurement in various applications.

Types of Thermistors

  • Two main types of thermistors are explained: NTC (Negative Temperature Coefficient) and PTC (Positive Temperature Coefficient).
  • NTC thermistors decrease in resistance with increasing temperature, while PTC thermistors increase in resistance with rising temperatures.

Understanding Resistance Behavior

Non-linear Response

  • The response curve for NTC thermistors is non-linear; this is illustrated through a graph comparing NTC (orange curve) and PTC (blue curve).
  • As temperature increases from 25°C, the resistance for NTC decreases, demonstrating an inversely proportional relationship between temperature and resistance.

Implications for Use

  • The non-linear behavior presents challenges when using NTC thermistors in practical applications since simple linear equations cannot be applied to infer temperature from resistance readings.

Practical Application and Testing

Common Specifications

  • Typical resistances for NTC thermistors include values such as 5k, 10k, 25k, 50k at a reference temperature of 25°C.
  • For example, a 10k thermistor has a resistance value of 10,000 ohms at 25°C.

Range and Selection

  • The operational range for these devices spans from -55°C to +260°C; ideal for high-temperature applications.

Testing Thermistor Values

Identification Process

  • When acquiring a thermistor, it’s recommended to choose one with pre-soldered wires that can withstand higher temperatures than standard cables.

Using a Multimeter

  • A multimeter can be used to test unknown thermistor values by measuring their resistance at room temperature.
  • An example shows how touching the sensor raises its temperature and alters its resistance reading on the multimeter.

Conclusion on Thermistor Characteristics

Final Observations

  • By observing changes in resistance when manipulating the sensor's environment (e.g., heat), users can determine both the type (NTC or PTC) and specific characteristics of their thermistor.

How to Measure Temperature Using Arduino and a Thermistor

Circuit Connection Setup

  • The method of measuring resistance directly is not feasible; instead, a voltage divider technique will be used. This involves placing a resistor in series with the thermistor.
  • A voltage is applied at one end of the circuit, and an analog wire connects from the midpoint to the Arduino's analog input. It's recommended to use a resistor value equal to that of the thermistor for accurate readings.
  • For a 100k thermistor, a 100k resistor is connected in series. One end of the thermistor connects to positive voltage while its other end connects through the resistor to ground.
  • The setup allows translating changes in resistance into measurable voltage variations readable by Arduino, making it easy to implement this simple circuit.

Converting Resistance Variation into Temperature

  • To convert resistance variation into temperature, a mathematical model known as the Steinhart-Hart equation is utilized due to non-linear response characteristics of thermistors.
  • The Steinhart-Hart equation provides temperature values based on resistance changes. It consists of three coefficients (A, B, C), which are specific to each thermistor type and material.
  • These coefficients can often be found in manufacturer datasheets or obtained online easily. They determine how resistance varies with temperature.

Implementing Code for Temperature Measurement

  • In programming, it's essential to convert Kelvin measurements from the Steinhart-Hart equation into Celsius for practical use.
  • The complete code for reading temperature via Arduino is available in the video description link. Initial lines declare variables including b0 for analog input and r1 as float type representing circuit resistance.

Coefficient Determination Process

  • Three additional float variables (r2, temperature) are declared; r2 represents thermistor resistance needed for calculations within loops.
  • Constants corresponding to Steinhart-Hart coefficients (C1, C2, C3) are also defined; these values are crucial for accurate temperature calculations based on specific thermistors.

Utilizing Online Resources for Coefficients

  • An online tool provided by Stanford Research Systems helps determine necessary coefficients without needing complex datasheets—just input basic data about your thermistor.
  • Users can visualize characteristic curves related to their specific thermistors using this tool; default settings typically start with common values like 10k at room temperature (25°C).

Adjustments Based on Thermistor Specifications

  • When working with different types of thermistors (e.g., 100k), adjustments must be made by multiplying coefficient values accordingly—this ensures accuracy across varying specifications.

Configuring Resistor Values for Temperature Measurement

Initial Setup of Resistors

  • The resistance value at 25 degrees Celsius (R2) is set to 100k ohms, with a preloaded value of 10,000. This is adjusted by adding a zero to the end.
  • R1 is modified similarly; its value becomes 250k ohms after adding a zero. This adjustment affects the curve displayed on the interface.
  • It's crucial to change focus away from the last modified field to update data correctly; pressing Enter is not necessary and should be avoided.

Updating Data and Coefficients

  • By moving the cursor to another field, data updates automatically. The coefficients A, B, and C are essential for programming temperature calculations.
  • The setup initializes serial communication at 9600 bps. The first five lines in the loop read analog input from Arduino and convert voltage values into resistance.

Code Implementation for Temperature Calculation

  • Logarithmic calculations are applied using standard equations in code. These lines remain consistent across different terms used in projects.
  • After obtaining coefficient values from the webpage, these five lines of code will yield temperature readings that can be printed on the serial monitor.

Monitoring Temperature Readings

  • A half-second delay between readings allows for real-time monitoring of temperature changes displayed on the serial monitor.
  • Variations in decimal readings are normal; adjustments can be made to increase or decrease reading frequency based on project needs.

Practical Application Example

  • Once temperature values are stored, conditional logic can activate devices like relays or fans based on specific thresholds.

Real-world Applications of Temperature Sensors

Use Case in 3D Printing

  • In a practical example involving a 3D printer, one sensor monitors temperatures on a heated bed (hotbed), ensuring proper filament deposition.

Additional Sensor Functions

  • Another sensor regulates temperatures at the hotend where filament melts; maintaining around 200 degrees Celsius is critical for optimal performance.

Overview of Hardware Integration

  • The discussed system utilizes an Arduino Mega board integrated with RAMPS hardware capable of controlling multiple motors—highlighting versatility in applications beyond basic setups.
Video description

Mediante la variación de resistencia del Termistor podremos usarlo para medir temperatura en un amplio rango de valores con gran precisión y gran utilidad en Arduino. Analizaremos los tipos NTC y PTC de termistores y la aplicación de la ecuación de Steinhart-Hart para una fácil conversión del valor de resistencia a temperatura. También una forma simple de obtener los coeficientes de la ecuación sin necesidad de la hoja de datos del termistor. Código fuente del programa visto en: https://github.com/bitwiseAr/Curso-Arduino-desde-cero/ #ArduinoControlDeTemperatura #ArduinoTermistor #ArduinoNTC Formula Termistor Ecuacion Termistor Arduino Thermistor Termistor NTC Arduino Termistores Arduino thermistor temperature sensor Steinhart Hart equation termistor 100k Marcas de tiempo: 0:00 Introducción 0:42 Características de los termistores 3:37 NTC valores (típicos) 7:03 Circuito de conexión 10:09 Primer programa (obteniendo temperatura) 12:00 Página para obtención de coeficientes 17:58 Impresora 3D aplicación práctica