Download as pdf or txt
Download as pdf or txt
You are on page 1of 10

See discussions, stats, and author profiles for this publication at: https://www.researchgate.

net/publication/347932969

Design and Implementation of Bluetooth-based Fan Speed Control

Conference Paper · November 2019

CITATION READS
1 3,288

2 authors:

Bolatito Fatimah Aderinkola Agboola Mutiu Kolawole


Federal Polytechnic, Ede Federal Polytechnic, Ede
4 PUBLICATIONS   1 CITATION    13 PUBLICATIONS   4 CITATIONS   

SEE PROFILE SEE PROFILE

Some of the authors of this publication are also working on these related projects:

SECURITY CHALLENGE View project

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.

The user has requested enhancement of the downloaded file.


School of Engineering Technology Annual International Conference
(SAINCONF), 1(1): 147-156, 2019. ISSN: 2756-4126
www.setridc.com

Design and Implementation of Bluetooth-based Fan Speed Control


B. F. Aderinkola1*, N. O. Olaniran2, K. A. Hassan1, M. K. Agboola1 and J.O. Oladapo1

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.

Keywords: Microcontroller, Bluetooth, Relay, Liquid Crystal Display, Fan speed.

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

Design and Implementation of Bluetooth-based Fan Speed Control


School of Engineering Technology Annual International Conference (SAINCONF), ISSN: 2756-4126 www.setridc.com
transmission used assures protection against interferences and safety in the sending of information in a range up to 100

meters at a speed of up to 3Mbps.

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

physically challenged people (Preethi and Dharmalingam, 2017).

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

1.1 Design Analysis


2.1.1 Power supply unit
a. Transformer
Expected input voltage = 220V

Needed output voltage = 12V


Design and Implementation of Bluetooth-based Fan Speed Control
School of Engineering Technology Annual International Conference (SAINCONF), ISSN: 2756-4126 www.setridc.com
Required transformer rating = 220V/12V
b. Diode

Peak inverse voltage (PIV) = 2 × 𝑉𝑟𝑚𝑠 (1)

= 2 × 12 = 24V

Therefore, the required diode is IN4001 which has a voltage rating of 50V

c. Capacitor

The value of capacitance, C of the capacitor to be used is governed by equation (2)


1
𝐶 = (2)
4√3 𝐹𝛶𝑅

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

is 200Ω. Substituting the values, we have

𝐶 = 288µF.

The closest value to 288µF is 470µF.

2.1.2 Voltage sensing unit

These are the d.c voltage (𝑉𝑑𝑐 ) and d.c current (𝐼𝑑𝑐 ) through the resistors

2𝑉𝑚𝑎𝑥
𝐼𝑑𝑐 = (3)
𝜋𝑅

Where R is 250Ω // 1000Ω = 200Ω

𝑉𝑚𝑎𝑥 = 𝑉𝑟𝑚𝑠 × √2 (4)

= 19.233V ≅ 20𝑉

Substituting the values of R and 𝑉𝑚𝑎𝑥 in equation (3)

𝐼𝑑𝑐 = 0.064 𝐴

𝑉𝑑𝑐 = 𝐼𝑑𝑐 × 𝑅 (5)

⸫ 𝑉𝑑𝑐 = 12.732 𝑉

The maximum voltage from the utility public supply designed for is 250volts.

Needed output voltage = 4V

Employing simple proportion to determine the output voltage,

If 220V gives 12V

Design and Implementation of Bluetooth-based Fan Speed Control


School of Engineering Technology Annual International Conference (SAINCONF), ISSN: 2756-4126 www.setridc.com
Then, 250V will give 13.6V

From equation (4),

𝑉𝑚𝑎𝑥 ≅ 20 𝑉

2.1 Hardware Implementation

Figure 1 shows the block diagram implementation of the Bluetooth-based fan speed control.

2.2.1 Power supply unit.

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.

Figure 2: The power supply unit.

Design and Implementation of Bluetooth-based Fan Speed Control


School of Engineering Technology Annual International Conference (SAINCONF), ISSN: 2756-4126 www.setridc.com
The microcontroller, relay driver, Bluetooth module and relays are all DC components therefore, a DC voltage is supplied to

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.

Figure 3: Data and pin configuration of the PIC microcontroller.

2.2.2 Bluetooth module (HC-05)

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

through Android mobile phone by using android application.

2.2.3 Android smart phone with Bluetooth application


Design and Implementation of Bluetooth-based Fan Speed Control
School of Engineering Technology Annual International Conference (SAINCONF), ISSN: 2756-4126 www.setridc.com
A Smartphone is a mobile phone built on a mobile operating system, with more advanced computing capability and

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.

 Click on ‘UNO Monitor’ and then ‘Connect’

 Select Bluetooth Classic and then press Next

 Select ‘Discover’ button on the phone screen and then Click on the code HC-05 (98:D3:61:F5:C0:5C). Then select

the ‘Pair’ button, then click ‘Connect’

 Press the Done button and then click ‘Run’.

Figure 4 depicts the graphic user interface (GUI) of the Android Application’s process of connecting to Bluetooth module.

2.2.1 Relays and relay driver IC ULN2003

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

stands for the three different levels of speed of the fan.

2.2.2 The Fan and Display Unit

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

shows the circuit diagram implementation of the system.

2. Results and Discussion

Design and Implementation of Bluetooth-based Fan Speed Control


Figure Conference
School of Engineering Technology Annual International 5: Circuit(SAINCONF),
diagram implementation of the
ISSN: 2756-4126 system .
www.setridc.com
The Android phone, through the Bluetooth app, sends the command to the microcontroller via the Bluetooth module to

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

afternoon and the results obtained is as depicted in Table 1.

Table 1. Results of connectivity tests between android smartphone and the fan

Distance (m) Fan response


outside the home
1.00 Signal received
5.00 Signal received
7.50 Signal received
10.00 Signal received
12.00 Signal not received

Table

shows

that

the

Blueto

oth

modul

e was

able to

Figure 6: Demonstration of the implemented fan speed control. receiv

signal from the android phone even when the phone

Design and Implementation of Bluetooth-based Fan Speed Control


School of Engineering Technology Annual International Conference (SAINCONF), ISSN: 2756-4126 www.setridc.com
was outside the room up to about 10meters range. At distance above 10meters outside the home, the fan was unable to

receive signal from the smartphone. This implied that the android phone was out of coverage range of the Bluetooth module

paired with it, thus no connection was established.

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.

Design and Implementation of Bluetooth-based Fan Speed Control


School of Engineering Technology Annual International Conference (SAINCONF), ISSN: 2756-4126 www.setridc.com

View publication stats

You might also like