DIY Thermometer with TTGO T Display and DS18B20
Greetings.
So this is the DIY Thermometer made entirely from scratch using a TTGO T display board and DS18B20 Temp sensor.
A 3D Printed body is being used to hold everything together, for Version 1, I've made an exoskeleton-like body that holds a display on one side and a lithium cell on the other.
This DIY Thermometer is easy to make and just uses a couple of components that we can easily get and replicate this device.
This article is about the whole built Process of this device so let's get started.
MATERIAL REQUIRED
These are the materials that were used in this built-
- TTGO T DISPLAY
- DS18B20 Sensor
- 3D Printed Parts
- ON OFF SWITCH
- LiPo Cell
- Breadboard and jumper wires
CONCEPT
DS18B20 is perfect for making a thermometer because of its shape so we designed a body that holds the TEMP sensor with the TTGO T Display board and lithium cell in a simple form factor.
TTGO Board is added on one side and LiPi Cell is on the other.
There's also a Switch for turning the setup ON or OFF.
DS18B20 Sensor
The DS18B20 digital thermometer provides 9-bit to 12-bit Celsius temperature measurements and has an alarm function with nonvolatile user-programmable upper and lower trigger points.
The DS18B20 communicates over a 1-Wire bus that by definition requires only one data line (and ground) for communication with a central microcontroller.
This sensor comes in two form factors, one that looks like a transistor and a probe-like device that we'll be using in this build.
Check out its datasheet for more info about the sensor itself.
https://datasheets.maximintegrated.com/en/ds/DS18B20.pdf
PCBWAY GIFTSHOP
As for sourcing the components, the DS18B20 Sensor was provided by PCBWAY from their GIFTSHOP.
Aside from PCB and CNC Related services, PCBWAY also has an online marketplace for getting bunches of electronics-related stuff like DEV Boards, Sensors, Modules, and all kinds of DIY Boards.
PCBWAY have this system that lets us purchase anything from their gift shop through beans, Beans are like a redeemable currency or coupons that we get by placing an order on PCBWAY or by sharing your projects in the community to get beans.
Check PCBWAY out for getting great PCB service from here- https://www.pcbway.com/
BREADBOARD SETUP
Before starting the Assembly process, we first have to prepare a breadboard setup for testing and setting up the libraries that we require.
First, we connect TTGO Board with DS18B20 Sensor by using the attached wiring diagram.
- Vcc of Temp Sensor to 3V of TTGO
- GND to GND
- we add a 10k resistor between 3V and Sensor Pin
- Sensor Pin to GPIO2
Next, we add the following libraries for the TTGO Board display and the TEMP sensor.
CODE
Next, we add the main code to the TTGO Board and the sensor will start working and will display TEMP Data on the TTGO's Screen.
#include <OneWire.h>
#include <DallasTemperature.h>
#include <TFT_eSPI.h> // Graphics and font library for ST7735 driver chip
#include <SPI.h>
#include <WiFi.h>
#define TFT_BLACK 0x0000 // black
#define ONE_WIRE_BUS 2
OneWire oneWire(ONE_WIRE_BUS);
DallasTemperature sensors(&oneWire);
TFT_eSPI tft = TFT_eSPI(); // Invoke library, pins defined in User_Setup.h
void setup(void)
{
tft.init();
tft.setRotation(1);
Serial.begin(9600);
sensors.begin();
}
void loop(void)
{
Serial.print(" Requesting temperatures...");
sensors.requestTemperatures(); // Send the command to get temperature readings
Serial.println("DONE");
tft.fillScreen(TFT_BLACK);
tft.setCursor(0, 0, 2);
tft.setTextColor(TFT_WHITE,TFT_BLACK);
tft.setTextSize(2);
tft.println("Temperature is: ");
tft.setCursor(0, 40, 2);
tft.setTextColor(TFT_WHITE,TFT_BLACK);
tft.setTextSize(3);
tft.println(sensors.getTempCByIndex(0));
delay(2000);
}
TESTING
After Uploading the sketch, we test this Temperatyr Sensor setup by using two mediums like ICE and HOT Coffee.
ICE is for testing low temperatures and HOT Coffee is for testing high temperatures.
ADDING BATTERY to TTGO
TTGO Board has an onboard Lithium Cell charging setup, we can add lithium cell to power the board.
It comes with a small JST Connector but I lost that wire harness so I used a slightly bigger wire harness and its JST connector.
- We add the JST connector on the existing one's Positive and negative port with soldering iron.
- Next, we add a lithium cell to its JST connector and test if the TTGO Board is working or not.
After this, we can now finally prepare the 3D Body for final assembly.
3D PRINTED PART
3D Body is basically an Exoskeleton that holds the sensor, TTGO Board, and battery altogether, it doesnt cover anything so that's why it's like an Exoskeleton.
This model was designed in Fusion360 and then exported out as a mesh file for 3D Printing. The files are all attached.
We use Orange PLA with a 1mm Nozzle and 0.32mm Layer height for preparing the 3D Printed part. 1mm Nozzle gives the body structural strength.
MAIN ASSEMBLY
- Next, we start the final assembly by first adding the DS18B20 Sensor to the 3D Printed body.
- We then add a Switch to the 3D Body by using a few drops of super glue.
- Next, we add the 10K Resistor to GIPO2 and 3V Pin, we also connect the TTGO's 3V and GND to DS18B20 Sensor.
- We add DS18B20's sensor pin to GPIO2
- Next, we add the switch in between LiPo Cell's Positive terminal and wire harness so we can use the switch to disconnect the battery from TTGO Board as the TTGO Board doesnt have an ON-OFF SWITCH for disconnecting the power source.
- We connect the Battery to its JST connector and test the switch connectivity.
- Next, we add Hot glue to secure the battery and TTGO Board in their place.
- And the setup is now completed.
RESULT
Here's the result of this built, a working Thermometer that measures accurate temperature hot or cold.
For the main test of this device, I use it to measure my body temperature.
It took a whole minute to take readings to get stable but the end reading was 35°C which is the normal Body Temp.
This is it for today folks, if you have any problem regarding this project, leave a comment.
Special thanks to PCBWAY for supporting this project, you guys can check them out for getting great PCB Service for less cost.
Stay tuned for the next project!
Peace
#include <OneWire.h>
#include <DallasTemperature.h>
#include <TFT_eSPI.h> // Graphics and font library for ST7735 driver chip
#include <SPI.h>
#include <WiFi.h>
#define TFT_BLACK 0x0000 // black
#define ONE_WIRE_BUS 2
OneWire oneWire(ONE_WIRE_BUS);
DallasTemperature sensors(&oneWire);
TFT_eSPI tft = TFT_eSPI(); // Invoke library, pins defined in User_Setup.h
void setup(void)
{
tft.init();
tft.setRotation(1);
Serial.begin(9600);
sensors.begin();
}
void loop(void)
{
Serial.print(" Requesting temperatures...");
sensors.requestTemperatures(); // Send the command to get temperature readings
Serial.println("DONE");
tft.fillScreen(TFT_BLACK);
tft.setCursor(0, 0, 2);
tft.setTextColor(TFT_WHITE,TFT_BLACK);
tft.setTextSize(2);
tft.println("Temperature is: ");
tft.setCursor(0, 40, 2);
tft.setTextColor(TFT_WHITE,TFT_BLACK);
tft.setTextSize(3);
tft.println(sensors.getTempCByIndex(0));
delay(2000);
}
DIY Thermometer with TTGO T Display and DS18B20
- Comments(0)
- Likes(1)
- Stan Mar 09,2023
- 0 USER VOTES
- YOUR VOTE 0.00 0.00
- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
- 9
- 10
- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
- 9
- 10
- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
- 9
- 10
- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
- 9
- 10
More by Arnov Arnov sharma
- Delete Button XL Greetings everyone and welcome back, and here's something fun and useful.In essence, the Delete Butt...
- Arduino Retro Game Controller Greetings everyone and welcome back. Here's something fun.The Arduino Retro Game Controller was buil...
- Super Power Buck Converter Greetings everyone and welcome back!Here's something powerful, The SUPER POWER BUCK CONVERTER BOARD ...
- Pocket Temp Meter Greetings and welcome back.So here's something portable and useful: the Pocket TEMP Meter project.As...
- Pico Powered DC Fan Driver Hello everyone and welcome back.So here's something cool: a 5V to 12V DC motor driver based around a...
- Mini Solar Light Project with a Twist Greetings.This is the Cube Light, a Small and compact cube-shaped emergency solar light that boasts ...
- PALPi V5 Handheld Retro Game Console Hey, Guys what's up?So this is PALPi which is a Raspberry Pi Zero W Based Handheld Retro Game Consol...
- DIY Thermometer with TTGO T Display and DS18B20 Greetings.So this is the DIY Thermometer made entirely from scratch using a TTGO T display board and...
- Motion Trigger Circuit with and without Microcontroller GreetingsHere's a tutorial on how to use an HC-SR505 PIR Module with and without a microcontroller t...
- Motor Driver Board Atmega328PU and HC01 Hey, what's up folks here's something super cool and useful if you're making a basic Robot Setup, A ...
- Power Block Hey Everyone what's up!So this is Power block, a DIY UPS that can be used to power a bunch of 5V Ope...
- Goku PCB Badge V2 Hey everyone what's up!So here's something SUPER cool, A PCB Board themed after Goku from Dragon Bal...
- RGB Mixinator V2 Hey Everyone how you doin!So here's a fun little project that utilizes an Arduino Nano, THE MIXINATO...
- Gengar PCB Art Hey guys and how you doing!So this is the GENGAR PCB Badge or a Blinky Board which is based around 5...
- R2D2 Mini Edition So here's something special, A Mini R2D2 PCB that speaks ASTROMECH.Astromech is a fictional language...
- C-3PO Blinky Board Hey guys and how you doing!So this is the C3P0 PCB Badge or a Blinky Board which is based around 555...
- WALKPi Breadboard Version Greetings everyone and welcome back, Here's something loud and musical.Similar to a traditional walk...
- BOXcilloscope Greetings to everyone, and welcome back.This is BOXcilloscope, a homemade portable oscilloscope that...
-
-
-
3D printed Enclosure Backplate for Riden RD60xx power supplies
95 1 1 -
-
-
-
Sega Master System RGB Encoder Switcher Z80 QSB v1.2
80 0 0 -
18650 2S2P Battery Charger, Protection and 5V Output Board
117 0 0 -
High Precision Thermal Imager + Infrared Thermometer | OpenTemp
555 0 7 -
Sony PlayStation Multi Output Frequency Oscillator (MOFO) v1
158 0 2 -