Meeting 04/27/2015

Hello everybody,

This week, we have to check the last problems of our code:

  • The first one is that each time that we put on the arduino, it use the date and time that it remember from the last connection. So, each time, we have to reload the program in the arduino.
  • The second problem is that we have to keep a pressure on the sensor to turn off the alarm. When we take off the pressure, the alarm start again to run.
  • The next problem in our code is that when we are able to turn off the alarm, the speaker turn off but not the light.
  • The last problem concern the connection between the arduino, the keypad and the screen.

After the finalization of our code, we will take a look at the design of the model to make it sellable. We need to create the support which will served to distribute the pressure. We will make a support with a surface of 0.25m² to be able to have 10kg on the sensor before turning off the alarm.

That’s all for today.

Don’t forget to follow our progress next week.

See you soon.

The Smart O’clock team

Sorting of bottles

Hello everyone !

During holidays and this week, we worked on our moke-up. We used piece of wood, belt from a kit of distribution from a car, and some screws from a handiwork store.

We received our electronics materials and we studied our datasheets.

We choose to use bottle tops to simulate bottles of glas. The bottles were to big and heavy to be transported by our motor and belt.

The moke-up is operative. We worked too on our code and programmation.

There are the next steps :

– To colour our moke-up

– To continue our programmation.

– To test our work.

Some pictures and video of our moke-up will be posted on the next post !

See you !

SmartHome project: Database

Hello everyone. This week, we continue our Smart home project. In the last session, we established the communication between the Arduino and the Rasperry Pi. We can now receive information of the two sensors and send a setpoint from the raspberry Pi to the Arduino Card.  See the following schematic view which explains our project.

photo article 220415

Before explaining the PHP in a next article, we will describe how we store our luminosity values into the SQL database. See the following code with the comments. With this code, each 5 seconds, the value of the luminosity is readed from the Arduino by the Rasperry PI and stored into a database.


#!/usr/bin/env python

# -*- coding: utf-8 -*-

import serial

import time

import MySQLdb

while True:

port = “/dev/ttyACM0”

serialFromArduino = serial.Serial(port,9600)    //Starting the connection with the Arduino

serialFromArduino.flushInput()

input = serialFromArduino.readline()     //Reading the value of the Arduino

inputAsInteger = float(input)

test = 10.0

print(inputAsInteger)

ser = serial.Serial(‘/dev/ttyACM0’, 9600)

time.sleep(4)   //We wait after the arduino is ready.

db = MySQLdb.connect(“localhost”, “monitor”, “password”, “Luminosity”)   //We open the database with its location, name, password and datatype added.

curs=db.cursor()

# We are using triple quotes for formatting purposes

# you can use one set of double quotes if you put the whole string on one line

try:

curs.execute (“””INSERT INTO lumdat

values(CURRENT_DATE() – INTERVAL 1 DAY, NOW(), ‘Outdoor’, inputAsInteger)”””)  //Reading the date and the hour from the Rasperry PI. We add also the luminosity value.

db.commit()

print “Data committed”

except:

print “Error: the database is being rolled back”

db.rollback()

db.close()       //The database is closed after each value added.

ser.write(‘3.20\n’)

#ser.write(‘2.100\n’)

time.sleep(1)              // We wait one second

ser = serial.Serial()


Sending the luminosity value to the raspberry Pi and storing it into a database with MYSQL work fine but we also want to display this database by using PHP. The next article will describe how we made the communication between the database and the website by using PHP.

That’s all for today, see you next week.

The SmartHome team

Software and hardware improvement

Hello everyboby,

The project is moving forward ! During the last lab, our group has worked on the Hardware and Software project.

The serial communication between the Arduino and the Raspberry Pi isn’t ended. Indeed, we always have some difficulties for the link from Raspberry Pi to Arduino. But, we found the problem : informations are sent but they are converted in ASCII code.

Then, we have made considerable progess on the fingerprint program. Different programs have been assembled to create just one principal code : the storage, the comparaison and the disappearance of data.

The selection of the function is carried out thanks to a button three positions. During the last lab, we have also performed the circuit of this selection.

The last work made was the program allowing searching the different information of the class file in the schedules of intranet. Now, this program runs !

The next steps are :
• to finish the communication between Arduino and Raspberry PI ;
• to try to program the link between the class file and the database ;
• to improve the selection fingerprint program.

That’s all for today,
But don’t forget to follow our progress the next week,
See you soon

Cocktail Maker Machine : News after holidays !

During the holidays we worked on the model. We bought wood planks in a special store. These are needed for the construction of the model. A plan of cutting of the boards was drawn up and each board was cut to the good size. A first team was in charge of producing the model. During this time another team was working on the program. The main problems were the following ones:

– Electrical wiring and programming: the engines connected to the breadboard were not working at the beginning.

– To cut the boards to the good size.

The objective of this week is to solve problems that we encountered during the holidays. After having tried to analyze the problem we found that the problem of the engines was caused by a resistance put in series with the engine. Indeed, this resistance was oversized what limited the tension on the engine. The programming can thus go on.

The program is almost done now. We just have to continue the model because its intern structure is not already done.

Stay tune !

Meeting 04/20/2015

Hello everybody,

Regarding to the progress of the project, the first part of the programming is done. That means that each part of the programming is working and we need to put all this part together. It’s the most difficult part of the project because we need to do work the model without computer.

However we have a problem with the RTC module because when we disconnect the arduino, it saved the last time and date so, when we restart it, it stop its implementation.

Regarding to the model, we are looking for free material. We need to create the support which will served to distribute the pressure. We will make a support with a surface of 0.25m² to be able to have 10kg on the sensor before turning off the alarm. One person of the team knows a market where it’s possible to have cut-off of Plexiglas. It will be a good thing for the carpet. It’s necessary to go to this market to find the right cut-off and start the model. Regarding to the wood part, Damien’s father has a lot of cut-off.

That’s all for today,

Don’t forget to follow our progress next week

See you soon

Easter Holiday Meeting

Last Monday, we had a meeting in to order to work together and to move forward for the project.
One of aims of this meeting was to find how to establish the serial communication between the Arduino and the Raspberry PI. We found how to make for the communication from Arduino to Raspberry PI but not in the reverse direction. We had some difficulties for this last point
A second aim was to finish the storage of fingerprints.
The last aim was to move forward in the program allowing searching the different information in the class file in the schedules of intranet. We tried to search a variable that may contain a time. We lost a lot of time to understand how this variable type works.
The next steps are :
• to finish the communication between Arduino and Raspberry PI
• to perform the programing for the use of the LCD
• to move forward in the program of searching the informations about the schedules : extract the times, the teachers and the classes
• to create the database containing the informations (teacher mail, student mail, the students in each class…)
That’s all for today,
Don’t forget to follow our progress next week
See you soon