DIY Thermometer with TTGO T Display and DS18B20 V2
Greetings everyone, and welcome back.
Here's something useful: A DIY thermometer made completely from scratch using a custom PCB and a couple of 3D-printed parts.
The DS18B20 temperature sensor probe and the TTGO T-display board form the project's core, and we have incorporated a lithium cell circuit onboard to power the circuit. The DS18B20 temperature sensor measures the temperature, which is subsequently shown on the TTGO Board's display.
This article covers the entire build process of this project, so let's get started.
Materials Required
These were the materials required in this build-
- TTGO T Display DEV Board
- Custom PCBs
- 3D-printed parts
- DS18B20
- IP5306 IC
- 10uF Capacitors
- 3.7V 100mAh LiPo Cell
- 5.6uH Inductor
- horizontal push button
- USB Micro Port
- M2 Screws
Previous Project
This project is actually Version 2 of a similar project that was produced before. It had the same configuration, but it was assembled with a 3D printed body, and the battery was connected directly to the TTGO's battery connection.
You can read about the previous project here.
https://www.hackster.io/Arnov_Sharma_makes/diy-thermometer-with-ttgo-t-display-and-ds18b20-2bca27
Making this arrangement was difficult; therefore, it was time to simplify the model by installing every component on a PCB.
New Design
First, we model the TTGO board, the DS18B20 sensor, and the battery using Fusion360. Next, we position the temperature sensor on the front side and the TTGO board a little away from it. To connect both of them, we model a PCB.
A holder part with two screw mounts that fit into the PCB holds the temperature sensor in place. One PCB will be positioned on top, containing all of the components, and a second PCB will be placed in its place, empty.
To prepare the PCB design for the following setup, we use the measurements from the Cad design of the PCB.
PCB Design
The first step in the PCB design process is creating the schematic, which shows the TTGO T-Display board connected to the DS18B20 temperature sensor by a CON3 header pin. We attach a resistor between the sensor pin and the CON3 header pin of the temperature sensor's VCC.
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. This sensor pin is connected to GPIO2 of the TTGO T-Display Board.
This sensor comes in two forms: one that looks like a transistor and a probe-like device that we are using in this project.
Check out its datasheet for more information about the sensor itself.
https://datasheets.maximintegrated.com/en/ds/DS18B20.pdf
Our selected power source is the IP5306 IC, a well-known Li-ion power management IC that outputs a steady 5 volts from a 3.7 volt Li-ion cell and offers features like charging cutoff and battery fuel level indication.
We create the PCB outline and arrange everything in accordance with the layout by using the PCB design layout from the Cad design.
PCBWAY PCB Service
After completing the PCB design, we export the gerber data and send it to PCBWAY for samples.
An order was placed for a yellow soldermask and white silkscreen.
After placing the order, I received the PCBs within a week, and the PCB quality was pretty great. The silkscreen I used is completely random and asymmetrical, so it's pretty hard to make, but they did an awesome job of making this PCB with no errors whatsoever.
You guys can check out PCBWAY if you want great PCB service at an affordable rate.
PCB Assembly Process
- Using a solder paste dispensing needle, we first add solder paste to each component pad individually to begin the PCB assembly process. In this instance, we are using standard 37/63 solder paste.
- Next, we pick and place all the SMD components in their places on the PCB using an ESD tweezer.
- With extreme caution, we lifted the complete circuit board and placed it on the SMT hotplate, which increases the PCB's temperature to the point at which the solder paste melts and all of the components are connected to their pads.
- Next, we add all the THT components, which include the header pin, horizontal switch, and USB micro port, to their locations and then solder their pads using a soldering iron.
- At last, we added the TTGO T-Display board to its location through the header pins, and the PCB assembly is now complete.
MAIN ASSEMBLY
- The main assembly process starts by soldering the positive and negative LiPo cells to the circuit's battery terminals.
- Next, we attach the temperature sensor's wires to the pads provided on the sensor circuit.
- The temperature sensor holder and the back holder with the TOP PCB are then fastened with M2 screws.
- To keep the LiPo cell in its place, we use Kapton tape to secure it with the back side of the TOP PCB.
- Next, we use an empty PCB, place it on the bottom side of the model, and secure it in place using four M2 screws.
- The thermometer is now complete; let's take a look at its code in the next step.
CODE
#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); }
Overall, this code reads the temperature from a DS18B20 sensor and displays it on an SPI-connected TFT LCD screen.
These are the libraries you need to download and install first before using this sketch:
https://github.com/milesburton/Arduino-Temperature-Control-Library
https://github.com/Bodmer/TFT_eSPI
TESTING
We first used a hot medium—a cup of tea—to test the thermometer. After dipping the DS18B20 Sensor's probe into the tea cup and waiting a minute for readings, the temperature reached 64°C.
Next, we plunge the DS18B20 Sensor probe into a cup of ice and water, a cold medium, and allow it to take readings for a minute. This yields temperature readings of 0.56°C.
CONCLUSION
Here is the end result of this straightforward build: a DIY thermometer that functions perfectly across all temperatures, hot or cold.
We saved a lot of space by employing a development board like the T-display board, which has an inbuilt display to make things compact.
The DIY Thermometer project has reached its final edition, and nothing has to be changed going forward because everything functions flawlessly.
I have included all the files, so you may try making one on your own.
Leave a comment if you need any help regarding this project. This is it for today, folks.
Thanks to PCBWAY for supporting this project.
You guys can check them out if you need great PCB and stencil service for less cost and great quality.
And I'll be back with a new project pretty soon!
#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 V2
*PCBWay community is a sharing platform. We are not responsible for any design issues and parameter issues (board thickness, surface finish, etc.) you choose.
- Comments(0)
- Likes(1)
- (DIY) C64iSTANBUL Feb 27,2024
- 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
158 1 1 -
-