INTRODUCCIÓN A LA PROGRAMACIÓN
EXAMEN DE ARDUINO
(Alarma Electrónica)
INTRODUCCIÓN A LA PROGRAMACIÓN
Evaluación N° 4
Introducción a la programación
ARduino
Alumno : sulla sulla Tony Gastón
Quispe Sucasaca Franklin
Ccolqque Ccahuana Romario
Gonzales Sierra Walter
Vilca Fernández Yordan
Jerson
Grupo : D Profesor: Usca Nota:
Semestre : 3 Huacasi Junior
Fecha de entrega : 29 06 2020
INTRODUCCIÓN A LA PROGRAMACIÓN
OBJETIVOS:
Equipos, materiales, programas y recursos:
● PC personal con Windows 10.
● Programa Tinkercad
● Material adicional en Canvas TECSUP.
SEGURIDAD:
• Ubicar maletines y/o mochilas en el lugar del aula de laboratorio destinado para tal fin.
• No ingresar con líquidos ni comida al laboratorio.
• Al culminar la sesión de laboratorio, apagar correctamente la computadora y el
monitor.
• Deberá dejar la mesa de trabajo y la silla que utilizó limpias y ordenadas.
INTRODUCCIÓN A LA PROGRAMACIÓN
EXAMEN DE ARDUINO
Project: alarma electrónica
1. Recursos
Components Reference image
1 PIR
1 bocina
1 resistencia de 100 ohm
1 led
1 resistencia de 220 ohm
1 botón
1 resistencia de 10 Kohm
2. Project description
In the microcontroller era today, Arduino is more than just a tool to accomplish
hobby tasks. There is actually a close relationship between microcontroller
technology and home security, since you can use a microcontroller based circuit
to help you protect your home. Here is an ultra-simple Arduino Night Alarm
project wired around a handful of inexpensive and easily available components.
INTRODUCCIÓN A LA PROGRAMACIÓN
One advantage of using Arduino as a security system is the flexibility!
Depending on the external hardware you use, there are various types of security
tasks that can be accomplished with the help of this little circuit. For example,
you can make your circuit sound an audible alert (and fire a warning lamp)
whenever it detects a motion near the door or window of your house.
The circuit is infact a dark activated switch measures the ambient light level and
will enable the system only when ambient light level is below a threshold value.
Here an LDR (Light Dependent Resistor) is used to measure the light level. The
alarm system is triggered when a “Logic High (H)” level signal is detected at its
sensor input port.
As indicated, our system requires a “Logic High (H)” level input to wake up. The
best sensor you can use to detect an intrusion is the Passive Infrared (PIR)
Sensor. The PIR Sensor detects the motion of a human body by the change in
surrounding ambient temperature when a human body passes across, and
effectively controls the switching
when it detects a moving target. Most Digital PIR sensor modules have three
connector pins: Vcc (5V), Ground (0V), and Output. The output is a digital LOW
or HIGH, depending on whether the sensor has detected movement. In case of a
motion detection, output pin will go High (H). The output returns to, and stays at
Low (L) when the motion has stopped. This output signal duration can be
adjusted from near 0.3s to 18s by the onboard potentiometer.
Another sensor suitable for our project is the Infrared Proximity Sensor. This
sensor gives logic high (H) output when an object comes close to the sensor.
This sensor only responds to 38 KHz modulated infrared light which makes it
immune to disturbance caused by the ambient light. Specifications of a typical
Digital Infrared Proximity Sensor module is given here.
Supply: 5VDC, 38mA
Range: 4cm to 18cm pre-settable using onboard potentiometer
Output: Digital
Modulation frequency: 38KHz
3. process
INTRODUCCIÓN A LA PROGRAMACIÓN
a. Circuit in Tinkercad
b. Link del proyecto en Tinkercad
https://www.tinkercad.com/things/bwg01mX1JAJ-incredible-
jaagub/editel?sharecode=PF98SJMKhZCBFpX7-
z9v9XZsaNc4LSIBrTSahAr8hCg
4. Códe
INTRODUCCIÓN A LA PROGRAMACIÓN
int buzz = 9;
int PIR = 2;
int led = 13;
int pulsador = 4;
int estado = LOW;
int mov = 0;
void setup()
{
pinMode(buzz, OUTPUT);
pinMode(led, OUTPUT);
pinMode(PIR, INPUT);
pinMode(pulsador,INPUT);
}
void loop()
{
while (digitalRead(pulsador) == LOW)
{
mov = digitalRead(PIR);
if(estado == HIGH)
{
digitalWrite(mov, HIGH);
delay(300);
mov = 0;
}
if (mov == HIGH)
{
digitalWrite(buzz, HIGH);
}
if (estado == LOW)
{
digitalWrite(buzz, LOW);
}
}
// si hay movimiento y el estado del led es activo entonces debe sonar la bocina
// sino nada
estado = !estado;
digitalWrite(led, estado); // enciende o apaga el led
while (digitalRead(pulsador) == HIGH);
}
INTRODUCCIÓN A LA PROGRAMACIÓN
5. Attach images where the operation is shown
6. URL del video Youtube
INTRODUCCIÓN A LA PROGRAMACIÓN
CONCLUSIONS
The program used (arduino), is the most important tool that can be used
in various environments of everyday life, whether as a hobby or even
technical projects, university and work.
This program has several benefits for its easy accessibility and its simple
and clear programming, whether working in blocks, codes or both.
Arduino is a complete platform that has everything, ie its variety of
components resembles reality.
Arduino programming is very intuitive and simple allowing people who
are not related to electronics, can quickly learn the basics and thus
create our projects like this security system.
The variety of programming and combination of components ina circuit is
variable and extensive. That is why it has a large audience.
A pir sensor detects movement by infrared light or what is the same heat
variations, in this project we will work with a screen next to the sensor to
simulate a small alarm system.
With arduino we can not only do jobs, projects, etc., but we can also use
this tool as a form of income.
This program is currently being incorporated into homes and schools,
causing children or young people to have a good management of it.
Thanks to the Internet you can now share the code or circuits of any
project in this way we can use it to our benefit and improve it
continuously.
The understanding of the last classes and some visited web pages are
being evidenced in this project.
The above observation has been important for the realization of this
project.
The lack of group coordination affected project production, but not
knowledge of the topic.
This previously developed project is even marketed and in this work we
are observing a more detailed and precise operation, not to mention that
we assembled the circuit and code.
We have to make a good connection of the components and then
conclude with the code.
This is a project that will help us to have control of a given area ina
computational and digital way and could even be remotely for example
that I sent an alert to our smartphone after or at the same time that the
alarm sounds.