0% found this document useful (0 votes)
26 views

Cloud and Sensor-based Automation using FieldProgrammable Gate Array (FPGA)

This document discusses a cloud and sensor-based automation system using Field Programmable Gate Arrays (FPGAs) to enhance home automation through IoT. It highlights the advantages of FPGAs over traditional microcontrollers, including flexibility, scalability, and the ability to handle multiple tasks simultaneously. The proposed system aims to improve energy efficiency and user convenience by allowing remote monitoring and control of home appliances through a cloud-connected application.

Uploaded by

Aakash Jain
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
26 views

Cloud and Sensor-based Automation using FieldProgrammable Gate Array (FPGA)

This document discusses a cloud and sensor-based automation system using Field Programmable Gate Arrays (FPGAs) to enhance home automation through IoT. It highlights the advantages of FPGAs over traditional microcontrollers, including flexibility, scalability, and the ability to handle multiple tasks simultaneously. The proposed system aims to improve energy efficiency and user convenience by allowing remote monitoring and control of home appliances through a cloud-connected application.

Uploaded by

Aakash Jain
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 7

Grenze International Journal of Engineering and Technology, June Issue

Cloud and Sensor-based Automation using Field


Programmable Gate Array (FPGA)
Aditya Chauhan1, Shreyas S. Patil2, Anita Agrawal3, Aakash Jain4, Rishabh M. Chugh5 and
K.S.Praneeth Reddy6
1-6
Department of Electrical and Electronics Engineering, Birla Institute of Technology and Science-Pilani,
K.K Birla Goa Campus, NH-17B, Zuarinagar, Goa 403726, India
Email: {h20220080, f20200385, aagrawal, f20191120, f20201607, h20220083}@goa.bits-pilani.ac.in

Abstract—Cloud automation is one of the most promising and upcoming applications of IoT [1],
as it allows users to control and monitor their environment remotely. Adopting the Internet of
Things (IoT) in the automation industry has created an amazing opportunity to develop
intelligent, automated systems. These systems can improve users' energy efficiency, security,
and convenience. However, most automation systems based on microcontrollers may not be
able to handle the complex and various tasks required in a modern environment. Field
Programmable Gate Arrays (FPGAs) replace microcontrollers, providing a more powerful,
flexible, and scalable solution for the latest automation systems [2]. FPGAs can perform
multiple functions simultaneously, making them ideal for managing large amounts of sensor
data and controlling signals in real-time. Moreover, FPGAs are reconfigurable, enabling
custom application creation and new features catering to the user’s specific needs. The
ecosystem can also include voice assistants and AI-powered systems to learn user preferences
and automate tasks. To create an effective ecosystem, devices must be compatible and
communicate through a standard protocol like Bluetooth, Zigbee, Z-Wave, or Wi-Fi [13]. The
ecosystem should also protect user privacy. A well-designed ecosystem can simplify daily tasks,
increase comfort and convenience, and provide peace of mind by allowing users to monitor and
control their systems remotely.

Index Terms— Home automation, IoT, FPGA, PIR sensor, LM35, HC-SR04, LDR, ESP8266.

I. INTRODUCTION
In the present era, the ubiquity of convenience has become indispensable for individuals. Automation represents
an exemplary solution that provides convenience and fosters energy efficiency. By creating routines that enhance
the quality of life, automation offers a multitude of benefits. To this end, we have introduced an FPGA-based
home automation system designed to control specific appliances. An extensive literature review has been
undertaken, revealing the lack of a system that eliminates the need for non-essential appliance control while
enabling users to control them through a cloud-connected app that can be accessed remotely. The app provides
users the ability to override the sensors and directly control the appliances. Conventionally, microcontrollers
have been employed worldwide for IoT applications [3]. However, FPGAs are more flexible, scalable, powerful,
and reprogrammable [2], allowing for the creation of custom applications and the implementation of new
features along the way.

Grenze ID: 01.GIJET.9.2.558


© Grenze Scientific Society, 2023
A. Energy Conservation
Energy conservation is an important consideration for home appliances and energy efficiency [4]. Home
appliances such as refrigerators, air conditioners, washing machines, and televisions are some of the biggest
energy consumers in a household. Homeowners can significantly reduce their energy bills and carbon footprint
by adopting energy-efficient appliances [5]. For instance, an energy-efficient refrigerator can save up to 40% on
energy costs compared to a conventional model. [6] Similarly, a washing machine with an Energy Star rating can
save up to 25% on energy and water consumption. Simple practices such as turning off appliances when not in
use and using power strips can also help conserve energy and reduce electricity bills. By prioritizing energy
conservation, homeowners can contribute to a sustainable future while benefiting from cost savings.
B. Ultrasonic Sensor
The HC-SR04 Ultrasonic Distance Sensor serves the purpose of detecting an object's distance through the usage
of sonar. This sensor functions through the employment of non-contact ultrasound sonar technology consisting
of two ultrasonic transmitters, a receiver, and a control circuit. The transmitters emit high-frequency ultrasonic
sound waves that reflect off any adjacent solid objects, while the receiver listens for the return echo. The control
circuit processes the echo received, enabling it to calculate the time differential between the transmitted and
received signals. This duration is utilized to determine the distance between the sensor and the reflecting object.
C. Temperature sensor LM35
The LM-35 is a three-terminal device that produces an analog voltage that is linearly proportional to the ambient
temperature. The voltage across a diode rises correspondingly with the surrounding temperature, and this voltage
is then amplified and delivered through the output terminal. The LM-35 is conveniently obtainable in a TO-92
package and is easy to utilize. Furthermore, its operating voltage ranges from 4 to 20 volts, and it exhibits an
accuracy of 0.5°C at 25°C.
D. Light-dependent resistor
This particular resistor operates based on the principle of photoconductivity, whereby the conductivity of the
material is reduced upon the incidence of light on its surface. The photons present in the incident light must
possess energy greater than the band gap of the semiconductor material, which causes the electrons to transition
from the valence band to the conduction band. It is worth noting that these devices are reliant on light, and as
such, when the LDR is exposed to light, its resistance is reduced, whereas when placed in darkness, its resistance
is high.
E. Passive Infrared Sensor
The PIR sensor does not radiate energy in space. Passive infrared (PIR) sensors use pyroelectric sensors to detect
heat energy in the surrounding environment. These two sensors sit beside each other, and when the differential
signal between the two sensors changes (if a person enters the room, for example), the sensor will engage.
PMOD PIR is used for detecting motion at low power. With the EKMC1601111, its range is five meters.
F. PMOD STEP
This device is utilized to operate a stepper motor that features four or six control pins, and it employs GPIO
interfacing. While it is capable of being operated at 3.3V from an FPGA, it is recommended that any external
power supply used to drive a heavy motor be within the range of 4.5 to 36 volts. It is advised to operate PMOD
STEP at 5 Volts for optimal performance.
G. PMOD SSR
The PMOD Solid State Relay is capable of blocking a maximum voltage of 48 volts and switching up to 6 Amps
RMS of continuous current. Additionally, it features an integrated LED to signify the open and closed conditions
of the circuit and exhibits low ON resistance during rapid switching.

II. LITERATURE REVIEW


Several academic papers have been examined concerning the development of an automation solution using Field
Programmable Gate Arrays (FPGA). In reference [7], the authors present a concept for wirelessly implementing
a remotely controlled home system through the use of FPGA and WiFi. The Internet of Things (IoT) module,
ESP8266, plays a crucial role in communicating with the cloud. The system allows for manual access through a
mobile application to send data signals for turning ON and OFF the end devices. However, it relies on human

2397
intervention continuously. Therefore, we have devised a solution to embed different sensors and employ sensory
data to send data signals automatically without any human intervention. In reference [8], the authors propose a
solution to automate the home system using sensors and controlling end devices interfaced with FPGA without
the need for human effort. This system also uses the ESP module to access the cloud. Nevertheless, there is no
provision for manually overriding the actions taken based on sensory data, leading to unnecessary power
consumption and decreased efficiency. In reference [9], the authors present a solution for developing a home
automation system using Very High-Speed Integrated Circuit Hardware Description Language (VHDL) and
FPGA. The Global System for Mobile (GSM) network facilitates communication between the mobile and the
primary controller through Short Messaging Service (SMS).

III. MOTIVATION
The primary focus is to mitigate the physical exertion for elderly and disabled individuals and additionally
enable remote monitoring and control of the device status through cloud-based systems from any location.
Microcontrollers have been traditionally used all over the world for designing IoT applications. On the other
hand, FPGAs are more flexible and scalable than microcontrollers, enabling them to cater to various diverse
features and specifications [2]. The evaluation of these factors constituted a pivotal component of our home
automation research. Our inquiry has revealed the difficulties confronted by those seeking to achieve home
automation via sensors and IoT-controlled appliances.

IV. PROBLEM STATEMENT


A. Problem Domain
The present study delves into the complex challenges that arise when dealing with sensor interfacing, motor
speed control, FPGA implementation, and system design in the domain of automation. These challenges have
been thoroughly addressed and analyzed, and a comprehensive understanding of the issues involved has been
gained. Moreover, the study goes further and explores the problem of automating the control of equipment when
multiple individuals enter or exit a room. To tackle this problem, a novel solution in the form of a combination
of sensor-based automation and a cloud-based IoT system has been proposed. The proposed system is expected
to enhance the overall automation process by allowing for efficient and effective management of equipment
control. The integration of these two technologies is envisioned to enable seamless communication between the
sensors and the cloud-based system, thereby optimizing the automation process. This approach is also expected
to increase the efficiency of the system and reduce the need for human intervention, thus minimizing the
likelihood of errors and improving overall performance. In summary, this study has not only addressed the
challenges associated with automation but has also proposed a cutting-edge solution to one of its most persistent
problems. The proposed system has the potential to revolutionize the automation industry and usher in a new era
of efficiency and precision in equipment control.
B. Problem Definition
The aim of this study is to design an end-to-end solution for home automation by utilizing the capabilities of
FPGA, microcontrollers, and IoT. The primary objective of this research is to address the challenges associated
with designing an integrated system that can efficiently control and monitor various home appliances and
devices. The study will explore the potential of FPGA, microcontrollers, and IoT to create a robust and reliable
home automation solution that can improve the quality of life for homeowners.

V. METHODOLOGY
A. Method
In this study, the automation of home appliances has been achieved through the utilization of sensors and IoT
platforms. This approach involves the integration of a variety of sensors, including the PMOD PIR sensor,
PMOD stepper, ultrasonic sensor, temperature sensor, and a light-dependent resistor (LDR). The Digilent
ZedBoard Zynq-7000 Development Board [10] has been employed as the FPGA Board. The fan motor (stepper
motor) has been connected to the FPGA using a PMOD STEP, while an LED has been connected to the FPGA
using a PMOD SSR (relay). The speed of the fan is controlled by digital circuits, which generate four frequency
levels, as implemented on the FPGA. The PMOD PIR, PMOD STEP, and PMOD SSR are connected to the
FPGA, while the ultrasonic sensor, temperature sensor, and LDR sensors are connected to the NodeMCU.

2398
As individuals enter the room and the counter (number of persons) increments, the appliances are automatically
switched on. The motor speed is adjusted based on the room's temperature and light intensity, and the LED is
also automatically switched on/off accordingly.
B. Innovative content
1. The implementation of a person entry/exit detection system that utilizes a combination of ultrasonic and PIR
sensors.
2. A counter to maintain an accurate count of individuals is proposed. Moreover, the stepper motor's speed
control is suggested to be done both manually and automatically, taking into account the ambient
temperature.
Fig. 3 is the circuit diagram of modules in Vivado that includes the clock divider, counter, MUX, relay, and
driver for the motor. The circuit operates as follows:
1. A new clock named new_clk0 is generated.
2. This new_clk0 is given as a reference clock to the 3-bit counter, which generates three different frequencies
of count0=new_clk0/2, count1=new_clk0/4, and count2=new_clk0/8.
3. These three counter outputs are given as the input to 4x1 MUX along with new_clk0, with the select lines s1
and s0.
4. With the help of select lines, different frequencies can be selected and given as input to the driver of the
motor, which is named clk_for_driver, to get four different speeds.
5. When a person crosses the threshold distance set by the user for the connected Ultrasonic sensor, one of the
pins on the NodeMCU board switches to a high or low state. This signal is then transmitted to an FPGA
variable named Ultra_Sonic.
6. When the manual switch of the Blynk IOT [12] platform is turned on, LED_Control, which is sent from
Node MCU to FPGA, is used to control the LED that is connected to PMOD SSR.
7. The input signal pir is obtained from the PMOD PIR, which is connected to the FPGA. Additionally, the
LDR sensor is connected to one of the analog pins of the NodeMCU. This signal is then provided as input to
the FPGA and is named "ldr". The circuit uses an internal clock of the FPGA named "clk" and has a reset
pin "rst" that can be enabled to bring the circuit to its initial condition. Finally, the enable pin "en" controls
the motor, which can only rotate if the enable pin is high.
Manual Control - When the level of manual control is set to a high value, it is possible to exercise control over
the Motor and LED components by means of the Blynk IOT application [12]. The speed of the motor may be
adjusted via the slider feature of the aforementioned application, and such adjustments may be made independent
of ambient temperature. Similarly, independent control of the LED may be achieved regardless of input from the
LDR sensor or ambient light conditions. Additionally, the status of the appliances, whether in the OFF or ON
position, can be automatically or manually monitored via our mobile application.
Automatic Control -In the automated mode, we utilized an Ultrasonic sensor and PMOD PIR to activate the
Appliances and keep track of the number of individuals present in the room. The outputs from the variable
Ultrasonic and PIR sensors are utilized to regulate the count. The count is incremented when both outputs are
HIGH, which in turn activates the appliances. After a specified time delay, both variables become low. This
process repeats for every person entering the room. When the PIR is high (motion detected near the PMOD PIR
sensor) and the Ultrasonic becomes low (distance detected by the ultrasonic sensor is increasing, implying
someone is exiting the room), the count is decremented. Once the count reaches zero, all appliances are
deactivated. Furthermore, we have implemented a case logic to regulate two actuators, namely LED and Motor.
An LDR sensor is employed to regulate the switching condition of the LED. In addition, an LM35 temperature
sensor is utilized to vary the speed of the fan in accordance with the room's temperature, providing four different
speeds for four different temperature ranges.

VI. RESULTS
A. Manual Control is HIGH
In this system, the user is able to initiate the movement of devices as required, even from remote locations. The
control lines s1 and s0 are utilized to determine the speed of the FAN (stepper motor) [11], resulting in the
production of four distinct frequencies that are clearly depicted in Fig. 5 below. Similarly, the LED can be turned
on and off by means of its control signal, LED_Control. If manual control is activated, the output remains
unaffected by the presence or absence of individuals, and therefore COUNT[2:0] remains at 0 during simulation.

2399
Figure 1. Block diagram Figure 2. Lab Setup

Figure 3. Synthesized circuit diagram on Xilinx Vivado

Figure 4. Full system Flowchart

The four frequencies, f1, f2, f3, and f4, which control the stepper, are selected through the use of select lines s1
and s0.

2400
Figure 5. Simulation result of manual control using Blynk IoT

B. Manual Control is LOW


When the manual control parameter has a value of zero, the system utilizes the sensor outputs that are provided to the FPGA
in order to arrive at a decision. It can be observed that as the PIR and Ultrasonic sensors attain a HIGH state, the count value
is incremented. Conversely, when the PIR sensor attains a HIGH state and the Ultrasonic sensor attains a LOW state
simultaneously, the count value is decremented. Assuming that the count value is positive and taking into consideration the
temperature range that has been specified in the testbench, control signals s1 and s0 are generated, resulting in the
corresponding frequencies of the FAN being observed. Similarly, the LED is switched ON or OFF based on the intensity of
the light. The frequency with which the FAN rotates, based on temperature, can be observed from the circled parts. When the
count value is zero, the direction1 and direction2 pins are set to a LOW state in order to turn OFF the end devices since there
are no occupants in the home. The COUNT[2:0] parameter keeps track of the number of individuals entering or exiting the
room.

Figure 6. Simulation result of automatic control using sensors

VII. CONCLUSION
The logic of automation has been implemented through the utilization of sensors and the cloud. A novel solution
has been devised to address the issue of automation by relying solely on sensors, as the underlying logic is
contingent on the number of individuals entering and exiting the room.

FUTURE SCOPE
The entirety of the circuit connections depicted in this illustration can be produced as a single Printed Circuit
Board (PCB), as the complete design can be miniaturized [14], rendering it a superior choice for actual
implementation within a home or office environment. The present research showcases the interconnection of
merely two domestic appliances. However, due to the high pin count of the FPGA device, which offers an
abundance of input and output channels for interfacing with various other devices, additional appliances may be
integrated into this system. Furthermore, given the FPGA's exceptional data processing capabilities, a facial
recognition feature [15] can be incorporated into this home automation system from a security standpoint. By
implementing specific protocols and algorithms, the FPGA can be utilized to provide heightened security, as
cybersecurity [16] is a significant threat to automation. The complexity of AI algorithms can be processed by the
FPGA, utilizing an AI framework, which will augment the system's intelligence. As IoT devices become more
prevalent, there is an increasing demand for low-power FPGAs that can handle the compute-intensive tasks
required by these devices without consuming excessive energy. Ways to optimize the FPGA design to reduce
power consumption while maintaining performance [17] is an important field to work on.

2401
ACKNOWLEDGEMENTS
This research project was conducted in the EEE department at BITS Pilani, KK Birla Goa Campus. We extend
our sincere appreciation to our department and Institute for its provision of all the indispensable hardware,
software and laboratory resources, without which the successful completion of this project would not have been
possible.

REFERENCES
[1] Rahmani, A.M., Bayramov, S. & Kiani Kalejahi, B. Internet of Things Applications: Opportunities and Threats.
Wireless Pers Commun 122, 451–476 (2022). https://doi.org/10.1007/s11277-021-08907-0.
[2] P. H. W. Leong, "Recent Trends in FPGA Architectures and Applications," 4th IEEE International Symposium on
Electronic Design, Test and Applications (delta 2008), Hong Kong, China, 2008, pp. 137-141, doi:
10.1109/DELTA.2008.14.
[3] Wu, Z.; Qiu, K.; Zhang, J. Smart microcontroller architecture for the Internet of Things. Sensors 2020,20, 1821.
[4] Muhammad Zaman Fakhar, Emre Yalcin, Alper Bilge” Survey of smart home energy conservation tech,” October 2022,
ScienceDirect.
[5] Lee, H., Ruppert, K. C., Porter, W. A., & Prescott, T. (2008). Energy Efficient Homes: Appliances in General. Retrieved
from http://edis.ifas.ufl.edu/FY1032.
[6] R. Grisso, M.A. Walker, J. Ignosh, ENERGY SERIES: What about Refrigerators and Freezers?, Virginia Tech,
February 2020, Retrieved from https://www.pubs.ext.vt.edu/2908/2908-9022/2908-9022.html.
[7] Aadesh Pawar, Shubham Gurav, Vanshika Parkar, Swarnima Patole, Satendra Mane“IoT based home automation using
FPGA”2021, International Journal of Advance Research, Ideas and Innovations in Technology.
[8] S. Sharma, J. Boddu, G. S. Charan, S. Sharma, S. Sivanantham and K. Sivasankaran, "Home automation through FPGA
controller" 2015, Online International Conference on Green Engineering and Technologies (IC-GET), Coimbatore,
India, 2015, pp. 1-4, doi: 10.1109/GET.2015.7453813.
[9] M. R. Mukkawar, S.D. Sawant, “Home Automation through FPGA Controller” IJERT, vol. 3, March 2014.
[10] ZedBoard Zynq-7000 Development Board Reference Manual, Version 2.2, January 2014.
[11] Khan Zarrarahmed Zaferullah, Rajesh Bansode, S.N. Pethe, Mandar Vidwans and Kelvin Dsouza, “FPGA based Speed
Control of Stepper Motor,” Volume 2, Issue 12, December 2013
[12] H. Durani, M. Sheth, M. Vaghasia and S. Kotech, "Smart Automated Home Application using IoT with Blynk App,"
2018 Second International Conference on Inventive Communication and Computational Technologies (ICICCT),
Coimbatore, India, 2018, pp. 393-397, doi: 10.1109/ICICCT.2018.8473224.
[13] S. Palaniappan, N. Hariharan, N. T Kesh, V. S, and A. Deborah S, “Home automation systems - a study,” Int. J. Comput.
Appl., vol. 116, no. 11, pp. 11–18, 2015, doi: 10.5120/20379-2601.
[14] M. Suárez-Albela, P. Fraga-Lamas, T. Fernández-Caramés, A. Dapena, and M. González-López, “Home Automation
System Based on Intelligent Transducer Enablers,” Sensors, vol. 16, no. 10, p. 1595, Sep. 2016, doi:
10.3390/s16101595.
[15] S. Chakraborty, S. Roy, and P. Kundu, "FPGA Implementation of Real-Time Face Detection and Recognition System
for Home Security," 2019 IEEE 11th International Conference on Advanced Computational Intelligence (ICACI), 2019,
pp. 620-625.
[16] Alexandre Proulx, Jean-Yves Chouinard, Paul Fortier, and Amine Miled. 2023. A Survey on FPGA Cybersecurity
Design Strategies. ACM Trans. Reconfigurable Technol. Syst. 16, 2, Article 20 (June 2023), 33 pages.
https://doi.org/10.1145/3561515.
[17] R. Sharma, A. Saini, and S. Mittal, "Low-power FPGA Design Techniques for IoT Applications," 2019 2nd
International Conference on Intelligent Computing, Instrumentation and Control Technologies (ICICICT), 2019, pp.
999-1004.

2402

You might also like