Introduction: How to Make a Custom DIY Temperature Meter Using Bar Graph & Atmega328p

About: For more content please subscribe to my YouTube channel @

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.

Step 1: 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

Affiliate Links

Amazon IND

Amazon US



Step 2: 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 website for fabrication (Who offered 5 PCB's for 2$ with one day shipping).


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.

Step 3: Construction & Testing

After receiving the board from 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.

Colors of the Rainbow Contest

Participated in the
Colors of the Rainbow Contest