How to Make a Custom DIY Temperature Meter Using Bar Graph & Atmega328p
by DIYTechStudio in Circuits > Arduino
3553 Views, 14 Favorites, 0 Comments
How to Make a Custom DIY Temperature Meter Using Bar Graph & Atmega328p
In this post i will show you how to make a Temperature Meter using Bar Graph & Atmega328p. The post will include all the details like circuit diagram, PCB fabrication , Coding, Assembly & Testing. I have also included a video containing all the details.
Components
- 1*Atmega328p
- 1*Bar Graph
- 1*10K Ohm
- 10*220 Ohm
- 1*LM35
- 1*Terminal Block
- 2*22pf Ceramic Capacitor
- 1*16 MHz Crystal
- 1*Custom Made PCB by JLCPCB.com
Affiliate Links
Amazon IND
- Atmega328p - https://amzn.to/2YOAyk2
- Bar Graph - https://amzn.to/2Ma64Hu
- 16 MHz Crystal - https://amzn.to/2VS266c
Amazon US
- Atmega328p - https://amzn.to/2YLm18q
- Bar Graph - https://amzn.to/2Wlpayd
- 16 MHz Crystal - https://amzn.to/2Erg2hq
AliExpress
- Atmega328p - http://s.click.aliexpress.com/e/cpGPZBZI
- Bar Graph - http://s.click.aliexpress.com/e/bgbq8NP2
- 16 MHz Crystal - http://s.click.aliexpress.com/e/bpqjFRKC
Banggood
- Atmega328p - https://www.banggood.in/custlink/GvvmPYsIOI
- 16 MHz Crystal - https://www.banggood.in/custlink/KvGDPEnZOB
Circuit Diagram, PCB Layout & Sketch
The circuit was designed in KiCad. After designing the circuit i designed the PCB layout & generated the Gerber & Drill File. Then uploaded a Zip folder containing all the Gerber & Drill file in JLCPCB.com website for fabrication (Who offered 5 PCB's for 2$ with one day shipping).
Sketch
The sketch which i used is a very basic sketch which can easily understood. The first part of the sketch (highlighted in yellow) is used to declare & initialize the variables. Next Line which is highlighted is to get the analog value from the LM35. The next two line is used to convert the analog value to Celsius (to know more about the formula please click here). I have also included a line which you can use if you want the value in Fahrenheit. The last part of the code is simple if statement used to turn on and off of the Bar Graph based on the temperature.
Construction & Testing
After receiving the board from JLCPCB.com i assembled the board & connected it to a 5V DC power supply. The Atmega328 was programmed before hand. If you are not familiar on how to program Atmega328p then you can refer this video. Please note this device is programmed to show the temperature from 25'C to 34'C. I have also included the comparison of the two design showing the temperature.
Thank you reading. Please subscribe to my YouTube channel for more such content.