Make a Stevenson Screen with Arduino Part 3 – Mastering the Humidity Sensor & Using Battery

Make a Stevenson Screen with Arduino Part 3 – Mastering the Humidity Sensor & Using Battery

Stevenson screen with Arduino

Stevenson screen with Arduino

We’ve arrived at part 3 of our series on how to make a Stevenson screen with Arduino. We’ve become quite comfortable using Arduino. Last time, we learned how to use 7-segment LED to display values. Today, we will implement the humidity sensor, one of the primary function of the Stevenson screen. We will also simplify the cabling of Arduino to make the Stevenson screen easier to use.

Today’s Electronics Recipe

Expected time to complete: 60 minutes
Parts needed:

Reviewing the Specifications

Before we begin our work, let us review once again the specifications of the Stevenson screen that we are trying to build.

Arduino Specifications for our Stevenson screen

The features we’d like to implement for our Stevenson screen (Specification sheet):

  1. The measured values should always be accessible from the PC over the Internet
    → Connect the Stevenson screen to a LAN cable using components such as the Ethernet module
  2. It should operate without being connected to a PC to easily be moved
    → Change the power supply method of Arduino from USB to a DC adapter or batteries
  3. The number of cables connected to the Stevenson screen should be minimized (none, if possible)
    → Go cable-free by not using a DC adapter (solution mentioned above), and by using Wi-Fi instead of a LAN cable
  4. The measured values should not only be accessible on the PC, but also on the Stevenson screen itself
    → Add a display to show the measurements on the case itself
  5. It should be compact
    → We could solder parts onto the base instead of using a breadboard and/or use a smaller Arduino

According to the plan, we are working towards implementing the above features in the Stevenson screen. The humidity sensor is a basic feature that hardly needs to be mentioned explicitly on such a list. For items 2 and 3, we can take care of them this time with an AC adapter or batteries.

Trying out the Humidity Sensor

Stevenson screen humidity sensor Arduino

A staple among humidity sensors, the TDK CHS-UGR

Let’s start by learning how to use the humidity sensor. Since the humidity sensor we have selected is very easy to use, not much knowledge is necessary.

We will be using the humidity sensor CHS-UGR, which display 100% RH with a DC.1V output. To put it simply, if we set the humidity sensor as an analog input, 0V = if the analog input on the Arduino is 0, the humidity is 0%, and 1.0V = if the analog input on the Arduino is 205, the humidity is 100%. We will build a circuit based on this specification.

Arduino stevenson screen humidity sensor

The humidity sensor is larger than the parts we have been using until now

Arduino Stevenson screen humidity sensor

You can see that both the breadboard circuit and the program are simple.

In the above program, the analog input is basically read in the same way as the temperature sensor. The value is converted based on the specifications of the humidity sensor, allowing us to measure the humidity data. The humidity sensor will input analog values from 0–205 (all higher values are set to 100%), so we create a function that applies to the part written in red.

Arduino

If you run Arduino, the serial monitor should show something similar to what is displayed below. By placing your hand close to the sensor or breathing on it, you should be able to verify that it detects the humidity and the values will change accordingly.

Displaying Both Temperature and Humidity

Now that we know how to use both the temperature and humidity sensors, we will place both sensors on the breadboard and get both values.

Arduino Stevenson screen temperature sensor humidity sensor

We are able to get the data from the temperature sensor with analog pin #0, and from the humidity sensor with pin #1.

Now, let’s start using the 7-seg LED from last time and display the temperature and humidity in sequence.

Arduino Stevenson screen temperature sensor humidity sensor 7seg led

In this program, we are basically sending analog values to the 7-seg LED display program we created previously. But since we also want to display both temperature and humidity in sequence, we use _switchFlg as a flag which switches between true/false in a set interval, in order to alternate _number between temperature and humidity. This time, we increment _cnt at the end of the loop function every delay(10) = 0.01 seconds, and when _cnt reaches 100, we reset _cnt to 0 and switch the value of _switchFlg, therefore the alternation occurs every 0.01sec×100=1 second.

Powering Arduino with a Different Power Source

We’re finally at the point where the functionality of the Stevenson screen is complete. Let’s operate Arduino with a different power source. Until now, we have been using Arduino by connecting it to a PC with a USB cable. But as we discussed, the programs are already stored on Arduino, so it is operational as long as we can secure a power source.

How much power do we actually need for Arduino? On the specification for Arduino UNO that we have been using, the minimum operational voltage is 5V, and the standard voltage is 7–12V. Today, we’ll attempt to use an AC adapter and a 9V battery as power sources for Arduino.

Powering Arduino with an AC Adapter

To use Arduino with an AC adapter, simply plug in the adapter to the adapter port on Arduino.

Arduino with AC adapter

Powering Arduino with a 9V Battery

To use Arduino with a 9V battery, you can connect it just like the AC adapter as long as the battery box is compatible with the Arduino port. However, if it is wired, you can power it by connecting the + side to Arduino’s Vin port and connecting the – side to GND.

Arduino with 9v battery

By comparing it to a cell battery, we can really see how small Arduino is.

Now, let us review the specifications:

  1. The measured values should always be accessible from the PC over the Internet
  2. It should operate without being connected to a PC to easily be moved
  3. The number of cables connected to the Stevenson screen should be minimized (none, if possible)
  4. The measured values should not only be accessible on the PC, but also on the
  5. Stevenson screen itself
  6. It should be compact

We have implemented most of the features we established at the beginning. There happened to be a stand clip for smartphones by my side, so I’ve made a rudimentary setup.

Arduino Stevenson screen

Wow, the circuit board looks cool here when it’s shown like that.

But it looks like the wiring can come off easily, and it’s connected by wire to Arduino base… It will certainly fall apart with a little bump! (Laughs)

This is definitely far from being complete. Next time, I’d like to build on what’s been done so far, and complete our Stevenson screen, and include an external case!