This is an old revision of the document!
Carlos Javier del Nero Castón
1. Is it within range to warn? 1.Yes 1. Trigger visual and audible alarm 2. Continue 2. No 1. Continue
The algorithm of the visual and audible warning system would be as follows.
1. Are you in the green zone?
1. Yes 1. Turn on green LED 2. Emit sound 1 3. Exit 2. No 1. Continue
2. Are you in the yellow zone?
1. Yes 1. Turn on yellow LED 2. Sound 2 3. Exit 2. No 1. Continue
3. Are you in the red zone?
1. Yes 1. Turn on red LED 2. Emit sound 2 3. Exit 2. No 1. Continue
From the two previous algorithms, we deduce that we will need several decision thresholds, one for each situation.
To measure distances with Arduino we can do it in different ways. There is the infrared sensor, which uses the properties of light to calculate distance, and the Arduino ultrasonic sensor uses the propagation properties of sound to measure distances. More specifically it uses ultrasound. This type of sound waves are above the spectrum audible to humans.
The operation is very simple. The sensor sends an ultrasonic wave through the trigger, it bounces off the object and the receiver or echo detects the wave. By knowing how long the wave has taken to travel, we can find out the distance.
To correctly simulate the distance sensor we are going to use an Arduino buzzer. These components use piezoelectricity, a physical phenomenon that affects certain crystals (quartz is the most common). When a crystal of this type is subjected to piezoelectricity, it deforms and vibrates. If we get that vibration to have a frequency within the audible spectrum, we get a sound.
Finally, we incorporate the visual alert system for the Arduino ultrasonic sensor. This allows us to visualise whether we are near or far from an obstacle.
With 3 LEDs (green, yellow and red).
Where we will connect the components.
To make the connections.
Of 220 Ω
ELECTRIC SCHEMATIC
Through the ultrasonic sensor we are going to detect the obstacle. We start programming by declaring the variables and constants.
Pines utilizados
#define LEDVERDE 2
#define LEDAMARILLO 3
#define LEDROJO 4
#define TRIGGER 5
#define ECHO 6
#define BUZZER 9
Constantes
const float sonido = 34300.0; Velocidad del sonido en cm/s
const float umbral1 = 30.0;
const float umbral2 = 20.0;
const float umbral3 = 10.0;
</note>
===== Rezultate Obţinute =====
<note tip>
Care au fost rezultatele obţinute în urma realizării proiectului vostru.
</note>
===== Concluzii =====
===== Download =====
<note warning>
O arhivă (sau mai multe dacă este cazul) cu fişierele obţinute în urma realizării proiectului: surse, scheme, etc. Un fişier README, un ChangeLog, un script de compilare şi copiere automată pe uC crează întotdeauna o impresie bună .
Fişierele se încarcă pe wiki folosind facilitatea Add Images or other files. Namespace-ul în care se încarcă fişierele este de tipul :pm:prj20??:c? sau :pm:prj20??:c?:nume_student (dacă este cazul). Exemplu: Dumitru Alin, 331CC → :pm:prj2009:cc:dumitru_alin.
</note>
===== Jurnal =====
<note tip>
Puteți avea și o secțiune de jurnal în care să poată urmări asistentul de proiect progresul proiectului.
</note>
===== Bibliografie/Resurse =====
<note>
Listă cu documente, datasheet-uri, resurse Internet folosite, eventual grupate pe Resurse Software şi Resurse Hardware.
</note>
<html><a class=“media mediafile mf_pdf” href=”?do=export_pdf”>Export to PDF</a></html>
====== Senzor de parcare ======
===== Introducere =====
<note tip>
Acest proiect are ca scop relizarea unui senzor de parcare. Cu ajutorul unui buzzer va fi semnalizata apropierea de un obiect. Ecranul LCD-ul va afisa distanta fata de cel mai apropiat obiect detectat.
</note>
===== Descriere generală =====
<note tip>
O schemă bloc cu toate modulele proiectului vostru, atât software cât şi hardware însoţită de o descriere a acestora precum şi a modului în care interacţionează.
Exemplu de schemă bloc: http://www.robs-projects.com/mp3proj/newplayer.html
</note>
===== Hardware Design =====
<note tip>
List of components:
- Arduino UNO
- Protoboard where we will connect the components
- Cables to make the connections
- 3 resistors of 220 Ω
- 1 green LED
- 1 yellow LED
- 1 red LED
- 1 Arduino ultrasonic sensor (HC-SR04)
- 1 buzzer.
</note>
===== Software Design =====
<note tip>
Descrierea codului aplicaţiei (firmware):
* mediu de dezvoltare (if any) (e.g. AVR Studio, CodeVisionAVR)
* librării şi surse 3rd-party (e.g. Procyon AVRlib)
* algoritmi şi structuri pe care plănuiţi să le implementaţi
* (etapa 3) surse şi funcţii implementate
</note>
===== Rezultate Obţinute =====
<note tip>
Care au fost rezultatele obţinute în urma realizării proiectului vostru.
</note>
===== Concluzii =====
===== Download =====
<note warning>
===== Jurnal =====
<note tip>
Puteți avea și o secțiune de jurnal în care să poată urmări asistentul de proiect progresul proiectului.
</note>
===== Bibliografie/Resurse =====
<note>