In process instrumentation and control, operators in the plant equipment control room monitor on-field sensors and send real-time commands to control actuators and final control elements such as motors, pumps, variable-speed drives, variable-frequency drives and electrically operated valves in the field using a human-machine interface (HMI) program for process control. A graphical user interface (GUI)-based HMI application enhances the user-friendliness of such an approach.
Signals from the operator station are usually sent to on-field actuators by using an industry-standard 4-20mA current loop protocol. However, due to inherent disadvantages during troubleshooting, control loop testing and plant commissioning stages of a wired communication based process plant, the trend in recent years has been towards operating plants wirelessly. For example, WirelessHART (Highway Addressable Remote Transducer) protocol based transmitters and actuators are widely used in modern process industries.
In this project, a GUI built on MATLAB environment is employed to wirelessly control four electrical equipment. Transmitter and receiver modules for this wireless equipment control operate at 434MHz frequency.
Authors’ prototype and the front panel of the MATLAB-based GUI are shown in Figs 1 and 2, respectively.
Circuit and working
Block diagrams of transmitter and receiver circuits are shown in Figs 3 and 4, respectively. The main components used in this project are described below.
Arduino Uno is an AVR ATmega328P microcontroller-based development board with six analogue input pins and 14 digital input/output (I/O) pins. The microcontroller has 32kB of ISP flash memory, 2kB RAM and 1kB EEPROM. The board provides serial communication capability via UART, SPI and I2C. The microcontroller can operate at a clock frequency of 16MHz.
In this project, digital I/O pins 8 through 12 of the Arduino are configured as output pins.
It is a 212 series CMOS LSI encoder for remote control applications. It is capable of encoding information, which consists of ‘N’ address bits and ’12-N’ data bits. Each address/data input can be set to one of the two logic states. Upon receipt of a trigger signal, the programmed addresses/data are transmitted together with header bits via an RF transmission medium. The capability to select a TE trigger on the HT12E further enhances the application flexibility of 212 series of encoders. HT12E IC has 8 address bits and 4 data bits.
This 212 series CMOS LSI decoder is widely used with HT12E encoder for remote control applications. It receives serial addresses and data transmitted from the programmed 212 series encoder. The decoder compares the serial input data three times continuously with its local addresses. If no error or unmatched code is found, input data codes are decoded and then transferred to the output pins.
The 212 series of decoders are capable of decoding the information comprising ‘N’ bits of address and ’12-N’ bits of data. The HT12D is arranged to provide 8 address bits and 4 data bits. For a valid transmission, address bits of both the encoder and the decoder must be the same.
Relays used here are single-pole double-throw (SPDT) type. In this type of relay, the output side has three terminals: normally open (N/O), normally closed (N/C) and common (C). When the relay is not energised, N/C and C terminals are short-circuited, and N/O and C terminals open-circuited. When the relay coil is energised, N/C and C terminals are open-circuited, and N/O and C terminals short-circuited.
Circuit diagrams of transmitter and receiver units are shown in Figs 5 and 6, respectively.
When a pushbutton is pressed in the GUI, the code executes a callback function in MATLAB. Commands to set or reset digital I/O pins 9 through 12 of the Arduino are written within that ‘callback’ function. After a pin is set or reset, the encoder scans the status of digital pins and transmits it wirelessly to the receiver side using the 434MHz wireless transmitter.
The transmitted data is received by the receiver and decoded to energise or de-energise the relays accordingly. When a particular digital I/O pin is set high by pressing the pushbutton, the corresponding relay energises. Four BC547 BJTs (T1 through T4) are additionally used, as IC3 cannot directly source sufficient current to energise relays.
Diodes D1 through D4 are used as protection diodes to prevent sinking of current into IC3. Diodes D5 through D8 are fly-back diodes, which prevent damage to electronic components due to the back emf produced by the inductive action of the relay’s coil. LED1 indicates power-on status of the circuit, whereas LED2 through LED5 show the status of the four relays. The power to the relay board is provided separately from a +9V battery.
We have used Arduino IDE for programming the Arduino Uno. The latest IDE can be downloaded for free from Arduino’s official website. After downloading the Arduino IDE, install it. Note the directory of the Arduino IDE installation. Follow the steps given below for this project: