background preloader

Capteur température

Facebook Twitter

Using a Thermistor. Connecting to a Thermistor These thermistors are pretty hardy, you can strip the PVC insulation and stick the wires into a breadboard or solder to them directly.

Using a Thermistor

Of course you can cut or extend the wires. Since the resistance is pretty high (10Kohm) the wire resistance won't make a huge difference. Analog Voltage Reading Method To measure the temperature, we need to measure the resistance. Say the fixed resistor is 10K and the variable resistor is called R - the voltage output (Vo) is: Vo = R / (R + 10K) * Vcc Where Vcc is the power supply voltage (3.3V or 5V) Now we want to connect it up to a microcontroller. ADC value = Vi * 1023 / Vcc So now we combine the two (Vo = Vi) and get: ADC value = R / (R + 10K) * Vcc * 1023 / Vcc What is nice is that if you notice, the Vcc value cancels out! ADC value = R / (R + 10K) * 1023 It doesn't matter what voltage you're running under. Finally, what we really want to do is get that R (the unknown resistance). Great, lets try it out.

Better Readings. Thermistor2. This is a function I wrote to convert the value from an analogRead call of a pin with a thermistor connected to it to a temperature.


Unlike most other programs that use a look-up table, this function utilizes the Steinhart-Hart Thermistor Equation to convert "Thermistor Resistance" to "Temperature in Degrees Kelvin. " I found the equation here, but it can also be found at Wikipedia. The more simple program shows how little code is necessary to do the conversion, and how much memory and program space can be saved when compared to a large look-up table. The more elaborate program shows the power of the function. It displays lots of data including the ADC (from 0 to 1023), the voltage on the analog pin (note: ideally, the arduino would be running at 5.0 volts, but my power supply gives it 4.86 volts, so I divide by 4.86. I hope this comes in handy for everyone. (Ground) ---- (10k-Resistor) -------|------- (Thermistor) ---- (+5v) | Analog Pin 0 %box%[@#include <math.h> #include <math.h>

Arduino 1-Wire Address Finder. This tutorial has been updated to use version 1.0+ of the Arduino software, and compatible libraries.

Arduino 1-Wire Address Finder

Please download the latest version of the Arduino software here: 1-Wire devices, such as the DS18B20 digital temperature sensor, are great to use with Arduino boards because you can connect many of them to a single IO pin. The freely available software libraries and example code make using 1-wire devices simple. There is only one problem we have seen with the examples on the web. If you have more than one device connected to a single pin, say an indoor temperature sensor, as well as an outdoor temperature sensor, how does your Arduino know which is which? The answer is in the ROM embedded in each 1-wire device. The method that we use here at hacktronics is to connect each sensor, one at a time, to an Arduino and run the sketch provided below.

Software used in this tutorial can be downloaded here: Arduino 1-Wire Address Finder Software OneWire Arduino Library Hardware used in this tutorial: DS18B20 : How to change resolution (9/10/11/12 bits)? DS18B20 from Maxim (formerly Dallas) is a great chip for measuring temperature in your projects.

DS18B20 : How to change resolution (9/10/11/12 bits)?

But do you know you can set up the temperature resolution measurement? Yes, the DS18B20 gives you the possibility to choose the resolution of the temperature. Information from DS18B20 datasheet The DS18B20 has an internal register in which the user can set values (called scratchpad). User can modify Byte 2,3 and 4. On our case, we will focus on the Byte 4 which is called the “configuration register” and which contains the bits used to select the resolution. The EEPROM will then save this resolution in order that after a power disconnection, the component will keep this resolution as default. Let’s now talk about the Byte 4 Configuration Register: This byte contains two bits which are used to change resolution: R0 and R1. ArduinoExpertCapteursComplexesDS18B20ThermometreSimple.



HINAULT - Créé le 11/04/2010 1. Présentation Ce programme réalise un thermomètre de précision avec affichage du résultat dans la fenêtre Terminal série, à l'aide d'un capteur de température One-wire de type DS18B20. Une mesure est effectuée toutes les secondes. Ce programme utilise les fonctionnalités suivantes : la connexion série vers le PC un ou plusieurs capteurs One Wire Pour plus détails voir notamment : 2. 2.1 L'espace de développement Arduino ... pour éditer, compiler le programme et programmer la carte Arduino. 2.2 Le matériel suivant pour réaliser le montage associé une plaque d'essai pour montage sans soudures, des straps, - How to measure temperature with your Arduino and a DS18B20. In this example project we will be combining an Arduino and a DS18B20 temperature sensor. - How to measure temperature with your Arduino and a DS18B20

The DS18B20 is a so called 1-wire digital temperature sensor. The words “digital” and “1-wire” make this sensor really cool and allows you, with a super simple setup, to read the temperature of one or more sensors. You can even connect multiple devices together, utilizing only one pin on your Arduino.