Ir ao conteúdo

Sensor de Temperatura com Arduino e LM35 (Arduino + LM35)

Ola,

Vou começar a publicar experimentos que eu faço com o Arduino UNO/Nano e Sensores, etc. Hoje fiz um termometro utilizando o LM35.

O LM35 é um sensor de temperatura de precisão, o mesmo varia 10mV por grau Celsius. Os pinos do mesmo podem ser visualizados na imagem.

LM35 Pins

O pino VCC você conecta no 5V do Arduino, o GND no GND do Arduino e o pino do meio você conecta em um pino Analogico, no meu caso utilizei o A0.

O mesmo não necessita de nenhum resistor entre o Arduino e o Sensor então basta fazer uma conexão direta. O ADC do Arduino UNO possui uma precisão de 10 bits, ou seja nesse caso 5V / 1024 que é aproximadamente 0.0049 será a precisão do mesmo. Para lermos a temperatura em Celsius fazemos o seguinte:

Temperatura = (pino * 0.0049)*100

Mas por que 100? Pino * 0.0049 vai nos dar a tensão na porta analogica em Volts. Se multiplicarmos por 1000 teremos millivolts, como o sensor varia 10mV/C dividimos os milivolts por 10. O que nos daria a temperatura, multiplicar por 1000 e dividir por 10 é o mesmo que multiplicar por 100. Entendeu? [Adicionado 12/12]

Para termos em farenheit temos que fazer a conversão que é:

TemperaturaF = (temperatura * 1.8) + 32.

O código utilizado no Arduino:

[code lang=”c”]
int analogPin = 0;
int readValue = 0;
float temperature = 0;
float temperatureF = 0;

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

void loop() {
readValue = analogRead(analogPin);
//Serial.println(readValue);
temperature = (readValue * 0.0049);
temperature = temperature * 100;
temperatureF = (temperature * 1.8) + 32;
Serial.print(“Temperature: “);
Serial.print(temperature);
Serial.print(“C “);
Serial.print(temperatureF);
Serial.println(“F”);
delay(1000);
}
[/code]

Espero que seja util.
Matheus

Referencias:
LM35 Datasheet
Arduino analog Read

Publicado emArduino

5 Comentários

  1. Interesting read! Seeing more platforms tailor to the Philippine market is smart – localized payment options like GCash are key. Considering security, I’d always check for PAGCOR licensing & RNG certification before playing any phlaro vip game. Good to see responsible gaming being prioritized!

  2. Keine Notwendigkeit, sich um Einzahlungen oder Abhebungen online zu kümmern – wir halten es
    hier in unserem physischen Casino einfach und altmodisch.
    Egal, ob Sie ein erfahrener Profi sind oder gerade erst anfangen,
    die Spielbank Bad Neuenahr hat für jeden etwas zu bieten. Darüber hinaus sorgen sofortige Barauszahlungen und ein engagiertes Support-Team, das jederzeit zur Verfügung steht, dafür, dass Ihr Spielerlebnis
    neue Höhen erreicht. Mit über 80 Spielautomaten, darunter beliebte Titel wie Dragon Link,
    Lightning Link und Mo’ Mummy JP, haben Sie die Qual der Wahl.
    Als geschätzter Spieler genießen Sie Cashback-Belohnungen durch unser VIP-Programm und exklusiven Zugang zu saisonalen Turnieren.
    Mit seiner reichen Geschichte, die bis ins Jahr 1948 zurückreicht,
    bietet das Casino eine elegante Atmosphäre und ist ein ideales
    Ziel für diejenigen, die ein erstklassiges Spielerlebnis suchen. Der
    Spielautomatenbereich verfügt über etwa 80 verschiedene
    Spiele und bietet endlose Unterhaltung für die Spieler.
    Das Casino, Spielbank Bad Neuenahr, bietet eine Reihe von aufregenden Spielen, darunter klassische Tischspiele wie Französisches Roulette, Amerikanisches Roulette, Blackjack und Texas Hold’em Poker.

    References:
    https://online-spielhallen.de/1go-casino-bewertung-eine-umfassende-analyse/

  3. The vast majority of videos on YouTube are free to view and supported
    by advertising. It also found more “mainstream-adjacent Conservative creators” gaining over alt-right and
    extremist videos by 2020. According to a 2020 study, viewership of far-right videos on YouTube peaked in 2017 and “a growing body of journalistic evidence”
    suggested that YouTube was radicalizing young men through its recommendation engine, but that such evidence was “fraught with a bias towards sensationalism”.
    TED curator Chris Anderson described a phenomenon by which geographically distributed individuals in a
    certain field share their independently developed
    skills in YouTube videos, thus challenging others to
    improve their own skills, and spurring invention and evolution in that field.

    Some YouTube videos have themselves had a direct effect on world events, such as Innocence of Muslims (2012)
    which spurred protests and related anti-American violence internationally.

    Concurrently, old media celebrities moved into the website at the invitation of a YouTube
    management that witnessed early content creators accruing substantial followings and perceived audience sizes potentially larger than that attainable by television.
    In 2010, YouTube temporarily released a “TEXTp” mode
    which rendered video imagery into ASCII art letters “in order to reduce bandwidth costs by $1 per second.” The next year, when clicking on a video on the main page,
    the whole page turned upside down, which YouTube claimed
    was a “new layout”. Kremlin spokesperson Dmitry Peskov labeled the court decision as “symbolic” and warned
    Google that it “should not be restricting the actions of our broadcasters on its platform.”
    Shortly after the Russian invasion of Ukraine in 2022,
    YouTube removed all channels funded by the Russian state.

    References:
    https://blackcoin.co/vip-slots-best-slots-for-real-money-play-with-bonuses-2023/

Deixe um comentário

O seu endereço de e-mail não será publicado. Campos obrigatórios são marcados com *