Professional Documents
Culture Documents
Design and Implementation of Bluetooth Based Fan Speed Control
Design and Implementation of Bluetooth Based Fan Speed Control
net/publication/347932969
CITATION READS
1 3,288
2 authors:
Some of the authors of this publication are also working on these related projects:
Design and Implementation of a GSM Based Automated Meter Reading System View project
All content following this page was uploaded by Bolatito Fatimah Aderinkola on 27 December 2020.
1
Department of Electrical and Electronic Engineering, The Federal Polytechnic, Ede, Osun State, Nigeria.
2
Department of Electrical and Electronic Engineering, Osun State College of Technology, Esa-Oke, Osun State.
*fattyade2307@gmail.com
Abstract
The use of automation systems to monitor and control electrical appliances at home and offices has been on the increase in
recent times. This paper presents an Android based home automation system that allows users to control the speed of AC fan
through an Android application. The system employs a microcontroller PIC16F877, Bluetooth module, relay and relay driver
IC-ULN2003APG and some hardware devices. The Bluetooth module receives commands from the smart phone user and
sends the code to the microcontroller, the sensor detects temperature and communicates with the microcontroller. The fan
receives the command via the relay through the relay driver that communicates with the microcontroller, the relays provide
the switch mechanism and the Liquid Crystal Display (LCD) displays the temperature and the fan speed. The results obtained
shows that the work meets the design target.
Introduction
Automation is a technique of operating or controlling a process by electronic devices with reduced human involvement to a
minimum. The fundamental of building an automation system for an office or home is growing everyday due to its numerous
benefits (Gaikwad & Kalshetty, 2017). Recently, the popularity of controlling electrical device through phone has been
increasing due to high performance and reduced work by connecting through smart phone which is useful for elderly and
physically challenged people, who can access and control the appliances by staying at some distances and access them
without the help of others (Preethi & Dharmalingam, 2017). The fan, as a common household appliances has enjoyed the
smart automation. With smart automation, the speed of a fan can be controlled using smart phone. This can be achieved
through Bluetooth, a widespread wireless technology used for sharing data, available in Android smartphones. This Bluetooth
technology allows the users, prompt connections of voice and information between several devices in real time. The way of
Several researchers have worked on smart automation for controlling electrical appliances. Belgi, et al., (2013) implemented
an Android Based Appliances Control System. The system is a combination of Android mobile technology and embedded
system which employs a Bluetooth module LM400 whose function is based on CSR blue core 4-EXT Bluetooth system. The
system developed and implemented is thus, capable to control fan speed and light intensity using smart phone. Mowad,
Fathy, & Hafez, (2014) worked on Smart Home Automated Control System Using Android Application and Microcontroller.
The system was supported by remote control system as a sub-controlling system and also connected to a wireless Bluetooth
technique to monitor and control the electronic house equipment from anywhere in the world using both Arduino and
microcontroller. Yasin (2016) successfully implemented fan speed control using smartphone by employing a RemoteXY
smartphone application which delivers to and receives data from Arduino. The RemoteXY transmit data through Bluetooth
module HC-05 and then delivered to Arduino Uno which sends digital data to the relay module which in turn selects or
controls the speed of the fan. However, the relay module used sometimes takes time to understand command from the
Arduino.
Controlling Fan Using Smart Android Device Via Wireless Bluetooth Microcontroller was made possible with the use of
simpleBluetooth mobile application that sends signal from the mobile phone to the microcontroller. The system introduces an
Android OS based application for Smartphone that communicates with the fan through mobile device continuously to control
the fan speed. The wireless connectivity through the android device provides help to the people especially to elderly and
This paper presents Bluetooth-based fan speed control system that employs an Android smartphones with Bluetooth
Electronics as the mobile Application for communicating with a PIC microcontroller via Bluetooth module. The system will
enable users to have control over the speed of fan in his home with Bluetooth.
1. Methodology
= 2 × 12 = 24V
Therefore, the required diode is IN4001 which has a voltage rating of 50V
c. Capacitor
where F is the frequency of ripple voltage which is 50Hz, ϒ is the ripple factor taken to be 0.05 and R is the resistance which
𝐶 = 288µF.
These are the d.c voltage (𝑉𝑑𝑐 ) and d.c current (𝐼𝑑𝑐 ) through the resistors
2𝑉𝑚𝑎𝑥
𝐼𝑑𝑐 = (3)
𝜋𝑅
= 19.233V ≅ 20𝑉
𝐼𝑑𝑐 = 0.064 𝐴
⸫ 𝑉𝑑𝑐 = 12.732 𝑉
The maximum voltage from the utility public supply designed for is 250volts.
𝑉𝑚𝑎𝑥 ≅ 20 𝑉
Figure 1 shows the block diagram implementation of the Bluetooth-based fan speed control.
The power supply from 220V alternating current (AC) mains is stepped down using a step-down transformer (220/12V
1500mA) to 12V. The output from the transformer is converted to a DC voltage using a bridge rectifier. The output from the
rectifiers is a pulsating DC which contains some ripples. Electrolytic capacitor is used to filter the 12V pulsating DC to a pure
12V DC.
them. This 12V DC output is used to power the relays and relay driver. However, a 5V DC is required to power the PIC
16F877A microcontroller, the Bluetooth module and LCD using LM 7805 regulator. The output from the regulator contains
some ripples which is filtered using 1µf capacitor. Figure 2 depicts the circuit diagram of the power supply unit.
2.2.1 Microcontroller
The microcontroller employed here is the PIC16F877 used as the “brain” to control a large variety of devices. The
microcontroller communicates with the Bluetooth module through its TX and RX pins. The serial control command send
through the smart phone is received by the Bluetooth module and processed by PIC microcontroller. The corresponding port
pins are enabled to switch on appliances. A 12MHz crystal connected between pins 9 and 10 along with a 22pF capacitor to
provide the basic clock frequency to the microcontroller. Figure 3 shows the data and pin configuration of the PIC
microcontroller.
Bluetooth module receives the data serially in RS232 format from the microcontroller and sends it to wireless network. The
Bluetooth module HC-05 is used here to receive data from smartphone and communicate it to the PIC16F877 microcontroller
for further processing. The connection to the PIC16F877 microcontroller are as follows: RX to pin 18, TX to pin 17, Vcc to
pin 5V and GND to pin power GND. This Bluetooth module is used to control the speed of the fan using Bluetooth signal
connectivity than a feature phone. Android is a software stack for mobile devices that includes an operating system,
middleware and key applications. The Android phone sends the command to the microcontroller via the Bluetooth module to
change the speed of the fan. The android application used here is the Bluetooth Electronics version 1.3. It communicates
using Bluetooth to an HC-05 Bluetooth module and comes with a library containing 11 Bluetooth examples for Arduino. It
can also be used with Raspberry Pi or any other rapid prototyping system in which a suitable Bluetooth module has been
included in a project. It has large selection of controls including buttons, switches, sliders, pads, lights, gauges, terminals,
accelerometers and graphs.This app is downloaded unto a smart phone through the Google play store. Once installed,
connection with the Bluetooth module can be established using the following procedures:
Open the app, click ‘allow’ on the phone screen to switch ON the phone’s Bluetooth.
Select ‘Discover’ button on the phone screen and then Click on the code HC-05 (98:D3:61:F5:C0:5C). Then select
Figure 4 depicts the graphic user interface (GUI) of the Android Application’s process of connecting to Bluetooth module.
A relay is
an
electrome
chanical
switch
that is
used for
switching
between
Figure 4: GUI of Android Application showing process of connecting to Bluetooth module.
Design and Implementation of Bluetooth-based Fan Speed Control
School of Engineering Technology Annual International Conference (SAINCONF), ISSN: 2756-4126 www.setridc.com
5-volt circuits and 220/120 Volt AC circuits. Relays are used to provide isolation between microcontroller’s circuits and high
voltage operating loads. Microcontrollers are only used to provide on/off signals to relays (Bilal-Malik, 2018). However, it is
impracticable to use a relay directly with the microcontroller because they do not have enough current sourcing ability to
drive relays, hence the need for an interface called relay driver IC used to drive relays properly. The relay driver IC used here
is ULN2003. Relay driver IC ULN2003 is high voltage and high current integrated IC which used Darlington array (Bilal-
Malik, 2015). Three relays are employed here to perform the control of the fan speed switching mechanism. Each relay
Fan is a device that create a current of air by movement of a surface using a rotating motor. The fan and thermistor are
connected to pin 2 of the PIC microcontroller. The fan receives the command via the relay through the relay driver IC that
communicates with the microcontroller. However, the fan must be switched ON before it can receive any command. The
speed change processes are displayed on the Liquid Crystal Display (LCD). The LCD employed was LCD 1602. Figure 5
change speed of the fan. The fan receives the command via the relay through the relay driver IC that communicates with the
microcontroller. The speed changes process (speed 1, 2 and 3) is displayed on the LCD. Figure 6 demonstrates the working
of the device during testing. The connectivity between the smartphone and the Bluetooth module was tested to ascertain the
range at which the fan can receive command from the phone when the user is about entering the house in case of a sunny
Table 1. Results of connectivity tests between android smartphone and the fan
Table
shows
that
the
Blueto
oth
modul
e was
able to
receive signal from the smartphone. This implied that the android phone was out of coverage range of the Bluetooth module
4. Conclusion
The microcontroller was successfully interfaced with the Bluetooth module and the Bluetooth Electronics application
successfully read data from the microcontroller so as to control the fan speed. Thus, a Bluetooth-based fan speed control has
been successfully implemented. The device works well for it has been tested to work for 8 hours even while the author was
sleeping at night.
References
Belgi, Y. G., Avatade, P. G., Deshmukh, P. V., Sakhare, A. M., Shinde, A. J., & Patil, J. M. (2013). Android Based
Appliances Control System. International Journal of Emerging Technology and Advanced Engineering, 03(12), 681
- 683. Retrieved October 10, 2019, from www.ijetae.com
Bilal-Malik. (2015, April 25). Relay driver circuit using uln2003. Retrieved November 18, 2019, from Microcontrollers Lab:
https://microcontrollerslab.com/relay-driver-circuit-using-uln2003/
Bilal-Malik. (2018, July 3). Microcontroller interfacing to relays using ULN2003. Retrieved November 18, 2019, from
Microcontrollers Lab: https://microcontrollerslab.com/microcontroller-interfacing-relays-uln2003
Gaikwad, P. V., & Kalshetty, Y. R. (2017). Bluetooth Based Smart Automation System Using Android. International
Journal of New Innovations in Engineering and Technology, 7 (3), 24 - 29. Retrieved October 20, 2019
Mowad, M. A.-L., Fathy, A., & Hafez, A. (2014). Smart Home Automated Control System Using Android Application and
Microcontroller. International Journal of Scientific & Engineering Research, 5(5), 935 - 939. Retrieved October 10,
2019, from http://www.ijser.org
Preethi, M., & Dharmalingam, R. (2017). Controlling Fan Using Smart Android Device Via Wireless Bluetooth
Microcontroller. International Journal of Advances in Computer and Electronics Engineering, 02(01), 24 - 29.
Retrieved October 10, 2019
Yasin, N. H. (2016). Fan Speed Controlled using Smartphone. President University, Department of Electrical Engineering.
Cikarang Indonesia: President University.