Cloud and Sensor-based Automation using FieldProgrammable Gate Array (FPGA)
Cloud and Sensor-based Automation using FieldProgrammable Gate Array (FPGA)
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.
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.
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
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
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