Dienstag, 19. November 2013

Energy Effiency and Powerpoint

The time has come to revise the work and have an eye on the power consumption also the apperance of the program was slightly changed.

Due to the face that the original program on the Arduino was sampling all the time the microcontoller consumed a lot of energy. It sucks 22mA in a normal operational status which is quiet heavy for the operation we are doing. In order to save energy the Arduino is now set to sleep when he is no needed. This reduced the current input to 14mA, a huge save!
When the "Take a sample" button is pressed in the C# GUI, the PC sends a byte via the serial connection to the Arduino which wakes him up. He then responds with a 100 samples of the A/D converter (Ethanol Sensor) and falls back to sleep immediately.
In addition the Overall appearance of the GUI was changed and i learned how to merge cells which increases the visibility of the chart.

A short Video shows the operational program below

It was also necessary to create a little slideshow for the lecture. It can be found below if interested.

Alcodino Presentation 20.11.2013


Worked: (21h) + 4h30m = 25h30m

Dienstag, 12. November 2013

Serial Connection + Chartfilling

Serial connection established and data shown with C# Chart control

The connection is now established and the Alcodino GUI is able to receive data from the Arduino. Therefore the data  is shown in a chart using C# Chart control.
The current solution is not more then a prototype showing the possiblies of the future program. Still a lot of nasty errors occured on the way there. For example when trying to use Serial commands in C# the message "Serial port is already open" occured and froze the PC. The modification was then to insert more Serial.Close commands which led to the problem of data corruption. It took some time until a nice and clean working serial environment was established.
The Data collection was then only time consuming but not challenging. Still there are some problems: while collecting the data the program is not controllable and the user has to wait until the sampletaking is finished.

Next steps are:
- Make it possible to abort the sampletaking
- Introduce the I2C Sensor
- Rework the C# GUI

Alcodino Prototype - Serial connection + Data in Chart
Worked: (16h) + 5h = 21h

Montag, 4. November 2013

C# Chart Control

Chart Control -- Problems


Using the C# Chart Control i stumbled across a lot of problems. For example i can`t divide between X and Y values the data will always be displayed at both the x Axis and the y Axis even though i used 3 different methods.

  
 

private void fillButton_Click(object sender, EventArgs e)
        {
            Random rnd1 = new Random();

            int[] xaxis1;
            int[] xaxis2;
            int[] xaxis3;
            xaxis1 = new int[10];
            xaxis2 = new int[10];
            xaxis3 = new int[15];

            for (int i = 0; i < 5; i++)

            {
                xaxis1[i] = i*2;
            }

            toprightChart.DataSource = xaxis1;
            toprightChart.Series[0].XValueMember = "Y";
            toprightChart.Series[0].YValueMembers = "X";
            toprightChart.ChartAreas["ChartArea1"].AxisX.Interval = 1;
            toprightChart.DataBind();

            for (int j = 0; j < 10; j++)
            {
                xaxis2[j] = rnd1.Next(0, 10);
            }

            bottomleftChart.DataSource = xaxis2;
            bottomleftChart.Series[0].XValueMember = "Y";
            bottomleftChart.Series[0].YValueMembers = "X";
            bottomleftChart.ChartAreas["ChartArea1"].AxisX.Interval = 1;
            bottomleftChart.DataBind();

            List<double> chartData = new List<double>();

            for (int k = 0; k < 5; k++)
            {
                chartData.Add(rnd1.Next(0, 10));
            }

            bottomrightChart.DataSource = chartData;
            bottomrightChart.Series[0].XValueMember = "Y";
            bottomrightChart.Series[0].YValueMembers = "X";
            bottomrightChart.ChartAreas["ChartArea1"].AxisX.Interval = 1;
            bottomrightChart.DataBind();
        }


After those problems are solved there should be a focus at real time charts and the serial connection to the Arduino.

Worked (13h) + 3h = 16h

Freitag, 25. Oktober 2013

Project Plan

The Project Plan is finished

Click here to see the project plan

Since all the planning is finally done and all the parts have arrived i will start with technical issues next week.


Worked: (9h) + 4h = 13h

Donnerstag, 17. Oktober 2013

Project Management

Creating the Gantt, networking diagram, timeline and include resources to the project.


According to the module description at the CIT homepage for the project module the electrical engineering department planned with 3h40m independent project work for the student for each week.
Regarding the 14 weeks the semester has it sums up to 51h20m for the whole semester.

However I calculated with 91h for the whole project. This is the result of the agreement that was made with my supervisor. We decided that my project will planned and realised in the same semester since my semester abroad will after Christmas. Normally the project is planned in one semester and realized in the next semester.

The diagrams below were all done with Microsoft Project 2010 ver. 14.0.6 (32 Bit)


 Timeline


Timeline Project Alcodino - Microsoft Project 2010

 



Gantt- Chart
 
Resources


The Network Diagram is sadly to big!

Learend:
-How to use Microsoft Project (First steps)

ToDo:
-digitalize the Block Diagram
- Define the goals of the project according to the milestones
- make a table that shows the

Worked: (6h) + 3h = 9h

Montag, 14. Oktober 2013

The Order

The Requisition Form

First order:
1. Arduino Mega 61,44€
2. Linear Active Thermistor (Analogue) 4€
3. Humidity Sensor (Analogue) 16,95€
4. MQ-3 Ethanol Sensor 4,95 €
Sum: 87,34€ + Porto (high porto for the MQ-3 since its from USA)

After the first order form was declined due to high expenses a cheaper way had to be found.
The solution is to order the MQ-3 sensor from a store in the UK which is called cool components this will will result in cheaper porto costs. The second step was to combine the temperature sensor and the humidity sensor into a cheap all together sensor. The sensor is called DFN6 and is an I2C sensor this will require more work and research but the Arduino is capable of handling the I2C bus.

New order:
1. Arduino Mega 61,44€
2. Sensor Humidity & Temp DFN6 (I2C) 19,05€
3. Ethanol Sensor MQ-3 5,92£ = 6,97€
Sum : 87,46€ + Porto ( porto for the MQ-3 will be cheaper and faster)


Donnerstag, 10. Oktober 2013

First C# steps

First steps in C#

Today i made my first steps in C# using Microsoft Visual Studio Professionel.
I learned how to create a Project and creating my first "Windows Form Application".
The tutorial i used was the "create a picture viewer" tutorial from the visual studio website.

Tutorial 1 - Picture viewer

From there i tried to improve the form for my usage in the project.


The outcome was this form.
First form, microsoft visual studio profesionel
I learned how to create simple forms and how to convert strings into interture and back. Therefore i am now able to use button clicks (events) to perform simple algorithms and display the solution in labels.

Next steps are:
  1. Improvement of the layout
  2. Using of global variables (Since it was somehow not possible for me implement them yet)
  3. Creating data classes for users
Working hours so far : 6h