This document describes a graphical user interface (GUI) based device controller project created using MATLAB. It was submitted by 4 students - Vandana Sharma, Rohit Pandey, Palak Sinha, and Rajan Chauhan - to fulfill their Bachelor of Technology degree requirements. The project automated appliances like fans, bulbs, motors, and fire sensors using different wireless communication methods and a microcontroller. It also discussed implementing industrial appliance automation using an embedded C program on another microcontroller chip.
1. The document is a catalogue from 2014 for KING GATES srl, an Italian manufacturer of home and industrial automation products located in Sacile, Italy.
2. The catalogue showcases KING GATES' complete range of gate, door, and shutter automation products including motors, control units, radio systems, and accessories.
3. The automations are designed for sliding gates, swing gates, barriers, sectional doors, overhead doors, and rolling shutters to be durable, reliable, safe, and compliant with European standards.
Este documento describe los pasos para configurar la comunicación entre un PLC S7-300 y un módulo Rexroth a través de una red Profibus. Primero se crea un nuevo proyecto en TIA Portal V11 y se agrega un controlador S7-300. Luego se configura la interfaz Profibus en el controlador y se le asigna una dirección. Finalmente, se carga el GSD del módulo Rexroth, se agrega a la red Profibus y también se le asigna una dirección.
The main concept of our project is to unlock our automobiles by using our fingerprint as key and to sense our automobiles safety in mobile, PC or any other electronic gadgets using IOT. It is highly safe control of the automobiles from other person because, the idea implied in this paper is similar to a mobile’s finger print lock. Today, technology has made the unbelievable and impossible things possible and greatly reduced man power also solved major problems in industries and gave high profit for industries. Technology has also solving very much day-to-day life problems. The main motto of this project is to get awareness from automobiles theft. First, this project is combination of several ideas to make things safe, simple, economical friendly. But, this project is one of the more best and simpler for installation and tougher for burglars who try to steal our vehicles.
Automatic Power Factor Corrector Using Arduino reportSelf-employed
This document describes an automatic power factor corrector system using an Arduino microcontroller. The system measures the power factor of a load by determining the phase difference between the line voltage and current signals. It then calculates the required compensation and switches capacitors from a capacitor bank to normalize the power factor close to unity. This improves the efficiency of the power system by reducing losses. The automatic correction allows for varying loads by adjusting the capacitors proportionately.
The document discusses transducers, which are defined as devices that convert one form of energy to another. Specifically, transducers convert a physical phenomenon or chemical property into an electrical form. Examples of transducers include thermoelectric, magnetoresistive, and electrokinetic sensors that sense physical quantities like heat, light intensity, flow rate, and liquid level. Transducers can be classified as active or passive, analog or digital, and inverse. The document also discusses different types of pressure sensors and how they work, including those using elastic elements like diaphragms, capsules, and bourdon tubes.
The document discusses relay coordination and fault calculation. It describes how proper coordination of relay settings is important for system reliability and selectivity. The author presents different coordination techniques, such as current graded, time graded, and both current and time graded. Fault calculation methods including per unit and MVA methods are demonstrated through examples. Software features for graphical modeling, calculation, curve plotting, and setting sheets are overviewed to enable coordination studies.
This document discusses short-circuit calculations and selective coordination for electrical systems. It explains that short-circuit studies are required by the National Electrical Code to properly size overcurrent protection devices and ensure system coordination. The document provides guidance on calculating available short-circuit current values at different points in a system using the point-to-point method, which accounts for sources of fault current and impedances of system components. It also addresses variables that affect fault current values, such as transformer impedance, motor contribution, and utility voltage tolerance.
1. The document is a catalogue from 2014 for KING GATES srl, an Italian manufacturer of home and industrial automation products located in Sacile, Italy.
2. The catalogue showcases KING GATES' complete range of gate, door, and shutter automation products including motors, control units, radio systems, and accessories.
3. The automations are designed for sliding gates, swing gates, barriers, sectional doors, overhead doors, and rolling shutters to be durable, reliable, safe, and compliant with European standards.
Este documento describe los pasos para configurar la comunicación entre un PLC S7-300 y un módulo Rexroth a través de una red Profibus. Primero se crea un nuevo proyecto en TIA Portal V11 y se agrega un controlador S7-300. Luego se configura la interfaz Profibus en el controlador y se le asigna una dirección. Finalmente, se carga el GSD del módulo Rexroth, se agrega a la red Profibus y también se le asigna una dirección.
The main concept of our project is to unlock our automobiles by using our fingerprint as key and to sense our automobiles safety in mobile, PC or any other electronic gadgets using IOT. It is highly safe control of the automobiles from other person because, the idea implied in this paper is similar to a mobile’s finger print lock. Today, technology has made the unbelievable and impossible things possible and greatly reduced man power also solved major problems in industries and gave high profit for industries. Technology has also solving very much day-to-day life problems. The main motto of this project is to get awareness from automobiles theft. First, this project is combination of several ideas to make things safe, simple, economical friendly. But, this project is one of the more best and simpler for installation and tougher for burglars who try to steal our vehicles.
Automatic Power Factor Corrector Using Arduino reportSelf-employed
This document describes an automatic power factor corrector system using an Arduino microcontroller. The system measures the power factor of a load by determining the phase difference between the line voltage and current signals. It then calculates the required compensation and switches capacitors from a capacitor bank to normalize the power factor close to unity. This improves the efficiency of the power system by reducing losses. The automatic correction allows for varying loads by adjusting the capacitors proportionately.
The document discusses transducers, which are defined as devices that convert one form of energy to another. Specifically, transducers convert a physical phenomenon or chemical property into an electrical form. Examples of transducers include thermoelectric, magnetoresistive, and electrokinetic sensors that sense physical quantities like heat, light intensity, flow rate, and liquid level. Transducers can be classified as active or passive, analog or digital, and inverse. The document also discusses different types of pressure sensors and how they work, including those using elastic elements like diaphragms, capsules, and bourdon tubes.
The document discusses relay coordination and fault calculation. It describes how proper coordination of relay settings is important for system reliability and selectivity. The author presents different coordination techniques, such as current graded, time graded, and both current and time graded. Fault calculation methods including per unit and MVA methods are demonstrated through examples. Software features for graphical modeling, calculation, curve plotting, and setting sheets are overviewed to enable coordination studies.
This document discusses short-circuit calculations and selective coordination for electrical systems. It explains that short-circuit studies are required by the National Electrical Code to properly size overcurrent protection devices and ensure system coordination. The document provides guidance on calculating available short-circuit current values at different points in a system using the point-to-point method, which accounts for sources of fault current and impedances of system components. It also addresses variables that affect fault current values, such as transformer impedance, motor contribution, and utility voltage tolerance.
The document discusses ABB's ACS880 series of industrial drives. It provides an overview of the portfolio and profiles of the drives, their hardware components, primary control program, control panel, control and communication options, and PC tools. The drives offer all-compatible architecture across the product line with common firmware, control panels, connectivity options and PC tools to simplify usage. Key features highlighted include direct torque control, intuitive control panels, drive-to-drive communication capability, and integrated safety functions.
Petersen coils are used in ungrounded power systems to limit arcing currents during ground faults. They consist of an adjustable iron-cored reactor connected between the transformer star point and earth. During a fault, the reactor current balances the capacitive charging current, reducing arcing. Precise tuning of the reactor is needed as line capacitances change over time. Petersen coils allow the benefits of ungrounded systems while mitigating the dangers of arcing ground faults.
3 phase Transmission Line fault detector edit 1-3.pptxKrishna2017
This document presents a project on an automatic tripping mechanism for a three-phase power supply system to prevent damage from faults. The system can detect line-to-ground, line-to-line, and other faults and automatically disconnect power. It uses an Arduino Uno microcontroller along with relays, sensors and other components to sense fault types, locations and temporarily or permanently trip the supply. The system provides safety benefits and can help reduce losses by quickly detecting and isolating faults on transmission lines, substations and industrial applications.
Transformer Parameters Monitoring System using MATLAB SimulinkDr. Amarjeet Singh
Transformer is an important component of an
electrical distribution system. Hence it is important to
monitor transformers for problems before faults occur. This
system is about design and implementation of embedded
system to monitor and record key parameters of a
distribution transformer like load currents,voltage and
temperature. It is installed at the distribution transformer
site and the above parameters are recorded using the analog
to digital converter (ADC) of the embedded system. The
obtained parameters are processed and recorded in the
system memory. If any abnormality or an emergency
situation occurs the system takes immediate action to avoid it.
This system will help the transformers to operate smoothly
and identify problems before any failure. proposed system is
low cost, easy to use capable of monitoring and displaying
data using matlab[1,6].
Presentation on Over-/under-voltage protection of electrical applianceNishant Kumar
Sudden fluctuation in supply is a very big problem in industries and domestic applications. It causes a major loss for industries, offices and homes.
This project gives a low cost and powerful solution for this problem. This Circuit protects refrigerators ,ACs, Microwave ovens as well as other appliances from over and under voltage fluctuations.
This document provides an overview of a training session on protection fundamentals presented by Craig Wester and John Levine of GE Multilin. The training covers protection tools, demonstration relays, future training classes, and protection fundamentals. The fundamentals section discusses desirable protection attributes, selection of protective relays, primary equipment components, and various types of protection including overcurrent, differential, voltage, frequency, power, and distance protection. Information required for applying protection is also listed.
Power Electronics Notes written by Arun Kumar G, Associate Professor, Dept. o...Arunkumar Gowdru
Arunkumar G M.Tech is a lecturer in the Department of Electronics and Communication Engineering at Sri Taralabalu Jagadguru Institute of Technology in Ranebennur, India. He holds a Diploma in Electronics and Communication, Bachelor of Engineering degree, and Master of Technology degree. He is teaching the subject of Power Electronics to seventh semester students and can be contacted by phone or email for feedback or suggestions.
This document discusses power transformer protection. It begins by explaining that transformers are static devices that transform electrical energy between circuits without changing frequency. Power transformers are vital but expensive components that are difficult to repair if damaged. Protection is needed to prevent severe damage from faults.
It then describes the types of faults as incipient, internal, or external. Potential causes of faults are listed as insulation breakdown, overheating, oil contamination, reduced cooling, and phase/ground faults.
The document outlines the general scheme of differential protection and lists specific protection functions used. It provides an example calculation for setting a transformer differential relay and describes the relay's operating characteristics. Models of differential protection relays from various manufacturers are also listed.
Power transformer testing and commissioning guidelines rAshish Patel
1. The document provides guidelines for testing and commissioning power transformers, including pre-commissioning checks, electrical checks, and tests to be performed. It details tests such as ratio testing, vector grouping, no-load current, short-circuit current, insulation testing, and checks of protections like the Buchholz relay.
2. Key electrical checks include verifying the on-load tap changer operation, measuring no-load currents, performing short-circuit tests, and measuring insulation resistance. The transformer, oil, and protections must pass all tests before energization.
3. After energization, the transformer is monitored for 24 hours to check for abnormalities before full commissioning.
Relays are smarter, more flexible and adaptable than traditional devices. The Relion family delivers advanced functionality through an extensive library of protection and control functions. This webinar from ABB will provide technical information on protective relays, though ABB makes no guarantees about specific applications and is not responsible for actions taken based on the information.
The document discusses excitation in generators and loss of excitation (LOE). It begins by explaining what excitation is, why it is required, and how it is provided in generators of different sizes. It then discusses what will happen if excitation is lost, including potential overspeeding, abnormal heating, and loss of synchronization. Several protection schemes for LOE are presented, including impedance-based R-X schemes which monitor changes in generator terminal impedance during LOE. Settings for typical LOE relays are also calculated and described.
This document discusses reactive power and voltage control in electrical power systems. It defines real and reactive power and explains that reactive power is needed to maintain adequate voltages throughout transmission and distribution systems. Several methods of providing reactive power are described, including synchronous condensers, capacitors, static VAR compensators, and distributed generation. The document also discusses different types of voltage and VAR control and compares characteristics of various reactive power sources.
Long & Short Interruptions: Interruptions – Definition – Difference between failures,
outage, Interruptions – causes of Long Interruptions – Origin of Interruptions – Limits for the
Interruption frequency – Limits for the interruption duration – costs of Interruption –
Overview of Reliability evaluation to power quality, comparison of observations and
reliability evaluation.Short interruptions: definition, origin of short interruptions, basic principle, fuse saving,
voltage magnitude events due to re-closing, voltage during the interruption, monitoring of
short interruptions, difference between medium and low voltage systems. Multiple events,
single phase tripping – voltage and current during fault period, voltage and current at post
fault period
This document provides information about the SIMATIC ET 200S distributed I/O 2 AI I 2/4WIRE HF analog electronic module. It includes sections on properties, parameters, diagnostics, analog value representation, and connecting measuring sensors. The module has 2 inputs for measuring current with ranges of ±20 mA or 4-20 mA. It supports two-wire or four-wire measuring transducers and has a resolution of 15 bits.
This document discusses ultrasonic level sensing using transducers that emit high frequency acoustic waves and measure the time-of-flight of reflected echoes to determine the distance to the surface of a liquid. It describes the basic working involving excitation of a start pulse and detection of a stop pulse, with the time difference providing the time-of-flight and corresponding distance. It also mentions that there is a blanking zone near the transducer face where objects cannot be detected. Finally, it notes this technology is used for level sensing in tanks, containers, and various industrial equipment.
The document discusses various electrical protections for a generator transformer, including:
1. Transformer biased differential protection (87GT) that detects internal faults but not through faults.
2. Overhang differential protection (87L) that provides backup protection for the HV side.
3. Backup earth fault protection (51NGT) that operates for inside and outside zone faults if other protections fail.
4. Overall differential protection (87OA) that protects multiple components using multiple current transformer inputs.
5. Over-fluxing protection (99GT) that monitors the voltage-to-frequency ratio to prevent insulation damage.
6. HV overcurrent protection (51GT) that protects against overloads and phase-to
ppt of Three phase fault analysis with auto reset for temporary fault and tri...Vikram Rawani
it's the final ppt which we have made for the project hope you will like it and make use most of it. it will definitely help you guys .
all the best (Y) :)
This document provides a site test report for a transformer differential relay. It includes summaries of general data and information, mechanical checks, electrical tests including function tests and secondary injection tests to check pickup and dropout values of differential currents. Test results are provided to check the relay's response to differential currents, bias characteristics, and blocking of second and fifth harmonic currents, as specified in the testing standards. Signatures are included to verify completion of the on-site testing.
gui based device controller using matlab Major presentationPalak Sinha
major presentation on graphical user interface developing in matlab to control the device control like arduino output , for extending it to home automation etc.
This document describes a MATLAB GUI project to create a graphical user interface for various signal processing and control systems functions. The project includes modules for a basic calculator, plotting functions, convolution, impulse response, step response, and bode plots. It aims to allow users to access these functions through a simple GUI without needing to write MATLAB code. The document outlines the functions, algorithms, and testing used for each module. It concludes that the project was successful in creating a user-friendly interface but that further improvements could allow for more customization and user-defined inputs.
The document discusses ABB's ACS880 series of industrial drives. It provides an overview of the portfolio and profiles of the drives, their hardware components, primary control program, control panel, control and communication options, and PC tools. The drives offer all-compatible architecture across the product line with common firmware, control panels, connectivity options and PC tools to simplify usage. Key features highlighted include direct torque control, intuitive control panels, drive-to-drive communication capability, and integrated safety functions.
Petersen coils are used in ungrounded power systems to limit arcing currents during ground faults. They consist of an adjustable iron-cored reactor connected between the transformer star point and earth. During a fault, the reactor current balances the capacitive charging current, reducing arcing. Precise tuning of the reactor is needed as line capacitances change over time. Petersen coils allow the benefits of ungrounded systems while mitigating the dangers of arcing ground faults.
3 phase Transmission Line fault detector edit 1-3.pptxKrishna2017
This document presents a project on an automatic tripping mechanism for a three-phase power supply system to prevent damage from faults. The system can detect line-to-ground, line-to-line, and other faults and automatically disconnect power. It uses an Arduino Uno microcontroller along with relays, sensors and other components to sense fault types, locations and temporarily or permanently trip the supply. The system provides safety benefits and can help reduce losses by quickly detecting and isolating faults on transmission lines, substations and industrial applications.
Transformer Parameters Monitoring System using MATLAB SimulinkDr. Amarjeet Singh
Transformer is an important component of an
electrical distribution system. Hence it is important to
monitor transformers for problems before faults occur. This
system is about design and implementation of embedded
system to monitor and record key parameters of a
distribution transformer like load currents,voltage and
temperature. It is installed at the distribution transformer
site and the above parameters are recorded using the analog
to digital converter (ADC) of the embedded system. The
obtained parameters are processed and recorded in the
system memory. If any abnormality or an emergency
situation occurs the system takes immediate action to avoid it.
This system will help the transformers to operate smoothly
and identify problems before any failure. proposed system is
low cost, easy to use capable of monitoring and displaying
data using matlab[1,6].
Presentation on Over-/under-voltage protection of electrical applianceNishant Kumar
Sudden fluctuation in supply is a very big problem in industries and domestic applications. It causes a major loss for industries, offices and homes.
This project gives a low cost and powerful solution for this problem. This Circuit protects refrigerators ,ACs, Microwave ovens as well as other appliances from over and under voltage fluctuations.
This document provides an overview of a training session on protection fundamentals presented by Craig Wester and John Levine of GE Multilin. The training covers protection tools, demonstration relays, future training classes, and protection fundamentals. The fundamentals section discusses desirable protection attributes, selection of protective relays, primary equipment components, and various types of protection including overcurrent, differential, voltage, frequency, power, and distance protection. Information required for applying protection is also listed.
Power Electronics Notes written by Arun Kumar G, Associate Professor, Dept. o...Arunkumar Gowdru
Arunkumar G M.Tech is a lecturer in the Department of Electronics and Communication Engineering at Sri Taralabalu Jagadguru Institute of Technology in Ranebennur, India. He holds a Diploma in Electronics and Communication, Bachelor of Engineering degree, and Master of Technology degree. He is teaching the subject of Power Electronics to seventh semester students and can be contacted by phone or email for feedback or suggestions.
This document discusses power transformer protection. It begins by explaining that transformers are static devices that transform electrical energy between circuits without changing frequency. Power transformers are vital but expensive components that are difficult to repair if damaged. Protection is needed to prevent severe damage from faults.
It then describes the types of faults as incipient, internal, or external. Potential causes of faults are listed as insulation breakdown, overheating, oil contamination, reduced cooling, and phase/ground faults.
The document outlines the general scheme of differential protection and lists specific protection functions used. It provides an example calculation for setting a transformer differential relay and describes the relay's operating characteristics. Models of differential protection relays from various manufacturers are also listed.
Power transformer testing and commissioning guidelines rAshish Patel
1. The document provides guidelines for testing and commissioning power transformers, including pre-commissioning checks, electrical checks, and tests to be performed. It details tests such as ratio testing, vector grouping, no-load current, short-circuit current, insulation testing, and checks of protections like the Buchholz relay.
2. Key electrical checks include verifying the on-load tap changer operation, measuring no-load currents, performing short-circuit tests, and measuring insulation resistance. The transformer, oil, and protections must pass all tests before energization.
3. After energization, the transformer is monitored for 24 hours to check for abnormalities before full commissioning.
Relays are smarter, more flexible and adaptable than traditional devices. The Relion family delivers advanced functionality through an extensive library of protection and control functions. This webinar from ABB will provide technical information on protective relays, though ABB makes no guarantees about specific applications and is not responsible for actions taken based on the information.
The document discusses excitation in generators and loss of excitation (LOE). It begins by explaining what excitation is, why it is required, and how it is provided in generators of different sizes. It then discusses what will happen if excitation is lost, including potential overspeeding, abnormal heating, and loss of synchronization. Several protection schemes for LOE are presented, including impedance-based R-X schemes which monitor changes in generator terminal impedance during LOE. Settings for typical LOE relays are also calculated and described.
This document discusses reactive power and voltage control in electrical power systems. It defines real and reactive power and explains that reactive power is needed to maintain adequate voltages throughout transmission and distribution systems. Several methods of providing reactive power are described, including synchronous condensers, capacitors, static VAR compensators, and distributed generation. The document also discusses different types of voltage and VAR control and compares characteristics of various reactive power sources.
Long & Short Interruptions: Interruptions – Definition – Difference between failures,
outage, Interruptions – causes of Long Interruptions – Origin of Interruptions – Limits for the
Interruption frequency – Limits for the interruption duration – costs of Interruption –
Overview of Reliability evaluation to power quality, comparison of observations and
reliability evaluation.Short interruptions: definition, origin of short interruptions, basic principle, fuse saving,
voltage magnitude events due to re-closing, voltage during the interruption, monitoring of
short interruptions, difference between medium and low voltage systems. Multiple events,
single phase tripping – voltage and current during fault period, voltage and current at post
fault period
This document provides information about the SIMATIC ET 200S distributed I/O 2 AI I 2/4WIRE HF analog electronic module. It includes sections on properties, parameters, diagnostics, analog value representation, and connecting measuring sensors. The module has 2 inputs for measuring current with ranges of ±20 mA or 4-20 mA. It supports two-wire or four-wire measuring transducers and has a resolution of 15 bits.
This document discusses ultrasonic level sensing using transducers that emit high frequency acoustic waves and measure the time-of-flight of reflected echoes to determine the distance to the surface of a liquid. It describes the basic working involving excitation of a start pulse and detection of a stop pulse, with the time difference providing the time-of-flight and corresponding distance. It also mentions that there is a blanking zone near the transducer face where objects cannot be detected. Finally, it notes this technology is used for level sensing in tanks, containers, and various industrial equipment.
The document discusses various electrical protections for a generator transformer, including:
1. Transformer biased differential protection (87GT) that detects internal faults but not through faults.
2. Overhang differential protection (87L) that provides backup protection for the HV side.
3. Backup earth fault protection (51NGT) that operates for inside and outside zone faults if other protections fail.
4. Overall differential protection (87OA) that protects multiple components using multiple current transformer inputs.
5. Over-fluxing protection (99GT) that monitors the voltage-to-frequency ratio to prevent insulation damage.
6. HV overcurrent protection (51GT) that protects against overloads and phase-to
ppt of Three phase fault analysis with auto reset for temporary fault and tri...Vikram Rawani
it's the final ppt which we have made for the project hope you will like it and make use most of it. it will definitely help you guys .
all the best (Y) :)
This document provides a site test report for a transformer differential relay. It includes summaries of general data and information, mechanical checks, electrical tests including function tests and secondary injection tests to check pickup and dropout values of differential currents. Test results are provided to check the relay's response to differential currents, bias characteristics, and blocking of second and fifth harmonic currents, as specified in the testing standards. Signatures are included to verify completion of the on-site testing.
gui based device controller using matlab Major presentationPalak Sinha
major presentation on graphical user interface developing in matlab to control the device control like arduino output , for extending it to home automation etc.
This document describes a MATLAB GUI project to create a graphical user interface for various signal processing and control systems functions. The project includes modules for a basic calculator, plotting functions, convolution, impulse response, step response, and bode plots. It aims to allow users to access these functions through a simple GUI without needing to write MATLAB code. The document outlines the functions, algorithms, and testing used for each module. It concludes that the project was successful in creating a user-friendly interface but that further improvements could allow for more customization and user-defined inputs.
The document discusses using a 3D virtual interface to automate home devices. It proposes an architecture with a metaverse client, metaverse server, home server, and home devices. The home server would connect to devices using Bluetooth, WLAN, and UPnP and control them in a hierarchical structure. The 3D virtual interface provides a realistic and intuitive way for users to control automated home functions.
The document discusses the integrated serial port feature of the 8052 microcontroller. It explains that the serial port allows easy reading and writing of data without having to manually clock individual bits. It also describes how the 8052 handles transmission and reception of serial data automatically. The document then discusses how this project uses an 8052 microcontroller to control electrical appliances and vary fan speed from a PC using a serial connection. It provides block diagrams of the power supply and MAX232 serial interface circuitry.
PC Based Industrial Automation With AVR Atmega 16 - Project ReportRobo India
Robo India Presents A project Report on PC Based Industrial Automation using AVR family's Atmel Atmega 16 microcontroller.
It uses Serial communication technology to communicate between PC and embedded system.
You will learn following aspects-
1. serial communication
2. Input output programming
3. Embedded system
4. AVR atmega 16
6. Controlling
This report also contains complete codding of the project.
Automation or automatic control is the use of various control systems for operating equipment such as machinery, processes in factories, boilers and heat treating ovens, switching in telephone networks, steering and stabilization of ships, aircraft and other applications with minimal or reduced human intervention. Some processes have been completely automated.
The biggest benefit of automation is that it saves labour, however, it is also used to save energy and materials and to improve quality, accuracy and precision.
Please share your views and queries, we are found at-
Website- http://roboindia.com
mail- info@roboindia.com
This document summarizes three common temperature sensors: thermocouples, RTDs, and bimetallic thermometers. Thermocouples generate voltage based on the Seebeck effect when two dissimilar metals are joined at different temperatures, and common types include J, K, and E. RTDs provide accurate and stable measurements by changing resistance based on temperature, using materials like platinum. Bimetallic thermometers use the different expansion rates of two welded metals to cause a pointer movement corresponding to temperature. Each sensor has advantages for different applications and temperature ranges.
The UK's Whole System Demonstrator trial from 2008 was the largest randomized controlled study of telehealth and telecare in the world, involving over 6,000 patients across 238 general practices in three sites. The trial found reductions of 45% in mortality rates, 20% in emergency admissions, 15% in A&E and elective visits, and 14% in bed days and costs. It was evaluated by several UK universities and institutions.
REAL TIME MONITORING OF INDUSTRIAL ENVIRONMENT USING LABVIEW.Varun Kambrath
This document describes a system for monitoring industrial environmental parameters. It consists of two main units: a sensing unit and a monitoring unit. The sensing unit measures parameters like pressure, temperature, and voltages using sensors. An PIC16F877A microcontroller converts the analog sensor readings to digital and displays them on an LCD. It then transmits the data using an FSK transmitter module. The monitoring unit includes an FSK receiver to receive the transmitted data. The data is processed by a PIC16F877A microcontroller and sent to a PC via a serial port. An application to monitor the data is created using LabVIEW on the PC.
The document discusses an agenda covering field-programmable logic devices (FPLDs) including complex programmable logic devices (CPLDs). It provides an overview of CPLD architecture, describing them as composed of multiple simpler programmable logic devices (SPLDs) like PALs interconnected on a single chip. It also discusses CPLD vendors and families, noting they provide devices with differing numbers of logic blocks and I/O pins depending on the intended application.
This project presentation summarizes a home automation system called HomeNet that allows control of household appliances and security systems over the internet, PC, or mobile device. The system uses a central microcontroller connected to devices via Zigbee, WiFi, and Bluetooth. It includes a GUI interface on PC accessed via USB, LAN, or WLAN. The system also has a web-based and mobile interface for remote control. All programming is done in C, PHP, Java, and MATLAB to allow automated control and feedback of devices from anywhere.
SIMULATION OF TEMPERATURE SENSOR USING LABVIEWPooja Shukla
This document discusses the design of a temperature sensor circuit using LabVIEW. It contains information about thermistors and how their resistance varies with temperature. The document outlines that the goal is to design the temperature sensor circuit in LabVIEW and analyze temperature variation over time for different applications. It provides details about the front panel and block diagram of LabVIEW programs. Common temperature sensors like thermocouples, thermistors, and silicon sensors are described. Applications of temperature sensors in systems like GPS devices, homes, oil exploration, and electronics are listed.
This document provides an overview of finite state machines (FSMs). It defines an FSM as a digital circuit whose output depends on both the current input and state. There are two main types of FSMs: Moore machines whose output depends only on the current state, and Mealy machines whose output depends on both the current state and input. The document discusses state diagrams, state tables, basic circuit organization including latches to represent states and combinational logic for next states and outputs. It also covers topics like state assignment methods including one-hot encoding commonly used to map FSMs onto field programmable gate arrays due to their register-rich architecture.
UNIT I- CPLD & FPGA ARCHITECTURE & APPLICATIONSDr.YNM
Dr. Y.Narasimha Murthy Ph.D introduces programmable logic devices and their evolution from PLDs to CPLDs and FPGAs. The document discusses the basic architecture and applications of ROM, RAM, PLDs including PLA, PAL and GAL. It provides details on the programmable AND and OR planes in a PLA and compares device types based on their AND and OR array programmability. SPLDs, CPLDs and FPGAs are the main types of PLDs discussed.
This document describes a Bluetooth-based home appliance system that allows appliances to communicate wirelessly in a network. It uses a Bluetooth module to connect appliances like lights and fans to an Android phone. The system is powered by a 5V regulated power supply and uses an 8051 microcontroller and relays to control the appliances. Programming is done using the Kiel Vision software. The Bluetooth system provides a low-cost and wireless way to remotely control home appliances through an Android phone.
Temperature measurement is important across many industries and applications. There are several common temperature sensors including glass thermometers, bi-metallic thermometers, RTDs, thermocouples, thermistors, and IC sensors. Each sensor has advantages and disadvantages regarding factors like accuracy, sensitivity, temperature range, cost, and stability over time that must be considered when choosing a sensor for a particular application like industrial processes, manufacturing, health and safety applications.
TEDx Manchester: AI & The Future of WorkVolker Hirsch
TEDx Manchester talk on artificial intelligence (AI) and how the ascent of AI and robotics impacts our future work environments.
The video of the talk is now also available here: https://youtu.be/dRw4d2Si8LA
This document describes a student project to create a Bluetooth-based home automation system using an Arduino. The system allows controlling electrical devices in a home remotely using a smartphone. It discusses the components used - Arduino UNO, Bluetooth module, relay module, software. The document provides details on each component and how they work together with a block diagram and circuit diagram. It aims to automate home appliances and reduce human effort for tasks like switching on lights or fans.
This minor project report describes a home automation system that allows remote control of home appliances via an Android application or web server. The primary objectives are to develop a remote controlled home automation system using Android technology. The system would allow appliances to be operated from a smartphone or tablet through a graphical user interface. It discusses how internet of things technology can connect devices and allow them to communicate electronically. The report outlines how the system would use a microcontroller and relays to control switches and turn appliances on and off based on commands from the remote Android application or web server.
IRJET- IoT based Classroom Automation SystemIRJET Journal
This document describes an IoT-based classroom automation system that allows teachers to remotely control devices in the classroom using a mobile application. The system uses NodeMCU microcontrollers connected to sensors and appliances via relays to enable on/off control. An ultrasonic sensor detects human presence. Commands sent from the mobile app via WiFi are received by the NodeMCU which controls the relays. This allows automation of lighting, A/C, and other devices for improved energy efficiency, convenience and security while providing remote classroom monitoring capabilities.
Office automation refers to the varied computer machinery and software used to digitally create, collect, store, manipulate, and relay office information needed for accomplishing basic tasks. ... Office automation was a popular term in the 1970s and 1980s as the desktop computer exploded onto the scene.
IRJET- Home Control System using Artificial IntelligenceIRJET Journal
This document describes a home control system that uses voice commands via the Google Assistant. The system allows users to control household appliances like lights, fans, and TVs using natural language voice commands to the Google Assistant. The Google Assistant then sends the commands to IFTTT, which decodes them and sends signals to a NodeMCU microcontroller over WiFi. The microcontroller controls relays connected to appliances, turning them on and off. The system provides a low-cost way to control home appliances using voice commands with readily available components like the Google Assistant, IFTTT, NodeMCU, and relays.
Transfer Switch for Solar, Grid and Utility PowerIRJET Journal
This document describes a smart switch system that can control the flow of electricity from solar panels, batteries, or the grid to power various home appliances. It uses an ESP8266 Wi-Fi module connected to a relay board to allow remote control of appliances via a smartphone app. When signals are sent from the app, the Wi-Fi module activates the relay board to switch appliances on or off. This provides a smart home solution for remotely monitoring and controlling lights, AC, fans and other devices using a wireless network. The system was tested successfully and could enable more convenient and efficient energy management in homes with solar power.
This document describes an Android application based home automation and security system developed by students at Khulna University of Engineering and Technology. The system uses an Arduino board to control home appliances and monitor sensors via Bluetooth from an Android app. Key features of the system include controlling lights, fans, TVs, AC units and more from the app, as well as smart door locking, garage door control, fire alarms, motion detection, and remote temperature monitoring. The Arduino code and block diagram of the system are provided along with an equipment list and costs.
PROJECT REPORT ON Home automation using by BluetoothAakashkumar276
This document summarizes a student project on developing a home automation system using an Arduino board and Bluetooth. The system allows users to control electrical appliances like fans and lights in their home remotely using an Android phone app. The app communicates with an Arduino Uno microcontroller via HC-05 Bluetooth module. The Arduino is connected to a 4-channel relay board to switch appliances on and off. The project aims to provide a low-cost solution for remote home control without needing physical switches or remote controls.
SIMPLIFIED SECURED WIRELESS RAILWAY / AIRWAY FOR RESERVATIONRicky Drk
This document discusses embedded systems and describes them as a combination of computer hardware and software designed to perform a specific function within a larger system. It notes that while general-purpose computers can perform many different tasks, embedded systems are designed for a dedicated purpose like controlling anti-lock brakes in a vehicle. Real-time embedded systems must also meet precise timing requirements to ensure functions are performed within required time constraints.
This document presents a design for an IoT-based home automation system using the ESP8266 WiFi module. The system aims to reduce electricity waste by automatically turning off appliances when not in use. It has two main components - an Arduino board that controls the ESP8266 WiFi module, and the ESP8266 module which creates a WiFi network to control connected devices remotely over the internet. The system is intended to be centralized and allow remote access and control of a home's devices from any location via an IP address or website.
This document describes a seminar report on a smart energy efficient home automation system using IoT. The system aims to remotely control home appliances from anywhere using an internet connection to reduce electricity bills and provide safety and security. It proposes using technologies like NodeMCU, IFTTT, Arduino and Google Assistant to operate devices via voice commands or a web interface. The report includes sections on the system framework, architecture, applications used and concludes that the system can make homes more intelligent and efficient while saving energy costs.
This document provides an overview of a project report on controlling home appliances using an Android smartphone. It includes an introduction describing how smartphones can be used to automate household tasks by connecting to appliances over Bluetooth. It also includes sections on acknowledgements, literature review, design considerations, measurements, simulation, and conclusions. The project aims to develop a mobile application for Android devices to remotely control home appliances for the benefit of senior citizens and others.
The document provides details about Abdul Azeem's 6-week summer training at Electrocus Solution on "Internet of Things (IOT)". It includes a certificate, declaration, acknowledgement, abstract and contents. The training covered embedded system architecture, designing and implementing embedded systems, and fundamentals of Arduino and IOT. Key topics included microcontrollers, sensors like ultrasonic and soil moisture, programming with Arduino IDE, and characteristics and applications of IOT.
This document summarizes an internship project report on developing a smart home automation system based on mobile network using a microcontroller. The project was completed by Chinmaya Bhoi over two months under the guidance of Prof. Ajit Kumar Panda and Prof. M. Suresh at the National Institute of Science and Technology. The report includes chapters on embedded systems and microcontroller architecture, embedded C programming, components used including a DTMF module, relay and motor driver, and demonstrating the automation of lighting a bulb. The conclusion discusses applications and future work such as enabling remote control of devices in the home from a mobile phone.
This document describes a smart home automation project completed by six students. The project involved creating a system to control home appliances and monitor temperature/humidity using an Arduino, Bluetooth, and an Android app. Hardware components included an Arduino Uno, DHT22 sensor, relays, HC-05 Bluetooth module, and more. Software included code for the Arduino and an Android app created in Android Studio. The system allowed controlling lights, fans and more from a phone and monitoring the home environment remotely.
HOME APPLIANCE CONTROL SYSTEM USING GSM TECHNOLOGYSEKHAR PENTAKOTA
This document describes a home appliance control system using GSM technology. It discusses designing a system that allows users to control home appliances remotely using their cell phones. The system uses an AT89S52 microcontroller connected to GSM and relay modules to control appliances. When the microcontroller receives control commands via the GSM module, it activates the appropriate relays to switch appliances on or off. The system aims to provide a low-cost way to automate and control home appliances from anywhere using basic technologies like cell phones and GSM networks. It allows conveniences like remotely turning lights or other devices on/off for security while away from home.
This document presents a project report for a home automation system called Webcasa. It describes the system's hardware and software requirements. The system will use an Arduino board connected to an Ethernet shield to control appliances and monitor temperature via a web interface. It will allow users to remotely control devices like lights, appliances and check the temperature of rooms in their home from a web browser. The report outlines the project objectives, proposed features, hardware components, software tools and design of the home automation system.
A collision prevention warning system is an automobile safety system which enables vehicles to identify the chances of collision and give visual and audio warning to the driver so that the driver can take necessary action to avoid `a collision.
This document appears to be a seminar paper on embedded web technology presented by Sruthi R Babu. It includes an introduction, sections on embedded web technology basics covering embedded systems, embedded web servers, and the client-server model. It also discusses HTML, XML, explanations of embedded web technology, and applications. The paper was completed to fulfill requirements for a BTech degree and was certified by several professors from the College of Engineering Pathanapuram.
This document describes a system that allows remote control of home appliances over the internet. The system is divided into three modules: input, computation, and output. In the input module, a user interface is provided for a remote user to control appliances. In the computation module, the microcontroller processes input signals and controls the appliances. In the output module, devices like lights, fans, and a display can be controlled remotely. The system uses an IP address to connect appliances to the internet and allow remote control from any location through a web application. This provides benefits like reduced electricity waste and labor by allowing appliances to be controlled without being physically present.
Similar to Final report on gui based device control using matlab (20)
Sri Guru Hargobind Ji - Bandi Chor Guru.pdfBalvir Singh
Sri Guru Hargobind Ji (19 June 1595 - 3 March 1644) is revered as the Sixth Nanak.
• On 25 May 1606 Guru Arjan nominated his son Sri Hargobind Ji as his successor. Shortly
afterwards, Guru Arjan was arrested, tortured and killed by order of the Mogul Emperor
Jahangir.
• Guru Hargobind's succession ceremony took place on 24 June 1606. He was barely
eleven years old when he became 6th Guru.
• As ordered by Guru Arjan Dev Ji, he put on two swords, one indicated his spiritual
authority (PIRI) and the other, his temporal authority (MIRI). He thus for the first time
initiated military tradition in the Sikh faith to resist religious persecution, protect
people’s freedom and independence to practice religion by choice. He transformed
Sikhs to be Saints and Soldier.
• He had a long tenure as Guru, lasting 37 years, 9 months and 3 days
Tools & Techniques for Commissioning and Maintaining PV Systems W-Animations ...Transcat
Join us for this solutions-based webinar on the tools and techniques for commissioning and maintaining PV Systems. In this session, we'll review the process of building and maintaining a solar array, starting with installation and commissioning, then reviewing operations and maintenance of the system. This course will review insulation resistance testing, I-V curve testing, earth-bond continuity, ground resistance testing, performance tests, visual inspections, ground and arc fault testing procedures, and power quality analysis.
Fluke Solar Application Specialist Will White is presenting on this engaging topic:
Will has worked in the renewable energy industry since 2005, first as an installer for a small east coast solar integrator before adding sales, design, and project management to his skillset. In 2022, Will joined Fluke as a solar application specialist, where he supports their renewable energy testing equipment like IV-curve tracers, electrical meters, and thermal imaging cameras. Experienced in wind power, solar thermal, energy storage, and all scales of PV, Will has primarily focused on residential and small commercial systems. He is passionate about implementing high-quality, code-compliant installation techniques.
Flow Through Pipe: the analysis of fluid flow within pipesIndrajeet sahu
Flow Through Pipe: This topic covers the analysis of fluid flow within pipes, focusing on laminar and turbulent flow regimes, continuity equation, Bernoulli's equation, Darcy-Weisbach equation, head loss due to friction, and minor losses from fittings and bends. Understanding these principles is crucial for efficient pipe system design and analysis.
Blood finder application project report (1).pdfKamal Acharya
Blood Finder is an emergency time app where a user can search for the blood banks as
well as the registered blood donors around Mumbai. This application also provide an
opportunity for the user of this application to become a registered donor for this user have
to enroll for the donor request from the application itself. If the admin wish to make user
a registered donor, with some of the formalities with the organization it can be done.
Specialization of this application is that the user will not have to register on sign-in for
searching the blood banks and blood donors it can be just done by installing the
application to the mobile.
The purpose of making this application is to save the user’s time for searching blood of
needed blood group during the time of the emergency.
This is an android application developed in Java and XML with the connectivity of
SQLite database. This application will provide most of basic functionality required for an
emergency time application. All the details of Blood banks and Blood donors are stored
in the database i.e. SQLite.
This application allowed the user to get all the information regarding blood banks and
blood donors such as Name, Number, Address, Blood Group, rather than searching it on
the different websites and wasting the precious time. This application is effective and
user friendly.
Supermarket Management System Project Report.pdfKamal Acharya
Supermarket management is a stand-alone J2EE using Eclipse Juno program.
This project contains all the necessary required information about maintaining
the supermarket billing system.
The core idea of this project to minimize the paper work and centralize the
data. Here all the communication is taken in secure manner. That is, in this
application the information will be stored in client itself. For further security the
data base is stored in the back-end oracle and so no intruders can access it.
Open Channel Flow: fluid flow with a free surfaceIndrajeet sahu
Open Channel Flow: This topic focuses on fluid flow with a free surface, such as in rivers, canals, and drainage ditches. Key concepts include the classification of flow types (steady vs. unsteady, uniform vs. non-uniform), hydraulic radius, flow resistance, Manning's equation, critical flow conditions, and energy and momentum principles. It also covers flow measurement techniques, gradually varied flow analysis, and the design of open channels. Understanding these principles is vital for effective water resource management and engineering applications.
This study Examines the Effectiveness of Talent Procurement through the Imple...DharmaBanothu
In the world with high technology and fast
forward mindset recruiters are walking/showing interest
towards E-Recruitment. Present most of the HRs of
many companies are choosing E-Recruitment as the best
choice for recruitment. E-Recruitment is being done
through many online platforms like Linkedin, Naukri,
Instagram , Facebook etc. Now with high technology E-
Recruitment has gone through next level by using
Artificial Intelligence too.
Key Words : Talent Management, Talent Acquisition , E-
Recruitment , Artificial Intelligence Introduction
Effectiveness of Talent Acquisition through E-
Recruitment in this topic we will discuss about 4important
and interlinked topics which are
Sachpazis_Consolidation Settlement Calculation Program-The Python Code and th...Dr.Costas Sachpazis
Consolidation Settlement Calculation Program-The Python Code
By Professor Dr. Costas Sachpazis, Civil Engineer & Geologist
This program calculates the consolidation settlement for a foundation based on soil layer properties and foundation data. It allows users to input multiple soil layers and foundation characteristics to determine the total settlement.
Particle Swarm Optimization–Long Short-Term Memory based Channel Estimation w...IJCNCJournal
Paper Title
Particle Swarm Optimization–Long Short-Term Memory based Channel Estimation with Hybrid Beam Forming Power Transfer in WSN-IoT Applications
Authors
Reginald Jude Sixtus J and Tamilarasi Muthu, Puducherry Technological University, India
Abstract
Non-Orthogonal Multiple Access (NOMA) helps to overcome various difficulties in future technology wireless communications. NOMA, when utilized with millimeter wave multiple-input multiple-output (MIMO) systems, channel estimation becomes extremely difficult. For reaping the benefits of the NOMA and mm-Wave combination, effective channel estimation is required. In this paper, we propose an enhanced particle swarm optimization based long short-term memory estimator network (PSOLSTMEstNet), which is a neural network model that can be employed to forecast the bandwidth required in the mm-Wave MIMO network. The prime advantage of the LSTM is that it has the capability of dynamically adapting to the functioning pattern of fluctuating channel state. The LSTM stage with adaptive coding and modulation enhances the BER.PSO algorithm is employed to optimize input weights of LSTM network. The modified algorithm splits the power by channel condition of every single user. Participants will be first sorted into distinct groups depending upon respective channel conditions, using a hybrid beamforming approach. The network characteristics are fine-estimated using PSO-LSTMEstNet after a rough approximation of channels parameters derived from the received data.
Keywords
Signal to Noise Ratio (SNR), Bit Error Rate (BER), mm-Wave, MIMO, NOMA, deep learning, optimization.
Volume URL: https://airccse.org/journal/ijc2022.html
Abstract URL:https://aircconline.com/abstract/ijcnc/v14n5/14522cnc05.html
Pdf URL: https://aircconline.com/ijcnc/V14N5/14522cnc05.pdf
#scopuspublication #scopusindexed #callforpapers #researchpapers #cfp #researchers #phdstudent #researchScholar #journalpaper #submission #journalsubmission #WBAN #requirements #tailoredtreatment #MACstrategy #enhancedefficiency #protrcal #computing #analysis #wirelessbodyareanetworks #wirelessnetworks
#adhocnetwork #VANETs #OLSRrouting #routing #MPR #nderesidualenergy #korea #cognitiveradionetworks #radionetworks #rendezvoussequence
Here's where you can reach us : ijcnc@airccse.org or ijcnc@aircconline.com
We have designed & manufacture the Lubi Valves LBF series type of Butterfly Valves for General Utility Water applications as well as for HVAC applications.
Final report on gui based device control using matlab
1. GRAPHICAL USER INTERFACE (G .U. I) BASED DEVICE
CONTROLLER USING MATLAB
MAJOR PROJECT REPORT
Submitted in partial fulfillment of the
Requirement for the award of the degree of
BACHELOR OF TECHNOLOGY
IN
ELECTRICAL AND ELECTRONICS ENGINEERING
(UNDER THE GUIDANCE OF Dr. Y. R. SOOD)
BY
Vandana Sharma (11273)
Rohit Pandey (11236)
Palak Sinha (11234)
Rajan Chauhan (10225)
2. DEPARTMENT OF ELECTRICAL & ELECTRICAL ENGINEERING
NATIONAL INSTITUTE OF TECHNOLOGY, HAMIRPUR (H.P)
CANDIDATE’S DECLARATION
I hereby certify that the work which is being presented in the major project titled “GUI
Based Device Controller Using MATLAB” in partial fulfillment of the requirements for
the award of the Degree of Bachelor of Technology and submitted in the Electrical and
Electronics Department, National Institute of Technology Hamirpur, is an authentic
record of my own work carried out during a period from August 2014 to DEC 2014
under the supervision of Dr. Y.R. SOOD, Professor, Electrical and Electronics
Department , National Institute of Technology, Hamirpur.
The matter presented in this project report has not been submitted by me for the award of
any other degree of this or any other Institute / University .
VANDANA SHARMA (11273)
ROHIT PANDEY (11236)
PALAK SINHA (11234)
RAJAN CHAUHAN (10225)
This is to certify that the above statement made by the candidates is correct to the best of
my Knowledge.
Dr. Y.R. SOOD
Professor
Project Supervisor
Prof. Ashwani Chandel
HEAD OF DEPARTMENT
ELECTRICAL ENGINEERING DEPARTMENT
National Institute Of Technology Hamirpur, HP
3. ACKNOWLEDGEMENT
“Preservance ,inspiration and motivation have always played a key role in any venture .
It is not just the brain that matters most , but that which guides them . The character, the
heart , generous qualities and progressive forces. The metamorphosis took endless hours
of toil , had its moments of frustation , but in the end everything seemed to have sense”.
At this level of understanding it is often difficult to understand the wide spectrum of
knowledge without proper guidance and advice. Hence, we take this opportunity to
express our heartfelt gratitude to our project guide “DR .Y.R. SOOD” who had faith in us
and allowed us to work on this project .We would like to thank him for his immense
interest ,valuable guidance, constant inspiration and kind co-operation throughout the
period of word undertaken, which has been instruemnted in the success of our project .
We also acknowledge our profound sense of gratitude to all the teachers who have
been instruemental for providing us the technical knowledge and moral support to
complete the project with full understanding .We thank our friends and family for their
moral support to carve out this project and above all GOD for removing all hurdles in
the way .
VANDANA SHARMA (11273)
ROHIT PANDEY (11236)
PALAK SINHA (11234)
RAJAN CHAUHAN (10225)
4. ABSTRACT
Within the ambit of wireless technology ,apperance of the remote control based devices
and appliances have become the order of the day. It reduces human affords and
increases the efficiency. Every sector needs the automation, ranging from home to
industries. Automation Systems perform by allowing a number of to communicate with a
central controller which in turn communicates all information to the user or the owner of
the system as per the instructions and the structure of the system.The application of
such automation systems could be in areas such as heating ,lighting , defence , energy
management audio and vedio systems , health monitoring and entertainment .
Keeping all these facts in mind , this project propose a system which based on GUI
controlling through a PC (personal computer ) or LAPTOP. This project propose
automation of appliances like fan , bulb , motor , fire sensor. To automate these
appliances , we can use the different wireless communication media like infrared ,
Bluetooth , Radio Frequency , RFID , GSM, DTMF and GUI-MATLAB and
implemented with the help of microcontroller – 89c51 to compare the robustness and
effeciency of the output . To automate the industries
appliances we have to programme the CPU-89S52 In Embedded C . Being an emerging
area of research, a review of the most recent literature and implementation has been
carried out. Home Automation refers to the use of the computer and information
technology to control home appliances and features ( such as windows or lightning )
. Systems can range from simple remote control of lightning through to complex
computer /micro –controller based networks with varying degrees of intelligence
and automation . Home automation is adopted for reasons of ease , security and
energy efficiency .In modern construction in industrialized nations , most homes have
been wired for electrical power , telephones , TV Outlets (cable or antennas ) and a
doorbell . Many household tasks were automated by the development of
specialized appliances . For instances , automatic washing machines were
developed to reduce the manual labor of cleaning clothes , and the water heaters
reduced the labor necessary for bathing. Other traditional household tasks , like food
preservation and preparation have been automated in large extent by moving them
5. into factory settings , with the development of pre made , prepackaged foods and in
some countries , such as the UNITED STATES , increased reliance on commercial
food preparation services , such as fast food restuarants . Volume production and
the factory setting allows forms of automation that would be impractical or too
costly in a home setting . Standardize foods enable possible futher automation of handling
the food within the home. The use of gaseous or liquid fuels, and later the use of
electricity enabled increased automation in heating , reducing the labour necessary to
manually refuel heaters and stoves . Development of thermostats allowed more
automated control of heating and ater cooling . As the number of controllable
devices in the home rises , interconnection and communication becomes a useful and
desired feature. For example, a furnace can send an alert message when it needs
cleaning , or a refrigerator when it needs service . Rooms will become
“intelligent” and will send signals to the controller when someone enters . If no one
is supposed to be at home and the alarm system is set , the system is set , the
system could call the owner , or the neighbors , or an emergency number. In simple
installations, domotics may be as straightforward as turning on the lights when a
person enters the room. In advanced installations , rooms can sense not only the
presense of a person inside but know who that person is and perhaps set appropriate
lightining, temperature , music levels or television channels , taking into account
the day of the week , the time of day and other factors . This Project is an
implementation of the MATLAB –ARDUINO serial port communication .This project
will also include an introduction of what an Arduino is - it’s basic design . The pins
that are there on the board etc , Following this we have covered topics on Arduino Setup,
issues faced while installing an Arduino. It’s hardware and software aspects , issues
faced while installing an Arduino , how we have troubles hooted the problems etc .
The final portion of this report includes MATLAB ARDUINO INTERFACING and
serial port communication. The communication is established using the serial ports
that are present on the Arduino Board .
Introduction
6. A graphical user interface (GUI) is a pictorial interface to a program. A good GUI can
make programs easier to use by providing them with a consistent appearance and with
intuitive controls like pushbuttons, list boxes, sliders, menus, and so forth. The GUI
should behave in an understandable and predictable manner, so that a user knows what to
expect when he or she performs an action. For example, when a mouse click occurs on a
pushbutton, the GUI should initiate the action described on the label of the button. This
chapter introduces the basic elements of the MATLAB GUIs. The chapter does not
contain a complete description of components or GUI features, but it does provide the
basics required to create functional GUIs for your programs.
How a Graphical User Interface Works
A graphical user interface provides the user with a familiar environment in which to
work. This environment contains pushbuttons, toggle buttons, lists, menus, text boxes,
and so forth, all of which are already familiar to the user, so that he or she can
concentrate on using the application rather than on the mechanics involved in doing
things. However, GUIs are harder for the programmer because a GUI-based program
must be prepared for mouse clicks (or possibly keyboard input) for any GUI element at
any time. Such inputs are known as events, and a program that responds to events is said
to be event driven. The three principal elements required to create a MATLAB Graphical
User Interface are
1. Components. Each item on a MATLAB GUI (pushbuttons, labels, edit boxes, etc is a
graphical component. The types of components include graphical controls(pushbuttons,
edit boxes, lists, sliders, etc.), static elements (frames and text strings), menus, and
axes. Graphical controls and static elements are created by the function ui control, and
menus are created by the functions ui menu and ui context menu. Axes, which are used
to display graphical data, are created by the function axes.
2. Figures. The components of a GUI must be arranged within a figure, which is a
window on the computer screen. In the past, figures have been created automatically
whenever we have plotted data. However, empty figures can be created with the
7. function figure and can be used to hold any combination of components.
3. Callbacks. Finally, there must be some way to perform an action if a user clicks a
mouse on a button or types information on a keyboard. A mouse click or a key press is
an event, and the MATLAB program must respond to each event if the program is to
perform its function. For example, if a user clicks on a button, that event must cause
the MATLAB code that implements the function of the button to be executed. The
code executed in response to an event is known as a call back. There must be a call
back to implement the function of each graphical component on the GUI. The basic
GUI elements are summarized in Table 1.1, and sample elements are shown in Figure.
We will be studying examples of these elements and then build working GUIs
from them.
Creating And Displaying A Graphical User Interface
MATLAB GUIs are created using a tool called guide, the GUI Development
Environment. This tool allows a programmer to layout the GUI, selecting and aligning
the GUI components to be placed in it. Once the components are in place, the
programmer can edit their properties: name, color, size, font, text to display, and so forth.
When guide saves the GUI, it creates working program including skeleton functions that
the programmer can modify to implement the behavior of the GUI. When guide is
executed, it creates the Layout Editor, shown in Figure 1.2. The large white area with
grid lines is the layout area, where a programmer can layout the GUI. The Layout Editor
window has a palate of GUI components along the left side of the layout area. A user can
create any number of GUI components by first clicking on the desired component, and
then dragging its outline in the layout area. The top of the window has a toolbar with a
series of useful tools that allow the user to distribute and align GUI components, modify
the properties of GUI components, add menus to GUIs, and so on. The basic steps
required to create a MATLAB GUI are:
1. Decide what elements are required for the GUI and what the function of each element
will be. Make a rough layout of the components by hand on a piece of paper.
8. Figure 1.1 A Figure Window showing examples of MA TLAB GUI elements From top
to bottom and left to right, the elements are: (1) a pushbutton; (2) a toggle button in the
‘on' state; (3) two radio buttons surrounded by a frame; (4) a check box; (5) a text field
and an edit box; (6) a slider; (7) a set of axes; and (8) a list box.
9. 2.Use a MATLAB tool called guide (GUI Development Environment) to layout the
components on a figure. The size of the figure and the alignment and spacing of
10. components on the figure can be adjusted using the tools built into guide.
3. Use a MATLAB tool called the Property Inspector (built into guide) to give each
component a name (a "tag") and to set the characteristics of each component, such as
its color, the text it displays, and so on.
4. Save the figure to a file. When the figure is saved, two files will be created on disk
with the same name but different extents. The fig file contains the actual GUI that you
have created, and the M-file contains the code to load the figure and skeleton call
backs for each GUI element.
5. Write code to implement the behavior associated with each callback function.
As an example of these steps, let's consider a simple GUI that contains a single
Push button and a single text string. Each time that the pushbutton is clicked, the text
string will be updated to show the total number of clicks since the GUI started.
11. Figure 1.3 Rough layout for a GUI containing a single pushbutton and a single label field.
Step 1: The design of this Gm is very simple. It contains a single pushbutton and a single
text field. The callback from the pushbutton will cause the number displayed in the text
field to increase by one each time that the button is pressed. A rough sketch of the GUI is
shown in Figure 1.3.
Step 2: To layout the components on the GUI, run the MATLAB function guide. When
guide is executed, it creates the window shown in Figure 1.2
Figure 1.4 The completed GUI layout within the guide window
First, we must set the size of the layout area, which will become the size the final GUI.
We do this by dragging the small square on the lower right corner of the layout area until
12. it has the desired size and shape. Then, click on the "pushbutton" button in the list of GUI
components, and create the shape of the pushbutton in the layout area. Finally, click on
the "text" button in the list GUI components, and create the shape of the text field in the
layout area. The resulting figure after these steps is shown in Figure 1.4. We could now
adjust the alignment of these two elements using the Alignment Tool, if desired.
Step 3: To set the properties of the pushbutton, click on the button in the layout area and
then select "Property Inspector" from the toolbar. Alternatively, right-click on the button
and select "Inspect Properties" from the popup menu. The Property Inspector window
shown in Figure 1.5 will appear. Note this window lists every property available for the
pushbutton and allows us set each value using a GUI interface. The Property Inspector
performs the same function as the get and set functions, but in a much more convenient
form.
For the pushbutton, we may set many properties such as color, size, font, text alignment,
and so on. However, we must set two properties: the String property, which contains the
text to be displayed, and the Tag property, which is the name of the pushbutton. In this
case, the String property will be set to 'click Here', and the Tag property will be set to
MyFirstButton. For the text field, we must set two properties: the String property, which
contains the text to be displayed, and the Tag property, which is the name of the text
field. This name will be needed by the callback function to locate and update the text
field. In this case, the String property will be set to 'Total clicks: 0', and the Tag property
defaulted to 'MyFirstText'. The layout area after these steps is shown in Figure 1.6. It is
possible to set the properties of the figure itself by clicking on a clear spot in the Layout
Editor, and then using the Property Inspector to examine and set the figure's properties.
Although not required, it is a good idea to set the figure's Name property. The string in
the Name property will be displayed in the title bar of the resulting GUI when it is
executed.
13. Figure 1.5 The Property Inspector showing the properties of the pushbutton. Note that the
String is set to 'Click Here', and the Tag is set to 'MyFirstButton'.
Step 4: We will now save the layout area under the name MyFirstGUI. Select the
"File/SaveAs" menu item, type the name MyFirstGUI as the file name, and click "Save".
This action will automatically create two files, MyFirstGUI.fig and MyFirstGUI.m. The
figure file contains the actual GUI that we have created. The M-file contains code that
loads the figure file and creates the GUI, plus a skeleton callback function for each active
GUI component.
At this point, we have a complete Gm, but one that does not yet do the job it was
designed to do. You can start this Gm by typing MyFirstGUI in the Command Window,
as shown in Figure 1.7. If the button is clicked on this GUI, the following message will
appear in the Command Window: MyFirstButton Callback not implemented yet. A
portion of the M-file automatically created by guide is shown in Figure 1.8. This file
contains function MyFirstGUI, plus dummy sub functions implementing the callbacks for
14. each active GUI component. If function MyFirstGUI is called without arguments, then
the function displays the Gm contained in file.
Figure 1.6 The design area after the properties of the pushbutton and the text field have
been modified.
MyFirstGUI.fig. If function MyFirstGUI is called with arguments, then the function
assumes that the first arguments the name of a sub function, and it calls that function
using feval, passing the other arguments on to that function. Each callback function
handles events from a single GUI component. If a mouse click (or keyboard input for
Edit Fields) occurs on the GUI component, then the component's callback function will
be automatically called by MATLAB. The name of the callback function will be the
value in the Tag property of the GUI component plus the characters "_Callback". Thus,
the callback function for MyFirstButton will be named MyFirstButton_Callback. M-files
created by guide contain callbacks for each active GUI component, but these callbacks
simply display a message saying that the function of the callback has not been
implemented yet.
15. Step 5: Now, we need to implement the callback sub function for the pushbutton. This
function will include a persistent variable that can be used to count the number of clicks
that have occurred. When a click occurs on the pushbutton, MATLAB will call the
function MyFirstGUI with MyFirstButton_callback as the first argument. Then function
MyFirstGUI will call sub function MyFirstButton_callback, as shownin Figure 1.9. This
function should increase the count of clicks by one, create a new text string containing
the count, and store the new string in the String property of the text field MyFirstText.
Figure 1.7 Typing MyFirstGUI in the Command Window starts the GUI
16. .
Figure 1.8 The M-file forMyFirstGUI, automatically created by guide.
A function to perform this step is shown below:
17. Figure 1.9 Event handling in program MyFirstGUI.
When a user clicks on the button with the mouse, the function MyFirstGUI is cal1ed
automatically with the argument MyFirstButton_callback. Function MyFirstGUI in turn
calls sub function. MyFirstButton_Callback. This function increments count, and then
saves the new count in the text field on the GUI.
Figure 1.10 The resulting program after three button pushes.
18. Note that this function declares a persistent variable count and initializes it to zero. Each
time that the function is called, it increments count by 1 and creates a new string
containing the count. Then, the function updates the string displayed in the text field
MyFirstText. The resulting program is executed by typing MyFirstGUI in the Command
Window. When the user clicks on the button, MATLAB automatically calls function
MyFirstGUI with MYFirstButton_Callback as the first argument, and function
MyFirstGUI calls sub function MyFirstButton_Callback. This function increments
variable count by one and updates the value displayed in the text field. The resulting GUI
after three button pushes is shown in Figure 1.10.
Good Programming Practice
Store GUI application data in the handles structure, so that it will automatically be
available to any callback function.
If you modify any of the GUI application data in the handles structure, be sure to save the
structure with a call to guidata before exiting the function where the modifications
occurred.
Graphical user Interface Components
This section summarizes the basic characteristics of common graphical user interface
components. It describes how to create and use each component, as well as the types of
events each component can generate. The components discussed in this section are
• Text Fields
• Edit Boxes
• Frames
• Pushbuttons
• Toggle Buttons
• Checkboxes
• Radio Buttons
• Popup Menus
• List Boxes
• Slide
19. Text Fields
A text-field is a graphical object that displays a text string. You can specify how the text
is aligned in the display area by setting the horizontal alignment property. By default, text
fields are horizontally centered. A text field is created by creating a uicontrol whose style
property is 'edit'. A text field may be added to a GUI by using the text tool in the Layout
Editor. Text fields do not create callbacks, but the value displayed in the text field can be
updated in a callback function by changing the text field's String property.
Edit Boxes
An edit box is a graphical object that allows a user to enter a text string. The edit box
generates a callback when the user presses the Enter key after typing a string into the
box. An edit box is created by creating a uicontrol whose style property is 'edit'. An
edit box may be added to a GUI by using the edit box tool in the Layout Editor. Figure
l.l1a shows a simple GUI containing an edit box named, ‘Edit Box’ and a text field
named 'TextBox' .When a user types a string into the edit box, it automatically calls
the function EditBox_Callback, which is shown in Figure 1.11b. This function locates
the edit box using the handles structure and recovers the string typed by the user.
Then, it locates the text field and displays the string in the text field. Figure 1.12 shows
this GUI just after it has started and after the user has typed the word "Hello" in the edit
box.
3. Frames
A frame is a graphical object that displays a rectangle on the GUI. You can use frames
to draw boxes around groups of logically related objects. For example, a frame is used
to group the radio buttons together on Figure 1.1. A frame is created by creating a
uicontrol whose style property is 'frame'. A frame maybe added to a GUI by using the
frame tool in the Layout Editor. Frames do not generate callbacks.
4. Pushbuttons
A pushbutton is a component that a user can click on to trigger a specific action. The
20. pushbutton generates a callback when the user clicks the mouse on it. A pushbutton is
created by creating a uicontrol whose style property is 'pushbutton'. A pushbutton may
be added to a GUI by using the pushbutton tool in the Layout Editor. Function
MyFirstGUI in Figure 1.10 illustrated the use of pushbuttons.
Figure 1.11 (a) Layout of a simple GUI with an edit box and a text field. (b) The callback
functions for this GUI.
21. Figure 1.12 (a) The GUI produced by program test edit. (b) The GUI after a user types
Hello into the edit box and presses Enter.
5. Toggle Buttons
A toggle button is a type of button that has two states: on (depressed) and off (not
depressed). A toggle button switches between these two states whenever the mouse clicks
on it, and it generates a callback each time. The 'Value' property of the toggle button is
set to max (usually 1) when the button is on, and min (usually 0) when the button is off.
A toggle button is created by creating a uicontrol whose style property is toggle button. A
toggle button may be added to a GUI by using the toggle button tool in the Layout Editor.
Figure 1.13a shows a simple GUI containing a toggle button named 'ToggleButton' and a
text field named' TextBox'. When a user clicks on the toggle button, it automatically calls
the function ToggleButton Callback, which is shown in Figure 1.13b. This function
locates the toggle button using the handles structure and recovers its state from the' Value'
property. Then, the function locates the text field and displays the state in the text field.
22. Figure 1.14 shows this GUI just after it has started, and after the user has clicked on the
toggle button for the first time.
6. Checkboxes and radio buttons
Checkboxes and radio buttons are essentially identical to toggle buttons except that they
have different shapes. Like toggle buttons, checkboxes and radio buttons have two states:
on and off. They switch between these two states whenever the mouse clicks on them,
generating a callback each time. The 'Value' property of the checkbox or radio button is
set to max (usually 1) when they are on, and min (usually 0) when they are off. Both
checkboxes and radio buttons are illustrated in Figure 1.1.
A checkbox is created by creating a uicontrol whose style property is 'checkbox', and a
radio button is created by creating a uicontrol whose style property is 'radiobutton'. A
checkbox may be added to a GUI by using the checkbox tool in the Layout Editor, and a
radio button may be added to a GUI by using the radio button tool in the Layout Editor.
Checkboxes are traditionally used to display on/off options, and groups of radio buttons
are traditionally used to select among mutually exclusive options. Figure 1.l5a shows an
example of how to create a group of mutually exclusive options with radio buttons. The
GUI in this figure creates three radio buttons, labeled "Option 1," "Option 2," and
"Option 3." Each radio button uses the same callback function, but with a separate
parameter. The corresponding callback functions are shown in Figure l.l5b. When the
user clicks on a radio button, the corresponding callback function is executed.That
function sets the text box to display the current option, turns on that radio button, and
turns off all other radio buttons. Note that the GUI uses a frame to group the radio buttons
together, making it obvious that they are a set. Figure 1.16 shows this GUI after Option 2
has been selected.
23. Figure 1.13 (a) Layout of a simple GUI with a toggle button and a text field. (b) The call
back function for this GUI.
Figure 1.14 (a) The GUI produced by program testto gglebutton when the toggle button
is off. (b) The GUI when the toggle button is on.
7. Popup menus
24. Popup menus are graphical objects that allow a user to select one of a mutually exclusive
list of options. The list of options that the user can select among is specified by a cell
array of strings, and the 'Value' property indicates which of the strings is currently
selected. A popup menu may be added to a GUI by using the popup menu tool in the
Layout Editor. Figure 1.14a shows an example of a popup menu. The GUI in this figure
creates a popup menu with five options, labeled "Option I," "Option 2," and so forth. The
corresponding callback function is shown in Figure 1.14b. The call back function
recovers the selected option by checking the' Value' parameter of the popup menu, and
creates and displays a string containing that value in the text field. Figure 1.15 shows this
Gm after Option 4 has been selected.
8. List Boxes
List boxes are graphical objects that display many lines of text and allow a user to select
one or more of those lines. If there are more lines of text than can fit in the list box, a
scroll bar will be created to allow the user to scroll up and down within the list box. The
lines of text that the user can select among are specified by a cell array of strings, and the'
Value' property indicates which of the strings are currently selected. A list box is created
by creating a uicontrol whose style property is 'listbox'. A list box may be added to a GUI
by using the listbox tool in the Layout Editor. List boxes can be used to select a single
item from a selection of possible choices. In normal GUI usage, a single mouse click on a
list item selects that item but does not cause an action to occur. Instead, the action waits
on some external trigger, such as a pushbutton. However, a mouse double-click causes an
action to happen immediately. Single-click and double-click events can be distinguished
using the Selection Type property of the figure in which the clicks occurred. A single
mouse click will place the string 'normal' in the Selection Type property, and a double
mouse click will place the string' open' in the Selection Type property.
25. Figure 1.14 (a) Layout of a simple GUI with a popup menu and a text field to display the
current selection. (b) The callback functions for this GUI.
Figure 1.15 The GUI produced by program test popup.
It is also possible for a list box to allow multiple selections from the list. If the difference
between the max and min properties of the list box is greater than one, then multiple
selections is allowed. Otherwise, only one item may be selected from the list.
This function will check the figure producing the callback (using function gebf) to see if
the selecting action was a single-click or a double-click. If it was a single-click, the
26. function does nothing. If it was a double-click, then the function gets the selected value
from the listbox, and writes an appropriate string into the text field. If the pushbutton is
selected, then functionButton1_Callbaekwill be executed. This function gets the selected
value from the listbox, and writes an appropriate string into the text field.
9. Sliders
Sliders are graphical objects that allow a user to select values from a continuous range
between a specified minimum value and a specified maximum value by moving a bar
with a mouse. The 'Value' property of the slider is set to a value between min and max
depending on the position of the slider.
A slider is created by creating a uicontrol whose style property is 'slider'. A slider may be
added to a GUI by using the slider tool in the Layout Editor.
MICROCONTROLLERS
Microcontrollers are used in the industrial world to control many types of equipments
ranging from customers to specialized devices . Furthermore , there is a growing need
for offline support of a computers main processor . The demand will grow as
more eqipment uses more intelligence . One of the most popular is MOTOROLA
68HC11 MICROCONTROLLER is relatively easy to work with , yet they have most
of the features essential for a complete control system .Thus student of control
automation can use them to work with control systems at the component level.The
intersted person can also use them as tools to understand and experiment with the
computer and data communications systems. As time passed engineers have developed a
better microcontroller to perform the specific task. For example, : ATMEL8051 family ,
ATMEL 8052 family , ATmega AVR family , TI-MSP430 , ARM family and many
more. These all controllers are present in the market for development such types of
specific task . As per the application we need to choose one of them. The crtiteria for
choosing the microcontroller are by their features , cost and power consumption, area ,
27. available memory inside the chip etc. Controller 89S52 from ATMEL 8052 Family .
It has 8 KB of on chip ROM and 256 bytes of RAM , 32 I/O PINS and easy to
program .
Industrial Automation meant for a system which monitor the input points (sensors and
signals generated by the GSM , BLUETOOTH , RF TRANSMITTER , RFID , DTMF)
and respond as per their described behaviour after crossin a threshold limit set by the
user.So far many scientists have done lots of research in the field of automation. For
example :There is automation using IR SENSOR . In addition some of them have
improved their communication medium to robust and effeicient their system. Morever,
due to the advancement in computer era , it facilitates the development of electronic
devices such as digital camera, digital images have been widely used in many era.
Therefore security is also an important issue.
ARDUINO
Arduino is a tool for making computers that can sense and control more of the physical
world than your desktop computer . It’s an open - source physical computing platform
based on a simple microcontroller board and a development enviornment for
writing software for the board . Arduino can be used to develop interactive objects
, taking inputs from a variety of switches or sensors and controlling a variety of
lights , motors , and other physical outputs . Arduino projects can be stand – alone , or
they can communicate with softwares running on your computer ( eg Flash , Processing
, MaxMSP ) . The boards can be assembled by hand or purchased preassembled , the
open source IDE can be downloaded for free .
The Arduino programming language is an implementation of Wiring , a similar physical
computing platform which is based on the Processing multimedia programming
enviornment .
There are many other microcontrollers and microcontroller platforms , available for
physical computing. Parallax Basic Stamp , Netmedia’s BX-24 , PHIDGETS , MIT’s
Handyboard and many other offer similar functionality. All of these tools take the
messy details of microcontroller programming and wrap it up in an easy to use package .
28. Arduino also simplifies the process of working with microcontrollers, but it offers some
advantage for teachers, students and interested amateurs over other systems.
INEXPENSIVE : Arduino boards are relatively inexpensive compared to other
microcontroller platforms . The least expensive version of the Arduino module can be
assembled by hand and even the pre-assembled Arduino modules cost less than $ 50.
Cross-Platform : The Arduino software runs on the Windows , Macintosh OSX and
Linux operating systems. Most microcontroller systems are limited to Windows .
Simple, clear programming enviornment : The Arduino programming enviornment is
easy -to–use for beginners, yet flexible enough for advanced users to take advantage of
as well. For teachers, it’s conveniently based on the Processing programming
enviornment , so students learning to program in that enviornment will be familiar
with the look and feel of Arduino .
Open source and extensible software : The Aurdino software is published as open
source tools , available for extension by experienced programmers . The language can
be expanded through C++ libraries and people wanting to understand the technical
details can make the leap from Arduino to the AVR C PROGRAMMING
language on which it’s based . Similarly you can add AVR - C CODE directly
into your Arduino programs if you want to .
Open source and extensible hardware : The Arduino is based on Atmel’s
ATMEGA8 and ATMEGA168 MICROCONTROLLERS . The plans for the
modules are published under a creative Common license , so experienced circuit
designers can make their own version of the module , extending it and improving
it . Even relatively inexperienced users can build the breadboard version of the
module in order to understand how it works and save money .
Setting up an Arduino:
29. To setup an Arduino we need the board, a cable to connect plug A and B. Cable is used to
interface/connect between PC and Arduino. Connect it to PC. COM port (Communication
port is the name of the serial port interfacing on the common PC’s. After plugging in the
Arduino gets connected to COM port. A software called arduinocc is downloaded (open
source software). It is the IDE (Integrated Development Environment).
PIN Configurations:
The Arduino Digital Pins can be configured as either input/output pins. By default they
are input pins.
PinMode(pin, mode)
There are pin modes. The number of pin whose mode is to be changed is represented by
pin. Mode can be input, output or input pull-up.
Checking if the Arduino works:
30. After setting up, the debugging LED is made to blink by writing the following code:
int led = 13;
// the setup routine runs once when you press reset:
void setup() {
// initialize the digital pin as an output.
pinMode(led, OUTPUT);
}
// the loop routine runs over and over again forever:
Serial Port communication:
The concept of serial communication is simple, in serial communication data is sent one
bit at a time. Although this is slower than parallel communication, which allows the
transmission of an entire byte at once, it is simpler and can be used over longer distances.
Possible troubleshooting for issues that may arise:
Issues are:
1. Right clicking on COM Port and updating drivers did not work.
2. Incompatibility of the software. It did not function at all.
3. The board was not able to connect to the PC.
Troubleshooting:
1.The issue was troubles hooted when the unzipped folder was put on desktop.
2. Following quite a few instructions found on a supportive blog and the official Arduino
Forum proved helpful to solve the rest of the issues.
void loop() {
digitalWrite(led, HIGH); // turn the LED on (HIGH is the voltage level)
delay(1000); // wait for a second
digitalWrite(led, LOW); // turn the LED off by making the voltage LOW
delay(1000); // wait for a second }
31. MATLAB code to generate a pulse:
clc; clear all; close all;
t=-5:0.0001:5;
D=input('Enter the Ton percentage');
y=square(t,D);
plot(t,y);
% This code shows a pulse on the MATLAB plotter window
But a problem with the code is that I was not able to change the frequency of the pulse.
How did I solve this problem?
I have used a Simulink block called pulse generator. I can vary the sampling time of the
pulse using this block. The below is the block diagram of a pulse generator. It can be
found in the Simulink Library.
Pulse generator block:
Pulse generator output graph:
32. The Pulse Generator block generates square wave pulses at regular intervals. The block's
waveform parameters, Amplitude, Pulse Width, Period, and Phase delay, determine the
shape of the output waveform. The above diagram shows how each parameter affects the
waveform.
The Pulse Generator can emit scalar, vector, or matrix signals of any real data type. To
cause the block to emit a scalar signal, use scalars to specify the waveform parameters.
To cause the block to emit a vector or matrix signal, use vectors or matrices, respectively,
to specify the waveform parameters. Each element of the waveform parameters affects
the corresponding element of the output signal. For example, the first element
of a vector amplitude parameter determines the amplitude of the first element of a vector
output pulse. All the waveform parameters must have the same dimensions after scalar
expansion. The data type of the output is the same as the data type of the
Amplitude parameter.
Use the Pulse type parameter to specify whether the block's output is time-based or
sample-based. If you select sample-based, the block computes its outputs at fixed
intervals that you specify. If you select time-based, Simulink software computes the
block's outputs only at times when the output actually changes. This choice can result in
fewer computations for computing the block's output over the simulation time period.
A time-based configuration using parameters Pulse Width and Period that results in a
constant output signal is not supported. Simulink returns an error if these parameters
satisfy either of the following conditions:
If you select time-based as the block's pulse type, you must specify the pulse's phase
delay and period in units of seconds. If you specify sample-based, you must specify the
block's sample time in seconds, using the Sample time parameter, then specify the block's
phase delay and period as integer multiples of the sample time. For example, suppose that
33. you specify a sample time of 0.5 second and want the pulse to repeat every two seconds.
In this case, you would specify 4 as the value of the block's Period parameter.
Tweaking with the properties of a pulse generator:
To tweak with the properties of a pulse generator the following information can be used:
Pulse type- The pulse type for this block: time-based or sample-based. The default is
time-based.
Time- It specifies whether to use simulation time or an external signal as the source of
values for the output pulse's time variable. If you specify an external source, the block
displays an input port for connecting the source. The output pulse differs as follows:
If you select Use simulation time, the block generates an output pulse where the time
variable equals the simulation time.If you select Use external signal, the block generates
an output pulse where the time variable equals the value from the input port, which can
differ from the simulation time.
Amplitude:
It is the pulse amplitude. The default is 1.
Period:
The pulse period specified in seconds if the pulse type is time-based or as number of
sample times if the pulse type is sample-based. The default is 10 seconds.
Pulse Width:
The duty cycle specified as the percentage of the pulse period that the signal is on if time-
based or as number of sample times if sample-based. The default is 5 percent.
Phase delay:
The delay before the pulse is generated specified in seconds if the pulse type is time-
based or as number of sample times if the pulse type is sample-based. The default
is 0 seconds.
Sample time:
It is the length of the sample time for this block in seconds. This parameter appears only
if the block's pulse type is sample-based. See Specify Sample Time in the Simulink User's
Guide for more information.
34. MATLAB and ARDUINO Interfacing:
This is the function:
Serial: 0 (RX) and 1 (TX). Used to receive (RX) and transmit (TX) TTL serial data.
These pins are connected to the corresponding pins of the FTDI USB-to-TTL Serial chip.
How to Communicate:
The Arduino Duemilanove has a number of facilities for communicating with a computer,
another Arduino, or other microcontrollers. The ATmega168 and ATmega328 provide
UART TTL (5V) serial communication, which is available on digital pins 0 (RX) and 1
(TX). An FTDI FT232RL on the board channels this serial communication over USB and
the FTDI drivers (included with Windows version of the Arduino software) provide a
virtual com port to software on the computer. The Arduino software includes a serial
monitor which allows simple textual data to be sent to and from the Arduino board. The
RX and TX LEDs on the board will flash when data is being transmitted via the FTDI
chip and USB connection to the computer (but not for serial communication on pins 0 and
1). A SoftwareSerial library allows for serial communication on any of the Duemilanove's
digital pins. The ATmega168 and ATmega328 also support I2C (TWI) and SPI
communication. The Arduino software includes a Wire library to simplify use of
the I2C bus; see the documentation for details. For SPI communication, use the SPI
library.
SoftwareSerial Library:
The Arduino hardware has a built-in support for serial communication on pins 0 and 1
(which also goes to the computer via the USB connection). The native serial support
happens via a piece of hardware (built into the chip) called a UART. This hardware
allows the Atmega chip to receive serial communication even while working on other
tasks, as long as there room in the 64 byte serial buffer. The SoftwareSerial library has
been developed to allow serial communication on other digital pins of the
Arduino, using software to replicate the functionality (hence the name "SoftwareSerial").
It is possible to have multiple software serial ports with speeds up to 115200 bps. A
parameter enables inverted signaling for devices which require that protocol. The version
35. of SoftwareSerial included in 1.0 and later is based on the NewSoftSerial library by Mikal
Hart.
MATLAB support package for Arduino:
In serial port communication information transfers one bit at a time. MATLAB Support
Package for Arduino (also referred to as "ArduinoIO Package") allows you to
communicate with an Arduino Uno or Duemilanove over a serial port. It consists of a
MATLAB API on the host computer and a server program that runs on the Arduino.
Together, they allow you to access Arduino analog I/O, digital I/O, operate servo
motors, read encoders, and even handle dc and stepper motors using the adafruit motor
shield, all from the MATLAB command line.
Setting Up serial port object:
>> s = serial (’COM1’);
Serial Port Object : Serial-COM1
Communication Settings
Port: COM1
BaudRate: 9600
Terminator: ’LF’
Communication State
Status: closed
RecordStatus: off
Read/Write State
TransferStatus: idle
BytesAvailable: 0
ValuesReceived: 0
ValuesSent: 0
Baud rate:
36. >> set(s, ’BaudRate’, 4800);
>> s.BaudRate = 4800;
The above progam helps us to establish a serial communication between matlab and
arduino.
Our project:
There is an arduino support package which works with Matlab. The code is written below
that links arduino with Matlab and further we are able to control the output that is
explained further.
/* Analog and Digital Input and Output Server for MATLAB */
/* Giampiero Campa, Copyright 2012 The MathWorks, Inc */
/* This file is meant to be used with the MATLAB arduino IO
package, however, it can be used from the IDE environment
(or any other serial terminal) by typing commands like:
0e0 : assigns digital pin #4 (e) as input
0f1 : assigns digital pin #5 (f) as output
0n1 : assigns digital pin #13 (n) as output
1c : reads digital pin #2 (c)
1e : reads digital pin #4 (e)
2n0 : sets digital pin #13 (n) low
2n1 : sets digital pin #13 (n) high
2f1 : sets digital pin #5 (f) high
2f0 : sets digital pin #5 (f) low
4j2 : sets digital pin #9 (j) to 50=ascii(2) over 255
4jz : sets digital pin #9 (j) to 122=ascii(z) over 255
3a : reads analog pin #0 (a)
37. 3f : reads analog pin #5 (f)
5j : reads status (attached/detached) of servo on pin #9
5k : reads status (attached/detached) of servo on pin #10
6j1 : attaches servo on pin #9
8jz : moves servo on pin #9 of 122 degrees (122=ascii(z))
7j : reads angle of servo on pin #9
6j0 : detaches servo on pin #9
E0cd : attaches encoder #0 (0) on pins 2 (c) and 3 (d)
E1st : attaches encoder #1 on pins 18 (s) and 19 (t)
E2vu : attaches encoder #2 on pins 21 (v) and 20 (u)
G0 : gets 0 position of encoder #0
I0u : sets debounce delay to 20 (2ms) for encoder #0
H1 : resets position of encoder #1
F2 : detaches encoder #2
R0 : sets analog reference to DEFAULT
R1 : sets analog reference to INTERNAL
R2 : sets analog reference to EXTERNAL
X3 : roundtrip example case returning the input (ascii(3))
99 : returns script type (0 adio.pde ... 3 motor.pde ) */
#include <Servo.h>
/* define internal for the MEGA as 1.1V (as as for the 328) */
#if defined(__AVR_ATmega1280__) || defined(__AVR_ATmega2560__)
#define INTERNAL INTERNAL1V1
#endif
38. /* define encoder structure */
typedef struct { int pinA; int pinB; int pos; int del;} Encoder;
volatile Encoder Enc[3] = {{0,0,0,0}, {0,0,0,0}, {0,0,0,0}};
/* create servo vector */
Servo servo[70];
void setup() {
/* initialize serial */
Serial.begin(115200);
}
void loop() {
/* variables declaration and initialization */
static int s = -1; /* state */
static int pin = 13; /* generic pin number */
static int enc = 0; /* generic encoder number */
int val = 0; /* generic value read from serial */
int agv = 0; /* generic analog value */
int dgv = 0; /* generic digital value */
/* The following instruction constantly checks if anything
is available on the serial port. Nothing gets executed in
the loop if nothing is available to be read, but as soon
as anything becomes available, then the part coded after
the if statement (that is the real stuff) gets executed */
39. if (Serial.available() >0) {
/* whatever is available from the serial is read here */
val = Serial.read();
/* This part basically implements a state machine that
reads the serial port and makes just one transition
to a new state, depending on both the previous state
and the command that is read from the serial port.
Some commands need additional inputs from the serial
port, so they need 2 or 3 state transitions (each one
happening as soon as anything new is available from
the serial port) to be fully executed. After a command
is fully executed the state returns to its initial
value s=-1 */
switch (s) {
/* s=-1 means NOTHING RECEIVED YET ******************* */
case -1:
/* calculate next state */
if (val>47 && val<90) {
/* the first received value indicates the mode
49 is ascii for 1, ... 90 is ascii for Z
s=0 is change-pin mode;
s=10 is DI; s=20 is DO; s=30 is AI; s=40 is AO;
s=50 is servo status; s=60 is aervo attach/detach;
s=70 is servo read; s=80 is servo write;
40. s=90 is query script type (1 basic, 2 motor);
s=210 is encoder attach; s=220 is encoder detach;
s=230 is get encoder position; s=240 is encoder reset;
s=250 is set encoder debounce delay;
s=340 is change analog reference;
s=400 example echo returning the input argument;
*/
s=10*(val-48);
}
/* the following statements are needed to handle
unexpected first values coming from the serial (if
the value is unrecognized then it defaults to s=-1) */
if ((s>90 && s<210) || (s>250 && s!=340 && s!=400)) {
s=-1;
}
/* the break statements gets out of the switch-case, so
/* we go back and wait for new serial data */
break; /* s=-1 (initial state) taken care of */
/* s=0 or 1 means CHANGE PIN MODE */
case 0:
/* the second received value indicates the pin
from abs('c')=99, pin 2, to abs('¦')=166, pin 69 */
if (val>98 && val<167) {
pin=val-97; /* calculate pin */
s=1; /* next we will need to get 0 or 1 from serial */
41. }
else {
s=-1; /* if value is not a pin then return to -1 */
}
break; /* s=0 taken care of */
case 1:
/* the third received value indicates the value 0 or 1 */
if (val>47 && val<50) {
/* set pin mode */
if (val==48) {
pinMode(pin,INPUT);
}
else {
pinMode(pin,OUTPUT);
}
}
s=-1; /* we are done with CHANGE PIN so go to -1 */
break; /* s=1 taken care of */
/* s=10 means DIGITAL INPUT ************************** */
case 10:
/* the second received value indicates the pin
from abs('c')=99, pin 2, to abs('¦')=166, pin 69 */
if (val>98 && val<167) {
pin=val-97; /* calculate pin */
dgv=digitalRead(pin); /* perform Digital Input */
42. Serial.println(dgv); /* send value via serial */
}
s=-1; /* we are done with DI so next state is -1 */
break; /* s=10 taken care of */
/* s=20 or 21 means DIGITAL OUTPUT ******************* */
case 20:
/* the second received value indicates the pin
from abs('c')=99, pin 2, to abs('¦')=166, pin 69 */
if (val>98 && val<167) {
pin=val-97; /* calculate pin */
s=21; /* next we will need to get 0 or 1 from serial */
}
else {
s=-1; /* if value is not a pin then return to -1 */
}
break; /* s=20 taken care of */
case 21:
/* the third received value indicates the value 0 or 1 */
if (val>47 && val<50) {
dgv=val-48; /* calculate value */
digitalWrite(pin,dgv); /* perform Digital Output */
}
s=-1; /* we are done with DO so next state is -1 */
break; /* s=21 taken care of */
43. /* s=30 means ANALOG INPUT *************************** */
case 30:
/* the second received value indicates the pin
from abs('a')=97, pin 0, to abs('p')=112, pin 15 */
if (val>96 && val<113) {
pin=val-97; /* calculate pin */
agv=analogRead(pin); /* perform Analog Input */
Serial.println(agv); /* send value via serial */
}
s=-1; /* we are done with AI so next state is -1 */
break; /* s=30 taken care of */
/* s=40 or 41 means ANALOG OUTPUT ******************** */
case 40:
/* the second received value indicates the pin
from abs('c')=99, pin 2, to abs('¦')=166, pin 69 */
if (val>98 && val<167) {
pin=val-97; /* calculate pin */
s=41; /* next we will need to get value from serial */
}
else {
s=-1; /* if value is not a pin then return to -1 */
}
break; /* s=40 taken care of */
44. case 41:
/* the third received value indicates the analog value */
analogWrite(pin,val); /* perform Analog Output */
s=-1; /* we are done with AO so next state is -1 */
break; /* s=41 taken care of */
/* s=50 means SERVO STATUS (ATTACHED/DETACHED) ******* */
case 50:
/* the second value indicates the servo attachment pin
from abs('c')=99, pin 2, to abs('¦')=166, pin 69 */
if (val>98 && val<167) {
pin=val-97; /* calculate pin */
dgv=servo[pin].attached(); /* read status */
Serial.println(dgv); /* send value via serial */
}
s=-1; /* we are done with servo status so return to -1*/
break; /* s=50 taken care of */
/* s=60 or 61 means SERVO ATTACH/DETACH ************** */
case 60:
/* the second value indicates the servo attachment pin
from abs('c')=99, pin 2, to abs('¦')=166, pin 69 */
if (val>98 && val<167) {
pin=val-97; /* calculate pin */
s=61; /* next we will need to get 0 or 1 from serial */
45. }
else {
s=-1; /* if value is not a servo then return to -1 */
}
break; /* s=60 taken care of */
case 61:
/* the third received value indicates the value 0 or 1
0 for detach and 1 for attach */
if (val>47 && val<50) {
dgv=val-48; /* calculate value */
if (dgv) servo[pin].attach(pin); /* attach servo */
else servo[pin].detach(); /* detach servo */
}
s=-1; /* we are done with servo attach/detach so -1 */
break; /* s=61 taken care of */
/* s=70 means SERVO READ ***************************** */
case 70:
/* the second value indicates the servo attachment pin
from abs('c')=99, pin 2, to abs('¦')=166, pin 69 */
if (val>98 && val<167) {
pin=val-97; /* calculate pin */
agv=servo[pin].read(); /* read value */
Serial.println(agv); /* send value via serial */
}
s=-1; /* we are done with servo read so go to -1 next */
46. break; /* s=70 taken care of */
/* s=80 or 81 means SERVO WRITE ******************** */
case 80:
/* the second value indicates the servo attachment pin
from abs('c')=99, pin 2, to abs('¦')=166, pin 69 */
if (val>98 && val<167) {
pin=val-97; /* calculate pin */
s=81; /* next we will need to get value from serial */
}
else {
s=-1; /* if value is not a servo then return to -1 */
}
break; /* s=80 taken care of */
case 81:
/* the third received value indicates the servo angle */
servo[pin].write(val); /* write value */
s=-1; /* we are done with servo write so go to -1 next*/
break; /* s=81 taken care of */
/* s=90 means Query Script Type:
(0 adio, 1 adioenc, 2 adiosrv, 3 motor) */
case 90:
47. if (val==57) {
/* if string sent is 99 send script type via serial */
Serial.println(2);
}
s=-1; /* we are done with this so next state is -1 */
break; /* s=90 taken care of */
/* s=210 to 212 means ENCODER ATTACH ***************** */
case 210:
/* the second value indicates the encoder number:
either 0, 1 or 2 */
if (val>47 && val<51) {
enc=val-48; /* calculate encoder number */
s=211; /* next we need the first attachment pin */
}
else {
s=-1; /* if value is not an encoder then return to -1*/
}
break; /* s=210 taken care of */
case 211:
/* the third received value indicates the first pin
from abs('c')=99, pin 2, to abs('¦')=166, pin 69 */
if (val>98 && val<167) {
pin=val-97; /* calculate pin */
Enc[enc].pinA=pin; /* set pin A */
s=212; /* next we need the second attachment pin */
48. }
else {
s=-1; /* if value is not a servo then return to -1 */
}
break; /* s=211 taken care of */
case 212:
/* the fourth received value indicates the second pin
from abs('c')=99, pin 2, to abs('¦')=166, pin 69 */
if (val>98 && val<167) {
pin=val-97; /* calculate pin */
Enc[enc].pinB=pin; /* set pin B */
/* set encoder pins as inputs */
pinMode(Enc[enc].pinA, INPUT);
pinMode(Enc[enc].pinB, INPUT);
/* turn on pullup resistors */
digitalWrite(Enc[enc].pinA, HIGH);
digitalWrite(Enc[enc].pinB, HIGH);
/* attach interrupts */
switch(enc) {
case 0:
attachInterrupt(getIntNum(Enc[0].pinA), isrPinAEn0, CHANGE);
attachInterrupt(getIntNum(Enc[0].pinB), isrPinBEn0, CHANGE);
break;
case 1:
attachInterrupt(getIntNum(Enc[1].pinA), isrPinAEn1, CHANGE);
attachInterrupt(getIntNum(Enc[1].pinB), isrPinBEn1, CHANGE);
49. break;
case 2:
attachInterrupt(getIntNum(Enc[2].pinA), isrPinAEn2, CHANGE);
attachInterrupt(getIntNum(Enc[2].pinB), isrPinBEn2, CHANGE);
break;
}
}
s=-1; /* we are done with encoder attach so -1 */
break; /* s=212 taken care of */
/* s=220 means ENCODER DETACH *********************** */
case 220:
/* the second value indicates the encoder number:
either 0, 1 or 2 */
if (val>47 && val<51) {
enc=val-48; /* calculate encoder number */
/* detach interrupts */
detachInterrupt(getIntNum(Enc[enc].pinA));
detachInterrupt(getIntNum(Enc[enc].pinB));
}
s=-1; /* we are done with encoder detach so -1 */
break; /* s=220 taken care of */
/* s=230 means GET ENCODER POSITION ****************** */
case 230:
/* the second value indicates the encoder number:
50. either 0, 1 or 2 */
if (val>47 && val<51) {
enc=val-48; /* calculate encoder number */
/* send the value back */
Serial.println(Enc[enc].pos);
}
s=-1; /* we are done with encoder detach so -1 */
break; /* s=230 taken care of */
/* s=240 means RESET ENCODER POSITION **************** */
case 240:
/* the second value indicates the encoder number:
either 0, 1 or 2 */
if (val>47 && val<51) {
enc=val-48; /* calculate encoder number */
/* reset position */
Enc[enc].pos=0;
}
s=-1; /* we are done with encoder detach so -1 */
break; /* s=240 taken care of */
/* s=250 and 251 mean SET ENCODER DEBOUNCE DELAY ***** */
case 250:
/* the second value indicates the encoder number:
either 0, 1 or 2 */
if (val>47 && val<51) {
enc=val-48; /* calculate encoder number */
51. s=251; /* next we need the first attachment pin */
}
else {
s=-1; /* if value is not an encoder then return to -1*/
}
break; /* s=250 taken care of */
case 251:
/* the third received value indicates the debounce
delay value in units of approximately 0.1 ms each
from abs('a')=97, 0 units, to abs('¦')=166, 69 units*/
if (val>96 && val<167) {
Enc[enc].del=val-97; /* set debounce delay */
}
s=-1; /* we are done with this so next state is -1 */
break; /* s=251 taken care of */
/* s=340 or 341 means ANALOG REFERENCE *************** */
case 340:
/* the second received value indicates the reference,
which is encoded as is 0,1,2 for DEFAULT, INTERNAL
and EXTERNAL, respectively. Note that this function
is ignored for boards not featuring AVR or PIC32 */
#if defined(__AVR__) || defined(__PIC32MX__)
switch (val) {
52. case 48:
analogReference(DEFAULT);
break;
case 49:
analogReference(INTERNAL);
break;
case 50:
analogReference(EXTERNAL);
break;
default: /* unrecognized, no action */
break;
}
#endif
s=-1; /* we are done with this so next state is -1 */
break; /* s=341 taken care of */
/* s=400 roundtrip example function (returns the input)*/
case 400:
/* the second value (val) can really be anything here */
/* This is an auxiliary function that returns the ASCII
value of its first argument. It is provided as an
53. example for people that want to add their own code */
/* your own code goes here instead of the serial print */
Serial.println(val);
s=-1; /* we are done with the aux function so -1 */
break; /* s=400 taken care of */
/* ******* UNRECOGNIZED STATE, go back to s=-1 ******* */
default:
/* we should never get here but if we do it means we
are in an unexpected state so whatever is the second
received value we get out of here and back to s=-1 */
s=-1; /* go back to the initial state, break unneeded */
} /* end switch on state s */
} /* end if serial available */
} /* end loop statement */
/* auxiliary function to handle encoder attachment */
54. int getIntNum(int pin) {
/* returns the interrupt number for a given interrupt pin
see http://arduino.cc/it/Reference/AttachInterrupt */
switch(pin) {
case 2:
return 0;
case 3:
return 1;
case 21:
return 2;
case 20:
return 3;
case 19:
return 4;
case 18:
return 5;
default:
return -1;
}
}
/* auxiliary debouncing function */
void debounce(int del) {
int k;
for (k=0;k<del;k++) {
/* can't use delay in the ISR so need to waste some time
perfoming operations, this uses roughly 0.1ms on uno */
k = k +0.0 +0.0 -0.0 +3.0 -3.0;
}
}
55. /* Interrupt Service Routine: change on pin A for Encoder 0 */
void isrPinAEn0(){
/* read pin B right away */
int drB = digitalRead(Enc[0].pinB);
/* possibly wait before reading pin A, then read it */
debounce(Enc[0].del);
int drA = digitalRead(Enc[0].pinA);
/* this updates the counter */
if (drA == HIGH) { /* low->high on A? */
if (drB == LOW) { /* check pin B */
Enc[0].pos++; /* going clockwise: increment */
} else {
Enc[0].pos--; /* going counterclockwise: decrement */
}
} else { /* must be high to low on A */
if (drB == HIGH) { /* check pin B */
Enc[0].pos++; /* going clockwise: increment */
} else {
Enc[0].pos--; /* going counterclockwise: decrement */
}
} /* end counter update */
56. } /* end ISR pin A Encoder 0 */
/* Interrupt Service Routine: change on pin B for Encoder 0 */
void isrPinBEn0(){
/* read pin A right away */
int drA = digitalRead(Enc[0].pinA);
/* possibly wait before reading pin B, then read it */
debounce(Enc[0].del);
int drB = digitalRead(Enc[0].pinB);
/* this updates the counter */
if (drB == HIGH) { /* low->high on B? */
if (drA == HIGH) { /* check pin A */
Enc[0].pos++; /* going clockwise: increment */
} else {
Enc[0].pos--; /* going counterclockwise: decrement */
}
} else { /* must be high to low on B */
if (drA == LOW) { /* check pin A */
Enc[0].pos++; /* going clockwise: increment */
} else {
Enc[0].pos--; /* going counterclockwise: decrement */
}
57. } /* end counter update */
} /* end ISR pin B Encoder 0 */
/* Interrupt Service Routine: change on pin A for Encoder 1 */
void isrPinAEn1(){
/* read pin B right away */
int drB = digitalRead(Enc[1].pinB);
/* possibly wait before reading pin A, then read it */
debounce(Enc[1].del);
int drA = digitalRead(Enc[1].pinA);
/* this updates the counter */
if (drA == HIGH) { /* low->high on A? */
if (drB == LOW) { /* check pin B */
Enc[1].pos++; /* going clockwise: increment */
} else {
Enc[1].pos--; /* going counterclockwise: decrement */
}
} else { /* must be high to low on A */
if (drB == HIGH) { /* check pin B */
Enc[1].pos++; /* going clockwise: increment */
} else {
Enc[1].pos--; /* going counterclockwise: decrement */
}
58. } /* end counter update */
} /* end ISR pin A Encoder 1 */
/* Interrupt Service Routine: change on pin B for Encoder 1 */
void isrPinBEn1(){
/* read pin A right away */
int drA = digitalRead(Enc[1].pinA);
/* possibly wait before reading pin B, then read it */
debounce(Enc[1].del);
int drB = digitalRead(Enc[1].pinB);
/* this updates the counter */
if (drB == HIGH) { /* low->high on B? */
if (drA == HIGH) { /* check pin A */
Enc[1].pos++; /* going clockwise: increment */
} else {
Enc[1].pos--; /* going counterclockwise: decrement */
}
} else { /* must be high to low on B */
if (drA == LOW) { /* check pin A */
Enc[1].pos++; /* going clockwise: increment */
} else {
Enc[1].pos--; /* going counterclockwise: decrement */
59. }
} /* end counter update */
} /* end ISR pin B Encoder 1 */
/* Interrupt Service Routine: change on pin A for Encoder 2 */
void isrPinAEn2(){
/* read pin B right away */
int drB = digitalRead(Enc[2].pinB);
/* possibly wait before reading pin A, then read it */
debounce(Enc[2].del);
int drA = digitalRead(Enc[2].pinA);
/* this updates the counter */
if (drA == HIGH) { /* low->high on A? */
if (drB == LOW) { /* check pin B */
Enc[2].pos++; /* going clockwise: increment */
} else {
Enc[2].pos--; /* going counterclockwise: decrement */
}
} else { /* must be high to low on A */
if (drB == HIGH) { /* check pin B */
Enc[2].pos++; /* going clockwise: increment */
} else {
60. Enc[2].pos--; /* going counterclockwise: decrement */
}
} /* end counter update */
} /* end ISR pin A Encoder 2 */
/* Interrupt Service Routine: change on pin B for Encoder 2 */
void isrPinBEn2(){
/* read pin A right away */
int drA = digitalRead(Enc[2].pinA);
/* possibly wait before reading pin B, then read it */
debounce(Enc[2].del);
int drB = digitalRead(Enc[2].pinB);
/* this updates the counter */
if (drB == HIGH) { /* low->high on B? */
if (drA == HIGH) { /* check pin A */
Enc[2].pos++; /* going clockwise: increment */
} else {
Enc[2].pos--; /* going counterclockwise: decrement */
}
} else { /* must be high to low on B */
if (drA == LOW) { /* check pin A */
Enc[2].pos++; /* going clockwise: increment */
61. } else {
Enc[2].pos--; /* going counterclockwise: decrement */
}
} /* end counter update */
} /* end ISR pin B Encoder 2 */
As the program is uploaded in Arduino we open the Matlab window and go for the
instrument tool box. As we find the GUI tool we use it to create push buttons so as to
control the leds connected to the arduino. As the progam is uploaded in matlab command
window we need to make declaration for the controller whose program is described as
below:
clear all;
global a;
a= arduino(‘com 1’);
a= pinMode(4,’output’);
a= pinMode(8,’output’)
The name of push buttons can be changed by changing string name.
In simple control of two leds , two pushbuttons are being created in the gui tool then the
codes to be written to control the output of arduino through pushbutton is given as
For pushbutton 1
a=digitalwrite(4,0);
a=digitalwrite(8,1);
For pushbutton 2
a=digitalwrite(4,1);
a=digitalwrite(8,0);
62. By executing this program a GUI is created for arduino such that by clicking on the
pushbuttons we can control our leds.
Conclusion and Future Scope of Work:
The above project is a simple demonstration of the real time home automation system that
we wish to control using microcontrollers. In this project we have demonstrated to link
the Matlab to control arduino output. Here only pushbuttons are to be used by the user so
no need to write the program again and again once the declaration has been done.
This project doesn’t need exceptional coding skills for arduino and matlab. A simple
knowledge to both can work help the user fulfill his basic home and office tasks. Now this
can be extended for home automation, industrial automation, vehicle automation and
numerous fields using gsm module/ bluetooth/ android application/ dtmf .
For eg if we use gsm module we can connect with arduino via transmitter and receiver
pins then by programming the gsm module using AT commands we can control the basic
home appliances just by dialing the phone no. associated with the gsm module .
References:
[1]O.González, M. Rodríguez, A. Ayala, J. Hernández & S. Rodríguez, “Application of
PIC and microcontrollers in the measurement and control of parameters in industry” in
International Journal of Electrical Engineering Education, 41/3, 2004, pp. 266-274.
[2]M.R. Frankowiak, R.I. Grosvenor, and P.W. Prickett, “Microcontroller- Based Process
Monitoring Using Petri-Nets”, EURASIP Journal on Embedded Systems, vol. 2009,
Article ID 282708, 2009.
[3]S. R. D. Kalingamudali et al., “Remote Controlling and Monitoring System to Control
Electric Circuitry through SMS using a Microcontroller”, Industrial and Information
63. Systems, First International Conference on Industrial and Information Systems:
Peradeniya, Sri Lanka, 8-11 August, 2006. pp. 378-382.
[4]M. L. Glaze, “The Design and Implementation of a GUI-Based Control Allocation
Toolbox in the MATLAB® Environment”, Msc. Thesis, Virginia Polytechnic Institute
and State University, Blacksburg, 85 p. 2008.
[5] A. Delgado, R. Picking and V. Grout, “Remote-Controlled Home Automation
Systems with Different”,Centre for Applied Internet Research (CAIR), 2006.
[6] A. Alkar and U. Buhur, “An Internet Based Wireless Home Automation System for
Multifuntional Devices”,2005.
[7] N. Sriskanthan, F.Tan and A. Karande, “Bluetooth based home automation system”
ELSEVIER - Microprocessors and Microsystems, Vol. 26, pp. 281-289, 2002.
[8] R. Piyare and M. Tazil, “BLUETOOTH BASED HOME AUTOMATION SYSTEM
USING CELL PHONE”, IEEE International Symposium on Consumer Electronics, Vol.
15, 2011.
[9] I. Petrov, S. Seru, and S. Petrov, “HOME AUTOMATION SYSTEM”, School of
Engineering Science, 2011.
[10] A. Jadhav, and P. Gadhari, “Interactive Voice Response (IVR) and GSM Based
Control System”. Proceedings of the National Conference "NCNTE-2012". Mumbai.
2012
[11] S. Neng, et al., “ integrated, flexible, and Internet-based control architecture for
home automation system in the internet era”. Proceedings ICRA `02. IEEE International
Conference on Robotics and Automation, Vol. 2,pp.1101-1106, 2002.
[12] E. Yavuz, et al., “Safe and Secure PIC Based Remote Control Application for
Intelligent Home”. International Journal of Computer Science and Network Security,
Vol. 7, No. 5, May 2007.
[13] B. Koyuncu, “PC remote control of appliances by using telephone lines”. IEEE
Transaction on Consumer Electronics, Vol. 41, No. 1, pp.201-209, 1995
[14]M. AL-Rousan, et al., “Java-Based Home Automation System”. IEEE Transaction on
Consumer Electronics,Vol. 50, No. 2, May 2004.
[15]B. Myers, et al., “Taking handheld devices to the next level”. IEEE Computer
Society, December, pp. 36-45,2004.