Thesis

52
Introduction Data acquisition is the process whereby real physical conditions or variables are measured and the resulting analogue signals are then converted into digital signals that is then manipulated by a computer. Data acquisition systems (also known as DAS or DAQ), converts an analog signal into a digital signal so that processing can take place (Weller, S., Romney.A , 1988). Data acquisition systems are made up of components such as sensors that help convert the physical conditions to electrical signals, circuitry that converts the signal from the sensor into a form that can then be converted to digital values and analog to digital converts the sensors signal to a digital signal. Software programs such as BASIC, C, JAVA, Pascal, LABVIEW etc. are responsible for controlling the data acquisition applications. Wireless communication is when data is transferred over a certain distance without using wires. Using wireless technology makes tasks which are impossible or impractical to implement with wires, possible and more practical. Wireless technology is also used for remote data acquisition. Examples of wireless technology are cellular phones, WLAN, GPS units, wireless mice, keyboards, headsets etc (Seminar surveyor, 2010). The project includes the development of a wireless data acquisition system that can be used to record process variables behavior over time. This data could then be used to improve the process which could lead to a more efficient system.

Transcript of Thesis

Page 1: Thesis

Introduction

Data acquisition is the process whereby real physical conditions or variables are measured and the resulting analogue signals are then converted into digital signals that is then manipulated by a computer. Data acquisition systems (also known as DAS or DAQ), converts an analog signal into a digital signal so that processing can take place (Weller, S., Romney.A , 1988).

Data acquisition systems are made up of components such as sensors that help convert the physical conditions to electrical signals, circuitry that converts the signal from the sensor into a form that can then be converted to digital values and analog to digital converts the sensors signal to a digital signal. Software programs such as BASIC, C, JAVA, Pascal, LABVIEW etc. are responsible for controlling the data acquisition applications.

Wireless communication is when data is transferred over a certain distance without using wires. Using wireless technology makes tasks which are impossible or impractical to implement with wires, possible and more practical. Wireless technology is also used for remote data acquisition. Examples of wireless technology are cellular phones, WLAN, GPS units, wireless mice, keyboards, headsets etc (Seminar surveyor, 2010).

The project includes the development of a wireless data acquisition system that can be used to record process variables behavior over time. This data could then be used to improve the process which could lead to a more efficient system.

Page 2: Thesis

Project objective

The purpose of this project is to build a simple but effective method of acquiring and monitoring data wirelessly. This would require that a microcontroller based system be programmed and interfaced with a computer to acquire the data serially from the microcontroller. You also need some circuitry to monitor and access remote variables wirelessly.

Ways to successful data acquisition:

Define your application needs Identify the type of wireless communication to be used Identify the hardware to be used Design the interface between the PC and the receiver link Design the user interface and database to store the received data Design the software for the transmitter link Interface and test the system

Page 3: Thesis

Project Layout

The project development can be divided into phases to ensure that adequate planning takes place. Once the various phases have been identified, a working schedule can be put in place to ensure the project is completed within the allocated time period.

The various phases that this project was divided into are shown below:

Determine the type of wireless communication standard to be used.

Determine which hardware components will be used.

Determine the software components to be used.

Design all software components.

Interface the hardware and software components

Troubleshoot

The first three phases are research phases which ensure that an adequate knowledge of existing technologies is obtained before decisions are made as to how the problem at hand will be solved. Research is important in order to make an informed decision and to obtain the most feasible solution. The aim is to determine which components will be used for the project.

The fourth and fifth phases are construction phases in which the software and hardware components are developed. The software components will be developed first and then loaded onto the hardware. The transmitter, receiver and PC will each require different software components to control its functionality. The various hardware components will then be connected to each other and the system will be tested as a whole.

The final phase involves troubleshooting the system after all components have been interfaced. When troubleshooting, the system should be broken down into parts were each part is tested separate in order to determine which of the parts are working correctly and which are not. This simplifies the system and makes problem location easier. The troubleshooting phase requires ample time as there is no telling how long it will take to solve problems encountered in the system.

Page 4: Thesis

Determining the Wireless Communication Standard

Wireless communication consists of a broad range of different communication standards, hardware and software components. Wireless communication can be divided into long distance and short distance communication ( ICT Automatisering, 2008). Short distance wireless communication covers a distance about 100meters or less. Examples of short range communications are NFC, ZIGBEE, Z-WAVE, Bluetooth, Wi-Fi and DECT( ICT Automatisering, 2008).

ZIGBEE

ZIGBEE is a simple cost-effective wireless networking solution that is used for low data-rates and it supports low power consumption, security and excellent reliability. The ZIGBEE communication standard is based on Personal Area Network (PAN) technology and addresses the needs of the most remote monitoring, control and sensory network applications. ZIGBEE was designed for remote monitoring and control making it an excellent choice for the project implementation. ZIGBEE conforms to the IEEE 802.15.4 standard and is capable of forming a mesh network to extend its range and reliability. A mesh network is a network where a certain message is sent from the one node to the next, thus if a particular node happens to fail, the message is still able to reach its destination, making this a reliable method. A star network is a network where the devices communicate with the controlling node and is used in Bluetooth and Wi-Fi standards. Therefore in a ZIGBEE network a node can wake up, communicate with other nodes and then go back to sleep. Considering this and its low power consumption it tells us that a ZIGBEE power source can last for a very long period of time.

Bluetooth

Bluetooth is a communication standard used in Wireless Personal Area Networks (WPAN). It was designed to replace the clutter of short range cables. Bluetooth is used by devices such as cell phones, laptops, computers, digital camera’s and video game consoles. It has a range of about 10 – 100 meters and conforms to the 802.15 communication standard. It is suitable for devices that are in close proximity to one another and when high band is not required. Low-cost transceiver microchips in each Bluetooth device allow low power consumption and short range. Bluetooth can be used to get data from RS232 devices by simply plugging a Bluetooth adapting device into your computers com port and another into your device. You can then use software to collect the data. Bluetooth also supports Advanced Audio Distribution Profile, Human Interface Device Profile and Phone Book Access Profile.

Wi-Fi

Wi-Fi is a communication standard owned by the Wi-Fi Alliance and was designed to improve wireless local area networks (WLAN). Wi-fi has higher power consumption than Bluetooth but uses the same radio frequency. Wi-Fi is preferable to Bluetooth for large networks because of its

Page 5: Thesis

faster connection speeds, its greater range and the fact that more devices can be monitored at higher security levels. Wi-Fi is used for network connectivity in LANs, VoIP phone access and gaming.

Zigbee Vs Wi-Fi Vs Bluetooth:

  ZigBee Wi-Fi Bluetooth

Range 10-100 meters 50-100 meters 10 – 100 meters

Networking Topology Ad-hoc, peer to peer, star, or mesh

Point to hub Ad-hoc, very small networks

Operating Frequency 868 MHz (Europe)900-928 MHz (NA), 2.4 GHz (worldwide)

2.4 and 5 GHz 2.4 GHz

Complexity (Device and application impact)

Low High High

Power Consumption (Battery option and life)

Very low (low power is a design goal)

High Medium

Security 128 AES plus application layer security

  64 and 128 bit encryption

Typical Applications Industrial control and monitoring, sensor networks, building automation, home control and automation, toys, games

Wireless LAN connectivity, broadband Internet access

Wireless connectivity between devices such as phones, PDA, laptops, headsets

Determining the Hardware Components

Wireless communication hardware

The ZIGBEE communication standard was chosen because of its advantages over the other communication standards, so the next step is to choose the hardware that can implement the ZIGBEE standard and that is also capable to communicate with the computer and the variable that is to be monitored. This hardware would make up your TX and RX links.

Wireless communication kits

There are a large number of wireless communication kits to choose from that conforms to the ZIGBEE communications standard. Two examples of these kits are the PICDEM Z kit and the matrix multimedia e-blocks with ZIGBEE module.

Page 6: Thesis

PICDEM Z kit

The PICDEM Z kit allows developers to experiment with the microchips compatible with the ZIGBEE communication standard. The developer can create a two node network with this kit. If more nodes are desired, the developer can simply add them to the network. The nodes come with preprogrammed firmware which allows multiple operational configurations without making any changes to the code. Developers can also develop their own application or change the supplied one’s by using the microchip stack for ZIGBEE protocol source code. The PICDEM Z KITS comes with two nodes that are preprogrammed respectfully with a co-ordinator and a Reduced Function Device (RFD) application. The kits nodes consists each of the motherboard and an RF card which connects into one another. Although supplied with a RF card the motherboard supports different types of RF transceivers(Microchip Technology Inc, 2004). The PICDEM Z kit has the disadvantage of an insufficient amount of available support as information on the kit can be challenging to find.

E-blocks

E-blocks are small circuit boards each performing certain functions and can be interfaced to create working systems suited to an application need. There are more than 50 small circuit boards available to choose from, depending on your application needs. These boards range from LED boards, keypads, LCD, to more complex one’s such as device programmers, ZIGBEE boards and TCP/IP boards. To form a fully functional system with e-blocks you have to simply snap the boards together which best suites your application. This easy and fast assembly make e-blocks perfect for prototyping a complex electronic system and is easy to be used by lecturers and students in universities. E-blocks can be used with a variety of software packages, courseware, curriculum and sensors. The product is also well supported with data sheets, applications, information and an active forum where the user can request advice when encountering problems. This makes the e-blocks the obvious choice over the PICDEM Z kit.

The EB006 Multi-programmer

The EB006 Multi-programmer is a low cost and very flexible PICMICRO microcontroller programmer. The EB006 can be used with programs coded in C, Assembly or flow code and can be used to program most flash PICMICRO microcontroller devices. It also provides access to all I/O lines on the microcontroller. The EB006 is compatible with both RC and XTAL operations. It also features 5 I/O ports and in-circuit debugging via MPLAB ICD2.

EB051 ZIGBEE Board

This board provides you with a ZIGBEE node that can be used to create a ZIGBEE network. The EB051C is the coordinator ZIGBEE node and is used to start, configure the network as well as

Page 7: Thesis

allow other nodes to join. The EB051R is configured as the router/ end device and is used to connect and communicate with the coordinator and other nodes. The EB051 board is fully compliant with the ZIGBEE pro (07) and the ZNET (08) ZIGBEE standards. The EB051 can be used to create or join an existing ZIGBEE network. The board provides wireless communication at a range of approx 100 meters per node.

RS232 board (EB015)

This board is used to interface the e-blocks to the PC. It allows serial communication between the PICMICRO microcontroller and the computer. There are also flow code macro’s available for driving this device. The board provides serial communication between processors and a PC or between processors and a modem. Flow code macros are also available and hardware flow control can be enabled as an option.

Determining the software components

Flow code

Flow code is a flowchart based programming language and is compatible for use with PICMICRO microcontrollers. Because Flow code is flow chart based, it allows quick program development suited for students. It uses macros to allow easy control of complex devices such as motor controllers, LCD and ZIGBEE boards. A student could therefore control highly complex electronic devices without having to understand a complex programming language. Flow code can be used with e-blocks and doesn’t require any programming experience. It also supports interrupts and A/D converters. Flow code is therefore the ideal software to program the e-blocks.

PC to e-blocks interface

The PC is connected to the E-Blocks (RX link) via a USB/serial converter. The converters drivers are installed on the PC as well as the E-Blocks programmer board driver. The cable would then be plugged into the PC’s USB port on the one end and the other end into the RS232 board.

PC Software

LABVIEW

There are many kinds of software that can be used for the application eg. C, PASCAL, LABVIEW, but for this application LABVIEW is the ideal choice because its user friendly and quicker to program than the others which saves time.

LABVIEW is a graphical programming language and is used by many engineers to develop measurement, test and control systems by using graphical icons and wires to connect the icons. LABVIEW gives you the option of integrating with thousands of hardware devices and has built in libraries for advanced analysis and data visualization with which you can create virtual

Page 8: Thesis

instruments that are easy to use (National Instruments, 1999). LABVIEW can also be used with a range of operating systems.

Design of software components

Microcontroller configuration

Before the user begins writing the flowcode program the user is prompted to specify the type of microcontroller being used. The 16F88 microcontroller is selected as it comes with the EB006 E-Block.

Page 9: Thesis

The microcontroller is then configured by selecting the chip and configure option in the menu as shown in the figure below

From the PICmicro configuration, the XTAL oscillator is selected in order to use the crystal oscillator provided with the EB006 board.

Page 10: Thesis

The switch to expert config screen is selected and the bow shown in the figure below appears. The Low Voltage Program option is disabled in order to allow external power supply usage to the EB006 E-Block.

Page 11: Thesis

Programming the microcontrollers

Coordinator

The figure below shows the flowchart that was programmed into the coordinator. The program enables the coordinator to communicate with the PC as well as the end device

1. This arrow points to the Zigbee initialize network component macro. The initialize macro must be called once to initialize the Zigbee coordinator node before any other Zigbee component macros are called.

1

2

3

4

5

6

Page 12: Thesis

2. The Zigbee connect to all component macro is called. This macro connects the coordinator to all nodes on the network. The macro returns a 0 if the device connected correctly, otherwise returns a 1. The return value is then assigned a variable name (in this case the connec variable has been chosen).

3. Loops the program until the specified condition becomes true. The test condition is set to While 1 which will make the loop repeat forever. This kind of loop is known as an infinite loop.

4. The receive character component macro is called. This macro checks for a received character from the Zigbee end device. It returns the incoming data byte, a value of 255 is returned if a data byte was not detected before the timeout expired.

Page 13: Thesis

5. The string manipulation icon allows users to manipulate, create and edit strings. In the string manipulation properties box below a ToString function is used to convert the value of char1 received from the end device to a string. This string is then assigned to the STR1 variable.

6. The RS232 component macro is called. This macro sends a string of characters via the RS232 connection. In the macros properties box the RS232 component is selected followed by the SendRS232String.The string to be sent is then entered into the parameters field.

Page 14: Thesis

From the properties box EXT properties is selected and the Edit Component Properties box appears as shown in the figure below. In the Edit Component properties box the software TX/RX should be selected.

Page 15: Thesis

Software UART communication, is when general-purpose I/O ports are used to function as the UART receive and transmit pins. Changing the setting of these ports, therefore, enables TX/RX communication via these ports. A Software UART is required when using the 16F88 microcontroller, because it only has one TX and RX pin. Both the EB051 Zigbee board and the EB015 RS232 board each require a TX/RX connection to the microcontroller.A software UART is therefore set up on the multiprogrammers A port and the hardware UART will be used by the Zigbee board on the B port.

End Device

Page 16: Thesis

The figure below shows the flowchart that was programmed into the end device. This program will enable the end device to read in an analogue value (process variable) and convert it to a digital signal. It then sends the digital value to the coordinator wirelessly.

1. This arrow points to the Zigbee initialize network component macro. The initialize macro must be called once to initialize the Zigbee coordinator node before any other Zigbee component macros are called.

2. The connect to coordinator component macro is called. This macro connects the end device to the Coordinator node. It returns a 0 if the device connected correctly, otherwise

1

2

3

4

5

6

Page 17: Thesis

returns a 1. The return value is passed to the connc variable as illustrated in the figure below.

3. Loops the program until the specified condition becomes true. The test condition is set to While 1 which will make the loop repeat forever. This kind of loop is known as an infinite loop.

4. The ADC read as byte component macro is called. This macro returns the 8 most significant bits of the analogue value as a BYTE value. The resulting value 0-255 can be easier to work with in some instances than the full INT value e.g. output to a port. The return value is passed to the ADC variable as shown in the figure.

Page 18: Thesis

5. The send char component macro is called. This macro transmits the ADC variable value to the coordinator. The variable value to be send is entered in the parameters field as shown in the figure below.

6. The delay icon is used to slow down program execution. Delay icons are particularly useful in setting the sampling time. Delays can be specified in units of microseconds, milliseconds or seconds.

LABVIEW

In this project LABVIEW is used to acquire the state of the remote process variable and display it to the user. The user is also allowed to manually or automatically control the process variable from the LABVIEW user interface. If automatic control is desired the user would select a set point on the front panel and LABVIEW will then control the process variable using on/off control.

Page 19: Thesis

The VISA configure serial port

Page 20: Thesis

Initializes the serial port specified by VISA resource name to the specified settings. The VISA resource name is set to the com port name allocated to the USB/SERIAL converter by the P.C. The termination char is set to false so that the serial device does not recognize the termination char. The timeout value is left at the default setting of 10000 milliseconds. The baud rate is set to 9600 so that it matches the baud rate of the E-Blocks. The data bits should be set to eight, parity should be set to none stop bits to 1.0 and the flow control should be set to none. These settings have been chosen to match the settings of the E-Blocks.

The VISA read function

Reads the specified number of bytes from the com port specified by the VISA resource name and returns the data in the read buffer. A property node is used in order to get the number of bytes to be read from the port.

Page 21: Thesis

The VISA write function

Writes data from the write buffer to the com port specified by the VISA resource name. The VISA resource name input specifies the resource to be opened. In the LABVIEW program it is connected to the port selection control, allowing the user to select the com port that the data is to be written to. The write buffer input contains the data to be written to the selected port.

Number to Decimal String Function

The number to decimal string function converts a number to a string of decimal digits. The number to be converted (switch state) is fed to the number input and the resulting string will be sent to the decimal integer string.

Boolean to (0, 1) Function

Converts a Boolean FALSE or TRUE value to a 16-bit integer with a value of 0 or 1. The function is used to convert the manual or automatic switch state (0 or 1) from a Boolean value to an integer value suitable to be used by the Number to String function.

Decimal String to Number Function

Converts the numeric characters in the string read from the port, to a decimal integer on its output. This makes the value suited to be used by the To Double Precision Float Function.

To Double Precision Float Function

Page 22: Thesis

Converts the number provided by the Decimal String to Number Function to a double-precision, floating-point number that is used within the case structure.

Printable? Function

This function outputs a boolean 1 if the string on its input is a printable ASCII value. The function was necessary in order to ensure if there is a period where there is a mismatch in the flow control values between the E-Blocks and LABVIEW , the blank value will not be displayed on the virtual thermometer.

Wait (ms) Function

Delays the program execution by the specified number of milliseconds specified on its input. The execution is delayed by 340 milliseconds after each time the while loop has executed. This allows data flow control so that the LABVIEW program operates in sync with the Flow Code programs executing in the E-Blocks.

Stop Button

The stop button (DAQ Termination) allows the user to stop the execution of the program.The initial value of the stop button is false and when selected by the user switches to a true state. When the user clicks on this button, the while loop containing the program code stops execution.

Write To Spreadsheet File VI

This VI is used to write to either a spreadsheet or text file depending on the file the user allocates in the file path. The transpose input is set to true in order to place the data in the file in a column. The data is entered into the VI from the String to Byte Array Function.

Page 23: Thesis

Case Structure

The case structure has two sub diagrams or cases, each executing when the structure executes. The value wired to the selector terminal (indicated by the question mark) determines which case is executed. Two cases are shown above. The true case is activated when a Boolean 1 is sent to the selector terminal from the inverter. When the true case is activated, no action is taken as the true case is a blank case.

When a zero is sent to the selector terminal, the false case is activated. The false case accepts a value from the To Double Precision Float Function and manipulates the value in order to convert it to degrees Celsius. An understanding of how an analog to digital conversion is need to be able to convert the value to degrees Celsius. The ADC input on the E-Blocks can accept a voltage between and including 0V and 5V.The voltage range is represented by a digital range of 0-255. Since an input of 5V will give a digital value of 255, it follows that 5 be divided by 255 in order to get the voltage per digital unit. Thus a digital unit equals 0.019607843 V. The ADC value received from the E-Blocks must then be multiplied by the value of a digital unit in order to get the output voltage of the temperature sensor. The temperature sensors voltage is an indication of

Page 24: Thesis

the measured temperature and must then be divided by 10mV as 10mV is equivalent to one degree Celsius.

This is illustrated in the false case above where the value from the To Double Precision Float Function is multiplied by 0.019607843. The product is then divided by 0.01 and the answer is compared to the set point value to check if the measured temperature has exceeded the set point value. If the temperature exceeds the setpoint value then the automatic switch is set to a Boolean 1.If the temperature is less than the setpoint value then the automatic switch value is set to a Boolean 0.The dividend (measured temperature) is also sent to be displayed on the virtual thermometer in degrees Celsius.

For Loop

The For Loop executes once each time the while loop executes. It contains the manual fan switch, automatic switch state, or function, Boolean to (0, 1) function, number to decimal string function and the write VISA. When the For Loop executes, the manual and automatic switch state is checked. If both switches indicates a 0 then a 0 is sent from the Or Function to the Boolean to (0, 1) function where it is converted to an integer. The 0 is then sent to the Number to Decimal String Function to be converted to a string format. The string is then sent to the Write VISA and is written to the Port specified by its Visa resource name input. If any of the two switches or both indicates a 1, then a 1 is written to the serial port in the same method mentioned above. A 1 switches the fan on and a 0 switches the fan on.

Interfacing the Hardware and software components

RX Link

Page 25: Thesis

The RX link is the receiving link and consists of the EB006 multiprogrammer, EB051 Zigbee board and the EB015 RS232 board. The EB015 RS232 board should be connected to port A of the multiprogrammer and the EB051 Zigbee board should be connected to port B (John, 2005) as shown below.

Power supply

Page 26: Thesis

The multiprogrammer board can be operated in Low Voltage Programming (LVP) mode or High Voltage Programming mode (HVP).” The PIC16F88 provided with this board has been set-up to accept low-voltage programming (LVP), but some features are not available in this mode, such as I/O line B3” (Ben, 2011).Since the application requires more features than what LVP offers an external power supply of 12V is connected to the mutiprogrammers power terminal. This enables the HVP mode.

“The jumper link system, J29, allows the user to decide on the source of the power supply. If using a regulated 13.5V power supply the jumper should be positioned to the left hand side of the

Page 27: Thesis

jumper system labelled ‘PSU’” (Ben, 2011). The three links in the jumper block should be position horizontally, connecting the centre pins to either the left hand or right hand pins. LED2 should light up when the board is being supplied with power.

1 - J29 jumper link

2 – Power Screw terminals

The multiprogrammer has a 5V onboard voltage regulator that is used when powering other E-Block modules. The EB015 and the EB051will have to receive 5V by placing a connecting wire

1

2

Page 28: Thesis

from the “+V Out” screw terminal of the multiprogrammer to the “+V” screw terminal of both E-Blocks. This is shown in the figure below.

1- Two single core copper wires connecting power from the multiprogrammer power screw terminals to the power terminal of the Zigbee board.

2- Two single core copper wires connecting power from the Zigbee board to the RS232 board.

3- 5V Voltage regulator

Programming

1

2

3

Page 29: Thesis

The multiprogrammer is connected to the PC via the USB socket as shown in the figure below. LED 1 indicates that the multiprogrammer is communicating with the PC and that the connection with the PC is valid.

1 – USB cable connected to the multiprogrammers USB connector.

Clock signal

1

Page 30: Thesis

The clock signal is provided either from the RC network or by the boards Crystal. The multiprogrammer comes standard with a 19.6608MHz crystal.SW2 is switched to Xtal in order to use the boards crystal. SW1 is used when the RC network is utilized to set the networks speed.

1 – SW1 (Switch 1)

2 – SW2 (Switch 2)

3 – 19.6608 MHz crystal

Connecting the RS232 Board

3

2

1

Page 31: Thesis

The RS232 board is connected to the multiprogrammer via port A, because the software UART has been configured to use port A bit number 4 to transmit signals. Since bit 4 is used to transmit the signal, the patch system on the RS232 board must be utilized. This is because bit 4 is not connected to the max3232 chips TX pin as can be seen in the schematic provided. Bit 0 (bit 1 on the schematic) is used by the board to receive incoming data from the PC and therefore has to be connected to the RX pin on the RS232 board.

A single core wire is thus used to connect bit 4 of the patch system to the max 3232 chips TX pin. A single core copper wire is also used to connect bit 0 to the max 3232 RX pin. In order to

Page 32: Thesis

use the patch system jumper setting D must be used. The CTS and RTS functions are not needed; therefore jumper setting 2 is selected. J1 is then connected to the serial to USB converter.

1 - Jumper placed on setting D for patch system utilization.

2 – Jumper placed on setting 2 so RTS and CTS is not used.

3 – Single core copper wire to connect bit 4 to the max 3232 TX pin

4 – Single core copper wire to connect bit 0 to the max 3232 RX pin

Connecting the Zigbee Coordinator Board

3

2

1

4

Page 33: Thesis

The Zigbee coordinator board is connected to the multiprogrammer via port B. This is because the Zigbee component macro in flowcode does not allow the use of a software UART. Since the 16F88 microcontrollers TX pin is connected to the multiprogrammers B port, it follows that the Zigbee board be connected to Port B. Jumper setting A is selected in order to route the signal from the 9 way D-type plug to the XBEE Zigbee module. Jumper setting 1 is then also selected in order to use of the RTS, CTS and SLEEP functions.

1 – Jumper placed on setting A

2 – Jumper placed on setting 1

3 – XBEE Zigbee module

TX link

2

1

3

Page 34: Thesis

The TX link is the transmitting link and consists of the EB006 multiprogrammer, EB038 quad relay board and the EB051 Zigbee board. The EB038 is connected to port A and the EB051 Zigbee board is connected to port B as shown below. The Zigbee board is connected to port B because the 16F88 TX and RX pins are connected to port B of the multiprogrammer (Ben, 2011; Sean, 2011). Jumper setting A on the Zigbee board is selected in order to route the signal from the 9 way D-type plug to the XBEE Zigbee module. Jumper setting 1 is then also selected in order to use of the RTS, CTS and SLEEP functions

Power supply

Page 35: Thesis

The TX link also requires more features than what LVP offers and is therefore connected to the 12V external power supply. This enables the HVP mode.

Since an external 12V power supply is being used, the jumper link J29 should be positioned to the left hand side of the jumper system labeled ‘PSU’. The three links in the jumper block should be position horizontally, connecting the centre pins to either the left hand or right hand pins. If the board is connected correctly, LED2 should light up when the power is turned on.

1 - J29 jumper link

2 – Power Screw terminals

The multiprogrammer’s 5V power screw terminals should be connected to the Zigbee boards 5V terminal. This should be done using two single core copper wires and placing the connecting wire from the “+V Out” screw terminal of the multiprogrammer to the “+V” screw terminal of

1

2

Page 36: Thesis

the Zigbee board. The ground terminals should then be connected to each other using the remaining connecting wire. The power terminals of the relay board should be connected to the 14V terminal of the mutiprogrammer. The connections are shown in the figure below.

Programming

The TX multiprogrammer is connected to the PC via the USB socket as shown in the figure below. LED 1 indicates that the multiprogrammer is communicating with the PC and that the connection with the PC is valid.

Clock signal

Page 37: Thesis

SW2 is switched to Xtal in order to use the boards 19.6608MHz crystal. SW1 is used when the RC network is utilized to set the networks speed and can be left on the fast setting.

1 – SW1 (Switch 1)

2 – SW2 (Switch 2)

3 – 19.6608 MHz crystal

After the Software programs have been written and the hardware has been configured and connected to the P.C, the program can be loaded onto the microcontroller. This is done by

3

2

1

Page 38: Thesis

selecting the compile to chip option as shown in the figure below. The co-ordinator program is compiled to the RX link and the end device program is compiled to the TX link.

Testing

Page 39: Thesis

The primary objective of the project was the development of a wireless link utilizing ZIGBEE technology as an infrastructure to enable remote data acquisition. An added function was the implementation of a bidirectional link which enables a user to interact with the remote apparatus in a limited capacity. User interactivity encompasses a LABVIEW graphical user interface depicting various attributes of the remote system.

The object under test consists of a simple voltage regulator with a resistive load. Monitoring of the temperature of the voltage regulator can be observed via the LABVIEW interface, which reads the transmitted data from the local receiving ZIGBEE unit. As explained in a previous section the remote system acquires the data and transmits it via the ZIGBEE link to the receiving unit.

To demonstrate On/Off control the unit has been programmed to monitor the voltage regulator temperature and to reduce the temperature by means of On/Off control of a fan to cool the regulator when the temperature exceeds a set value. In this regard there are two modes of operation i.e manual and automatic. In manual control the user observes the temperature

via the LABVIEW interface and can activate the fan using a virtual button on a graphical user interface. Alternatively a preset temperature value can be set and the electronic units will automatically command an On/Off signal when required.

This simple setup forms the basis for a very efficient and effective mechanism for remote data acquisition and control. The primary objective of this project was accomplished and provides a platform for future work. There are possibilities for widespread academic and industrial applications. From an academic perspective students involved in advanced areas of control have a good platform to study and implement complex control algorithms over wireless links.

In industry this provides an alternative mechanism for remote data acquisition and control.

CONCLUSION

LABVIEW program provides a user friendly interface in which the user can interact with the

Page 40: Thesis

process variable. The user is allowed a manual or automatic control over the variable. LABVIEW also allows storage capabilities, so the data can be kept safe to be viewed at a later stage. The Rx and TX links allows the user to remotely control a process eliminating the use of cables amongst other advantages.

In conclusion wireless data acquisition and control was achieved as the user was able to monitor and control the voltage regulators temperature remotely. This wireless data acquisition system can be said to be feasible and quite versatile as it can be used to monitor and control various processors besides temperature.

Glossary

Page 41: Thesis

DAS- Data Acquisition System is the sampling of a variable to generate data that can be

manipulated by a PC. It involves acquiring signals and processing the signals to obtain desired

information.

RDAS- Remote Data Acquisition System is system that allows an operator or user to supervise

a remote process for data collection

PC – A Personal Computer is a programmable machine used to sequentially and automatically

carry out a sequence of arithmetic or logical operations.

PAN-Personal Area Network is a technology that allows individuals to exchange data with a

simple touch or grasp.

WPAN- Wireless Personal Area Network is a network for interconnecting devices centered on

an individual person's workspace in which the connections are wireless.

LABVIEW- Laboratory Virtual Instrumentation Engineering Workbench is a platform and

development environment for visual programming.

RS232- Recommended Standard 232 is a standard for serial binary single-ended data and control signals connecting between a DTE (Data Terminal Equipment) and a DCE (Data Circuit-terminating Equipment) and is commonly used in computer serial ports.

IEEE- the Institute of Electrical and Electronics Engineers is an international non-profit, professional organization for the advancement of technology related to electricity.

Microcontroller-A microcontroller is a small computer on a single integrated circuit containing a processor core, memory, and programmable input/output peripherals.

MPLAB- MPLAB is a free, integrated toolset for the development of embedded applications employing Microchip's.

References

Page 42: Thesis

1. Seminar surveyor. Project Seminar Technology Expert (2010) Wireless communication (internet). Available from: www.seminarprojects.com/Thread-wireless-communication--14279

2. ATIS Telecom Glossary (2008) Wireless (internet) Available from: http://en.wikipedia.org.wiki.wireless

3. Comdex Fall (1981) Data acquisition (internet) Available from: http://en.wikipedia.org/wiki/Data_acquisition

4. Weller, S., Romney, A. (1988) Data Collection (internet) Available from: http://en.wikipedia.org/wiki/data_collection

5. Omega (2001) Data Acquisition (internet) Available from: http://www.omega.com/prodinfo.data acquisition.html

6. Risanuri Hidayat (2004) Akuisisi Data (internet) Available from: http://www.te.ugm.ac.id/~risanuri/me/

7. Teledesign system (2002) Remote Data Acquisition (internet) Available from: http://www.teledesignsystems.com/remote_data_acquisition.html

8. National Instruments (2007) Data Acquistion:7 steps to success (internet) Available from: http://www.ni.com/pdf/products/us/daq_7steps_to_success.pdf

9. ICT Automasering (2009) Short-range. Wireless Communication (internet) Available from: http//www.ict.nl/C12572F4004BC1DB/files/shortrange WirelessCommunication.pdf/sfile/shortrangeWirelessCommunication.pdf

10. Windmill Software Ltd (2007) Logging data wirelessly (internet) Available from: http://www.windmill.co.uk/monitor110.html

11. Microchip Technology Inc (2004) Picdem Z Demonstration kit user’s guide (internet) Available from: http:// ww1.microchip.com/downloads/en/device doc/51524a.pdf

12. Matrix Multimedia (2008) E-Blocks (internet) Available from: http://www.matrixmultimedia.com/eblocks.php

13. Ben (2011) Picmicro MCU multi programmer EB006-00-7Technical datasheet (internet) Available from: http://www.matrixmultimedia.com/datasheets/EB006-30-7.pdf

14. Ben (2008) EB051-30-01 (internet) Available from: http://www.matrixmultimedia.com/datasheets/EB051-30-1.pdf