#12037
An Application Tutorial Based on Arduino UNO
An Office Thermometer
How could I know environment temperature all the time in such a hot day? I called my absent friend but surprised to find that she got a cold because of cold weather and she had to monitor body temperature with a thermometer. She concerned with my health, advising me to pay attention to room temperature to keep healthy.
Thinking about her words, I decide to DIY a small office thermometer with DS18B20 sensor that based on Arduino UNO to know the environment temperature.
DSC_4755.JPG
Preparation Work

Hardware in Need:
1. DS18B20 Temperature Sensor
DS18B20.jpg
DS18B20 is the most common temperature sensor in the market, small, precise, and convenient to connect. After package, it is applicable to different situations. You can change exterior according to situations, such as plastic films, boilers, engine rooms, clean rooms, and even magazines.

2. Gravity: I2C 16x2 Arduino LCD with RGB Backlight Display
1419_P_1500454238386.jpg
Have you been fed up with Black/White LCD screen? Do you want to try a colorful one? DFRobot I2C 16x2 Arduino LCD with RGB Backlight Display module will bring you a new experience about screen. It comes with RGB full color backlight, which has 16 million kinds of color. It is also convenient to connect, this I2C 16x2 LCD Screen is using an I2C communication interface, only two communication wires can realize backlight control. It supports screen scrolls, cursor movement etc. All codes are based on special Arduino libraries.

3. DFRduino UNO R3
521_P_1415674112537.jpg
DERduino UNO R3, a simple microcontroller board fully compatible with Arduino UNO R3, replaces 8U2 with ATmega16U2 as a USB-to-serial converter. The convert speed and memory space of ATmega16U2 is the same as Arduino UNO R3. This master board adopts ENIG (immersion gold), quality, delicate, and cost effective.

4. Gravity: IO Expansion Shield for Arduino V7.1
791_P_1469444532407.jpg
IO expansion shield is an ideal expansion board for green hands that do without complex wires connection and fault resolutions of breadboards. It makes beginners realize creative plans easier.

Parts Diagram
DSC_47791.jpg
Circuit Connection Diagram
HT.png
DSC_4512.JPG
Operating Result
DSC_47201.jpg
When the room temperature is less than 25°C, the screen shows green. Is this temperature comforts people?
DSC_47151.jpg
When the room temperature is more than 25°C and less than 30°C, the screen shows yellow. The color suggesting increasing temperature, you can use fan now.
DSC_47181.jpg
When the room temperature is more than 30°C, the screen shows red. A fan means nothing to such a hot warming, only air-conditions can help you survive in the summer. I made a crust by 3D printer to protect and beatify inner parts.

3D Assembly Drawing
E4[4Q{NO%S{`ZEH1@CEA$C3.png
3D Sketch Design
(SXW{%0YBNLER_2[_6L%UZ0.png
Assemble Image
DSC_4768.JPG
If you are interested in this project, you can download 3D printing files in the end page. You can also design your own private crust.
Relate to programing, you can also add time display function. So it can be a combination of thermometer and clock. Your ideas will be appreciated.

Program:
Code: Select all
#include <OneWire.h>
#include <Wire.h>
#include "DFRobot_RGBLCD.h"
int DS18S20_Pin = 2; //DS18S20 Signal pin on digital 2
DFRobot_RGBLCD lcd(16,2);  //16 characters and 2 lines of show
//Temperature chip i/o
OneWire ds(DS18S20_Pin);  // on digital pin 2
void setup(void)
{
  Serial.begin(9600);
  lcd.init();
  lcd.setRGB(0, 255, 0);
  lcd.setCursor(1, 0 );
  lcd.print("Tep: ");
}

void loop(void)
{
 float temperature = getTemp();
  delay(1000);
   lcd.setCursor(5,0); 
   lcd.print(temperature);
    if(temperature<25)
    {
    lcd.setRGB(0, 255, 0);
   }
    else if (temperature<30)
    {
    lcd.setRGB(255, 215, 0);
    }
    else 
    {
    lcd.setRGB(255, 0, 0);
    }
    lcd.setCursor(10, 0 );
   lcd.write(0xdf);              //display°
   lcd.print('C');
    delay(100);
  delay(100); //just here to slow down the output so it is easier to read
}
float getTemp()
{
  //returns the temperature from one DS18S20 in DEG Celsius

  byte data[12];
  byte addr[8];

  if ( !ds.search(addr)) {
      //no more sensors on chain, reset search
      ds.reset_search();
      return -1000;
  }

  ds.reset();
  ds.select(addr);
  ds.write(0x44,1); // start conversion, with parasite power on at the end

  byte present = ds.reset();
  ds.select(addr);    
  ds.write(0xBE); // Read Scratchpad

  for (int i = 0; i < 9; i++) { // we need 9 bytes
    data[i] = ds.read();
  } 
  ds.reset_search();
  byte MSB = data[1];
  byte LSB = data[0];

  float tempRead = ((MSB << 8) | LSB); //using two's compliment
  float TemperatureSum = tempRead / 16;
  return TemperatureSum;
  
}

3D Printing Files:
(947.06 KiB) Downloaded 228 times
#45860
I must say that you have explained and give me a great responses on literature and minimum burden about the things that gonna help me with my all pending exams for sure though also I am liking to join online classes as https://medium.com/@markuskblackwood/3- ... 68a0fa5f21 is one the best review website which you can use for your exams, assignment or more related to content anyway.
#46358
I like weekends because I can spend all day playing the fireboy and watergirl adventure game, which is my absolute favorite. I like putting my heart and soul into characters that allow me to escape the worries of daily life and get lost in their world. No one knows what will happen next during this devastating epidemic, and no one can predict it. We should spend more time with the people who are important to us.
#46360
Undoubtedly, it pays quite well, but first of all you need to try to create your own mobile application. I understand perfectly well that this is quite time-consuming, but if you really want to achieve a result, then you need to learn how to do it. In addition, I would like to mention this resource https://augustafreepress.com/how-to-run ... e-product/ which is engaged in giving information about running your software product. These specialists can help you to find out more about this sphere, so if you really need it, you can contact them.
#46429
Guys, you know, it is necessary for every person to know about digital services because it is an integral part of our life. In addition, just recently I decided to visit this web and mobile development agency about, and it also helped me to learn more about this area. The entire service is held online and helps beginner and experienced users and engineers to develop. That's really cool.