====== Smart Objects and Services ====== ====== Project Presentation ====== == Name : == ------------- StressDetector == Group Composition : == ------------------------- **Bouhafa Nisrine** **Fadi William Ghali ABDELMESSIH** **Kharroubi Majdi** ==== Scenario : ==== -------------------- The idea of the project is to determine the presence of the users using a motion sensor. If the users are present, we will detect (the temperature and humidity using a single sensor) and the luminosity. Using a web service, we can instantly retrieve the information of the outside temperature and humidity. Using all of these information, we are going to register in a database the conditions in which the persons co-existed. So finally in the database, we are going to have the date, the time in which any person entered the room, the time in which everybody left the room, the average temperature, humidity and lightness of the whole period as well as the outside temperature and humidity. So now, we have all the data that we need to determine the degree of stress of the persons working in a certain place. Actually, it was difficult to put an algorithm to have a final answer about the status of the persons (i.e. stressed or not) because we are not doctors and the ideal approach to develop such an algorithm is by discussing the doctors of this domain. ==== Object Shape : ==== ------------------------ == Name of the contact at Reims : == ------------------------------------ Babacar eddie Faye == Sketch of the Object from Reims : == ---------------------------------------- We helped the student from Reims in the design of the object by sending him a [[ https://www.dropbox.com/s/e6fuxwx8msszvot/StressDetector_Cahier%20des%20charges.pdf | description of work]], [[ https://www.dropbox.com/sh/6otmpz39rwbqb06/xjYArHntv0 | sensors' mechanical drawing (folder) ]] as well as a [[ https://www.dropbox.com/s/qzrw7ukc2203udf/PotDeStylos_Mod%C3%A8le.skp | sketch file ]] to determine the dimensions needed for our object and we mentioned that this isn't what we want as a final design but it's what we want as dimensions. The sketch was designed using SketchUp. The software link: [[ http://www.sketchup.com/download | SketchUp download ]] As a final result, we obtained the following images and we thought that they do respect the mentioned dimensions. **Compact version of all the images in one image** {{ http://i.imgur.com/x7aUq5G.jpg?600 | Object design compact image }} Folder of the received images: [[ https://www.dropbox.com/sh/vua6x2xxuk7xg1o/Pq5zPi-VUB | Object design images folder ]] == Picture of the Object without instruments and electronics : == ----------------------------------------------------------------- Actually, the object was too bad to present in this report. Anyway, we are going to put an image of it and we must state that the object dimensions were too large than the specified in the description of work as well as the sketch file. **Compact version of all the images in one image** {{ http://i.imgur.com/twvkyIZ.jpg?600 | Real object without electronics compact image }} Folder of the images: [[ https://www.dropbox.com/sh/80omhyf5uyqakym/boZGO73BCP | Real object without electronics images folder ]] == Picture of the Object with instruments and electronics outside on the same table :== --------------------------------------------------------------------------------------- In this section, we are going to put a link to an images folder that contains the images with some comments on top of them. Folder of the images: [[ https://www.dropbox.com/sh/tukir3r8qk99xcf/I1vAtEPzC8 | Real object with electronics images folder ]] == Picture of the finished Object (all is integrated): == ---------------------------------------------------------- The following photo is our object with the electronics (All is integrated). Logically, this object can't be used as a pen pot so we used it to put some electronics parts. {{ http://i.imgur.com/Icd5NL4.jpg?600 | Real object with electronics }} == Demonstration Video : == --------------------------- The link:[[ http://youtu.be/zulMnVVU8TQ | Youtube video ]] ==== Hardware specifications : ==== ----------------------------------- == List : == ***Phidgets Single Board Computer** * Single Board Computer SBC1072 * [[http://www.gotronic.fr/art-interface-8-8-8-hub-sbc1072-12065.htm|Seller]] | Code 25446 | 212,90 € TTC * [[http://www.phidgets.com/docs/1072_User_Guide|User Guide]] * [[http://www.phidgets.com/documentation/Phidgets/1072_0_Mechanical.pdf|Mechanical Drawings]] * [[http://www.phidgets.com/docs/Programming_Resources|Programming Resources]] * [[http://www.phidgets.com/docs/Operating_System_Support|Operating System Support]] ***Phidgets Wi-Fi Adapter** * WiFi USB Adapter 802.11b/g - 3702 for SBC1072 * [[http://www.gotronic.fr/art-adaptateur-wifi-3702-pour-sbc1072-12066.htm|Seller]] | Code 25447 | 24,80 € TTC * [[http://www.phidgets.com/documentation/Phidgets/3702_0_Datasheet.pdf|User Guide]] * [[http://www.phidgets.com/documentation/Phidgets/3702_0_Mechanical.pdf|Mechanical Drawings]] * [[http://www.phidgets.com/downloads/usb_ieee_801_11g.rar|Download Drivers for Windows, Linux and Mac]] ***Phidgets Temperature and humidity sensor** *Temperature and humidity sensor 1125 *[[http://www.gotronic.fr/art-capteur-de-temperature-et-humidite-1125-12099.htm|Seller]] | Code 25484 | 49,90 € TTC *[[http://www.phidgets.com/docs/1125_User_Guide | User Guide]] *[[http://www.phidgets.com/documentation/Phidgets/1125_0_Mechanical.pdf | Mechanical Drawings]] ***Phidgets Light sensor precision** *Light sensor precision 1127 *[[http://www.gotronic.fr/art-capteur-de-lumiere-de-precision-1127-12101.htm|Seller]] | Code 25486 | 10,30 € TTC *[[http://www.phidgets.com/docs/1127_User_Guide | User Guide]] *[[http://www.phidgets.com/documentation/Phidgets/1127_0_Mechanical.pdf | Mechanical Drawings]] ***Phidgets Motion detector** *Motion detector 1111 *[[http://www.gotronic.fr/art-detecteur-de-mouvement-1111-12089.htm|Seller]] | Code 25474 | 41,75 € TTC *[[http://www.phidgets.com/docs/1111_User_Guide | User Guide]] *[[http://www.phidgets.com/documentation/Phidgets/1111_0_Mechanical.pdf | Mechanical Drawings]] ==== Specifications and interface of the service on the object ==== -------------------------------------------------------------------- A light and motion sensor located in the front of a transparent part adapted to return a numeric value for the light and boolean value for motion. A temperature and humidity sensor placed into the object that do returns numeric values. The system takes these measures and processes it through some equations to get an understandable measure of the temperature, humidity, motion, and light. Afterwards, these measures are sent through the UPnP network and saved to the database. ==== Specifications of the interface of high added value service ==== --------------------------------------------------------------------- The high added value service consists of a medical service that receives the data sent from our object. Then stock it into a database. Finally, it will be used by a doctor to analyse the work conditions of the users. Actually, an algorithm need to be developed in collaboration with the doctors of this domain to get a final result (i.e. If a person is stressed or not). ==== Project Files: ==== ------------------------ == . wcc of the two containers (embedded and on the remote PC) : == ------------------------------------------------------------------- * [[https://www.dropbox.com/s/661gkcqjxlm36d4/StressDetectorBroadcastData.wcc|Embedded Container]] * [[https://www.dropbox.com/s/4hs1rankr0q99ao/StressDetectorProxyContainer.wcc|Remote Container]] == Beans added for the embedded container (for the service on the object) ** (DLL and Source code for each of them) == ------------------------------------------------------------------------------------------------------ * [[https://www.dropbox.com/s/a1p69rasdvpdzbf/Embedded%20Container.zip|Embedded Bean DLL & Source Code]] == Beans added for the remote PC container (for the high added value service on the PC) ** (DLL and Source code for each of them) == ------------------------------------------------------------------------------------------------------ * [[https://www.dropbox.com/s/ry6u1xtcvowh00b/Remote%20PC%20Container.zip|remote PC Bean DLL & Source Code]] == Chesklist to install the embedded service on the object == -------------------------------------------------------------- * Make sure SharpDevelop (as well as WComp add-on), Phidget Control Pannel, WinSCP, PuTTY and Device Spy are all installed. * Copy all beans (DLL files) into the folder Beans inside the folder where SharpDevelop is installed. * Power on Phidgets and connect it to the Ethernet wire of the PC. * Configure WiFi connection with the help of Phidget Control Pannel then unplug Ethernet Connection (this won’t be needed anymore). * Open WinSCP and connect to the Phidget by using the IP address and the appropriate username and password. (File protocol: SCP). * Copy all .wcc and .dll files on the phidget. * Open session in PuTTY then type the appropriate password. * Launch the service : mono Container.exe –r ../Beans –l StressDetectorBroadcastData.wcc –n StressDetectorUPnP * We can also add the last command in the .bashrc to launch the service automatically (but we should change the relative paths to absolute ones). == Chesklist to install the remote service/application on the PC == ------------------------------------------------------------------- * Instal MySQL. * [[https://www.dropbox.com/s/zmcskp7ztgdw7u9/StressDetector_DB.sql |Import database using this SQL file]] * Open Device Spy and copy the Device URL (The functional one). * Open SharpDevelop and create a new C# Container. * Import StressDetectorProxyContainer.wcc * Modify the UPnP Device Proxy's URL with the copied one (should witch from red to green now). * Connect to the database to watch the results. ==== Results of the relations with Reims ==== --------------------------------------------- We have a negative feedback about the student of Reims, because we sent a detailed description of work that contains the design details to manufacture our communication object. Unfortunately, they delivered a product that don't respect the description of work as well as the dimensions mentioned in the sketch file or any logical approach. ==== Prospects : ==== --------------------- == Possible extensions of the object == --------------------------------------- *Adding a webcam : *Detect the facial expression of the user. *Adding more sensors to detect more environmental data. == Possible extension of the service on the Object == ----------------------------------------------------- *Controlling the room lightness or the air conditioning of the room using the services that sits on the UPnP network according to data received. == Possible extension of the high added value Service == -------------------------------------------------------- *Use a CSV file located on the operating system of the SBC2 that contains all the captured data, it will be synchronized each hour to reduce the network traffic. *Develop an algorithm in collaboration with the doctors of this field to get a clear result about the degree of stress of the persons (i.e stressed or not). *Taking in consideration the ambient temperature and humidity that will may vary the algorithm that needs to be developed in collaboration with the doctors of this field because peoples do wear different clothes according to the weather. == Possible GUI for data visualization == ----------------------------------------- *A graph that illustrates the users work conditions (temperature, humidity, light)during the work as well as the ambient temperature and humidity.