Micro-Controller Weather Station
This is a blog containing the description of the development of a micro-controller based weather station developed using an Arduino and various analog sensors. It has the ability to transmit data to any independent device wirelessly.
Translate
Search This Blog
Saturday, 12 March 2016
Week 6 - Presentation
Having finalised and tested our product during the week, we were ready to present it. With the whole team in attendance we waited anxiously before first presenting to our supervisor and then to a demonstrator. The whole team worked together to present our project, each speaking in turn and confidently explaining what we had done. Both our supervisor and the demonstrator seems fairly impressed with our work, with the demonstrator commenting that we seemed to have "a fairly mature product". Below, you can see a video of the final product in action on the presentation day.
Saturday, 5 March 2016
Week 5 - GUI and Presentation Preparation
Surya and Herbert meanwhile had begun working out the correct timings so that both the LCD screen on the weather station and the output on our iPad updated at a reasonable rate, so that the iPad did not appear slow, but the LCD could be readable. After doing this, the output on the LCD was then altered to make it neater.
Whilst this was happening, Anuraag and Qusai were working on our poster, researching other posters and trying to come up with a solid base design for ours. They were joined by Surya and Herbert later on.
Sunday, 28 February 2016
Week 4 - LCD Screens and a Packaged Product
We began week 4 by checking to see if our router and battery had arrived.
Much to our dismay, they had not. As such, we decided to focus on progressing our other output methods further. Surya and Herbert began by attempting to configure an LCD screen to display any information, so that the weather station could, if needed, function entirely on it's own. This went well, and our weather station was soon able to display an output. As such, Herbert and Surya went to go and solder the LCD to a veroboard, and subsequently try and design an overall layout for the entire system so that it could be packaged and presented neatly. Anuraag meanwhile informed Katherine and Alex that to he would like the input for the GUI to be doubles, with 1 double for each value. As such, Katherine and Alex spent the morning trying to adapt the code which took in serial data. Again, this was fairly successful, and we soon had methods set up which, when called, would return back the latest value for each quantity we were measuring.
Much to our dismay, they had not. As such, we decided to focus on progressing our other output methods further. Surya and Herbert began by attempting to configure an LCD screen to display any information, so that the weather station could, if needed, function entirely on it's own. This went well, and our weather station was soon able to display an output. As such, Herbert and Surya went to go and solder the LCD to a veroboard, and subsequently try and design an overall layout for the entire system so that it could be packaged and presented neatly. Anuraag meanwhile informed Katherine and Alex that to he would like the input for the GUI to be doubles, with 1 double for each value. As such, Katherine and Alex spent the morning trying to adapt the code which took in serial data. Again, this was fairly successful, and we soon had methods set up which, when called, would return back the latest value for each quantity we were measuring.
The afternoon however was less productive. Katherine and Alex decided to help Anuraag as much as they could by attempting to learn about GUI creation. This proved to be very difficult to do in the Java language, and after a very long afternoon, they were approached by a demonstrator, who informed them that they would have a far easier time using Visual Studio than trying to build a GUI with Java. The team felt a little disappointed, but thankful that they would still have a week to create a new GUI with visual studio.
Surya and Herbert meanwhile had made excellent progress with the packaging of the weather station, and we now had something resembling a finished product.
Week 3 - Transfer Functions and a Fixed Design
This week, we made excellent progress with our weather station. Bolstered by our success with serial communication, we made use of a small WiFi router that Alex brought in to test if we could transmit data over WiFi. This was very successful, and thanks to Surya's previous experience with Arduinos and WiFi, we could implement and test this relatively quickly. Moving on from this, we also tried powering the Arduino and router with a portable battery bank, and again we were successful. This means that if necessary, the weather station can function as a remote unit, without the need to be physically connected to a PC, however our planned Java based PC GUI is still intended to be the main method of data display. We also tested our weather station outside and observed comparable readings to those delivered by the BBC and the MET Office. Because of this, we placed an order for the router and battery bank so that we could have one specifically for our project.
Surya and Herbert set about trying to rebuild our light sensor circuit, to see if we would have more success this week, whilst Anuraag continued to work on the GUI, trying to implement a graph to track readings over time. Katherine meanwhile worked to try and discover a function by which we could convert the current through our light sensor into a value of Lux. She managed to do this, and found that the function was:

When we tested this formula, we read the same value of Lux that was reported by a Lux meter app on our phones. Satisfied that this formula worked, and that our circuit was correct, Alex and Katherine took our sensor circuit to have the light sensor soldered to it, and then afterwards once everything had once again been tested, neatened up the long wires on the bottom.
Surya and Herbert continued to modify the Arduino output so that it was in the correct format, and they added a special message to reconnect the sensors if the Arduino detected that non were present.
Alex and Katherine also began work on our Sustainability report, and with the help of the group noted down valid ideas and concerns regarding the sustainability and ethics of our project. This report will be completed during the week.
Lastly, Alex and Katherine modified our code that checked the BBC's weather data to produce the output in a dialogue box rather than in a command line, and also found a method by which we could modify this data to filter out values we do not need, such as visibility.
Surya and Herbert set about trying to rebuild our light sensor circuit, to see if we would have more success this week, whilst Anuraag continued to work on the GUI, trying to implement a graph to track readings over time. Katherine meanwhile worked to try and discover a function by which we could convert the current through our light sensor into a value of Lux. She managed to do this, and found that the function was:

Lux = (10^5.25419954) x (current^0.9852719925)
When we tested this formula, we read the same value of Lux that was reported by a Lux meter app on our phones. Satisfied that this formula worked, and that our circuit was correct, Alex and Katherine took our sensor circuit to have the light sensor soldered to it, and then afterwards once everything had once again been tested, neatened up the long wires on the bottom.
Surya and Herbert continued to modify the Arduino output so that it was in the correct format, and they added a special message to reconnect the sensors if the Arduino detected that non were present.
Alex and Katherine also began work on our Sustainability report, and with the help of the group noted down valid ideas and concerns regarding the sustainability and ethics of our project. This report will be completed during the week.
Lastly, Alex and Katherine modified our code that checked the BBC's weather data to produce the output in a dialogue box rather than in a command line, and also found a method by which we could modify this data to filter out values we do not need, such as visibility.
Week 2 - Implementing and Programming
Week 2 began by reviewing what had happened in week 1 and discussing what would be best to do next. We had met with our tutor earlier in the week and he seemed pleased with our progress. We collected our ordered components and again split into groups. Anuraag continued his research into Java based GUI's whilst Surya and Herbert began testing extra sensors we had ordered, mainly a new temperature sensor and a light sensor. Katherine and Alex continued in their attempts to develop a Java class that would be able to read information from a COM port which the Arduino would use to communicate with a PC.
Surya and Herbert had very little difficulty implementing the temperature sensor this time round, had had it relaying data relatively quickly. The light sensor however proved to be a little more difficult. While it reacted well to changes in light, we could not quite decide what the correct size of resistor to use to give a correct value of lux was. With no reliable way of measuring the lux in the room, we had to install apps on our phones, as well as use a website to find an approximate value, and then alter our code and circuit to represent this.
Katherine and Alex however had more success with the Java class. They successfully managed to create a class which could read data from a serial port, thereby giving our weather station the means to communicate with a PC.
Whilst Herbert and Surya worked on the light sensor and the Arduino code, and Anuraag began writing the first code for our GUI, with Qusai helping all of them, Alex and Katherine took the sensors we were confident in downstairs to solder them onto a veroboard, for the sake of neatness and ease of use. This went relatively well, however 1 sensor had to be re-soldered after it was accidentally put in the wrong place.
Surya had also ordered an Ethernet shield for our Arduino, in an attempt to have our weather station connect over a network. However, we could not connect to the university network with it, and so next week Alex will bring in some things from home to attempt to create a small local network to test on.
Once again, good progress was made, and next week we can focus largely on our user interface creation.
Surya and Herbert had very little difficulty implementing the temperature sensor this time round, had had it relaying data relatively quickly. The light sensor however proved to be a little more difficult. While it reacted well to changes in light, we could not quite decide what the correct size of resistor to use to give a correct value of lux was. With no reliable way of measuring the lux in the room, we had to install apps on our phones, as well as use a website to find an approximate value, and then alter our code and circuit to represent this.
Katherine and Alex however had more success with the Java class. They successfully managed to create a class which could read data from a serial port, thereby giving our weather station the means to communicate with a PC.
Whilst Herbert and Surya worked on the light sensor and the Arduino code, and Anuraag began writing the first code for our GUI, with Qusai helping all of them, Alex and Katherine took the sensors we were confident in downstairs to solder them onto a veroboard, for the sake of neatness and ease of use. This went relatively well, however 1 sensor had to be re-soldered after it was accidentally put in the wrong place.
Surya had also ordered an Ethernet shield for our Arduino, in an attempt to have our weather station connect over a network. However, we could not connect to the university network with it, and so next week Alex will bring in some things from home to attempt to create a small local network to test on.
Once again, good progress was made, and next week we can focus largely on our user interface creation.
Week 1 - Brainstorming Ideas and Selection of Implementations
We began our project by discussing exactly what we planned to do: Creating a small micro-controller based weather sensor which would transmit data to a traditional PC to display sensor information. We then began to split into pairs, and each pair was given a task. Alex and Katherine went to solder headers onto a FRDM board, whilst Surya and Herbert collected the sensors that we had ordered before the holidays. Anuraag and Qusai set about researching producing a Graphical User Interface with Java.
Katherine and Alex, once the FRDM board had been soldered, set about attempting to have the FRDM board communicate with a PC over a serial connection. Whilst the board could transmit information to the PC, we ran into issues regarding the reading and transmission of information. Meanwhile, Surya and Herbert had been having more success testing the sensors, and had been using an Arduino to measure their outputs. Seeing that the Arduino seemed to be working better than the FRDM board, the group decided we should shift focus to utilising it instead of the FRDM board in the final design.

Whilst Anuraag and Qusai continued to research GUIs, Katherine and Alex moved on to try and research another aspect of our plan: calling weather data from an external source to compare to our readings at the press of a button. Initially, we wanted to collect this weather data from the MET office, however the closest data they had available was from Crosby. Seeing this, we moved on to try the BBC. We found that the BBC had an RSS feed for weather, which we could very easily use to check current weather information. We were successfully able to create a Java program to call this information when required.
Surya and Herbert seemed to be having issues with the sensors however. Our temperature sensor seemed to be giving some very strange readings, and did not react to changes in environment. They opted to try the humidity sensor instead, and observed a better reaction but with strange values. After some research, we discovered that the Arduino method we were using to check the sensors output voltage was not directly outputting voltage, and instead converting voltage to a proportional integer between 0 and 1023. We implemented a new piece of code to convert this integer to voltage (reading*(5/1023)), but now saw no reaction at all from our sensors. We researched more, and concluded our code to convert the integer was using integer division instead of standard division, meaning all our outputs were being shown as 0. Again altering the code (reading*(5.0/1023.0)), we finally managed to get sensible value and reactions from our humidity sensor. We moved on to test the pressure sensor, and again saw good reactions, however our temperature sensor remained incorrect. Qusai went to search for a replacement we could order.
Katherine and Alex decided to look for a way we could read in the data transmitted over serial from the Arduino, but despite extensive efforts, this is still something we need to work on next week.
Surya Herbert and Qusai developed the Arduino code further to also calculate average values of our reading and output those as well.
We ended the day having made good progress on our project and ordered our new temperature sensor and a group Arduino to use, rather than the one Surya had brought from home. Over the week we will continue to research various parts of our project and next week we hope to make further progress.
Subscribe to:
Posts (Atom)

