Introduction: DIY Thermometer
Hello everybody. In this occasion I will show you how you can make your own thermometer from scratch using an ATMega328p microcontroller, which was programmed using an Arduino uno programming board.
This thermometer can be used to measure ambient temperature inside a room or outside ambient temperature as well.
Supplies
Things you will need:
1. Arduino UNO board => https://shorturl.at/dEl9Y
1. 16 MHz quartz crystal.
1. 10 uF capacitor.
2. 22pF capacitors.
1. 5V regulator L7805CV => https://shorturl.at/i4j9t
1. Small SPDT switch => https://rb.gy/k0ia9v
1 DHT11 temperature and humidity sensor module => https://rb.gy/bcts36
1 Prototype PCB Soldering board. (7.5cm x 4.5 cm or similar size) => https://shorturl.at/RkQVe
A bunch of wires (includes dupont cables).
Step 1: Code Uploading
This is the code that you will upload to the ATMega328p using the Arduino UNO board
// Incluimos librería
#include "dht.h"
#include <LiquidCrystal_I2C.h>
dht DHT11;
#define DHT11_PIN 7
LiquidCrystal_I2C lcd(0x27,16,2); //
void setup() {
// put your setup code here, to run once:
Serial.begin(9600);
lcd.init();
//Encender la luz de fondo.
lcd.backlight();
}
void loop() {
// put your main code here, to run repeatedly:
DHT_11_SENSOR();
}
void DHT_11_SENSOR(){
int humPer = DHT11.read11(DHT11_PIN);
lcd.clear();
lcd.setCursor(1,0);
lcd.print(DHT11.temperature);
lcd.setCursor(5,0);
lcd.print("C");
lcd.setCursor(1,1);
lcd.print(DHT11.humidity);
lcd.setCursor(5,1);
lcd.print("%");
delay(2000);
}
Step 2: 3D Design
I will pass the design for the box and the lid for the box.
Attachments
Step 3: Building the Device
Follow the Circuit design to connect all the components. First use a breadboard to assure that the connections are right before soldering all the components.
Step 4: Final Result
Here is the final result for the thermometer. If you have questions, feel free to ask in the comment section.