Mini - Project - Report - Microcontroller Apllication
Mini - Project - Report - Microcontroller Apllication
Faculty of Engineering
Department of Electrical and Computer Engineering
MICROCONTROLLER APPLICATIONS (721S)
PROJECT REPORT: HOME AUTOMATION SYSTEM
USING TELEGRAM APP
Submitted by
Mabhena Shepherd Junior
214052362
2
Table of Contents
Introduction...........................................................................................................................................4
Background Information....................................................................................................................4
Raspberry Pi...........................................................................................................................................4
Telegram................................................................................................................................................4
Problem Statement...............................................................................................................................4
Objectives..............................................................................................................................................5
Design and Methodology......................................................................................................................5
Hardware Requirements...................................................................................................................5
Methodology.....................................................................................................................................5
Working Mechanism..........................................................................................................................5
Conclusion.............................................................................................................................................6
3
Introduction
Background Information
Technology has become an integral part of people's lives, it continues to influence most facet
s of everyday life and has facilitated better social communication, ease of travel, entertainme
nt and media indulgence. It can also be facilitated in the home environment for convenience,
comfortably and luxury through smart homes implemented through the Internet of Things
(Iot), which simplifies the way in which things were traditionally done.
Raspberry Pi
Raspberry-Pi is characterized by raspberrypi.org as a minimal effort, Mastercard size PC that
attachments into a PC screen or television, and uses a standard console and mouse. It is
introduced as a little gadget that empowers individuals to experience figuring and pick up
programming dialects, for example, Scratch and Python. Basically, it can perform whatever
one would anticipate a PC or workstation to perform. Dr Eben Upton characterizes it as a
little, shabby ARM based PC for training and for specialists.
Telegram
Telegram is an instant messaging and voice of service application with a focus on security
and speed available for Android, iOS, Windows Phone, Windows NT, macOS and Linux. It
is a cloud-based service, meaning you can access your messages from several devices at
once. Since Telegram is accessible on Linux based devices it can be interfaced with
Raspberry Pi, since it runs on a Linux based OS.
Problem Statement
Home Automated systems demand is growing by the day due to its numerous advantages.
People are constantly spending countless hours on the mobile devices, mostly on social
networks and instant messaging application. To avoid the hustle of switching between
different application on a particular device, one would wonder, wouldn’t it be nice to control
the house lights appliances and security systems using an instant messaging application like
Telegram. In addition to this people sometimes find themselves in situations where they live
their place of residence without switching off certain appliances and lights, thus waiting
electricity (a commodity which is proving to be scarce in certain parts of the world). The
home automated system can rectify this problem where u can turn on and off appliances even
if you are not physically present in a certain environment. This paper henceforth proposes a
home automated system to control the lights in different rooms using Telegram.
Objectives
1. To interface Raspberry Pi 3 with the Telegram messaging application.
2. To switch lights on/off in different rooms using Telegram.
4
Hardware Requirements
Hardware/Components Quantity
Raspberry Pi 3 (with internet connection) 1
LEDs 4
Power Supply 1
Jumper Wires 4
Bread Board 1
Methodology
The plan of this undertaking incorporated the above stated equipment in the table.
Telegram Configuration
The preliminary steps towards the commencement of the design project was to configure the
Telegram instant messaging application with Bot Remote Control.
Step 1: Installing Telegram on the mobile device
The first step involved installing Telegram on the mobile phone, it is available on the
following platforms: Android, iOS, Windows Phone, but to name a few
Step2: Communicating with the Bot Father.
Before communicating with the Bot Father Remote Bot for Telegram was
downloaded from the Google Play Store. Upon finishing the installation of the
Remote Bot for Telegram, a bot name and bot username were created for establishing
connection between Telegram and the Remote Bot. This was completed successfully.
This bot created is for remotely connecting to the mobile phone remotely from any of
one’s devices with telegram installed running with the same mobile number.
Figure 1
Secondly, another bot was created specifically for communication between Raspberry
and Telegram. This was done by prompting the following command the Bot Father
chat interface
/newbot
Bot_name – Pi Bot
5
Bot_username-technolux_bot
Figure 2
6
Figure 3
Figure 4
7
Figure 5
8
Figure 6
The figure above shows the communication between the Raspberry Pi and Telegram via the
Pi Bot. Every time the user prompted an instruction a response would be received in
correspondence to the sent message.
9
Figure 7
10
Figure 8
Figures 7 and 8 depict the output responses from the instructions prompted in figure 6. Each
time an instruction was sent there was a corresponding response which gave an output in
accordance to what it was instructed to perform.
11
Modifications
Future modifications of the design will see voice to text capabilities being implemented into
the program, i.e. currently the user has to type the message, future designs will see the user
just having to control the GPIO pins using voice texts. In this regard one doesn’t have to type
but simply speak into the mobile phone microphone as though sending a voice note.
Applications
The above implemented design can have quite a vast number of real-world applications
which can revolutionize the way in which we live and perform certain tasks.
The LED’s can be replaced with relays and AC appliances then this design can be turned into
a Smart Phone controlled Home Automation System. This system could be used to control all
house lights, i.e. turning the house lights ‘on’ and ‘off’, as depicted in the figure below.
Figure 9
In addition to lights, a vast number of house hold appliances can be controlled in exactly the
same way as shown in figure. These appliances include the home entertainment unit,
microwaves, fridges, basically any house hold appliance can be controlled in this manner.
Conclusion
Overall completion of the proposed design was a success, with all the objectives having been
met. The application of the proposed design will primarily focus on a Smart Phone controlled
Home Automation system with modifications being implemented at this stage.
12
References
1. https://core.telegram.org/bots
2. https://www.instructables.com/id/Telegram-on-Raspberry-Pi/
3. https://www.slideshare.net/kasimmalik2/iot-based-home-automation-using-raspberry-
pi3
13