Final Project

The idea of the final project is to integrate all what we have learned during this course. For this we are required to make a small weather station with a display and inclosed in a casing or a box.

System components

-Microcontroller or microcontolled board for example SatshaKit.

Mountain View

-DHT11 Humidity and Temperature Sensor.

Mountain View

-BMP180 Barometric Pressure Sensor.

Mountain View

-LCD Display 12864B.

Mountain View

-Switch R13-66A3-02.

Mountain View

-9V Battery .

Mountain View

-Box.

Making the box

I started by making the box after taking the measurments of all the system components.

I decided to go with the dimensions of 8*10*6 cm.
My idea is to make a box of acrylic cut using the laser cutter with 3D printed corners.
This is how the rough sketch of the box looks like I am using Draftsight. And I will be using 5mm acrylic which I know its cutting settings and kerf very well.
I also used the same commands as I always do, They are already mentioned here.
Mountain View
I added an opening for the switch on one of the sides.
Mountain View

I also added an opening for the lcd screen.

Mountain View

For the corners I plan to draw them in Draftsight and then import them to FreeCad as I did before in the 3D design and printing project. This is how they look.

Mountain View
Mountain View
I extruded them like this: the 90 degrees one is 6 cm and the other one is 7 cm.
Mountain View
I placed them correctly and joined them into one part.
Mountain View
I made four copies so I can print them all together at the same time.
Mountain View

I used Cura to slice the model

Mountain View

Here are the settings for Cura:

Layer height 0.15 --> As very high quality is not critical for this.

Wall thickness 1

Top/Bottom thickness 1

Infill denisty 25%

Print speed 70

Travel speed 150

Support placement Touching build plate

Support Pattern Grid

Support Denisty 25% --> I could have gone with less than this but since it was too little supports it didn't make much of a difference in printing time.

Support Z Distance 0.3

Support X/Y Distance 1

Build Plate Adhesion Type Brim

Brim Width 5

Mountain View

Here are the settings for the laser cutter:

Power 100

Frequency 100

Speed 5

Mountain View
Mountain View

This is how all the parts of the box look like.

Mountain View

This is how it looks after assembly. Because of the accurate kerf it was perfectly fitting so I did not have to use any glue to hold the parts together.

Mountain View

Electronics

Microcontroller:

I will be using my version of SatshaKit which is similar to Arduino Uno in performance as a brain for this project.


Display:

Display 12864B V2.0.

-Here is the pinout for it.

Mountain View

-Here is a test code

-Here are some more information

Here is the output:

Mountain View

Sensors:

Temperature and humidity sensor: DHT11

-The DHT11 has three lines: GND, +5V and a single data line. For example in the picture shown GND should be connected to the right most pin, the signal line should be connected to the left most pin and the +5v should be connected to the middle one.

Mountain View

-Here is the test code

-And here are all the information about the sensor you could possibly need

Here is the output:

Mountain View

After blowing the sensor:

Mountain View


Barometric Pressure sensor: SparkFun BMP180

-This is how to connect it

Mountain View

-Here is the test code

-And here are all the information about the sensor you could possibly need

Here is the output:

Mountain View

Power:

Thanks to the voltage regulator circuit on the board I can connect it directly to 9v battery.


Programming

I will be using Arduino IDE to develop the code for this project.

How to programm SatshaKit?

I started by trying to test each of the system components using a single sketch for each and then integrating all of them into one final code.

throughout this project we will need to add a lot of libraries so I figured it would be better to explain it once rather thank doing it for each library.


Adding libraries

This is how to do it for example for the DHT11 Sensor

-First step is to download the .zip file of the library.

-Second step Open the Arduino IDE go to sketch, Include library and then click add .zip.

Mountain View

-Final step Go to where you downloaded the file choose it and click Open.

Mountain View

Integrating the code

While integrating the code I noticed the issue that the display can only display characters so all of the sensors output which are double values should be changed to a string and this string should be saved in a character array to be displayed by the LCD.

From double to string

I found a function on the internet to make this conversion and this is the code.

Mountain View

String to characters

There is a function already existing in Arduino to do this all you need to do is to define a character array to store the characters in as a buffer until they are displayed.


One other issue is that I was getting false values for both pressure and altitude.

Negative pressure

This is because the pressure output of the sensor was in millibar this value is too large to be stored in a character array element so the easiest solution was to divide this value by 1000 and display the pressure in bars instead of millibars.

False altitude

I was getting unstable readings for the altitude in meters once I changed to feet by multiplying 3.28084 I got more stable values probably this is because the other values were too small.


Final Product

Here is how the system looks before putting it inside the box.

Mountain View

And here is everything.

Mountain View
Mountain View
Mountain View
Mountain View
Mountain View

Here is a video of the station working:


Downloads

Box Files
Example Test Codes
Libraries
DoubleToString
Final Code

License

-----.