Humidity and Temperature & Arduino dht11
Obliczymy ostateczną cenę na podstawie wybranego pliku. Sprawdzisz ją i zaakceptujesz przed płatnością.
Zapisane na tym urządzeniu.
Measure temperature and humidity with a dht11 sensor connected to an arduino uno and breadboard using this box!!
- Ocena
- 0 / 5
- Polubienia
- 16
- Pobrania
- 172
- Wydruki
- 0
- Wyświetlenia
- 1150
- Oceny
- 0
Aktualizacja u źródła:
Informacje o modelu
- Źródło
- Printables
- Kategoria
- Engineering
- Licencja
- Creative Commons — Attribution — Share Alike
So I made this box that can hold in place an Arduino Uno, a breadboard, an LCD (16x2) and there is also room for a dht11 sensor on both sides to make it more convenient to assemble. The box was also designed keeping in mind room for wiring and cable management, hope you like it!!
Can be powered using a USB cable or a 9V battery adapter as shown in the pictures.
Printing tips:
- No need to use support (top part already includes support on the sensor holes)
- No need to use brim
- 3 perimeters
- 10% infill
- 3 bottom layers and 3 top layers for best results
Wiring:
- Connect the DHT11 sensor to the breadboard.
- Connect the Arduino Uno to the breadboard.
- Connect the components according to the pin configurations mentioned in the code.
Here's a step-by-step wiring guide:
DHT11 Sensor:
- Pin 1 (VCC) of the DHT11 sensor to the 5V pin on the Arduino Uno.
- Pin 2 (Data) of the DHT11 sensor to digital pin 2 on the Arduino Uno.
- Pin 3 (NC) of the DHT11 sensor is not connected.
- Pin 4 (GND) of the DHT11 sensor to the GND pin on the Arduino Uno.
Note: some dht11 sensors only have 3 pins. For those connect the VCC pin of the DHT11 sensor to the 5V pin on the Arduino Uno, connect the GND pin of the DHT11 sensor to the GND pin on the Arduino Uno and finally connect the DATA pin of the DHT11 sensor to digital pin 2 on the Arduino Uno.
Arduino Uno:
- Connect the GND pin of the Arduino Uno to the negative (-) rail of the breadboard.
- Connect the 5V pin of the Arduino Uno to the positive (+) rail of the breadboard.
LCD:
- Connect the LCD's VSS pin to GND on the Arduino.
- Connect the LCD's VDD pin to 5V on the Arduino.
- Connect the LCD's VO pin to the middle pin of a potentiometer (for contrast adjustment).
- Connect the LCD's RS pin to digital pin 8 on the Arduino.
- Connect the LCD's RW pin to GND.
- Connect the LCD's E pin to digital pin 9 on the Arduino.
- Connect the LCD's D4 pin to digital pin 4 on the Arduino.
- Connect the LCD's D5 pin to digital pin 5 on the Arduino.
- Connect the LCD's D6 pin to digital pin 6 on the Arduino.
- Connect the LCD's D7 pin to digital pin 7 on the Arduino.
- Connect the LCD's A (anode) pin to 5V.
- Connect the LCD's K (cathode) pin to GND.
Breadboard Connections:
- Connect the positive (+) rail of the breadboard to the 5V pin of the Arduino Uno.
- Connect the negative (-) rail of the breadboard to the GND pin of the Arduino Uno.
Once you have connected the components as described, upload the provided code to your Arduino Uno board, and it should display the temperature and humidity readings on the LCD screen.
Remember to double-check your connections and ensure that everything is properly wired before powering up the system.
Arduino code (make sure you have libraries installed):
#include <LiquidCrystal.h>
#include <DHT.h>
#define DHTPIN 2
#define DHTTYPE DHT11
DHT dht(DHTPIN, DHTTYPE);
LiquidCrystal lcd(8, 9, 4, 5, 6, 7);
void setup() {
dht.begin();
lcd.begin(16, 2);
}
void loop() {
delay(2000);
float humidity = dht.readHumidity();
float temperature = dht.readTemperature();
lcd.clear();
lcd.setCursor(0, 0);
lcd.print("Temp: ");
lcd.print(temperature);
lcd.print(" C");
lcd.setCursor(0, 1);
lcd.print("Humid: ");
lcd.print(humidity);
lcd.print(" %");
}
Hope you liked and successfully printed the model!! If so, please consider buying me a coffee so that I have more energy to create even more models :-D
https://buymeacoffee.com/miguel2811