Wall's Corners Wall's Corners Author
Title: Make a Stevenson Screen with Arduino Part 4 – Project Completion with Case Building and Soldering
Author: Wall's Corners
Rating 5 of 5 Des:
The is the last part of our series on how to make a Stevenson screen with Arduino. We’ve completed the basic assembly. Now, all that’s left ...

The is the last part of our series on how to make a Stevenson screen with Arduino. We’ve completed the basic assembly. Now, all that’s left to do is to make the outside look cool. This time, I’ll create a case, and I’ll try my hand at soldering.

*Those who don’t wish to solder can keep their circuit on the breadboard and make a case around that.

Today’s Electronics Recipe

Estimated time to complete: 120 minutes

Parts needed:

Thinking About What Kind of Case We Can Make

When I came to make my Arduino case, I checked what kind of methods were out there. When I did a quick Internet search for “Arduino case” I found many different sort of cases. Some people use plastic cases from one dollar shop, others design their own professional cases through 3D printing or processing acrylics, yet others use candy tins to make their cases. Everyone creates their own case in their individual way.

After researching various ways to make a case, I took inspiration from the nanoblock case made in the Raspberry Pi Beginner’s Guide by a Geek Girl series, and decided to make my Stevenson screen case from nanoblocks too!

Nanoblock

Nanoblocks are incredibly small. In fact, at only 4x4mm, they are the smallest blocks in the world. This means they should be pretty versatile for making a case, and if I don’t like what I’ve made I can simply take it apart and rebuild it. So this time, I’m going to try making my case with nanoblocks.
To make the case, I’m using a nanoblock basic set that contains a lot of basic blocks.

Starting Building the Case

Okay, time to start building the case. I say “building”, but really I’m just choosing blocks as I wish and enclosing the Arduino.

Arduino Stevenson Screen Case

I enclose the Arduino in nanoblocks.

When an Arduino is in use for long periods of time, it is highly likely to heat up due to the circuit. Therefore, it is important to create a case that has ventilation to ensure the Arduino will be okay even if it heats up.

Arduino Stevenson Screen Case

I’ve made gaps for ventilation on the sides, so the Arduino will be okay if it heats up.

Making the Stevenson Screen Electric Circuit into an Arduino Shield

As we’re making a case, I will try soldering the circuit we made previously to an Arduino universal board, as a shield for the Arduino, so that it can be easily dismantled. With this, the circuit we previously mounted to a breadboard will be more compact!

(Of course, if you don’t have a soldering iron, or if it seems too difficult, you can just keep the circuit mounted on the breadboard and build a case around that.)

Universal Circuit Board

My Arduino universal circuit board. It fits just nicely on top of my Arduino.

Universal Circuit Board and Arduino

Here it is next to my Arduino.

Placing the parts on the universal circuit board

Taking into consideration all the different parts I’d need to attach to the circuit board, I decided on where everything would go and set about wiring and soldering.
This time I used a 3-digit 7-segment LED display.

*You can download the data sheet for the 3-digit 7-segment LED I used from this page http://ift.tt/1S47yh0

Circuit board with humidity sensor and 7seg LED

I think about where the parts will go.

Arduino Case Parts

If you want to connect it with Arduino, you can use these kind of header pin.

Arduino with the universal circuit in the case

I put the universal circuit board on the top of the Arduino.

Try Soldering

Before soldering the components to the circuit board, I tested my circuit and program to make sure they worked (and to test out the breadboard.) Once you’ve soldered all the parts it takes a lot of effort to correct the circuitry if you make a mistake. So from here on in I preceded with a lot of care.

Arduino soldering

Arduino soldering

I assembled the circuit on the breadboard and checked it again to make sure it was running properly.

It ran on the breadboard without any issues. So, it was finally time to solder it to the circuit board. If you search online for “soldering” or “soldering hints”, you can find detailed instructions. It would pay to have a look at these before you begin.

Arduino soldering

The preparation is complete; it’s soldering time!

Arduino soldering

Laboring over the wiring, I managed to complete the soldering.

I didn’t place the parts in very good positions, so the wiring on the back of the circuit board is a bit messy. But nevertheless, it’s complete so I’ll attach it to the Arduino.

Arduino universal circuit board humidity sensor 7seg LED

I attatched it to the Arduino.

Let’s complete it!

Once you’ve finished soldering, you can now complete the case. But saying that, all that’s left is to assemble the blocks! Because the nanoblocks are tiny you can make intricate adjustments, but their small size also means that it takes a while to build a case with them.

I steadily piled the nanoblocks up… and the case is finally completed!

Arduino stevenson screen

My Stevenson screen is complete!

Up until now, the circuit board was always uncovered so I’m excited that the case is complete now!

Arduino stevenson screen

The uncovered version from last time.

Because the case is complete, I’ll upload a program right away. Because this time, I’m using a 3-digit 7-segment LED, I’ll have to modify a little the program  we made.

Code-Example
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
//
// Stevenson screen program
//
#include <avr/sleep.h>
int _cnt = 0;
float _number = 0;
int _viewFlg = 0; // Flag to change the digit
boolean _switchFlg = false; //Flag to change the temperature and humidity
int temperaturePin = A0; // select the input pin for the potentiometer
int humidityPin = A1; // select the input pin for the potentiometer
float temperatureValue = 0; // variable to store the value coming from the sensor
float humidityValue = 1; // variable to store the value coming from the sensor
void setup(){
Serial.begin(9600);
//pin numbers 2~8 set to digital output
for (int i=2; i<=8; i++){
pinMode(i,OUTPUT);
}
pinMode(9,OUTPUT); //dot
pinMode(11,OUTPUT); //1st digit
pinMode(12,OUTPUT); //2nd digit
pinMode(13,OUTPUT); //3rd digit
}
//define the LED layout
boolean Num_Array[10][7]={
{1,1,1,1,1,1,0}, //0
{0,1,1,0,0,0,0}, //1
{1,1,0,1,1,0,1}, //2
{1,1,1,1,0,0,1}, //3
{0,1,1,0,0,1,1}, //4
{1,0,1,1,0,1,1}, //5
{1,0,1,1,1,1,1}, //6
{1,1,1,0,0,1,0}, //7
{1,1,1,1,1,1,1}, //8
{1,1,1,1,0,1,1} //9
};
//Define the LED display function
void NumPrint(int Number){
for (int w=0; w<=7; w++){
digitalWrite(w+2,-Num_Array[Number][w]);
}
}
//Breakdown each digit into individual digits.
int NumParse(float Number,int s){
Serial.print("number:");
Serial.println(Number);
if(s == 1){
return int(Number) % 10;
}
else if(s == 2){
return int(Number / 10);
}
//Discriminate minuses by after the decimal point.
else if(s == -1){
return int((Number -int(Number))*10);
}
return 0;
}
void loop(){
if(_viewFlg == 0){
digitalWrite(11,HIGH);
digitalWrite(12,HIGH);
digitalWrite(13,LOW);
NumPrint(NumParse(_number,2));
//Switch off the dots
digitalWrite(9,LOW);
}
else if(_viewFlg == 1){
digitalWrite(11,LOW);
digitalWrite(12,HIGH);
digitalWrite(13,HIGH);
NumPrint(NumParse(_number,1));
//Display the dots
digitalWrite(9,HIGH);
} else if(_viewFlg == 2){
digitalWrite(11,HIGH);
digitalWrite(12,LOW);
digitalWrite(13,HIGH);
NumPrint(NumParse(_number,-1));
//Switch off the dots
digitalWrite(9,LOW);
}
_viewFlg++;
if(_viewFlg == 3){
_viewFlg = 0;
}
if(_cnt &>= 300){ 
_cnt = 0;
Serial.print("NUMBER:");
Serial.println(_number);
if(_switchFlg == true){
temperatureValue = analogRead(temperaturePin);
_number = toTemperature(temperatureValue);
Serial.print("temperature:");
Serial.println(_number);
_switchFlg = false;
}
else{
humidityValue = analogRead(humidityPin);
_number = toHumidity(humidityValue);
Serial.print("humidity:");
Serial.println(_number);
_switchFlg = true;
}
}
_cnt++;
delay(20);
}
//Change the analog input values to degrees Celsius
float toTemperature(int analog_val){
float v = 5; // Reference voltage level( V )
float tempC = ((v * analog_val) / 1024) * 100;
return tempC;
}
//Change analog input values to humidity
float toHumidity(int analog_val){
float v = 5; // Reference voltage( V )
float tempC = (analog_val / (1024/v)) * 100;
return tempC;
}

*Based on the data sheet I modified the program on a three digit display because the program handles decimal points.

 

You can power the Arduino with an AC adapter, or create a battery box. Then, put it next to your desk or on a windowsill and “install” your newly completed Stevenson screen into your daily life!

In the next article, I want to use my electric kit to work with something all men love – motors!

Share This:

View more at: http://yoursmart.mobi

About Author

Advertisement

Post a Comment

 
Top