SBSK 4
SBSK 4
INTRODUCTION
In this modern era of development, automation of everything is the need of the hour. The
basic aim of any development is to ease the human life. Home automation aims at automating is
the human lives. Activating the home appliances without conventional switch but by using a
smartphone is known as home automation. Home automation is the use of one or more
computerized remotes to control basic home functions and features remotely and sometimes
automatically. An automated home is sometimes called a smart home. In present day world, more
emphasis is put on wireless technology. It is because; wired networks are messy and really
complicated. These wireless technologies have impacted human life in a positive manner and
human, are development speed has increased fore fold. The main wireless technologies used in
home are automation are GSM, Internet, Cloud and Bluetooth. Each technology has its own
advantages and disadvantages. But Bluetooth based home automation systems have way more
advantages. Devices can be connected from a range of 10m to 100m and this range can be increased
by using architecture. Also the frequency used for Bluetooth is 2.4GHz, which is globally
available. The speed that can be fetched for Bluetooth services is up to 3Mbps. It is these basic
advantages that driven as automation system.
The innovative aspect of this class is to effectively teach a course with a substantial lab
component within the MOOC format. If MOOCs are truly going to transform the education, then
they must be able to deliver laboratory classes. This offering will go a long way in unraveling the
perceived complexities in delivering a laboratory experience to tens of thousands of students. If
successful, the techniques developed in this class will significantly transform the MOOC
environment. We believe effective education requires students to learn by doing. In the
traditional academic setting this active learning is delivered in a lab format. A number of
important factors have combined that allow a lab class like this to be taught at this time. First, we
have significant support from industrial partners ARM Inc. and Texas Instruments. Second, the
massive growth of embedded microcontrollers has made the availability of lost-cost development
platforms feasible. Third, your instructors have the passion, patience, and experience of
Certain operating systems or language platforms are tailored for the embedded market, such as
Embedded Java and Windows XP Embedded. However, some low-end consumer products use
very inexpensive microprocessors and limited storage, with the application and operating system
both part of a single program. The program is written permanently into the system's memory in
this case, rather than being loaded into RAM (random access memory), as programs on a personal
computer are.
Although the students are engaged with a fun and rewarding lab experience, the educational
pedagogy is centered on fundamental learning objectives. After the successful conclusion of this
class, students should be able to understand the basic components of a computer, write C
language programs that perform I/O functions and implement simple data structures, manipulate
numbers in multiple formats, and understand how software uses global memory to store
permanent information and the stack to store temporary information. Our goal is for students to
learn these concepts:
1. Understanding how the computer stores and manipulates data,
2. The understanding of embedded systems using modular design and abstraction,
3. C programming: considering both function and style,
● Arduino UNO
● HC-05 Bluetooth module
● USB Cable
● Connecting wires
● Jumper wires
● Adapter 9V/2amp
● 4-Channel relay module
● 4 bulbs
● Holders
● Android Mobile phone
● Bluetooth SPP manager App
● Arduino software IDE
The Arduino Uno is a microcontroller board based on the ATmega328. The Arduino UNO
is the most used board in the family of Arduino boards. "Uno" means one in Italian and is named to
mark the upcoming release of Arduino 1.0. The Uno and version 1.0 will be the reference versions
of Arduino, moving forward. The Uno is the latest in a series of USB Arduino boards, and the
reference model for the Arduino platform.
It has 14 digital input/output pins (of which 6 can be used as PWM outputs), 6 analog
inputs, a 16 MHz ceramic resonator, a USB connection, a power jack, an ICSP header, and a reset
button. It contains everything needed to support the microcontroller; simply connect it to a computer
with a USB cable or power it with an AC-to-DC adapter or battery to get started.
"Uno" means one in Italian and was chosen to mark the release of Arduino Software
(IDE) 1.0. The Uno board and version 1.0 of Arduino Software (IDE) were the
reference versions of Arduino, now evolved to newer releases. The Uno board is the
first in a series of USB Arduino boards, and the reference model for the Arduino
platform; for an extensive list of current, past or outdated boards see the Arduino index
of boards.
HC-05 module is an easy to use Bluetooth SPP (Serial Port Protocol) module, designed for
transparent wireless serial connection setup. ... It uses CSR Bluecore 04-External single chip
Bluetooth system with CMOS technology and with AFH (Adaptive Frequency Hopping Feature).
It has the footprint as small as 12.7mmx27mm.HC-05 Bluetooth module provides switching mode
between master and slave mode which means it able to use neither receiving nor transmitting data.
Comparing it to the HC-06 module, which can only be set as a Slave, the HC-05 can be set as
Master as well which enables making a communication between two separate Arduino Boards.
FEATURES:
Wireless control and communication between a mobile phone. This was one of the earliest
applications to become popular.
Wireless control of and communication between a mobile phone and a Bluetooth compatible
car stereo system.
Wireless control of and communication with iOS and Android device phones, tablets and
portable wireless speakers.
Wireless Bluetooth headset and Intercom. Idiomatically, a headset is sometimes called "a
Bluetooth".
Wireless streaming of audio to headphones with or without communication capabilities.
Wireless streaming of data collected by Bluetooth-enabled fitness devices to phone or PC.
Wireless networking between PCs in a confined space and where little bandwidth is required.
Wireless communication with PC input and output devices, the most common being
the mouse, keyboard and printer.
Transfer of files, contact details, calendar appointments, and reminders between devices
with OBEX.
Replacement of previous wired RS-232 serial communications in test equipment, GPS
receivers, medical equipment, bar code scanners, and traffic control devices.
For controls where infrared was often used.
For low bandwidth applications where higher USB bandwidth is not required and cable-free
connection desired.
Sending small advertisements from Bluetooth-enabled advertising hoardings to other,
discoverable, Bluetooth devices.
Wireless bridge between two Industrial Ethernet (e.g., PROFINET) networks.
Seventh and eighth generation game consoles such
as Nintendo's Wii, and Sony's PlayStation 3 use Bluetooth for their respective wireless
controllers.
Dial-up internet access on personal computers or PDAs using a data-capable mobile phone
as a wireless modem.
This is a 5V 4-channel relay interface board, and each channel needs a 15-20mA driver
current. It can be used to control various appliances and equipment with large current. It is
equipped with high-current relays that work under AC250V 10A or DC30V 10A.Relays work on
electromagnetism, When the Relay coil is energized it acts like a magnet and changes the position
of a switch. The circuit which powers the coil is completely isolated from the part which switches
ON/OFF, This provides electrical isolation. This is the reason we can control a relay using 5V’s
from an Arduino and the other end of it could be running a 230V appliance, the 230V end is
completely isolated from the 5V Arduino circuitry.
To connect the 4 Relay board to an Arduino is very easy and allows you to turn on and off a
wide range of devices, both AC and DC. The first to connections are the ground and power pins,
you need to connect the Arduino +5v to the 4 Relay board VCC pin and the Arduino ground to
the 4 Relay board GND pin. Then it’s a only a matter of just connecting the communication
pins, labeled IN1, IN2, IN3 and IN4, two 4 data pins on the Arduino. In the example code below
us used Arduino pins 7, 8, 9, 10. It’s a good idea to avoid using Data pins 0 and 1 as they are
used by the Arduino for serial communication and can cause problems when uploading code to
the Arduino.
The default state of the relay when the power is off for COMM (power) to be connected to NC
(normally closed), this is the equivalent of setting the 4 Relay boards IN pin to HIGH (has +5v
sent to it) It is a safety feature to not use the NC connector in-case you Arduino loses power it
will automatically turns off all the devices connected to the relay. When you have something
In order to activate your Tiles, and to connect them to your Android device, Bluetooth must
be turned on.
(Note: Each Android device may vary -- like Samsung vs Nexus -- and so such if you're unable to
find your Bluetooth settings, please see your phone's manual or support site.)
3.1Block diagram:
▪ In this illustration we will going to write the HC-05 Bluetooth module using serial communication
with the Arduino board.
▪ And also 4-channel relay module is in serial communication with Bluetooth module and Arduino
board.
[1] This home automation system consists of two main hardware components: the cell phone and
the Uno Arduino board.
[2] The cell phone hosts the Bluetooth which enables the user to access the home appliances and
also the control commands for the appliances.
This board has 23 digital input and output ports, 16kB of flash memory, 10-bit analog to
digital converter, pulse width modulator and extra hardware resources which makes it suitable
for the required task.
The Uno Arduino board can be programmed wirelessly over the Bluetooth connection
using the microcontroller’s high-level interactive C language.
[1] Bluetooth-compatible devices perform „inquiries‟ to detect and find other Bluetooth enabled
devices within the area.
[2] When performing an inquiry, an application must wait to about 10 seconds for a 95% chance
of detecting every device.
[3] Not only does this process take time, it also consumes power.
[4] To minimize the need for an inquiry and hence saving time and power, Python allows an
application to retrieve a list of devices that would probably be in an area without performing an
inquiry.
1. Take the appropriate actions to put your device in Bluetooth SPP mode.
5. After pairing through your host device's Bluetooth settings, launch (or open) the application you
wish to use with your scanner.
The circuit design of Home Automation based on Arduino and Bluetooth is very simple
and is explained below. The Bluetooth module has 4 – pins: VCC, TX, RX and GND. VCC and
GND are connected to 5V and ground from Arduino UNO. The Bluetooth module works on 3.3V
and it has an on board 5V to 3.3V regulator.
The TX and RX pins of the Bluetooth module must be connected to RX and TX pins of the
Arduino. In Arduino UNO, we are defining pins 2 and 4 as RX and TX using software. Hence, TX
of Bluetooth is connected to pin 4 of Arduino.
But when connecting RX of Bluetooth to TX of Arduino (or any microcontroller as a matter
of fact), we need to be careful as the pin can tolerate only 3.3V. But the voltage from TX or
Arduino will be 5V.
So, a voltage divider network consisting of 10K and 20K resistors are used to reduce the
voltage to 3.3V approximately.
1. A simple home automation project using Arduino UNO, Bluetooth module and a
smartphone.
2. The aim of this project is to control different home appliances using a smartphone.
3. The working of the project is explained here.
4. When the power is turned on, the connection LED on the Bluetooth module starts
blinking. We need to start the “Bluetooth Controller” app in our smartphone and get
connected to the Bluetooth module. If the pairing is successful, the LED becomes stable.
5. Now, in the app, we need to set different keys for different loads and their corresponding
value that must be transmitted when that key is pressed.
6. The following image shows a set of keys to control 4 loads and an additional key to turn
off all the loads.
RESULTS
The Aurdino and bluetooth SPP manager app are connected through 4-channel relay , as
shown in figures below.
When the code is dumped and bluetooth is connected to the relay, the bulb will glow as shown in
below figure.
CONCLUSIONS
In this paper we have introduced design and implementation of a low cost, flexible and
wireless solution to the home automation. The system is secured for access from any user or
intruder. The users are expected to acquire pairing password for the Arduino BT and the cell phone
to access the home appliances. This adds a protection from unauthorized users. This system can
be used as a test bed for any appliances that requires on-off switching applications without any
internet connection
The full functionality of the home automation system wasted and the wireless
communication between the cellphone and Arduino BT was found to be limited to <50m ina
concreted building and maximum of 100m range was reported to be applicable in an open range.
Right now the Symbian OS cell phones only support Python scripts. For future work it is
recommende d to develop the GUI application for the cell phone to be written in Java so that it
can be supported by most of the cell phones available nowadays.
Managing all of your home devices from one place. The convenience factor here is
enormous. Being able to keep all of the technology in your home connected through one interface
is a massive step forward for technology and home management. Theoretically, all you’ll have to
do is learn how to use one app on your smartphone and tablet, and you’ll be able to tap into
countless functions and devices throughout your home. This cuts way back on the learning curve
for new users, makes it easier to access the functionality you truly want for your home.
Flexibility for new devices and appliances. Smart home systems tend to be wonderfully flexible
when it comes to the accommodation of new devices and appliances and other technology. No
matter how state-of-the-art your appliances seem today, there will be newer, more impressive
models developed as time goes on. Beyond that, you’ll probably add to your suite of devices as
Near trends suggest that home automation industry is taking giant leaps. A lot is happening in
this space since last two years. Many new start ups have come up with innovative products and
have reduced the cost drastically. This all suggest that India is also going to catch up with west in
home automation segment very shortly.
One such company Pert is offering home automation with varied offering and reliable solutions:
Pert Home Automation lets you control your switches and devices at the tap of a button. With
one Pert you can manage up to 8 switches and every Pert comes with an installation and a free
iOS and Android App. It helps in minimizing your electricity consumption. With the Pert App,
you can set an alarm for your home to switch on or switch off any gadget or appliance as per
your convenience. You can choose when and how long the device has to be turned ON or OFF.
One unique feature of Pert is that it works even when there is no Wi-Fi connectivity.
1. The system as the name indicates, ‘Home automation’ makes the system more flexible
2. Provides attractive user interface compared to other home automation systems.
3. In this system we integrate mobile devices into home automation systems. A novel
architecture for a home automation system is proposed using the relatively new
communication technologies.
4. 3.The system consists of mainly three contentions is a BLUETOOTH module, Arduino
And relay circuits.
[2] Neng- Shiang Liang; Li-Chen Fu; Chao-Lin Wu. “An integrated, flexible, and Internet-based
control architecture for home automation system in the internet era” .Proceedings ICRA `02. IEEE
International Conference on Robotics and Automation, Vol. 2, pp.1101-1106, 2002
.[3] E. Yavuz, B. Hasan, I. Serkan and K. Duygu. “Safe and Secure PIC Based Remote Control
Application for Intelligent Home”. International Journal of Computer Science and Network
Security, Vol. 7, No. 5, May 2007.
[4] B. Koyuncu. “PC remote control of appliances by using telephone lines”. IEEE Transaction
on Consumer Electronics, Vol. 41, Issue 1, pp.201-209, 1995.
[5] S. Schneider, J. Swanson and Peng-Yung Woo. “Remote telephone control system”. IEEE
Transaction on Consumer Electronics, Vol.43, Issue 2, pp.103-111, 1997.
[8]NodeMCU:https://nodemcu.readthedocs.io/en/master
https://iotbytes.wordpress.com/nodemcupinout/
[9]GoogleAssistant:https://assistant.google.com/intl/en_in/
https://www.pocketlint.com/Apps/Appsnews/Googleapp news
[10] IoT: https://internetofthingsagenda.techtarget.com/definition /IoT-device
[12]Webhooks:https://webhooks.pbworks.com/w/page/13385124/Fro ntPage
PROGRAM CODE
CODE :-
String inputs;
#define relay1 2 //Connect relay1 to pin 9
#define relay2 3 //Connect relay2 to pin 8
#define relay3 4 //Connect relay3 to pin 7
#define relay4 5 //Connect relay4 to pin 6
#define relay5 6 //Connect relay5 to pin 5
#define relay6 7 //Connect relay6 to pin 4
#define relay7 8 //Connect relay7 to pin 3
#define relay8 9 //Connect relay8 to pin 2
void setup()
{
Serial.begin(9600); //Set rate for communicating with phone
pinMode(relay1, OUTPUT); //Set relay1 as an output
pinMode(relay2, OUTPUT); //Set relay2 as an output
pinMode(relay3, OUTPUT); //Set relay1 as an output
pinMode(relay4, OUTPUT); //Set relay2 as an output
pinMode(relay5, OUTPUT); //Set relay1 as an output
pinMode(relay6, OUTPUT); //Set relay2 as an output
pinMode(relay7, OUTPUT); //Set relay1 as an output
pinMode(relay8, OUTPUT); //Set relay2 as an output
digitalWrite(relay1, LOW); //Switch relay1 off
digitalWrite(relay2, LOW); //Swtich relay2 off
digitalWrite(relay3, LOW); //Switch relay1 off
digitalWrite(relay4, LOW); //Swtich relay2 off
digitalWrite(relay5, LOW); //Switch relay1 off
digitalWrite(relay6, LOW); //Swtich relay2 off
digitalWrite(relay7, LOW); //Switch relay1 off
digitalWrite(relay8, LOW); //Swtich relay2 off
}
void loop()
{
while(Serial.available()) //Check if there are available bytes to read
{
delay(10); //Delay to make it stable
char c = Serial.read(); //Conduct a serial read
if (c == ‘#’){
break; //Stop the loop once # is detected after a word
}
if(inputs == “A”)
{
digitalWrite(relay1, LOW);
}
else if(inputs == “a”)
{
digitalWrite(relay1, HIGH);
}
else if(inputs == “B”)
{
digitalWrite(relay2, LOW);
}
else if(inputs == “b”)
{
digitalWrite(relay2, HIGH);
}
else if(inputs == “C”)
{
digitalWrite(relay3, LOW);
}
else if(inputs == “c”)
{
digitalWrite(relay3, HIGH);
}
else if(inputs == “D”)
{
digitalWrite(relay4, LOW);
}
else if(inputs == “d”)
{
digitalWrite(relay4, HIGH);
}
else if(inputs == “E”)
{
digitalWrite(relay5, LOW);
}
else if(inputs == “e”)
{
digitalWrite(relay5, HIGH);