Make a Stevenson Screen with Arduino Part 1

Arduino Stevenson Screen

The last time, we used the Arduino as a Web server. In the next few entries, we will aim to expand the Web server by building a Stevenson screen. While there are thermometers and hydrometers in a Stevenson screen, this time, we will be building a Stevenson screen for indoor use, using optical and ultrasonic sensors used previously, so that besides temperature and humidity, it is capable of sensing the indoor environment.


We aim to be able to store the data collected by the Stevenson screen in an SD card, and integrate it with a server-side program through the Web server.

In this article, we will se how to operate the temperature sensor with Arduino. We will combine it with the Web server light sensor used previously.

Today’s Electronics Recipe

Estimated time to complete: 45 minutes
Parts needed:

How to use the temperature sensor

While there are many types of temperature sensors, we will be using the common LM35DZ.


Temperature sensor LM35DZ

Compared to other sensors, temperature sensors are easy to use. The LM35DZ is able to measure temperatures from 0℃ to 100℃, giving an output of 0V when the temperature is 0℃, 10mv at 1℃, and 100mV at 10℃.

As Arduino can receive analog inputs with values from 0 to 1023, it is possible to measure temperature using Arduino with the following formula.

Temperature = (([Base voltage(5V)] * [input value from analog pin]) / 1024) * 100;

Let’s connect this up to the Arduino.

The temperature sensor is connected as per the picture below.


With the flat part on top, from the left: +Vs, Vout, GND




Display on serial monitor

Using the serial monitor ([Tool]-[Serial monitor]), also used in the article about the light sensor, to display the current temperature on the screen!

Looking at the program, besides the setup() and loop() functions, the modTemp() function also appears in the program. The process can be to some degree consolidated into functions.

Structure of Functions

[return value type] [function name]([parameters]){
〜define the processing here〜
return [value to return];


Process flow and results: Calling of function “testFunc” within “loop”, and returning the results of the processing by “testFunc” in “result01” and “result02” based on the parameters passed. Value in “result01” is 3 and “result02” is 7.

As the program gets longer, using functions will allow to consolidate the process, avoid the code repetitions, and make the change needed directly in the functions. So, let’s try to use functions when there is similar process to be carried out.

This is all we need to us the temperature sensor. Easy, right?

Installation on the Web server

Let’s install the temperature sensor on the Web server that we’ve built previously.




The parts in red are what has changed from the program previously used for the Web server. Using part A to get the actual analog value (previously used for “for” statement), and part B to define the function to convert the temperature value, it is possible to display the values from the two sensors.

Once you are ready with the program, try displaying it in your browser.


We are one step closer to our Stevenson screen!

Display of Arduino Data

After using Arduino, you may have realized that there are many methods for displaying data. You can use Arduino and display the data through parts such as LED, on a PC through serial monitors, via the Ethernet shield through a network, and etc. There are many display methods, but in this example, as we build the Stevenson screen, what would be an interesting way to display data obtained? After all the trouble to set up a Web server with an Ethernet shield, it would be interesting to be able to display the data on a smart phone.
Whether it is interesting or boring depends on the display method. Let’s try displaying the input values using an electrical component known as a 7-segment LED.

* There will be a detailed explanation on how to use a 7-segment LED next time.

Attempt to display the temperature sensor value on 7-segment LED

When operating Arduino using power adapters, you cannot see the serial monitor. For those who want to see the sensor values immediately, try setting up a 7-segment LED. It can display the analog input value as a numerical value.


7-segment LED

Testing a 7-segment LED using a test count-up program

How to use a 7-segment LED

Let’s try using the 7-segment LED to display the value of the temperature sensor. Trying to use the 7-segment LED as it is led to the value inside the circuit overflowing, making the Arduino into something like a bomb 🙂

Displaying the value of the temperature sensor using a 7-segment LED


Final installation of temperature sensor and optical sensor

After installing the temperature sensor and the light sensor, the setup looks more complete. In the next article, we will be installing another sensor, and then we will be having a look at the case that will house the Arduino.