Temperature Plot Using Processing and Arduino

The plotting of data on a graph is used to observe and subsequently describe the visible patterns that exist within the data. The main aim of this project is to show, how to plot a variable graph using processing environment and Arduino. In this article temperature is plotted on the processing graph. Processing environment is quite similar to Arduino but the difference is that in the former we can plot the graph whereas in the latter we can’t plot any type of graph. Processing Environment is very useful in cases of plotting Analog graphs.Processing Environment is very useful in cases of plotting Analog graphs. For this project reader need to know how to start with arduino.

Fig. 1: Graph showing temperature plot on Processing Application

Fig. 2: Prototype of Arduino based Temperature Sensor

Here we are going to discuss plotting temperature graph on computer or laptop using Processing Environment and Arduino. Circuit of reading temperature is very simple. In this system only one circuit LM35 temperature Detector / Reader is used and directly connected with Analog pin number A0 of Arduino. And a 16×2 lcd interfaced with arduino is connected with this circuit for displaying temperature. See the block diagram given below to understand the working of this project.

Fig. 3: Block Diagram of Arduino based Temperature Sensor

From Arduino, we just read Analog output of temperature sensor and after some calculations Arduino sends data for Processing by using FTDI basic breakout. But you can use any of TTL logic converters to communicate with Desktop or Laptop with Arduino. But in Arduino UNO, there is no need of any other external converter because Arduino UNO Board is already configured with logic converter. But if you have Arduino UNO at home or lab then you should have a TTL Logic Converter.

Displaying the Graph

The formula for calculation of temperature given below:

Temperature= Analog reading * (5.0/1023.0) * 100;

Processing: Processing is an Environment like Arduino. In Arduino we uses

Temperature= Analog reading * (5.0/1023.0) * 100;

Processing: Processing is an Environment like Arduino. In Arduino we use

Void setup()

{

}

Void loop()

{

}

But in processing we use

Void setup()

{

}

And

Void draw()

{

// main program;

}

Line (x1,y1,x2,y2)

This function is used for plotting line on graph. The trace in graph is also plotted by using this function.

Where:

X1 is starting point in x direction on graph.

Y1 is starting point in y direction on graph.

X1 is ending point in x direction on graph.

Y1 is ending point in y direction

Fig. 4: Screenshot of Code used to plot a line on Processing Application

Fig. 5: Screenshot of a line plotted on Processing Application

Font and Text

By using text function we can plot text on graph window.

Text(“text”, x , y);

Where:

Text= text as you want to plot.

X = position of text in x direction.

Y = position of text in y direction.

Fig. 6: Screenshot of Code used to display text on Processing Application