Academia.eduAcademia.edu

Analysis of an Automatic Sliding Window

2021, ”. Journal of Electrical Engineering, Electronics, Control and Computer Science (JEEECCS)

Automation over the years has found application in areas of automobiles, industrial machines and some cases system conditioning. Nowadays home and building automation systems have been adopted to a greater extent as means of increasing comfort and achieving easy teleoperation tasks. These include energy management, water management, automatic opening and closing of access points or windows. This paper focuses on the design of an automatic sliding window system that responds to system command via a Bluetooth developed App on a mobile phone. The system uses Arduino as its controller and HC-05 Bluetooth module as a communication link between the controller and mobile application which was developed on MIT Ai2 platform. An ultrasonic sensor is been used to measure the distance of the sliding window to the edge of the wall by sending out and receiving pulses. A distance beyond or less than a threshold implies the system is closed or open and this can be adjusted according to the user's preference using the mobile application. This project involves processes like design, simulation, coding, fabrication and assembling procedures. The fabrication of the window would be of a quarter size compared to normal window size and the material used would be an acrylic glass having a wooden edge. For the control of the system, the stepper motor is connected to the driver which is interfaced with the Arduino PWM pins. The window is communicated to, through the Bluetooth module interfaced to the Arduino Uno to control the motor attached to the window.

Journal of Electrical Engineering, Electronics, Control and Computer Science – JEEECCS, Volume 7, Issue 26, pages 9-16, 2021 Analysis of an Automatic Sliding Window Adebola O. Olotuah Adedotun O. Owojori Hawal O. Alade Dept. of Electrical and Electronics Engineering Federal University of Technology, Akure Akure, Ondo State, Nigeria [email protected] Ministry of Education Oyi, Anambra State, Nigeria [email protected] Abstract – Automation over the years has found application in areas of automobiles, industrial machines and some cases system conditioning. Nowadays home and building automation systems have been adopted to a greater extent as means of increasing comfort and achieving easy teleoperation tasks. These include energy management, water management, automatic opening and closing of access points or windows. This paper focuses on the design of an automatic sliding window system that responds to system command via a Bluetooth developed App on a mobile phone. The system uses Arduino as its controller and HC-05 Bluetooth module as a communication link between the controller and mobile application which was developed on MIT Ai2 platform. An ultrasonic sensor is been used to measure the distance of the sliding window to the edge of the wall by sending out and receiving pulses. A distance beyond or less than a threshold implies the system is closed or open and this can be adjusted according to the user’s preference using the mobile application. This project involves processes like design, simulation, coding, fabrication and assembling procedures. The fabrication of the window would be of a quarter size compared to normal window size and the material used would be an acrylic glass having a wooden edge. For the control of the system, the stepper motor is connected to the driver which is interfaced with the Arduino PWM pins. The window is communicated to, through the Bluetooth module interfaced to the Arduino Uno to control the motor attached to the window. Keywords-Automation, Sliding Bluetooth, Ultrasonic Sensor I. window, Dept. of Electrical and Electronics Engineering Federal University of Technology, Akure Akure, Ondo State, Nigeria [email protected] Presently, few countries like Nigeria have limited facilities to control doors and windows affordably, as their commercial values are high [13]. The goal of this paper is to design an affordable system that is capable of opening and closing window frames in response to a command via a Bluetooth app. This device is useful in a situation whereby the user forgets to close the window before leaving home or having the knowledge that it’s about to rain and remembers that he left his window open or where a disabled person wishes to open or close the window. The design and implementation require a low-cost obstacle detection sensor [6], shown in Fig.1, that can interface with a smart controller for real-time data analysis and controlling of the sliding window [7], [8]. Arduino, INTRODUCTION The concept of automation has its way back 1500 years when the first water pump for metalworking rolling mills was developed. Ever since it has metamorphosized into numerous applications [1]. Automation is a process of making a system intelligent such that it operates with partial or without human intervention [2]. Automation has played a vital role in the advancement of engineering and sciences as a field especially, in the overall cost reduction and energy savings of facilities [3]. It is essential in industrial operations such as controlling pressure, temperature, humidity, viscosity, and flow in the processing industries [4]. Reference [5] describes a security system incorporated into a window frame to check burglars. Figure 1. Obstacle Detection Sensor [6] The distance of the sliding frame away from its close position is estimated after the received pulse is obtained at the echo terminal of the ultrasonic sensor and processed in the microcontroller based on (1)-(3) with Table I showing the description of symbols used in the equations. s= Also, 2D  () s = f  1 f =   ()  () 10 Adedotun Owojori, Hawal Alade, Adebola Olotuah TABLE I. Description Symbol speed of sound (340ms-1) s 2D SYMBOLS AND DESCRIPTION distance to-and-fro between the sensor and the object (m) τ total time taken (s) λ Wavelength (m) f frequency of operation of the device (Hz) The control section gathers all the information regarding the working prototype, especially the calibrated thresholds, and for any command prompt, the actual or calculated distance is compared with the threshold to trigger an actuator to open or close the frame. Several types of communication links could be deployed as described in [9], where SIM808 module, with GSM and GPS capabilities, was utilized via a service provider to interface a microcontroller [10,16], and where Bluetooth [11] and wireless module [12] were suggested amongst other communication devices. Figure 3. Summarized System Block Diagram The microcontroller [13], as shown in Fig. 2 interfaces the obstacle detection sensor, the Bluetooth module, and the actuator driver, all embedded within the system. The program codes are written on Arduino IDE (Integrated development environment), which supports C-programming language at a pulse frequency of 40 kHz. Figure 4. Overall System Block Diagram Figure 2. An Arduino Uno Board [13] In the development of the system, more emphasis was placed on the analysis of the power supply, sensing, actuator or motor selection, and the communication link. II. RESEARCH METHOD The design process of an automatic sliding frame system can be divided into three parts: power supply stage, control stage, and communication stage. The system block diagram is shown in Fig. 3, as a summarized diagram, and Fig. 4, as an overall diagram A. Power Supply Stage The power stage is a critical part of the design process. To design the power to specification, a reverse order design is used from the output load requirement to the input source, in line with [1,15]. With a 12 V voltage regulator used, it is expected that the unregulated input voltage to the 7812-voltage regulator should be greater than the output voltage. The more the difference between the input and the output voltage (that is dropout voltage) at the same current, the more the leak voltage which causes the regulator IC to become hot and eventually damages it [17]. A dropout voltage of 4 V was chosen, that is (12 + 4 = 16 V). Since the voltage drop across a diode is 0.6V and two diodes out of 4 rectifying diodes forming the fullwave bridge conducts per side wave, the voltage drop will then be 0.6 × 2 = 1.2 V For a peak voltage of 16 + 1.2 = 17.2 V For the root mean square (r.m.s.) voltage = 17.2 2 = 12.28 V Hence a transformer of a preferred secondary value of 12 V was employed, i.e. 220 V/12 V transformer, and 11 Analysis of an Automatic Sliding Window (4) describes the transformation ratio to find the required currents. E1 i2 =  E2 i1 () Assuming a ripple voltage of 15% was considered dv = dt = = Hence the capacitance value can be obtained in (5) assuming a current of 1A was required C= Hence, the rotational speed of the motor (ω) is 6.284rad/s, with a motor gear radius of (r) of 0.015 m The motor at full speed operates based on (8) () = 0.09426ms-1 1 = 0.01s 2  50 dv  i=C dt (2  60) = 6.284 rad/s 60 V = r   = 0.015  6.284 15 × 16 V = 2.4 V 100 1 2f = () 1  0.01 = 4.167  10-3 F 2.4 A desired value of 4700 µF was however employed. To decrease the ripple left, a number of 10µF electrolytic capacitors were used followed by some ceramic capacitors as shown in Fig. 5. The time for the window to fully open, that is, to travel a distance (D) = 0.31 m at constant speed as shown in Fig.6 is expressed in (9) D  V 0.31 t= 0.09426 t= () = 3.29s Figure 6. Pulley wheel to drive the sliding window Figure 5. Power Supply design B. System design and Actuator selection stage The design prototype gives the length of the window and the total track length measured using a measuring tape is expressed by (6). Window Length, Lw = 0.300m () = 0.31 m (2  N )  60 0.09426 0.0275 Which is equivalent to 32.73 rpm. The outer radius on the other hand having the same angular wheel speed has its linear speed estimated as VR = 3.43  0.0375 The speed required by the motor to drive the window is 60 rpm. The conversion from revolution per minute (rpm) to radian per second in line with [13,14], is as expressed in (7). = r = = 3.43 rad/s Track Length, Lt = 0.610m Travel Distance (D) = Lt − Lw  = 0.610 - 0.300 Translating the motor speed to an external pulley having an inner radius (rp ) 0.0275 m and an outer radius (Rp) 0.0375 m. The inner being the input to the external pulley has its angular wheel speed calculated as () = 0.129ms −1 Hence the actual time to cover the required distance for the external pulley is 12 Adedotun Owojori, Hawal Alade, Adebola Olotuah t= pinMode(buttonPin, INPUT); 0.31 0.129 } = 2.403s Also, the power required by the motor to move a rolling wheel is estimated based on (10)-(12). If the force acting on the wheel at equilibrium is void loop() { digitalWrite(trigPin, LOW); delay(2000); F = W  () where µ is the coefficient of rolling friction and can be expressed according to Beer and Johnson as = b  r () //let signal settle digitalWrite(trigPin, HIGH); //set trigger pin high delayMicroseconds(15); //delay in high state digitalWrite(trigPin, LOW); //ping has now been sent where r is the radius of the wheel, b the horizontal distance and W is the weight of the wheel. delayMicroseconds(10); The value of ‘b’ varies from 0.25 mm for steel wheel on a steel rail to 125 mm for the same wheel on soft ground. Whereas for the sliding window with the wheel (roller) on wood, a value of 1 mm was selected. //duration in microseconds //delay pingTime = pulseIn(echoPin, HIGH); pingTime = pingTime /1000000; Hence, with the mass of the slide panel and its accessories equal to 4 kg and the wheel radius equal to 37.5 mm, the force is evaluated as //speedOfSound is 340m/s 1 F = 5  9.81 37.5 targetDistance = speedOfSound* pingTime; targetDistance = (targetDistance)/2; = 1.308N //to convert targetDistance to cm The power required to drive the carriage wheel is expressed in (12) P = F p r  = 0.168W C. Sensing and Control stage The ultrasonic sensor requires + 5 V supply voltage, sourced from an Arduino Uno integrated circuit. It further acts on the instruction codes to estimate the target distance. The Ultrasonic sensor codes in C language is displayed below. int trigPin =10; int echoPin = 7; float pingTime; float targetDistance; } () = 1.308 3.43  0.0375 #include <Wire.h> targetDistance = targetDistance *100; The control sequence check if the distance is within the threshold otherwise it actuates the stepper motor to open or close the window #define step_pin 3 #define dir_pin 2 void setup() { pinMode(dir_pin, OUTPUT); pinMode(step_pin, OUTPUT); } void loop() { if(digitalRead(buttonPin) == HIGH) { if(targetDistance < 15){ float speedOfSound = 340; openWindow(); int buttonPin= 4; } else if(targetDistance > 15) { void setup() { closeWindow(); Serial.begin(9600); pinMode(trigPin, OUTPUT); pinMode(echoPin, INPUT); } } Analysis of an Automatic Sliding Window } 13 motors range from a typical H-bridge circuit, Easy driver shown in Fig. 8, to A4899 circuit. void openWindow(){ digitalWrite(dir_pin, LOW); for(int x=0;x<5000;x++){ digitalWrite(step_pin, HIGH); delayMicroseconds(2500); digitalWrite(step_pin, LOW); delayMicroseconds(2500); } Serial.println("The window is opening"); delay(1000); } Figure 8. Easy driver circuit void closeWindow(){ digitalWrite(dir_pin, HIGH); for(int x=0;x<5000;x++){ D. Communication stage The Bluetooth module is a transceiver that interfaces a microcontroller to perform teleoperation tasks as shown in Fig. 9. This creates a physical layer, through which a wireless link communicates between the mobile application and the system control unit digitalWrite(step_pin, HIGH); delayMicroseconds(2500); digitalWrite(step_pin, LOW); delayMicroseconds(2500); } Serial.println("The window is closing"); delay(1000); } A MITSUMI M49SP-2K bipolar stepper motor was selected shown in Fig. 7, having a step angle of 7.50 per step, coil resistance of 3.2 Ohms, current requirement of 750 mA max, and torque constant of 44 mN-m. Figure 9. Bluetooth module pin description A mobile application designed on the MIT Ai2 platform shown in Fig. 10, is required to serve as user interface to drive and control the system. This application is installed on a mobile phone that is Bluetooth enabled. Figure 7. Bipolar stepper motor Stepper motors require a driver to interface a microcontroller. This is due to the amount of current the stepper motor draws. Driver circuits for bipolar stepper Figure 10. Mobile application on MIT app inventor 14 Adedotun Owojori, Hawal Alade, Adebola Olotuah The code structure is expressed as shown in Fig. 11 Figure 11. MIT app inventor Bluetooth code structure Material type Acrylic glass with wooden sides Overall Weight 12 kg Figure 12. Prototype model of a sliding window The part of the window housing the accessories is found at the top of the model. This contains the drive belt and pulley, gears, stepper motor, and the microcontroller. The sensing stage involving an ultrasonic sensor (HC-SR04) was programmed and tested on Breadboard shown in Fig. 13, before soldering on the Vero board. III. RESULTS AND DISCUSSIONS The results obtained highlight the hardware implementation of the device. A. Hardware Results The design started with the framing of the sliding window using wooden material as shown in Fig.12. The size of the prototype frame is specified to be a quarter of the size of a normal-sized window for residential buildings. The applicable specifications are listed in Table II TABLE II. Material type The mounting of the ultrasonic sensor on the frame is shown in Fig.14 FRAME SPECIFICATIONS Acrylic glass with wooden sides Length 610 mm Breadth 610 mm Thickness of sides Inner length per frame Material thickness Inner breadth per frame Sliding window weight Figure 13. Breadboard implementation of the sensing stage 150 mm 600 mm 5 mm 300 mm 5 kg Figure 14. Mounting of sensor on the sliding frame Analysis of an Automatic Sliding Window The ultrasonic sensor echo pin, and trigger pin, connects with the Arduino Uno board's digital pins D7 and D10 respectively alongside the power and ground pin. Based on the instruction code, once the set threshold is reached the stepper motor is actuated via the stepper driver. Pin D2 and D3 of the Arduino uno are used as the control terminal for the stepper motor driver as shown in Fig. 15. 15 A USB 2.0 cable is used as a link to upload the codes to the microcontroller. ACKNOWLEDGMENT The authors of this work appreciate Labcenter Electronics, Arduino, for the software and utility used, that is, Proteus Design Suite 8.4, Arduino IDE for certifying the C-Codes generated for controlling the ultrasonic sensor, stepper motor, and Bluetooth module used and also, appreciate Pyramidal Studio for the prototyping of the sliding window used. CONCLUSION Figure 15. Actuation of the stepper motor With the Arduino turned ON, the mobile phone can be connected to it over Bluetooth using the developed mobile application. The circuit implementation of the Bluetooth module is as shown in Fig. 16. This paper has given a design analysis and prototype implementation of an automatic sliding window using an ultrasonic sensor, stepper motor and driver, Bluetooth module, and Arduino board as the core components used. The voltage variations of the stepper motor driver enable the movement of the stepper motor to either close or open the sliding window; having in mind that the voltage variation of the motor determines the speed and the position. The stepper motor used is the MITSUMI (M49SP-2K) which was connected to the A4988 current driver as against the Easy driver used during testing. Implementation of this system was carried out using cost-effective components. Homes can undergo this transformation towards achieving a smart home with constant real-time data to achieve better management and full home automation for comfort, security, and privacy. The prototype window can be scaled up and operated with the same control system described but, the driver circuitry must use components that can handle more power required to drive the window. REFERENCES [1] Figure 16. Interfacing the microcontroller with a Bluetooth module The instruction codes from Arduino IDE were initially tested on Proteus 8 simulator before being uploaded into the microcontroller circuit. The installation of the electronic components on the window is shown in Fig. 17 [2] [3] [4] [5] [6] [7] [8] Figure 17. Installation of electronic components A. M. Zungeru, P.A. Abraham-Attah, “A Digital Automatic Sliding Door with A Room Light Control System,” Botswana International University of Science and Technology, 2013, pp.1-18. A. G. Kalbande, V. S. Golait, S. V. Bhadange, “Smart Automation System Using Arduino and Rain Drop Sensor,” International Journal of Innovative and Emerging Research in Engineering, 2017, 4(4), pp. 97-102. A. Elshafee, K. Hamed, “Design and Implementation of a WiFi Based Home Automation System,” International Journal of Computer and Information Engineering, 2012, pp. 1074-1080. N. S. Okomba, C. O. Okwor, I. A. Adeyanju, and H. Ezea, “Design of an Automatic Window using a PIC Microcontroller and Stepper Motor,” FUOYE Journal of Engineering and Technology, 2017, 2(2), pp. 23-28. K. Rathod, R. Vatti, M. Nandre, S. Yenre, “Smart Door Security Using Arduino and Bluetooth Application,” International Journal of Current Engineering and Scientific Research (IJCESR), 2017, 4(11), pp. 73-77. M. W. Hassan, "Covid-19 Fever Symptom Detection Based on IoT Cloud," International Journal of Electrical and Computer Engineering (IJECE), 2021, 11(2), pp. 1823-1829. R. Jagadeshwaran, R.Geethalakshmi, D J Pricilla Marry., "Path Identify Protocol for Visually Impaired Patient using Ultrasonic Sensor Integrated with GPS," International Journal of Pure and Applied Mathematics, 2018, 119(15), pp. 20652072. S. B Dhal, A. Agarwal, K Agarwal, "Smart Electronic travel stick for the visually challenged," American Journal of Electrical and Electronic Engineering (IJEEE), 2016., 4(6), pp. 177-181. 16 [9] [10] [11] [12] [13] Adedotun Owojori, Hawal Alade, Adebola Olotuah A. O. Owojori, J. O. O. Mebawondu, J. O. Mebawondu, “Design of an Obstacle and Location-Based Detector with Microcontroller System,” European Journal of Electrical and Computer Engineering (EJECE) 2021; 5 (2) S H. Mahmood, O G. Hassan, A M. Kwad, S F. Abass, “Auto Opeining Door and Car Identification,” Jounal of Computer and Communications 2016; 132-141. S P. Patil, J R. Dhabuwala, L A. Patel, “Automatic Sliding Window,” International Journal of Science and Research (IJSR) 2015; 4 (4): 553-555. A O. Owojori, I A. Adebanjo, S A. Oyetunji, “Design Analysis of a Mobile-Based Gait Analyzer,” European Journal of Electrical and Computer Engineering (EJECE) 2019; 3 (3): 18. D I G. Chomo, D S. Yawas, Z S. Johnson, “Development of an Automatic Door System,” American Journal of Engineering Research (AJER) 2018; 7 (5): 168-173. [14] F C. Yang, S M. Kit, L K. Sing, A. Hadi, M. Ikhwan, “Design and Development of Low Cost Auto Gate System for House Mechanical System Design, Part 2,” 2nd Integrated Design Project Conference (IDPC) 2015; 1-11 [15] W M M. Hywe, M T. Tun, “Door Operator for Automatic Sliding Door System Design,” International journal of Scientific Engineering and Technology Research 2014; 3 (15): 3165-3172 [16] Arduino UNO board with real-time application projects:http://www.edgefx.in/wpcontent/uploads/2014/07/Arduino-Uno-Board.jpg, last accessed 2020/4/20 [17] Learn about electronics Power Supplies: https://learnaboutelectronics.org/PSU/psu23.php#:~:text=The%20dropout%20v oltage%20for%20any,%2B2.5V%20%3D7.5V. last accessed 2021/5/23