Logo en.artbmxmagazine.com

Home automation applied with arduino and its different modules

Anonim

Home automation has a number of applications through the use of the Arduino platform shield, which due to its diversity, low cost, easy handling and implementation, becomes the most viable option for its implementation, giving better quality. life especially to people with special abilities that with a simple application can have access to all areas and effective control of your home.

Introduction

"Home automation is the set of technologies applied to the intelligent control and automation of the home, which allows efficient management of energy use, which provides safety and comfort, as well as communication between the user and the system.".

Theoretical framework

II-A Domotics

Home automation systems are capable of storing information from different types of sensors or inputs, processing it in such a way that different actuators or outputs carry out different activities for which they were created. These types of systems, due to their versatility, can be compatible with different technologies, being able to access external communication, information and alert networks, even interacting with both private and public security forces, taking these systems to another level.

Home automation is designed in such a way that it allows to respond to the new requirements posed by new societies, which are increasingly automated and the new trends in our way of life, facilitating the design of houses and homes that are more humane, more personal, Polyfunctional and flexible, generating a better quality of life and independence for people with special abilities, despite the fact that home automation was directed towards wealthy homes with the advancement of technology and the reduction in cost of the various devices, rather it has become an effective tool and it can be said that even more humane when people with special abilities are concerned, giving them greater independence, privacy and allowing them to carry out activities that they previously needed from other people.

Currently it offers more features for less money, more product variety, which thanks to technological developments, are easier to use and install. In short, the offer is better and of higher quality, and its use is now more intuitive and perfectly manageable by any user, being one of that technology the one that covers Arduino with its shields, which we have the opportunity to mention its basic characteristics of functioning.

II-B Arduino mega.

Arduino is an OpenSource platform, that is, an open platform or based on a microcontroller board and a development environment designed to perform and use in different fields.

This Arduino has 54 digital pins either input or outputs, 16 analog inputs, 4UARTs that are serial ports, a 16 MHz crystal oscillator, a reset button and also a USB connection.

The Arduino Mega has 16 analog inputs, each of which provide 10 bits of resolution (i.e. 1024 different values). By default they are measured from ground at 5 volts.

Its power is based on either connecting it via USB to the computer, connecting an AC adapter or a DC battery. The power source is automatically selected.

Figure 1. Arduino MEGA.

Specs:

ATmega1280 Microcontroller

Operating voltage 5v.

Input voltage (recommended) 7-12V

Input voltage (limits) 6-20V

Digital I / O 54 pins (of which 15 provide PWM output)

Analog input pins: 16

DC current by I / O Pin 40 mA

3.3V Pin 50 mA DC current

128 KB Flash memory of which 4 KB used by bootloader

SRAM 8 KB

EEPROM 4KB

Clock speed 16 MHz

The Arduino can work with a power supply of 6 to 20 volts, but there is a power reference that is between 7 to 12 volts where the Arduino would work correctly since if it is powered with a voltage less than 7 volts the pin 5V can supply less than 5V which would already be a problem and would make an unstable system, also if we go the other way, if it is powered more than 12v this could cause problems such as overheating or damaging the board. Therefore the recommended range is 7 to 12 volts.

The regulated power supply is used to power the microcontroller and other components on the board. This can come from VIN via an on-board regulator, or be supplied by USB or another regulated 5V source.

Pin: 3V3. A 3.3 volt supply generated by the onboard FTDI chip. Maximum current draw is 50 mA.

Pin: GND. Ground pins.

Arduino memory.

This arduino has a memory capacity of 128 KB of which 4KB is used for booting, 8KB is from SRAM and 4KB from an EEPROM which means that it can be read and written with the EEPROM library.

II C. Communication:

The Arduino is capable of communicating with the computer, another Arduino and also with other microcontrollers. It offers a serial communication, one of them a USB communication and FTDI drivers which is included in the arduino, it also offers a virtual com port for the computer. The arduino software includes a serial monitor which allows you to either send or receive data from the Arduino.

The RX and TX LEDs are LEDs that blink while information is being transmitted to the Arduino via a chip and the USB connection.

II D. Arduino programming.

The Arduino mega can be programmed with the arduino software which is downloaded from the arduino platform.

The Arduino comes preloaded with a bootloader which does not require external programming.

Figure 2. Arduino platform.

II-D EasyVR 3- Multi-purpose speech recognition module

The EasyVR shield is the module that serves for voice recognition and is compatible with any Arduino board to date there are three models starting from UNO ending R3 Shield, they work at levels of 3.3V or 5V, using the IOREF instruction pin to select EasyVR operating voltage.

It is also backward compatible with previous Arduino boards that do not have the IOREF instruction pin, which are using the default 5V I / O levels.

The board comes with separate stackable Arduino headers for the Shield interface. The EasyVR 3 module is also provided separately.

Compatible with Arduino boards that have the 1.0 Shield (UNO R3) interface and existing boards, including, but not limited to:

Arduino Duemilanove

Arduino uno

Mega arduino

Arduino Leonardo

Arduino Due

Supports direct connection to PC in main boards with separate USB / serial chip and special software by "bridge" in boards with single native USB interface, for easy access by Commander

Allows for different serial connection modes and will also flash updates to the built-in EasyVR module (via bridge mode). Supports reassignment of the serial pins used by the Shield (in SW mode).

Provides a 3.5mm audio output suitable for headphones or as a line output.

Figure 3. EasyVR3.

This module allows voice command and can be used in a number of applications, currently it can be applied even in wheelchairs due to its size and versatility, as was the project that was generated allowing quadriplegic people their mobility and independence in addition to independent control of lights, doors etc. Being the limit our imagination.

II-E. RF modules

This 433MHz radio frequency module is a UHF data transmitter for PCB mounting. When it works with the 433MHz receiver that complements it, forming a TX / RX system, it allows the implementation of radio frequency data links in a very simple way, reaching distances of up to 80 meters inside buildings or 350 meters in the open field when operating with the 12V source.

Technical specifications:

Radio Frequency Signal: ASK Modulation (Amplitude Displacement Modulation)

Power supply: 12V (also available in 3V and 5V versions)

Current consumption: <16 mA

Transmit power: 13 dBm

Frequency deviation: + - 75kHz

characteristics

Useful range up to 350 meters (12V), 230 meters (5V), 160 meters (3V)

Available in frequencies of 433.92 MHz (433MHz) and 315.0 MHz

Transmission speeds up to 20kbps

Available to operate at 315 MHz and 433.92 MHz (433MHz), this radio frequency TX / RX system minimizes spurious radiation and susceptibility. The transmitter supports wireless one-to-one or multi-node data link applications: opening garage doors / gates, remote monitoring of industrial processes, building security, Electronic Point of Sales (EPOS) and inventory tracking, remote switch, remote control lamp, wireless TX / RX calling system, etc.

Figure 4. Radio Frequency Module, transmitter and receiver.

Pinout

Figure 3. RF module pins.

Vcc: Regulated DC power. Maximum ripple content 0.1Vpp

DATA: Modulated signal input. Accepts serial digital data at 0V to 5V levels.

GND: Reference (ground) of the DC supply.

ANT: 50 ohm input from the antenna.

This is another Arduino module basically due to its properties we can use them in applications such as: authentication for personal entry or door command, card engraving etc.

II-F. ETHERNET MODULE

To be able to connect sensors, relays, etc. The Arduino is very interesting but to be able to consult all this from a simple and remote interface it is essential to be able to serve all this data through a website.

For this we need to connect it to a network and of course, we will need an Ethernet interface. Ethernet modules for Arduino are one of the most interesting components that we can work with.

In the market there are basically 2 types. Those based on the ENC28J60 and W5100 chip. Each has its advantages. The modules based on the ENC28J60 are cheaper and smaller. Allowing in a cheap way to mount a web server. In return, say that they are not supported by Arduino in a standard way, although there are more and more libraries and better finished.

The modules based on the W5100 are bigger and with a higher economic cost, although they are getting cheaper and cheaper. The good thing about these modules is that they are easier to use since they come to mount directly on the Arduino and are supported in a standard way.

We are going to start with the ones based on the ENC28J60, which I have to say that I have used and for small projects it fulfills its function but that in larger projects it has given me some problems, since it became unstable and stopped responding. I think it was due to the version of the library I was using and I hope that in the new versions it has been solved.

Figure 5. ENC28J60 Ethernet Module.

The first thing we observe is that we have 10 pins and 7 must be connected to the Arduino.

Table 1. Ethernet, Arduino and Arduino Mega module pins.

Ethernet module Arduino Arduino Mega
VCC 3.3V 3.3V
GND GND GND
CS 10 53
SW 12 51
SCK 13 52
YES eleven fifty
RESET RESET RESET

II G Bluetooth HC-05 and HC-06

The HC-05 and HC-06 bluetooth modules are widely used modules for applications with PIC and Arduino microcontrollers. They are cheap devices

Figure 6. Bluetooth HC-05

In order to configure the HC-06 it is necessary that it is NOT paired or being used by any device, it is necessary to connect it to the PC and use a terminal program to give it configuration instructions (AT Commands), although we can also write a Arduino or in a microcontroller to configure it.

To connect it with the PC we use a serial USB adapter as shown in the photo:

The HC-06 module accepts a very basic set of commands (somewhat rare by the way), which allows few configurations, but which will undoubtedly be useful to customize this inexpensive module and configure it to meet the needs of the application.

The commands it supports are:

Test run:

Send: AT

Receive: OK

Set the Baudrate:

Send: AT + BAUD

The parameter number is a hexadecimal character from '1' to 'c' that correspond to the following Baud Rates: 1 = 1200, 2 = 2400, 3 = 4800, 4 = 9600, 5 = 19200, 6 = 38400, 7 = 57600, 8 = 115200, 9 = 230400, A = 460800, B = 921600, C = 1382400

Receive: OK

Set the Bluetooth Device Name:

Send: AT + NAME

Receive: OKsetname

Set the pairing PIN code:

Send: AT + PIN

Receive: OK

Get the firmware version:

Send: AT + VERSION

Receive: Linvor1.8

And if we could mention a large number of elements such as gps module, gsm module, among others, but the purpose of this document is not to delve into the Arduino shield but rather to have an exact idea of ​​the benefits of this platform in terms of home automation.

II H. App inventor:

This is a platform to create Android applications that will serve in each of the projects for its corresponding application, it is an operating system that many mobile devices currently use, including tablets, smartphones, this system was Linux based for its development, currently belongs to Google.

App inverter is not a program to develop an application, it works through a network connection, it works directly on the inventor's App server, it is like a web page where all operations are executed.

There are versions to install them on a computer, these versions are intended to work offline.

Requirements:

An internet connection (This requirement can be supplied by the computer version).

A google account. The programming is developed in the following direction:

http://ai2.appinventor.mit.edu

You can work in different languages, currently it has a package of 10 languages, among them are English, Spanish, Portuguese, etc.

Programming is not complex, in fact, it is object-oriented programming. The interface is somewhat friendly, from here you can add objects, once objects have been added to the Screen, they are programmed.

The following figure shows the inventor app interface.

Figure 7. Introduction inventor app interface.

Programming code

Figure 8. Programming code

VII. Applications:

The applications that can be developed are various and diverse, in our case we have developed it in a chair that is able to move through different technologies and interfaces, among which we can mention manual command of the chair using a joystick, this form is the basic one to command a chair that through simple swhichs we pass the current and voltage to the respective motors so that they can maneuver according to our need.

Figure 9. Joystick control

In the same way, one of the ways in which we can command the chair is the implementation of the commands through voice commands developed on the arduino platform in its esay vr3 shield, As it was possible to study in the previous statements, this can be summarized in that the chair will simply obey the orders given to it through a headband where the microphone is implemented, this will serve especially those people who for different circumstances cannot move their upper limbs to give themselves the corresponding impulse in the wheelchair as well as for the same reason they are not able to maneuver the joystick becoming an instrument that can give a better quality of life, independence to the privacy of many of these individuals. To achieve this purpose, countless tests had to be carried out,Another application is not only the handling of the wheelchair but it is also the subject of home automation since it can also be done through direct communication to a smart house so that the person can turn on or pay for lights to open or close electric doors, among others. purposes of a smart home.

Remote control with the bluetooth shield, in this simple and small shield it has been found countless applications and diversity of uses since it will not only serve to command a remote-controlled wheelchair since this type of control was implanted in the chair wheel with which it allows us to give two types of use, one the control by means of pulsations through an application created in android as a remote-controlled cart, but it also allows us to use certain tools within our reach and give them the corresponding use of the new technologies such as sparth puts and tablets, by running them we can perform voice commands and remotely operate by pressing it,In the same way, it can communicate with the smart home, giving the individual better control of the same application created for everyone in the house since it can be operated without any experience, even by children, as it was proven at the science fair that the chair It was operated by young children of approximately 6 years who has a great facility to handle this type of technology, below we can see the application developed where we can observe others and the implementation not only of the chair command but also of turning on lights and alarm activationThen we can see the application developed where we can observe others and the implementation not only of the chair command but also of lighting and alarm activationThen we can see the application developed where we can observe others and the implementation not only of the chair command but also of lighting and alarm activation

Figure 10. Application developed in inventor app and loaded to a phone.

VII. conclusions and recommendations

Currently where we have developed technologies to travel to the moon or to other parts of the universe we have lost the vision of service in the first place to our neighbor service with which we want to reach and not displace them, the home or home automation building is not only at the service of Those who can pay, not only as a luxury but as the opportunity to give a better standard of living to those they love, is for this reason that we have shown that we implement these services at low cost and very versatile.

VIII. references and bibliography

Home automation for houses and buildings, Werner Harke, Marcobo technical editions.

dfists.ua.es/~jpomares/arduino/page_03.htm

www.academia.edu/9692067/Arduino_Curso_Pr%C3%A1ctico_de_formaci%C3%B3n

arduinobot.pbworks.com/f/Manual+Programacion+Arduino.pdf

Voice recognition module. Available at:

Polytechnic University of Madrid, Laboratorioderobotica.wordpress.com/easyvr-shield/tutorial-easyvr-shield-parte-2-tablas-de-sonido/

Radio Frequency Module.. Available at:

www.instructables.com/id/Modulos-RF433-Mhz-con-Arduino/

giltesa.com/2012/07/19/modulos-de-radio-frecuencia-a-433mhz-para-arduino.

Ethernet module.. Available at:

electronicaytelecomunicaciones-jc.blogspot.com/2015/02/modulo-bluetooth-hc-06-android-practica.html

www.gerdslab.com/es/libro_arduino_labview

www3.fi.mdp.edu.ar/electrica/instrumentacion/arduino/Arduino+Ethernet%20Shield.pdf

www.geekfactory.mx/tutoriales/bluetooth-hc-05-y-hc-06-tutorial-de-configuracion/

books.google.com.ec/books?id=6cZhDmf7suQC&pg=PA550&lpg=PA550&dq=modulo+bluetooth+arduino+libros&source=bl&ots=AZdAgXLyxO&sig=3s-NoTQubMnPMYJ136y3uzCaBNM&hl=es-419&sa=X&ved=0ahUKEwjRzOXQl7HKAhWFQyYKHVIpBQcQ6AEIUDAM#v=onepage&q= modulo% 20bluetooth% 20arduino% 20libros & f = false

domotica-arduino.es/blog/es/

RIVERA P. Control of electrical machines. NATIONAL POLYTECHNIC SCHOOL, Ecuador, 2000

PHILIPS. Electronic Compass Design Using KMZ51 / KMZ52.

ai2.appinventor.mit.edu/

Electronic Technician, Home Automation, 12 arduino + Android projects, Simon Monk, Editorial Starboard.

Learning app inventor, Alberto sierra, BOHODON EDICIONES, 2014

Create your own Android applications with Google App Inventor, ANAYA MULTIMEDIA / O´REILLY, David Wolber, Hal Abelson, Ellen Spertus and Liz Looney, September 2011

Download the original file

Home automation applied with arduino and its different modules