Saturday, May 23, 2015

Chapter 2 Glove Implementation 73 Assembly


Now let's take a look for our main system of glove implementation.



Fig 2.58 Glove Implementation
The previous figure shows the whole main system after fix the flex sensors on glove and connected to the voltage divider circuit which also provide good balanced place to the accelerometer, then this circuit connected to the Arduino, on the Arduino there is XBee shield which there is the ZigBee connected to start transmission.


END OF Chapter 2  

Chapter 2 Glove Implementation 72 Assembly

2-7 Assembly

2.7.5 the whole main system


Now it's time to connect all of that with each other


Fig 2.57 some main system component

 
 
We fixed the Arduino on straight plate which will be fixed on the hand by strip.

Chapter 2 Glove Implementation 71 Assembly



And the next figure shows the PCB design of the pervious circuit and now  it's ready to be printed


Fig 2.56 PCB design of the main system circuit

Chapter 2 Glove Implementation 70 Assembly



And by using the ARES of Proteus 7 professional we have the design of the Printed circuit board ready to be printed.


Next figure shows the schemtic of the circuit




Fig 2.55 schematic of the main system

And the next figure shows the PCB design of the pervious circuit and now  it's ready to be printed...

Chapter 2 Glove Implementation 69 Assembly

2-7 Assembly

2.7.4 Printed circuit board


This section will shows PCB designs and schematic of the circuit .
the circuit which we use is the voltage divider circuit (see figure
2.3.3) but not only for one sensor but for all the flex sensors we use
and also it combined the 5 pins to connect the MPU-6050 module
with the Arduino and reserve the balance of the circuit.


By using the ISIS Proteus 7 professional we design the schematic of the circuit of voltage divider and pins of the accelerometer plus
additional part of analog multiplexing will be further discussed in
chapter 4.


And by using the ARES of Proteus 7 professional we have the design of the Printed circuit board ready to be printed.


Next figure shows the schematic of the circuit

Chapter 2 Glove Implementation 68 Assembly

The accelerometer is connected directly to the Arduino so it's not
need special circuit to connect it, but the accelerometer must be
mounted in the normal mode on glove itself. So it need just a
simple circuit all its role is to connect the accelerometer to Arduino
pins and to reserve the balance of the sensor on the various modes
(further discussed in Chapter 3).


In the next figure we shows the position of the accelerometer on
the normal mode on circuit





Fig 2.54 normal mode of the accelerometer (starting mode)
 
 
Please note that this circuit is not the final circuit, it is just test
circuit and also this circuit is not only for the accelerometer (has
other uses).

Chapter 2 Glove Implementation 67 Assembly

2.7.3 Mounting the accelerometer


When we deal with the accelerometer the most important thing to
take in consideration is the orientation and position of the
accelerometer .


We must choose normal mode or normal position to mounting the
accelerometer on it.


we take the decision that the normal mode occurs when the notch
of the chip of the MPU-6050 module at top left and the surface of
the sensor is parallel to the earth surface and perpendicular to the
direction of gravity of the earth.


From this point we start to compute the change in orientation.



Fig 2.53 MPU-6050 module chip up and down view

 
 
Please note that in the previous figure the photo is very large compared to real size of the chip which equal about 4 mm by 4 mm .

Chapter 2 Glove Implementation 66 Assembly

The next figure shows the glove after insert the sensors on it.



Fig 2.52 flex sensors on the glove

 
 
 
 
Now we are ready for the next step, the next step is to connect the
sensors to the voltage divider circuit but we must take in account
that we will may need other circuits so we will wait and think firstlywhat we want to do.

Chapter 2 Glove Implementation 65 Assembly

In the next figure we will show how we fixed the sensor on the
glove to prevent it from be damaged or disconnected.





Fig 2.51 fixing the sensor on the glove by thread
 
 
 
 
 
I pulled the sensor a little out to show it to the reader.
And repeat that for all sensors and must notice that the pinky sensor must be not entered to the end of the sensor so as to be affected by the force of bending (the pinky finger is weak at the top).

Chapter 2 Glove Implementation 64 Assembly

2-7 Assembly



After that we will insert the sensor carefully into this open area and
make sure that sensor doesn't affected by wrong force.

We just want one force allowed to affect the sensor which is the
degree of the bending of the finger.


So the sensor must mounted free on the hole straight before any
hand wears the glove and also straight when the hand just wears
the glove without any bending motion.


Then the sensor must fixed at point so that it couldn't move
upward when we bend the fingers which may because cutting in
the sensor end


The mechanism of fixing the sensor is so simple we will fixing it
after the end of the sensor on the wire connected between the flex
sensor and the controller but at the beginning of the wire from the
side of sensor .


We will use needle and thread to fix the wire on the glove, this
thread is the same color of the glove and the shrink used so it will
not be noticed.

Chapter 2 Glove Implementation 63 Assembly

2-7 Assembly

2.7.2 Mounting the flex sensor.
 

When we use the flexible sensors we must be careful so as not to cause damage to it or cutting it when we are moving the hand and fingers so we use a glove which has capability to insert the flex sensors on it with minimal additional fixing tools, the next figure shows the glove we used.



Fig 2.50 glove to be used
 
 
 
 
As shown in fig 2.50 the glove made of leather and has empty areas
which we can use it to mounting the flex sensor.we will open small line at the bottom of every finger to allow us to insert the flex sensor


Chapter 2 Glove Implementation 62 Assembly

2-7 Assembly

2.7.1 Assembly sections


This section is the most important section in our main system, we
will discuss further information about the connection between the
various sensors and the controller which fixed on the hand
In this section we will discuss :


 Mounting the flex sensor on the Glove
 

 Mounting the Accelerometer
 

 Printed circuit board
 

 Mounting the ZigBee on the Arduino
 

 Assembly of the system
 

This section gives the reader of our project a very good overview
how our main system parts connected together and how we fixed
them on the glove and on the hand.

Chapter 2 Glove Implementation 61 MPU-6050

We will burn the pervious code on the Arduino and open the serial
monitor to show the row values of the accelerometer .




Fig 2.49 row values of accelerometer
 
 
 
 
Previous figure shows the row values of accelerometer when changes the orientation of X axis by about 180 and Y axis by about 90 .
We will further discussed this accelerometer with advanced application at later chapters.


Chapter 2 Glove Implementation 60 MPU-6050

Now it’s time for the code, firstly don’t forget to import MPU-6050
library we can import all of I2Cdev libraries from this page
github.com/jrowberg/i2cdevlib and put it in the right place on the PC which is C:\Users\”username”\Documents\Arduino\libraries
So to read row values of the accelerometer we will use this code, this code is modified version of the original version exist in MPU-6050 example in the I2Cdev libraries




#include "I2Cdev.h"
#include "MPU6050.h"
#if I2CDEV_IMPLEMENTATION == I2CDEV_ARDUINO_WIRE
#include "Wire.h"
#endif
MPU6050 accelgyro;
int16_t ax, ay, az;
void setup() {
#if I2CDEV_IMPLEMENTATION == I2CDEV_ARDUINO_WIRE
Wire.begin();
#elif I2CDEV_IMPLEMENTATION == I2CDEV_BUILTIN_FASTWIRE
Fastwire::setup(400, true);
#endif
Serial.begin(9600);
Serial.println("Initializing I2C devices...");
accelgyro.initialize();
Serial.println("Testing device connections...");
Serial.println(accelgyro.testConnection() ? "MPU6050 connection successful" : "MPU6050 connection failed");
void loop() {
accelgyro.getAcceleration(&ax, &ay, &az);
#ifdef OUTPUT_READABLE_ACCELGYRO
Serial.print("a/g:\t");
Serial.print(ax); Serial.print("\t"); Serial.print(ay); Serial.print("\t"); Serial.println(az);
#endif }

Chapter 2 Glove Implementation 59 MPU-6050

The pins of the module will be connected to the Arduino
The next figure shows simple scheme of connection of the module
with Arduino




Fig 2.48 connection between MPU-6050 and Arduino
 
 
As shown in figure 2.48 the VCC pin connected to 3.3V of the
Arduino, the GND pin connected to Arduino Ground, SCL pin
connected to A5 and SDA connected to A4.

Chapter 2 Glove Implementation 58 MPU-6050

Figure 2.47 shows the pins on the MPU-6050 module


Fig 2.47 MPU-6050 pins
 
2.6.6 Connection with Arduino

In this section will show how to connect the sensor with the Arduino Uno board.

In our project we will use only 4 pins of overall 8 pins there is no need for the other pins, so we will use VCC , GND, SDA and SCL pins and will connect them with Arduino

Chapter 2 Glove Implementation 57 MPU-6050

2.6 MPU-6050

2.6.5 Module pins


 MPU-6050 module has external eight pins, here is some further
information:


 VCC: supply voltage (take 3.3 from Arduino)


 GND: Ground pin


 SCL: serial clock line pin (for I2c communication)
 

 SDA: serial data line (for I2c communication)
 

 XDA: axillary data line
 

 XCL: axillary clock line
 

 AD0:I2C address (allow more than one MPU-60X0 to communicate through the same I2C bus).
 

 INT : interrupt pin

Chapter 2 Glove Implementation 56 MPU-6050

Here is further information and specification of the ccelerometer of
the MPU-6050



Table 2.3 specification of MPU-6050 accelerometer


Chapter 2 Glove Implementation 55 MPU-6050

in the next figure shows the block diagram of the MPU-6050
module



Fig 2.46 MPU6050 block diagram structure
 
 
 
The previous figure shows the internal structure of the module which clarify the internal detectors of axes for both accelerometer and gyroscope which its outputs goes to ADC converters then passing through some signal conditioning then registered in sensor registers before goes to I2C communication protocol.

Chapter 2 Glove Implementation 54 MPU-6050

2.6 MPU-6050

2.6.4 Accelerometer
In our project we will use accelerometer only because it has the
capability to measure the orientation about its axis, so we will focus on the accelerometer.


Computing orientation from an accelerometer relies on a constant
gravitational pull of 1g (9.8 m/s2) downwards.
If no additional forces act on the accelerometer (a risky assumption), the magnitude of the acceleration is 1g, and the sensor’s rotation can be computed from the position of the acceleration vector If the Z-axis is aligned along the gravitational acceleration vector, it is impossible to compute rotation around the Z-axis from the accelerometer.


Digital accelerometers give information using a serial protocol like I2C , SPI or USART; analog accelerometers output a voltage level within a predefined range (MPU6050 use I2C protocol)
Accelerometer has a zero-g voltage level, we can find it in the data
sheet of the sensor (in our sensor its zero-g voltage is ±50 mg for X and Y axis and ±80 mg for Z axis ) , Accelerometers also have a sensitivity, usually expressed in mV/g (MPU-6050 accelerometer has sensitivity scale factor of 16284 LSB/g)



Chapter 2 Glove Implementation 53 MPU-6050

2.6 MPU-6050

 Additional Features
The MPU-6050 includes the following additional features:


 Auxiliary master I2C bus for reading data from external sensors (e.g., magnetometer).


 2.9mA operating current when all 6 motion sensing axes and the
DMP are enabled.


 VDD supply voltage range of 2.275V-3.46V.


 Minimal cross-axis sensitivity between the accelerometer and
gyroscope axes.


 1024 byte FIFO buffer reduces power consumption by allowing host processor to read the data in bursts and then go into a low-power mode as the MPU collects more data.


 Digital-output temperature sensor


 User-programmable digital filters for gyroscope, accelerometer, and temp sensor.


 10,000 g shock tolerant.


 400kHz Fast Mode I2C for communicating with all registers.




Fig 2.45 MPU6050 Module

Chapter 2 Glove Implementation 52 MPU-6050

2.6 MPU-6050

2.6.3 Features

 Accelerometer Features


 Digital-output triple-axis accelerometer with a programmable full
scale range of ±2g, ±4g, ±8g and ±16g.


 Integrated 16-bit ADCs enable simultaneous sampling of
accelerometers while requiring no external multiplexer.


 Accelerometer normal operating current: 500μA.


 Tap detection.


 User-programmable interrupts.


 High-G interrupt.


 Zero Motion/Motion interrupt.


 User self-test.

Chapter 2 Glove Implementation 51 MPU-6050

2.6 MPU-6050
2.6.1 MPU-6050 Overview
The MPU-6050 Motion Processing Unit with integrated 6-Axis
sensor fusion using its field-proven and proprietary Motion Fusion
engine for handset and tablet applications, game controller motion
pointer remote controls, and other consumer devices. The MPU-
6050 has an embedded 3-axis MEMS gyroscope, a 3-axis MEMS
accelerometer, and a Digital Motion Processor (DMP) hardware
accelerator engine with an auxiliary I2C port that interfaces to 3rd
party digital sensors such as magnetometers. When connected to a
3-axis magnetometer, the MPU-6050 delivers acomplete 9-axis
Motion Fusion output to its primary I2C or SPI port. The MPU-6050 combines acceleration and rotational motion plus heading information into a single data stream .

2.6.2 Applications
 AirSign technology (for Security/Authentication).
 MotionCommand technology (for Gesture Short-cuts).
 Motion-enabled game and application framework.
 Location based services, points of interest, and dead reckoning.
 Handset and portable gaming.
 Motion-based game controllers.
 3D remote controls for Internet connected DTVs and set top
boxes, 3D mice.
 Wearable sensors for health, fitness and sports.

Chapter 2 Glove Implementation 50 ZigBee

We already have the modules ready for use and sending and
receiving data, the characters are blue when typing in the terminal,
and these mean we sending to the destination address that we
configured on the coordinator, when the characters are red this
mean that this module is receiving data from the other side.







Fig 2.44 sending and receiving between two ZigBee

Chapter 2 Glove Implementation 49 ZigBee

Now we disconnect the USB port board, close the program and punctured the modules that will function as a router and open the program to set, as before we go to the modem configuration tab, select the operating mode and we put the PAN ID and 64-bit address of the coordinator, once done we write the configuration(figure 2.43).


Fig 2.43 configuration of the receiver

Chapter 2 Glove Implementation 48 ZigBee

Establishing these directions will tell our coordinator to the network module will send you the information you receive for your serial port.
Now we can click write to download the program on the XBee module.





Fig 2.42 write parameters to XBee module

Chapter 2 Glove Implementation 47 ZigBee

The first is to set the PAN ID, the ID number of our network, all
modules that communicate within a network must have the same
number, we set PAN ID as for example the number 555(see figure
2.40).
The next thing is to set the Destination Address High and Low, i.e.
the number of 64 bits of our router we have noted before



Fig 2.41 determine the destination of ZigBee

Chapter 2 Glove Implementation 46 ZigBee

coordinator, and the module 0013A200407E6FCF direction will be
the router.
First we set the coordinator, we click the module in the XBee
Explorer USB board connected to the pc and go to the previous tab
selected Function Set and ZigBee Coordinator AT in modem XB24-ZB and the latest version. This X-CTU to say that we will record a program module for it to function as coordinator in AT mode, the following is to select the communication parameters.




Fig 2.40 determine PAN ID

Chapter 2 Glove Implementation 45 ZigBee

2-5 ZigBee


With a choice of AT or API decide how we will communicate with
the serial port (UART) module of the software algorithm:
• If you select the option that AT module receives the DIN pin of
the UART, send it by wireless communication, i.e. if we write
10100000 10100000 transmit module, that simple. And similarly it
is received by the module transmits it to the microcontroller as
rides on the DOUT pin. If sent to the module DIN characters + + +,
the module enters command mode, and allows us to configure
various options of the module through its serial port.
• If we select API to communicate with the module is more
complex, not what enters and leaves sent to the module through the
serial port, but we communicate with the XBee module using frames, i.e. the data has to go in the order established with bytes of start, length, data type, checksum, etc. With this choice of communication with the module have many more opportunities for communication as the other way, we can send commands to other modules for remote configuration, know who the sender of the message, whether the packages have arrived, etc...
To test the modules we setting up an XBee Coordinator AT and the
other as AT Router, we must first have the address of 64 bits single
module, the module 0013A2004081372A address will be the ...

Chapter 2 Glove Implementation 44 ZigBee

on the type of device you want them to be on the network.
With the 2 XBee Modem drop-down lists, Function Set and Version
select the bar program to download from the module.
XBee Modem refers to the type of module that we bought, in our
case we select XB24-ZB modules for series two.
The following list is the Function Set we have several options:


Fig 2.39 function set of the ZigBee
We can see how we can decide whether to record a program for the
module to function as a coordinator, router or end device, and within each of these 3 options we can choose others like to read a sensor, or select one of its outputs.

Chapter 2 Glove Implementation 43 ZigBee

2-5 ZigBee


Fig 2.38 choosing Read button to read the firmware
We have a number of configuration parameters and drop-down lists, where we can select programs to record in different modules depending

Chapter 2 Glove Implementation 42 ZigBee

2-5 ZigBee
to do simple example, we take these two XBee modules and
configure one as Coordinator and another as a router for
communication between them. The module has a microcontroller
that runs a program, depending on what type of device is to be the
module (coordinator, router or end device) and the way of your
serial port communication with the outside world, we must record
a program or another on it by the X-CTU.
To do this we go to the Module Configuration tab


Fig 2.37 modem configuration tab to start configure ZigBee

Chapter 2 Glove Implementation 41 ZigBee

2-5 ZigBee
A dialog box where you can see the type of module that we played
in the XBee connected, internal software version of the
microcontroller that is engraved and serial number. This serial
number of the modules is unique, i.e. no two ZigBee modules with
the same serial number as well.




Fig 2.36 ZigBee Serial number



At the bottom we can see the number of each module, the first 32 bits 0013A200 corresponds to a number assigned to the manufacturer, all XBee modules have the same, and 32 bits 40813E2A following are individual to each module, there will be two modules with the numbers equal. Since this number can be used to identify a module within the network and communicate with it.

Chapter 2 Glove Implementation 40 ZigBee

2-5 ZigBee
2.5.6 ZigBee Configuration
To use the modules you must first configure them, so we must get off the X-CTU from Digi website , we can change the firmware on the XBee modules, so we can use a serial terminal to send and receive data over the module from the PC.
We stopped all communication parameters are set as default, select
the port where the module is connected to the PC (in this case appears only one) and give it to Test / Query to test the module.If everything is OK will return something like this:



Fig 2.35 test ZigBee





Chapter 2 Glove Implementation 39 ZigBee

2-5 ZigBee

Fig 2.32 choosing source



Fig 2.33 downloading update


Fig 2.34 choosing location on the computer

Chapter 2 Glove Implementation 38 ZigBee

2-5 ZigBee
Writing firmware to the Radio
To write the parameter changes to the radio’s non-volatile
memory, click on the Write button located in the Modem
Parameters and Firmware section (see Figure 2.31)
Downloading Updated Firmware Files Another function of the Modem Configuration tab is allowing the user to download updated firmware files from either the web or install them from a disk or CD. This is accomplished by following the steps below:
1: Click on the Download New Versions… option under the Version section
2a: Click on Web for downloading new firmware files from the web
2b: Click on the File when installing compressed firmware files from
a CD or saved file (see Figures 2.32 and 2.33)
2bi: Browse to the location the file is saved at and click on Open
(see Figure 2.34)
3: Click on OK and Done when prompted



Chapter 2 Glove Implementation 37 ZigBee

2-5 ZigBee
To modify any of the user-settable parameters, click on the
associated command and type in the new value for that parameter.
For ease of understanding a specific command, once the command
is selected, a quick description along with its limits is provided at the bottom of the screen. Once all of the new values have been entered, the new values are ready to be saved to the radio’s non-volatile memory.


Fig 2.31 , the configuration settings

Chapter 2 Glove Implementation 36 ZigBee

2-5 ZigBee
.
  •  On the Modem Configuration tab, select “Read” from the
       Modem Parameters and Firmware section (see Figure 2.30).


Fig 2.30 modem configuration tab interface
Making changes to a radio’s firmware
Once the radio’s firmware has been read, the configuration settings are displayed in three colors (see Figure 2.31): 
  •  Black – not settable or read-only.
  •  Green – Default value. 
  •  Blue – User-specified

Chapter 2 Glove Implementation 35 ZigBee

2-5 ZigBee
The Line Status indicators depicted in Figure 2.28 shows the status of the RS-232 hardware flow control lines. Green indicates the line is asserted while black indicates de-asserted.
The Break option is for engaging the serial line break. This can be
accomplished by checking or asserting the Break option. Asserting the Break will place the DI line high and prevent data from being sent to the radio.
Modem Configuration tab
The Modem configuration tab has four basic functions:
 Provide a Graphical User Interface with a radio’s firmware
 Read and Write firmware to the radio’s microcontroller
 Download updated firmware files from either the web or from a
compressed file
 Saving or loading a modem profile
Reading a radio’s firmware
To read a radio’s firmware, follow the steps outlined below:
 1: Connect the radio module to the interface board and connect
this assembly or a packaged radio (PKG) to the PC’s
corresponding port (IE: USB, RS232, Ethernet etc.).
 2: Set the PC Settings tab (see Figure 2.25) to the radio’s default settings




Chapter 2 Glove Implementation 34 ZigBee

2-5 ZigBee


Fig 2.28 main terminal tab interface

Assemble Packet
The Assemble Packet option on the Terminal tab is designed to allow the user to assemble a data packet in either ASCII or Hex characters. This is accomplished by selecting the Assemble packet window and choosing either ASCII (default) or Hex. Once selected, the data packet is assembled by typing in the desired characters as depicted in Figure 2.29.



Fig 2.29 Assemble packet window

Chapter 2 Glove Implementation 33 ZigBee

2-5 ZigBee
To modify the size of the packet sent, change the value next to the
“Create Data” box and click on the “Create Data” button (see Figure  2.27). If we want to change the data sent, delete the text in the transmit window and place in your desired text.
By modifying the text, data packet size, packet delay and the data
receive timeout; the user is able to simulate a wide range of
scenarios.

The Terminal Tab
The Terminal tab has three basic functions:
 Terminal emulator
 Ability to send and receive predefined data pacts (Assemble
packet)
 Ability to send and receive data in Hex and ASCII formats
(Show/Hide hex)
The main terminal window
The main white portion of this tab is where most of the
communications information will occur while using X-CTU as a
terminal emulator. The text in blue is what has been typed in and
directed out to the radio’s serial port while the red text is the
incoming data from the radio’s serial port (see Figure 2.28).

Chapter 2 Glove Implementation 32 ZigBee

2-5 ZigBee
Range Test Tab
The range test tab is designed to verify the range of the radio link by sending a user-specified data packet and verifying the response packet is the same, within the time specified. For performing a standard range test, please follow the steps found in most Quick Start or Getting Started Guides that ship with the product.
Packet Data and Size
By default, the size of the data packet sent is 32 bytes. This data
packet specified can be adjusted in either size or the text sent.




Fig 2.27 range test tab interface

Chapter 2 Glove Implementation 31 ZigBee

 2-5 ZigBee

The Test / Query button is used to test the selected COM port and
PC settings. If the settings and COM port are correct, there will be a response similar to the one depicted in Figure 2.26 below



Fig 2.26 test/query button response
Host Setup:
The Host Setup tab allows us to configure how the X-CTU program is to
interface with a radio’s firmware. This includes determining whether API or
AT command mode will be used to access the module’s firmware as well as
the proper command mode character and sequence.
User COM ports:
The user COM port option allows the user to “Add” or “Delete” a usercreated
COM port. This is only for temporary use. Once the program has
closed, the user-created COM port will disappear and is no longer
accessible to the program.

Chapter 2 Glove Implementation 30 ZigBee

2-5 ZigBee






Fig 2.25 X-CTU interface
PC Settings Tab
When the program is launched, the default tab selected is the “PC Settings”
tab. The PC Settings tab is broken down into three basic areas: The COM port setup, the Host Setup, and the User Com ports.
COM port setup:
The PC settings tab allows the user to select a COM port and configure the selected COM port settings when accessing the port.


Chapter 2 Glove Implementation 29 ZigBee

2-5 ZigBee
When launched, there are four tabs across the top of the program
(see Figure 2.25). Each of these tabs has a different function. The
four tabs are:
 PC Settings: Allows a customer to select the desired COM port
and configure that port to fit the radios settings.
 Range Test: Allows a customer to perform a range test between
two radios.
 Terminal: Allows access to the computers COM port with a
terminal emulation program. This tab also allows the ability to
access the radios’ firmware using AT commands (for a complete
listing of the radios’ AT commands, please see the product
manuals available online).
 Modem Configuration: Allows the ability to program the radios’
firmware settings via a graphical user interface. This tab also
allows customers the ability to change firmware versions.

Chapter 2 Glove Implementation 28 ZigBee

2-5 ZigBee
2.5.5 X-CTU interface
In this section we will discuss the functions of Digi’s X-CTU software utility.
X-CTU is a Windows-based application provided by Digi. This
program was designed to interact with the firmware files found on
Digi’s RF products and to provide a simple-to-use graphical user
interface to them.
X-CTU is designed to function with all Windows-based computers
running Microsoft Windows 98 SE and above. X-CTU can either be downloaded from Digi’s Web site or an installation CD. When
properly installed it can be launched by clicking on the icon on the
PC desktop (see Figure 2.23) or selecting from the Start menu (see
Figure 2.24).






Chapter 2 Glove Implementation 27 ZigBee

2-5 ZigBee
2.5.4 The ZigBee application areas
 Agriculture: sensor networks low in the field to measure and
collect various parameters.
 Home automation, building automation and household,
industrial control.
 Health care: gather information from sensors in patients, an
example may be the smart clothing.
 Remote control of consumer electronics like TV remote,
lights, etc..




Fig 2.22 The ZigBee application areas

Chapter 2 Glove Implementation 26 ZigBee

2-5 ZigBee
Zigbee Series 2 improvement on series 1
 Increasing the power output up to 2mW in Boost Mode.
 Supporting single Zigbee to multi-Zigbee communication
(mesh network) while series 1 support only single to single
Zigbee communication.
 Various other improvements to the AT command set.
How to know if the Zigbee module is series 1 or series 2?
Series 1 Zigbee modules start with part number XB24-A or XBP24-A
and equipped with Free Scale IC while series 2 equipped with
Ember IC.
Tips for using Zigbee Module
1-To set up your XBee you will need to download the X-CTU
tool(Digi.com website).
2- one of the devices must be a Coordinator and the other must be
a Router (an 'endpoint' device).
3- Series 1 and Series 2 XBee modules have the same pin-out.
However, Series 1 modules cannot communicate with Series 2
modules.

Chapter 2 Glove Implementation 25 ZigBee

2-5 ZigBee
2.5.3 XBee series
Mainly there are two series of XBee. The Xbee series 1 and The
XBee series 2 which are quite smaller, but selection of a module
should be based upon application specific needs.
All XBee radios have the same footprint and for the most part-are
pin for pin compatible (with a few differences in the placement of
ADC/IO lines), but are NOT interoperable. Series 1 and Series 2 use different application profiles, which are unique to each radio
family.



Chapter 2 Glove Implementation 24 ZigBee

2-5 ZigBee
wireless light switches, electrical meters with in-home-displays,
traffic management systems, and other consumer and industrial
equipment that requires short-range wireless transfer of data at
relatively low rates. The technology defined by the ZigBee
specification is intended to be simpler and less expensive than
other wireless personal area networks (WPANs), such as Bluetooth
or Wi-Fi.
ZigBee networks are secured by 128 bit symmetric encryption keys.
In home automation applications, transmission distances range
from 10 to 100 meters line-of-sight, depending on power output
and environmental characteristics.


Fig 2.21 ZigBee

Chapter 2 Glove Implementation 23 ZigBee

2-5 ZigBee
2.5.2 Why ZigBee ?
ZigBee is a specification for a suite of high level communication protocols used to create personal area networks built from small, low-power digital radios. ZigBee is based on an IEEE 802.15 standard.
ZigBee is a low-cost, low-power, wireless mesh network standard. The low cost allows the technology to be widely deployed in wireless control and monitoring applications. Low power usage allows longer life with smaller batteries. Mesh networking provides high reliability and more extensive range. ZigBee chip vendors typically sell integrated radios and
microcontrollers with between 60 KB and 256 KB flash memory.
The ZigBee network layer natively supports both star and tree typical networks, and generic mesh networks. Every network must have one coordinator device, tasked with its creation, the control of its parameters and basic maintenance. Within star networks, the coordinator must be the central node. Both trees and meshes allow the use of ZigBee routers to extend communication at the network level.
ZigBee is used in applications that require only a low data rate, long battery life, and secure networking. ZigBee has a defined rate of 250  kbit/s, best suited for periodic or intermittent data or a single signal transmission from a sensor or input device. Applications include...

Friday, May 22, 2015

Chapter 2 Glove Implementation 22 ZigBee

2-5 ZigBee




Table 2.1 ZigBee, Wi-Fi and Bluetooth comparison

Chapter 2 Glove Implementation 21 ZigBee


2-5 ZigBee
The following diagram and table contain comparison between
different wireless technologies. It is conceptual in nature. However,
it may be used as a quick tool on making decision of which
technology you will use in your application. It includes data on the
range, data rate transmission, possibility of network building and so
on.

Fig 2.20 wireless technologies

Chapter 2 Glove Implementation 20 ZigBee

2-5 ZigBee
2.5.1 Introduction to wireless communication.
Wireless communication is the transfer of information between
two or more points that are not connected by an electrical
conductor.

Wireless networking is used to meet many needs. Perhaps the most
common use is to connect laptop users who travel from location to
location. Another common use is for mobile networks that connect
via satellite or local antennas . A wireless transmission method is a
logical choice to network a LAN segment that must frequently
change locations. The following situations justify the use of wireless technology:


 To span a distance beyond the capabilities of typical cabling,
 To provide a backup communications link in case of normal
network failure,
 To link portable or temporary workstations,
 To overcome situations where normal cabling is difficult or
financially impractical, or
 To remotely connect mobile users or networks.



Chapter 2 Glove Implementation 19 Xbee Shield

2-4 Xbee Shield

2.4.2 Jumper Settings.

The Xbee shield has two jumpers (the small removable plastic
sleeves that each fit onto two of the three pins labelled Xbee/USB).
These determine how the Xbee's serial communication connects to
the serial communication between the microcontroller (ATmega8 or
ATmega168) and FTDI USB-to-serial chip on the Arduino board.


Fig 2.19 Zig-Bee mounted on Xbee shield





Chapter 2 Glove Implementation 18 Xbee Shield

2-4 Xbee Shield

2.4.1 What is the Xbee Shield?

The Xbee shield allows an Arduino board to communicate
wirelessly using Zigbee(will be discussed in 2.5 section ). The shields breaks out each of the Xbee's pins to a through-hole solder pad. It also provides female pin headers for use of digital pins 2 to 7 and the analog inputs, which are covered by the shield (digital pins 8 to12 are not obstructed by the shield, so we can use the headers on the board itself).



Fig 2.18 Xbee shield

Chapter 2 Glove Implementation 17 Flexible Sensor

2-3 Flexible Sensor

 Other application
  •  Automotive controls
  •  Medical devices.
  •  Industrial controls
  •  Computer peripherals
  •  Fitness products
  •  Musical instruments
  •  Measuring devices
  •  Physical therapy


Fig 2.16 Bio-metrics applications
 
 
 
Fig 2.17 Gloves for control purposes
 
 

Chapter 2 Glove Implementation 16 Flexible Sensor

2-3 Flexible Sensor

2.3.5 Mechanical Specifications
 Life Cycle: >1 million
 Height: 0.42mm (0.017")
 Temperature Range: -25°C to +80°C


2.3.6 Electrical Specifications
 Flat Resistance: 10K Ohms
 Resistance Tolerance: ±20%
 Bend Resistance Range: 20K to 20K Ohms
 Power Rating: 0.50 Watts continuous. 1 Watt Peak


2.3.7 Applications of flex sensor
 Robotics: flex sensors may be used to determine joint
movement or placement
 Bumper switches: for wall detection or pressure switches on
robotics grippers
 Bio-metrics: the sensor can be placed on a moving joint of
athletic equipment to provide an electrical indication of
movement or placement
 Gaming gloves: a few of the sensors can be used onto a glove to
make virtual reality glove

Chapter 2 Glove Implementation 15 Flexible Sensor

2-3 Flexible Sensor


Fig 2.14 test code for flex sensor with Arduino


the serial monitor will display the corresponding digital value of theoutput of the flex sensor from straight mode to the bending mode then back again to the straight mode.

Fig 2.15 output on serial monitor


Chapter 2 Glove Implementation 14 Flexible Sensor

2-3 Flexible Sensor
Test with Arduino.
We will connect the flex sensor with Arduino as Explained in section (2.3.3)






Fig 2.13 connection of sensor with Arduino


we will write this code on the Arduino IDE then upload the sketch
by clicking the upload button on the toolbar

Chapter 2 Glove Implementation 13 Flexible Sensor

2-3 Flexible Sensor
2.3.4 Testing Flex sensor.
Testing with AVO meter.
The simplest way to test the flex sensor is by using an AVO meter,
we connect the pins of the Flex sensor directly to the probes of
AVO. When the sensor is straight, its resistance is about 10KΩ,
figure 2.11 shows this case.





                                       
                                                    Fig 2.11 when the sensor is straight



 
When the sensor is bent away from the straight mode and reach to
the maximum bending, it’s resistance is increased to about 20KΩ
(see fig 2.12).





                                          Fig 2.12 when the sensor is bent to the maximum