1 / 6
Arduino Temperature and Humidity sensor case (DHT11) — zdjęcie 1
1 / 6

Arduino Temperature and Humidity sensor case (DHT11)

Zamów wydruk tego modelu

Obliczymy ostateczną cenę na podstawie wybranego pliku. Sprawdzisz ją i zaakceptujesz przed płatnością.

Zapisane na tym urządzeniu.

A case for a temperature and humidity sensor (DHT11), a 16x2 LCD, all powered by an Arduino uno board

Ocena
0 / 5
Polubienia
13
Pobrania
361
Wydruki
0
Wyświetlenia
1780
Oceny
0

Aktualizacja u źródła:

Informacje o modelu

Źródło
Printables
Kategoria
Electronics
Licencja
Creative Commons — Attribution — Share Alike

Summary

A case for a temperature and humidity sensor powered by an Arduino uno board.

The case fits:

  • an Arduino uno
  • a small breadboard
  • a 16x2 LCD display
  • a DHT11 temperature and humidity sensor

The parts are locked in place by melting the plastic pins with a soldering iron. The DHT11 is glued in place with hot glue.

Credits: The project is inspired by: https://www.progettiarduino.com/11-temperatura-e-umiditagrave-dht-11.html 

 

Parts needed

3D Printed parts:
  • 1x Top part of the case (Front_cover.stl)
  • 1x Bottom part of the case (Back_cover.stl)
  • 4x Feet (Feet.stl)
Electronics:
  • Arduino uno
  • a small breadboard
  • a 16x2 LCD display
  • a DHT11 temperature and humidity sensor
  • jumper cables (make sure they're long enough to reach)
  • 10k ohm potentiometer
  • a power brick / a 9v battery / usb cord to power the board
Assembly:
  • 4x M3 screws
  • Soldering Iron
  • Hot glue or other glue
Software:
Code (the .ino file is in the download section):
    #include <DHT.h>
#include &lt;LiquidCrystal.h&gt;


 

#define DHTPIN 8     // what digital the DHT11 is connected to

#define DHTTYPE DHT11   // DHT 11


 

DHT dht(DHTPIN, DHTTYPE); //set dht

LiquidCrystal lcd(12, 11, 5, 4, 3, 2); //set display (pin)

 

void setup() {

  lcd.begin(16, 2);//initialise screen

  lcd.print("Temperature");

  lcd.setCursor(0,1);

  lcd.print("Humidity");

  Serial.begin(9600);

  Serial.println("Arduino DHT11 Humidity and Temperature sensor");

  dht.begin();//inizialise dht

}

void loop() {

  // Wait a few seconds between measurements.

  delay(5000);


 

  //read temperature and humidity

  float h = dht.readHumidity();

  float t = dht.readTemperature();


 

  // Check if any reads failed and exit early (to try again).

  if (isnan(h) || isnan(t) ) {

    Serial.println("Failed to read from DHT sensor!");

    lcd.setCursor(0, 0);

    lcd.print("FAIL            ");

    lcd.setCursor(0, 1);

    lcd.print("FAIL            ");

    return;

  }

  // set lcd cursor to column 14 and row 0

  lcd.setCursor(14, 0);

  // print temperature

  lcd.print(t);

  // set lcd cursor to column 14 and row 1

  lcd.setCursor(14, 1);

  // print humidity

  lcd.print(h);

 

 // Serial print for debugging

  Serial.print("Temperature: ");

  Serial.print(t);

  Serial.print("\t");

  Serial.print("Humidity: ");

  Serial.print(h);

  Serial.print("\t");

}</code></pre><p>&nbsp;</p><h4>Assembly instructions</h4><ol><li>Make sure to test components and code outside the case.</li><li>Mount the Arduino Uno to the bottom part of the case (file: Front_cover.stl) using a soldering iron to melt the plastic tips and lock it in place.</li><li>Tape the breadboard (with the 10k ohm potentiometer) on the side of the Arduino.</li><li>Mount the LCD screen to the the top part of the case (file: Back_cover.stl) using a soldering iron to melt the plastic tips and lock it in place.&nbsp;</li><li>Place the DHT11 with a small amount of hot glue. Make sure it sits outside of the case and it can get some air.&nbsp;</li><li>Wire the LCD, DHT11, Potentiometer and Arduino following this scheme (source: <a href="https://www.progettiarduino.com/11-temperatura-e-umiditagrave-dht-11.html">https://www.progettiarduino.com/11-temperatura-e-umiditagrave-dht-11.html</a> ). Make sure the wires are long enough and are not easily disconnected when closing the case. If you're using a small breadboard you may need to connect more 5v and ground wires to power all the components.<br><img src="https://media.printables.com/media/prints/984651/rich_content/62b849e3-0c76-40d4-acd4-2d9fed66eb61/arduino-dht-11-display-temperatura-e-umidit_1.png#%7B%22uuid%22%3A%22fb389442-de4c-401d-a77c-08d5c9d3837c%22%2C%22w%22%3A611%2C%22h%22%3A453%7D"><br><img class="image_resized" style="width:97.99%;" src="https://media.printables.com/media/prints/984651/rich_content/7e4f4e5d-43f5-44bc-9a1b-4a850ce43090/large_display_a569e945-8947-43de-a30d-b6716e34a7e6_984651.webp#%7B%22uuid%22%3A%222ef76906-c0e3-45fd-bc4b-611d23e69ebe%22%2C%22w%22%3A960%2C%22h%22%3A960%7D"></li><li>Close the two halves of the case with 4 M3 screws. The feet are attached “as washers” to the screws.</li></ol>

Tagi