FINAL PROJECT

List of Contents:




Introduction

So, here we are! The most exciting moment where I have to apply all the knowledge gained from this course, and create something that will BLOW YOUR MIND, in a good way of course, because this is going to be the BEST thing which I ever made by myself! The task for the final project will be to create a Weather Forecast Station, and include all the topics covered during previous weeks.

I decided to structure my documentation in a way that it will be clear which topics I covered while implementing my project, and all step by step precedures related to that topic. As you can see, I placed the List of Contents and attached a link to each topic, in order to make it easier to navigate throw the whole page.

The Weather Forecast Station will be able to measure the Pressure, Humidity, and Temperature of the environment, and will output the information on a LCD Display. In this project I will try to integrate at least one element from each topic I have learned, and I will start with the available list of materials and components that were provided:




Materials & Components

Here you can find the table of all the components used in this project, the datasheets of each of them, the links with the useful information, and the estimated costs:

Component Name Tutorial DataSheet Cost
ATMega328P PinOut Atmel $4.30
BMP180 Barometric Pressure Sensor Wiring BMP180 $9.95
DHT11 Humidity & Temperature Sensor Arduino Connect DHT11 $5.00
Graphic LCD 12864B Arduino Serial Manual $17.00
TS2940 3.3V Voltage Regulator Package: TO-220-3 DataSheet $1.3
LM7805 5V Voltage Regulator Package: 78XXS DataSheet $0.6
Switch R13-66A3-02 Package: 1X03 DataSheet $1.20
9V Battery Package: 1X02 + connector $5

The overall cost of the components ~ $45




Electronics design & production

I will create the PCB based on the already existing model called Satshakit. It is an arduino UNO replication board, which I will modify according to my needs. In order to make the future wiring of all the components easier, I decided to place all the needed pins for one sensor next to each other, and have an organized connection.

First thing I have to do is design the board. I will be using   . This is not the best tool, but it is an open sources software, which fits perfectly for my needs.

Step 1:

In order to place all the components mentioned above, I have to download the libraries from HERE. After I have downloaded all the files, in the EAGLE menu on the top I click Libraries, then Open, and choose the path to my library files which I just downloaded.

Step 2:

Now when I have all the libraries I need, I can start adding the components on the main page. In the EAGLE left menu I click on Add, and then choose the component which I want to add, in my case I will start with the pinheader1X2, which means one block of two pins.


I repeat the same process with all the components which I am planning to use. When I have all of them, I have to connect each pinheader to the pins of the microprocessor. In the EAGLE left menu, I click on Net, command which allows me to draw green lines and connect the pins. Important thing is to start the connection from the little line on the pin (I marked it on the picture)



As you can see, the name of the group by default is JP1. In order to change the name I press right click on the little cross (next to #2 circle), all the components have this little cross, and choose name, after what I name it in the way I want, in my case I will call it BATERRY. Now, I have the pins, I have the connection lines, I just have to connect it to the pins of the microprocessor. In order not to have long lines of connections, I use Labels for which I can assign the name of the microprocessor pin. This saves a lot of space, and keeps things organized and easy to manage.

In EAGLE left menu, I press Label and add it to the end of my connection line. If I press the right click and then choose name, I can attribute to the label the same name which I used for the microprocessor pin, and connect them in this way! If I did everything right, a message should appear that states:Are you sure you want to connect your label (N$10) with GND?



Step 3:

I repeated the same process with the rest of the components. Remember that this is only the first stage. For now, it is important the Logic of the connections, not the way it looks. After I managed to connect all the things together, this is how the final satshakit + my modifications looks like:



I will repeat mysel that on the first page of the EAGLE it is important to have the right Logic of all the connections. The thing which I added first is a voltage regulator with an input from the 9V Battery, and two outputs: 5V and 3.3V. I also placed two 10 microfarad capacitors in order to assure the stability of the voltage regulator.



As I mentioned before, I want to place all the necessary pins of the sensors next to each other, to make an organized and easy wiring. I placed some pin headers for the DHT11 sensor, BMP180 pressure sensor, and the potentiometer , and connected them to the corresponding pins on the microprocessor using some labels. I am not sure if I want to use the potentiometer to regulate the contrast of the LCD Display, but I decided to place the pins anyway just in case.


I also added some additional pins for 3.3V and 5V power supply, and some additional GND pins, in order to have my board ready for any new crazy ideas that may come to my mind :D





And the last but not least, I added all the necessary pins for the Graphic LCD Display. This thing takes a lot of pins, and If I do not think of organizing the wires, it will make a big mess in the whole system. The LCD uses 3xGND pins, 3xDigital pins, 2xVCC pins, and V0 pin for the contrast regulation.







Step 4:

After I double check all the connections, I can proceed to the next step. On the top EAGLE menu, I press Generate/Switch to Board button. And this is what I get, a BIG MESS of connections.


You know, usually I do not like to complain, but this was the WORST shit that I have ever done. It seems like an endless game, a maze in which you are trapped. While I was trying to make the traces, and to organize things, so many times I finished all the connections, except one... And because of that one connection, I had to change and reorganize everything that I did so far.

But the good thing is, that after 7 fuckin' hours of hell, I finally made it! Easy :D

My final design looks like this:


Step 5:

The next step is to export the final design into a (.png) image! On the top of this page, I press File, then Export and choose Image. In the appearing window I choose the directory where to save the file, and make some little changes. I click on Monochrome, and add resolution to the image to increase the quality, (1500 dpi) is enough.


Step 6:

After I have the image ready, I have to prepare it for the Roland MDX-40A machine, which is available here in FabLab Ka-Li. To edit the picture, I will be using   GIMP, a very nice software to work with pictures! I open my image in GIMP, and using the rectangular select tool, I select the image leaving some space from all the sides. After I press File and Copy the selected area.


To continue working with the selected picture, I click on File, and Create from the Clipboard:


On the appearing window, I see the image which is ready to be printed. I save this image which will be the inside cut. To print the outside cut, I select the image again using the rectangle tool, and on the main page, in the Select menu, I press rounded rectangle. Because the copper material on which it will be printed is sharp, I make some fillet to round the corners, and in my opinion it looks way better :p.


In the Edit menu, I choose to fill the inside of the selected area with BG color.


This is the result which I save as the outside cut. When I have both, the inside and the outside cut images, I can proceed to the next step by setting up the CNC milling machine.

Step 7:

Today I realized the beauty of a good Documentation. The whole process which I have to go through, I just read from the previous weeks assigment, and because I have a step by step instructions of what I did, it was very easy now to set the configurations for the machine.

So, again I used FabModules to convert the .PNG files into Gcodes for the Roland machine. I check that I am connected to the FabLab Wi-Fi network, open the browser, and go to the following adress:

192.168.1.126:12345

Before using the Fab Modules, I had to be sure that the machine is connected to the Fab Modules computer near the MDX-40A

Let’s start to work with the Fab Modules. When I introduce the ip adress into the browser window, the first interface that will appear is:


After I press on th gray button input format, a new menu should appear with the option to load the .PNG image. Here I upload the first image, which is the inside engraving. After doing that, the preview of the image will appear in the Fab Modules and also other fields and other parameters will show up.

Now you have to choose the output format, that will be the Roland mill (.rml) file. And finally as process I choose PCB traces (1/64). Is possible to use exactly the same process for making the outline cut of the board and making the holes.

Now let's set the parameters for the Roland machine. On the right side of the window, we have many input parameters. In order to be able to move the machine, we have to input the following parameters:


    mod_lp.py /dev/usb/lp0     into the send command field


    hostname_of_your_machine     into the server field (just the address without http or /)

In order to move the machine I just enter in the respective fields the x, y and z position coordinates. Before moving the machine I have to make sure that the zjog parameter is always set to 0, even if it will change automatically. To move the machine I have to press the move to xyz0 button.

The hard thing to do was to adjust the x0 y0 z0 for the machine, took me a while :) After I found the right coordinates, I had to make sure that the tool is actually touching the copper surface. A small life hack is to use the multimeter and check if there is connection between the tool and the surface. As a tool to engrave PCB is suggested to use diameter from 0.2 mm and below, while for cutting we can use a 1 mm tool.

So my final settings look like this:


After I double check all the settings, I press the calculate button. This is what I get:


On this picture we can see all the paths and the jumps that the machine will do. Now I am ready to send the job to the MDX-40A by pressing the send button.

For the outside cut the settings remain the same with the exception of the value of the Z-Axis, as I replaced the 0.2mm tool with the 1mm tool, and the parameters of the CAM.

Because this board was much bigger then the Hello Board, the first job, the inside engraving, took about 2h, but the result was really good, except one small detail.


Problem

Analyzing the draft circuit, I noticed that one corner of the circuit is not well done, and I think this is due to the fact that the plate was not equally flat. I decided to continue with the outside cut, and then fix the problem by hand.






















Step 8:

After everything was fixed, It's time to solder! The most difficult part, and the most important one was to solder the microprocessor. The problem was that the traces are so small, that I was soldering two traces at the same time, after which I had to separate them. In order to make sure that I soldered everything in a right way, after each component soldered, I used the multimeter to check if there is conductivity between the component and the traces. Honestly saying, the begining was hell, but after 2 hours, I really liked soldering :)

My PCB with all the components on it looks like this:


And Here We Are!

Files:

EAGLE schematics (.sch)

EAGLE board (.brd)

EAGLE libraries (.rar)

Inside Cut (.png)

Outside Cut (.png)



Wiring & Embedded programming


The next step is to Program It! Now I have only a board with some components on it, but let's give it LIFE. As I did it already before, the software wich I am using is   , an open source software which allows to program Arduino boards. And yes, in order to program a board we have to use another board; its like Egg / Chicken situation - what appeared first :D

I connect my arduino board to the USB hub, in the tools menu select the right board (Arduino Uno/Genuino) and the port, after go to File--> examples and open the Arduino as ISP sketch. Upload the code.


After I see done uploading, which means that the code is uploaded to the board, I disconnect the arduino from the PC. The next step is to connect my PCB board to Arduino using some wires. The connection scheme is this one:


The right connection is very important, otherwise it is possible to damage the board. That is why, after I triple check the connections, I can go on setting the parameters for the Arduino IDE. I connect the arduino board to the USB hub, and select the right board and port. Under tools select Arduino as ISP programmer, double check the parameters, and press the Burn Bootloader button.


























After everything is done, we can upload any code to our PCB board. Because this board is the same as Arduino UNO, I can program it directly without using an external board. For this, I use a TTL cable with the following connection:


The simples code to upload and check if the board is working would be the Blink example, but because while designing the board I deleted one LED, I cannot make it blink. So I decided to use serial. And here it is:


BMP180 Barometric Pressure Sensor

The BMP180 Breakout is a barometric pressure sensor with an I2C (“Wire”) interface and measures the absolute pressure of the air around itself. It also measures the temperature of the environment. In order to use it, I have to solder the pins on the sensor. We’ll connect four of the five pins on the board to the Arduino. The four pins I need are labeled +, -, CL, and DA.

IMPORTANT: Connect the power pins (+ and -) ONLY to a 3.3V supply. Larger voltages will permanently damage the part.

I connected the sensor using the following schematics:


Once I have the BMP180 connected to my board, I am ready to play with the software.

First thing to do is download the library from HERE. Now open the Arduino IDE, and from the menu, choose Sketch / Include library / Add .ZIP Library. A file requester will open. Navigate to the “BMP180_Breakout_Arduino_Library-master.zip” file I just downloaded, and click the “Open” button. The library will be installed and ready to use.






















When the example opens, I have to upload it to the board (remember to select the correct board type and serial port), and open the Serial Monitor to 9600 baud. The readings that I get in my terminal look something like this:



DHT11 Humidity Sensor

The DHT11 is a relatively cheap sensor for measuring temperature and humidity. The sensor has three lines: GND, +5V and a single data line. I connected the sensor using the following schematics:

Before we can use the DHT11 on the board, we need to install the DHTLib library, which contains all of the functions we will need to get the humidity and temperature readings from the sensor. I downloaded the library HERE.

Following the same process as with the previous sensor, go to Sketch>Include Library>Add Library and select the DHTLib.zip file. After the library is installed, I upload this example program to my board, and open the serial monitor. I should see the humidity and temperature readings displayed at one second intervals:

 #include dht.h

dht DHT;

#define DHT11_PIN 7

void setup(){
  Serial.begin(9600);
}

void loop()
{
  int chk = DHT.read11(DHT11_PIN);
  Serial.print("Temperature = ");
  Serial.println(DHT.temperature);
  Serial.print("Humidity = ");
  Serial.println(DHT.humidity);
  delay(1000);
}
 


Graphic LCD Display

The LCD display was the most complex component to deal with. I had to find a way to connect the 128×64 screen by serial connection, this alows using only 3 Digital Pins on the board which is awesome because I may need the rest of the pins for other stuff, and it does not create a mess of wires.

This Is my LCDs Pinout and how I connected everything:




















After I connect the LCD, It's time to programm it!

First of all, I have to download the U8glib library from HERE. Another important thing is the declared pins used in the code. The one I used are the following:

U8GLIB_ST7920_128X64 u8g(13, 11, 12, U8G_PIN_NONE);

Using the "HELLO WORLD" library example, I came up with this test code:


#include "U8glib.h"

U8GLIB_ST7920_128X64 u8g(13, 11, 12, U8G_PIN_NONE);

void draw(void) {
// graphic commands to redraw the complete screen should be placed here
u8g.setFont(u8g_font_04b_03b);
//u8g.setFont(u8g_font_osb21);
u8g.drawStr( 0, 22, "Aqua Control V2");
}

void setup(void) {
// assign default color value
if ( u8g.getMode() == U8G_MODE_R3G3B2 )
u8g.setColorIndex(255); // white
else if ( u8g.getMode() == U8G_MODE_GRAY2BIT )
u8g.setColorIndex(3); // max intensity
else if ( u8g.getMode() == U8G_MODE_BW )
u8g.setColorIndex(1); // pixel on
}

void loop(void) {
// picture loop
u8g.firstPage();
do {
draw();
} while( u8g.nextPage() );

// rebuild the picture after some delay
delay(500);
}

And this is what I get:



Integrating everything together

Now the Pain Starts!. Its a little bit tricky to combine things together because separately they work fine, but when combined there is always an error. After I combined the code for the sensors, and displayed the data on the Serial Monitor, I had to integrate everything with the display.

One cool idea that came to my mind was to display the FabLab logo for some seconds, all the time when the display is powered. I spent quite a lot of time on doing this, but I finally did it! In order to display it on the Graphic LCD, I had to have a (.bmp) format picture, and display it as a bitmap.

First thing which I did was download the FabLab logo from the internet as a (.png) file, and reduce it significantly in size, so it fits my small LCD borders. I used the following online service to do that: LINK

These are the configurations I used:


The next step is to convert my small picture into (.bmp) format. I used the following online service to do that: LINK

Now, after I have my (.bmp) file, in order to place it into my Arduino code, I have to convert it into HEX array. I used a nice tool called LCD Assistant. To load up an image in LCD Assistant, go to File > Load Image. A preview of the image should open up, make sure it’s the right size – 128 pixels wide, 64 pixels tall. Also make sure the Byte orientation is set to Horizontal and the Size endianness is set to Little. These are the configurations for my LCD Display:


Then I go to File > Save output to generate a temporary text file. Open that text file to have a look at my shiny new array.

Now Let's put things together!

I came up with my final Arduino code, which when powered, uploads the FabLab logo for a couple of seconds, receives the data from both sensors, and displays the information on the Graphic LCD Display. My Final Code:


#include "dht.h"
#include "U8glib.h"
#include "SFE_BMP180.h"
#include "Wire.h"

#define DHT11_PIN 9     // what digital pin we're connected to

dht DHT;
SFE_BMP180 pressure;

U8GLIB_ST7920_128X64 u8g(13, 11, 12, U8G_PIN_NONE);

const unsigned char logo [] PROGMEM = {
0xFF, 0xFF, 0xFF, 0xFE, 0x7F, 0xFF, 0xFF, 0xFF, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0xFF, 0xFF, 0xFF, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0xFF, 0xFF, 0xF8, 0x00, 0x00, 0x1F, 0xFF, 0xFF, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0xFF, 0xFF, 0xC0, 0x00, 0x00, 0x03, 0xFF, 0xFF, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0xFF, 0xFF, 0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0xFF, 0xFE, 0x00, 0x03, 0xC0, 0x00, 0x7F, 0xFF, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0xFF, 0xF8, 0x00, 0x07, 0xE0, 0x00, 0x3F, 0xFF, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0xFF, 0xF0, 0x00, 0x1F, 0xF8, 0x00, 0x0F, 0xFF, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0xFF, 0xE0, 0x00, 0x3F, 0xFE, 0x00, 0x07, 0xFF, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0xFF, 0xC0, 0x00, 0x18, 0x1F, 0x00, 0x03, 0xFF, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0xFF, 0x80, 0x00, 0x00, 0x03, 0xC0, 0x01, 0xFF, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0xFF, 0x00, 0x00, 0x00, 0x00, 0xF0, 0x00, 0xFF, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0xFE, 0x00, 0x00, 0x00, 0x00, 0x7C, 0x00, 0x7F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0xFC, 0x00, 0x00, 0x00, 0x00, 0x3E, 0x00, 0x7F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0xFC, 0x03, 0x80, 0x00, 0x00, 0x3F, 0x80, 0x3F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0xF8, 0x07, 0xE0, 0x00, 0x00, 0x1F, 0xE0, 0x1F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0xFC, 0x1F, 0xF0, 0x00, 0x00, 0x1F, 0xF0, 0x1F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0xF0, 0x3F, 0xF0, 0x00, 0x00, 0x1F, 0xFC, 0x0F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0xF0, 0xFF, 0xF0, 0x00, 0x00, 0x1F, 0xFF, 0x0F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0xE0, 0xFF, 0xF0, 0x00, 0x00, 0x3F, 0xFF, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0xE0, 0xFF, 0xF0, 0x00, 0x00, 0x3F, 0xFF, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0xC0, 0xFF, 0xF8, 0x00, 0x00, 0x7F, 0xFF, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0xC0, 0xFF, 0xFC, 0x00, 0x00, 0xFF, 0xFF, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0xC0, 0xFF, 0xFF, 0x00, 0x01, 0xFF, 0xFF, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x80, 0xFF, 0xFF, 0xC0, 0x07, 0xFF, 0xFF, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x80, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x80, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x80, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x80, 0xFE, 0x1F, 0xFF, 0xFF, 0xF0, 0x3C, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x80, 0xF8, 0x03, 0xFF, 0xFF, 0xC0, 0x10, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x80, 0xF0, 0x01, 0xFF, 0xFF, 0x80, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0xF0, 0x00, 0xFF, 0xFF, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0xE0, 0x00, 0x7F, 0xFE, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x80, 0xE0, 0x00, 0x3F, 0xFC, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x80, 0xE0, 0x00, 0x1F, 0xFC, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x80, 0xE0, 0x00, 0x1F, 0xF8, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x80, 0xE0, 0x00, 0x0F, 0xF8, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x80, 0xE0, 0x00, 0x0F, 0xF0, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x80, 0xE0, 0x00, 0x0F, 0xF0, 0x00, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x80, 0xE0, 0x00, 0x07, 0xF0, 0x00, 0x07, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0xC0, 0xF0, 0x00, 0x07, 0xF0, 0x00, 0x07, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0xC0, 0xF0, 0x00, 0x07, 0xF0, 0x00, 0x0F, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0xC0, 0xF8, 0x00, 0x07, 0xF0, 0x00, 0x0F, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0xC0, 0xF8, 0x00, 0x07, 0xF0, 0x00, 0x1F, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0xE0, 0xFC, 0x00, 0x07, 0xF0, 0x00, 0x1F, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0xE0, 0xFE, 0x00, 0x0F, 0xF0, 0x00, 0x3F, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0xF0, 0x3E, 0x00, 0x0F, 0xF0, 0x00, 0x7C, 0x0F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0xF0, 0x1E, 0x00, 0x1F, 0xF8, 0x00, 0xF8, 0x0F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0xF8, 0x06, 0x00, 0x1F, 0xFC, 0x01, 0xE0, 0x1F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0xFC, 0x00, 0x00, 0x7F, 0xFF, 0x0F, 0x80, 0x3F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0xFC, 0x00, 0x00, 0x7F, 0xFF, 0xFF, 0x00, 0x3F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0xFE, 0x00, 0x00, 0x7F, 0xFF, 0xFC, 0x00, 0x7F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0xFF, 0x00, 0x00, 0x7F, 0xFF, 0xF0, 0x00, 0xFF, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0xFF, 0x80, 0x00, 0x7F, 0xFF, 0xC0, 0x01, 0xFF, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0xFF, 0xC0, 0x00, 0x7F, 0xFF, 0x80, 0x03, 0xFF, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0xFF, 0xE0, 0x00, 0x7F, 0xFE, 0x00, 0x07, 0xFF, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0xFF, 0xF0, 0x00, 0x1F, 0xF8, 0x00, 0x0F, 0xFF, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0xFF, 0xF8, 0x00, 0x0F, 0xF0, 0x00, 0x1F, 0xFF, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0xFF, 0xFC, 0x00, 0x03, 0xC0, 0x00, 0x3F, 0xFF, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0xFF, 0xFF, 0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0xFF, 0xFF, 0xC0, 0x00, 0x00, 0x03, 0xFF, 0xFF, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0xFF, 0xFF, 0xF0, 0x00, 0x00, 0x1F, 0xFF, 0xFF, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0xFF, 0xFF, 0xFE, 0x00, 0x00, 0x7F, 0xFF, 0xFF, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0xFF, 0xFF, 0xFF, 0xFD, 0x3F, 0xFF, 0xFF, 0xFF, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
};

bool first;
float hum =0.0;
double T=0.0;
double P =0.0;
void dht_test(float * humPerc);

void setup(void) {
  Serial.begin(9600);
  pressure.begin();
  first = true;
  // assign default color value
  if ( u8g.getMode() == U8G_MODE_R3G3B2 ) {
    u8g.setColorIndex(255);     // white
  }
  else if ( u8g.getMode() == U8G_MODE_GRAY2BIT ) {
    u8g.setColorIndex(3);         // max intensity
  }
  else if ( u8g.getMode() == U8G_MODE_BW ) {
    u8g.setColorIndex(1);         // pixel on
  }
  else if ( u8g.getMode() == U8G_MODE_HICOLOR ) {
    u8g.setHiColorByRGB(255,255,255);
  }
    // picture loop
  u8g.firstPage();  
  do {
    u8g.drawBitmapP( 32, 0, 16, 64, logo);
  } while( u8g.nextPage() );

  dht_test(&hum);
}
void HumMeter(float * humPerc, double *T, double *P) {
  u8g.setFont(u8g_font_fub11);
  u8g.setFontRefHeightExtendedText();
  u8g.setDefaultForegroundColor();
  u8g.setFontPosTop();
  u8g.drawStr( 4, 0, "Hum %");
  u8g.setPrintPos( 78, 0);
  u8g.print( *humPerc);
  u8g.drawStr( 4, 20, "Temp C");
  u8g.setPrintPos( 78, 20);
  u8g.print( *T); 
  u8g.drawStr( 4, 40, "Prs. mb");
  u8g.setPrintPos( 78, 40);
  u8g.print( *P); 
  
}

void loop(void) {

char status;

int chk = DHT.read11(DHT11_PIN);
hum = DHT.humidity;

status = pressure.startTemperature();
  if (status != 0)
  {
 delay(status);
  }

status = pressure.getTemperature(T);
if (status != 0)
{
      Serial.print("temperature: ");
      Serial.print(T,2);
      Serial.println(" deg C, ");
}      
    
      status = pressure.startPressure(3);
      if (status != 0)
      {
 delay(status);
      }

status = pressure.getPressure(P,T);
        if (status != 0)
        {
         
          Serial.print("absolute pressure: ");
          Serial.print(P,2);
          Serial.println(" mb, ");
        }

dht_test(&hum);
  if(first)
  {
    first = false;
  }
  else
  {
    u8g.firstPage();  
    do {
      HumMeter(&hum, &T, &P);
    } while( u8g.nextPage() );
  }
}
void dht_test(float * humPerc) {
  // Wait a few seconds between measurements.
  delay(1000);
}

And this is how it works:




Files:

Arduino Code (.rar)

FabLab Logo bitmap (.bmp)

FabLab Logo HEX array (.txt)




2D design & Laser cutting


As I mentioned before, I will make the top and the bottom faces of my box using the 2D techniques. And I will start with drawing the design.

To create a 2D graphic design, I will be using   which is a free CAD software. The design is pretty easy, it involves simple rectangles with fillets, some circles for the screws, and engraving. I decided not to place the step by step instruction how to design it, because it is really easy in my opinion. I also have a more detailed instruction on my webpage at 2D Design & Laser Cutting topic previous weeks.

In order to include some diversity and creativity in it, I will make the top face made of wood, and the bottom face made of acrylic. Acrylic will also give a brief image about the inside of the box.

This is how my design looks like:


Short video of the process:

And this is what I get at the end: A beautiful engraving:


For those who think that everything is too easy: Life is not rainbow and butterflies :D


Here you see how many times I tried to make a good cut, but because it was very hard to align the screw holes of the 3D printed frame with the holes of the 2D cover face, I had to do it manually and many times until I get the perfect match. This is the result: Waste of Material.



Files:

2D Design (.dwg)




3D Design & 3D Printing

I decided to use the 3D Printing technique to build the frame of the box for the Weather Forecast Station. The frame will cover the sides of the box, while the top and the bottom surface will be done using the laser cutter.

To create a 3D graphic design, I will be using   which is a free CAD software. Honestly, this is far not the best 3D software, but since it was the first one that I have ever used, I kind of got used to it:)

I visualized the frame as a rectangle, a little bit bigger than the dimensions of my LCD Display, with some rounded corners. Again, I want it to be Beautiful :p.

First thing to do is open the FreeCAD software, and go to Part menu. I started with drawing a simple cube with the following dimensions:100mm x 90mm x 40mm


I continued with selecting the top and the bottom sides of the rectangle using CTRL + select each side. Then using the Utility to apply thickness command, I use the following settings to get something like this:


This will be the frame of my future Weather Station. Because I want to place both faces on top and bottom of the frame, made of 2D design techniques, I decided to design also some holes for the screws. For this, I go to Draft menu, and draw some circles with the radius of 1.4mm. Because I will be using 3mm screws, I make the holes a little bit smaller, so the screw will fit tide.


After I repeat the same process for all the corners of the frame, this is how it looks:


Now, I have to remove th circles and create a hollow. I go to Part menu, and extrude the circles in the negative z direction. These are the settings I used:


After I have the extruded solid objects, I want to get rid of them. For this I go to Run a Boolean operation tool, and make a difference between the extruded object and the main frame:


After I repeat the same process with the rest of the extruded objects, this is how it looks:


Because I wanted to place a button on the side of the frame, I have to do the same process as I did with the holes for screws, Go to Part menu, draw a rectangle with the dimensions of the button, then go to Part menu, extrude the rectangle on the X direction (since it is placed on the side - X direction), and after that make a difference with the main object.

After I did everything, this is how My Final Design Looks:


And now, Let's Print It!

In order to make a 3D print, we need first to export the final CAD design into a slicing software. I will be using    because in my opinion CURA is the best 3D printing slicing software available. It has some recommended settings offered by the software, as well as the option to customize everything by ourselves. This is how my CURA settings look:


Problem

After about 15min of printing, I noticed that one corner is a little bit bended, and as a result, I had to cancel the job. Otherwise, the screw will not fit, and the frame will not be simetric. This happened because I did not take into account the fact that Brim should be bigger for a object with the size like mine.


After 15h of printing, My final 3D print model looks great!






















Files:

3D Design (.FCStd)

3D Design (.stl)



Final Prototype

And Here We Are!




























I would like to say Thanks to Daniele Ingrassia and Karsten Nebe for the great opportunity to find my passion, and to join the MAKERS family!