Measure temperature and humidity with a dht11 sensor connected to an arduino uno and breadboard using this box!!
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 (top part already includes on the sensor holes)No need to use brim3 perimeters10% infill3 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, the provided code to your Arduino Uno board, and it should display the temperature and humidity readings on the LCD screen.
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β