stay away from me

Post on 16-Apr-2017

1.501 Views

Category:

Technology

0 Downloads

Preview:

Click to see full reader

TRANSCRIPT

University of MessinaDepartment of Engineering

Course in Engineering and Computer Science (ECS)

B.Sc. CASALE GIUSEPPEProject for Embedded System

System Security with Arduino Yún:“ Stay Away From Me! ”

peppecasale@virgilio.it

Use scenario: Pedestal in an exhibition

CASALE GIUSEPPE - Engineering and Computer Science - ECS UNIME - peppecasale@virgilio.it

● Short messages are displayed on the LCD according to the area of interest.● In “Allarme”, an Alert is sent by e-mail through the Temboo service.

START

Welcome Message

Sensors Calibration

CASALE GIUSEPPE - Engineering and Computer Science - ECS UNIME - peppecasale@virgilio.it

Motion Detected?

SI

In which Direction?

I Orient the Servo

I Calculate the Distance and Act Accordingly

END

Anyway, I Calculate the Distance from a

Possible Object

No

CASALE GIUSEPPE - Engineering and Computer Science - ECS UNIME - peppecasale@virgilio.it

DIAGRAM OF OPERATION...PROJECT

CASALE GIUSEPPE - Engineering and Computer Science - ECS UNIME - peppecasale@virgilio.it

DIAGRAM OF OPERATION...TEMBOO

Source: https://temboo.com/

CASALE GIUSEPPE - Engineering and Computer Science - ECS UNIME - peppecasale@virgilio.it

● 1x Board Arduino Yún rel. 4;

● 1x Breadboard;

● 2x HC-SR501 PIR;

● 2x 10 Kohms Resistor with +/- 5% tolerance;

● 1x 2004A LCD Display with 20x4 characters available;

● 1x 220 ohms Resistor with +/- 5% tolerance;

● 1x Potentiometer;

● 1x SG90 Servo-motor;

● 1x 100 μF Condenser;

● 1x HC-SR04 Ultrasonic Sensor;

● Different wires;

Components Used:

ARDUINO YúNHeart of the entire system!!!

Provided with: Microcontroller, Microprocessor, wired or wireless network connectivity, pins to communicate with the outside world, micro-SD and much more...

Source: http://arduino.cc/en/Main/ArduinoBoardYun

CASALE GIUSEPPE - Engineering and Computer Science - ECS UNIME - peppecasale@virgilio.it

PIR SENSOR (Pyroelectric InfraRed)How does it work? It detects, through 2 slots, the infrared emission produced by an object!

Datasheet: http://www.datasheet-pdf.info/entry/HC-SR501-Datasheet-PDF

CASALE GIUSEPPE - Engineering and Computer Science - ECS UNIME - peppecasale@virgilio.it

The magic happens with the Fresnel lens.

The Principle: How it happens: How we see it!

CASALE GIUSEPPE - Engineering and Computer Science - ECS UNIME - peppecasale@virgilio.it

https://it.wikipedia.org/wiki/Lente_di_Fresnel

20x4 LCD Display

CASALE GIUSEPPE - Engineering and Computer Science - ECS UNIME - peppecasale@virgilio.it

● Interaction with the external environment through messages;

● To write a character you need to:

1. Make sure the cursor is at the point where you want to print the character;

2. Set to 1 the R / S pin and to 0 the R / W pin;3. Send the corresponding ASCII character code;4. Set to 1 the E pin for at least 450 nanoseconds and then

back to 0.

● Do you want it to be easy???

Use the liquidCrystal LIBRARY [ https://www.arduino.cc/en/Reference/LiquidCrystal ]

20x4 LCD Display

CASALE GIUSEPPE - Engineering and Computer Science - ECS UNIME - peppecasale@virgilio.it

Time of sensors calibration: do I see the countdown???

Please...I use the ALIEN!!!

How can I make animation on a text display???

TAITO’S ALIEN

CASALE GIUSEPPE - Engineering and Computer Science - ECS UNIME - peppecasale@virgilio.it

Easy: I draw the Pixels...

...I recall them to make an ANIMATION!

The ultrasonic sensor: HC-SR04

CASALE GIUSEPPE - Engineering and Computer Science - ECS UNIME - peppecasale@virgilio.it

When the sound waves encounter the separation interface between two material means, they give rise to phenomena such as refraction and reflection.

The ultrasonic sensor: HC-SR04

CASALE GIUSEPPE - Engineering and Computer Science - ECS UNIME - peppecasale@virgilio.it

It uses the concept of sonar to determine the distance to an object,as bats or dolphins.

Datasheet: https://docs.google.com/document/d/1Y-yZnNhMYy7rwhAgyL_pfa39RsB-x2qR4vP8saG73rE/edit.

SG90 Servo

CASALE GIUSEPPE - Engineering and Computer Science - ECS UNIME - peppecasale@virgilio.it

Within the servomotors, there are several mechanical and electronic parts. Here's a list:

● DC Motor -> Moves the wheels;● Potentiometer -> Generates a resistive value proportional to the angle of the current position;● Control electronics (feedback system) -> decides the direction of the rotation;● Motor driver (power stage) -> Feeds the motor correctly;● Set of gears and gear reduction mechanism -> These are used to increase the accuracy, reduce

the inertia and increase the torque;

SG90 9g Micro Servo: http://www.micropik.com/PDF/SG90Servo.pdf

COMPLETE REALIZATION OF THE CIRCUIT

CASALE GIUSEPPE - Engineering and Computer Science - ECS UNIME - peppecasale@virgilio.it

TEMBOO x E-MAIL

CASALE GIUSEPPE - Engineering and Computer Science - ECS UNIME - peppecasale@virgilio.it

● It provides a unified access to more than 100 web services, including the ability to send emails;

● Key words: TembooChoreo and SendEmailChoreo;● Input Parameters for the Choreo:

1. (“Username”, GMAIL_USER_NAME): this is the username of the Gmail account, which also corresponds to the email address of the Sender, formatted as a full email address;

2. (“Password”, GMAIL_APP_PASSWORD): this allows a user that uses the two-step verification to access to his/her Google Account through unofficial applications. It is generated automatically, immediately after entering the security code provided by the Google Authenticator App [ ], in the Auth phase of the creation of the application;

3. (“ToAddress”, TO_EMAIL_ADDRESS): this is the email address of the Recipient;

4. (“Subject”, “Testo_Personalizzabile”): it represents the voice OBJECT in the header of an email. The User can insert the text he/she prefers instead of Testo_Personalizzabile;

5. (“MessageBody”, “Testo_Personalizzabile” ): the text inserted by the User will be the BODY of the email instead of Testo_Personalizzabile;

“TembooAccount.h”

CASALE GIUSEPPE - Engineering and Computer Science - ECS UNIME - peppecasale@virgilio.it

● Key word: SECURITY!!!● External file for sensitive data of the

Temboo and Gmail Account;● Parameters:

1. TEMBOO_ACCOUNT: this is the name associated to the Temboo account;

2. TEMBOO_APP_KEY_NAME: this is the name of the key associated to the project, in this case “TiHoVisto” (I’ve Seen You);

3. TEMBOO_APP_KEY: this is the univocal key generated by Temboo for the particular App;

4. GMAIL_USER_NAME: this is the username, formatted as a complete email address, of the Gmail account of the sender;

5. GMAIL_APP_PASSWORD: this is the password of the sender’s account codified in base64;

6. TO_EMAIL_ADDRESS: this is the email address of the recipient of the Alert;

CASALE GIUSEPPE - Engineering and Computer Science - ECS UNIME - peppecasale@virgilio.it

REFERENCE[1] Arduino Yun official page: http://arduino.cc/en/Main/ArduinoBoardYun.

[2] Wikipedia page: Breadboard: https://it.wikipedia.org/wiki/Breadboard.

[3] Datasheet PIR HC-SR501 sensor: http://www.datasheet-pdf.info/entry/HC-SR501-Datasheet-PDF.

[4] Shenzhen Eone Electronics CO.,LTD. Specification For LCD Module 2004A:

https://www.beta-estore.com/download/rk/RK-10290_410.pdf

[5] Micropic.com - SG90 9g Micro Servo: http://www.micropik.com/PDF/SG90Servo.pdf.

[6] Cytron Technology. Product User’s Manual – HC-SR04 Ultrasonic Sensor:

https://docs.google.com/document/d/1Y-yZnNhMYy7rwhAgyL_pfa39RsB-x2qR4vP8saG73rE/edit.

[7] Arduino official page. http://arduino.cc/

[8] Wiring official page. http://wiring.org.co/ .

[9] Processing official page. https://processing.org/ .

[10] Community Arduino official page: https://forum.arduino.cc/

[11] Dario Bruneo. Embedded Systems slide part 3: The Arduino Yún Board, 2014.

[12] 8-bit avr microcontroller with 16/32k bytes of isp ash and usb controller. ATmega16U4 and ATmega32U4:

http://www.atmel.com/Images/Atmel-7766-8-bit-AVR-ATmega16U4-32U4_Datasheet.pdf.

CASALE GIUSEPPE - Engineering and Computer Science - ECS UNIME - peppecasale@virgilio.it

[13] Datasheet for Qualcomm Atheros AR9331:

https://www.atheros-drivers.com/qualcomm-atheros-download-datasheets-nr-110-with-code-4351.html .

[14] OpenWrt official page: https://openwrt.org/ .

[15] Linino official page: http://www.linino.org/ .

[16] cURL official page: http://curl.haxx.se/ .

[17] Python scripting language official page. https://www.python.org/ .

[18] Bridge Library official page. http://arduino.cc/en/Tutorial/Bridge/ .

[19] EEPROM Library official page. https://www.arduino.cc/en/Reference/EEPROM/ .

[20] Wire Library official page. http://arduino.cc/en/Reference/Wire/ .

[21] SPI Library official page. http://arduino.cc/en/Reference/SPI/ .

[22] LiquidCrystal Library official page. https://www.arduino.cc/en/Reference/LiquidCrystal/ .

[23] Wikipedia page on HD44780: https://it.wikipedia.org/wiki/HD44780/ .

[24] Servo Library official page: https://www.arduino.cc/en/Reference/Servo/ .

[25] NewPing Library official page: http://playground.arduino.cc/Code/NewPing/ .

[26] Wikipedia page on Taito’s Space Invaders: https://it.wikipedia.org/wiki/Space_Invaders/ .

CASALE GIUSEPPE - Engineering and Computer Science - ECS UNIME - peppecasale@virgilio.it

Credits:

Dr. Giuseppe CasaleE-mail: peppecasale@virgilio.itTel.: 340.095.33.86Fb.com/Giuseppe.Casale01https://youtu.be/1IioQDRjlNA

top related