DETAILED DESIGN REVIEW:



DETAILED DESIGN REVIEW:

Wireless Assistive Control System

Project 08027

[pic]

Todd Bentley, ISE

Vianna Muller, EE

Benjamin Danziger, EE

Peter “PJ” Drexel, EE

Jay Radharkrishnan, EE

James Corcoran, CE

Dr. Edward Brown, Advisor

November 2nd, 2007

RIT Multidisciplinary Senior Design 1

Design Review: Table of Contents

Function Diagram 3

Front End 4

Customer Needs for the Front End 5

Strap Design 7

Strap BOM 9

Filter, Controller 10

Customer Needs for the Filter and DSP 10

Unfiltered EMG data 12

Filter types 13

Exploration of Crosstalk 14

Control System 15

DSP 537 Architecture 18

CONTROL SYSTEM OPERATION 21

PROCESSING REQUIREMENTS AND SPECIFICATIONS 22

Audio System 25

Analog-to-Digital Converter (ADC) 24

Wireless System 25

RC Car 28

The QFD as it relates to the RC Car. 28

Microcontroller: 29

Development Board 30

Programmer 32

RC Car Pseudo Code 34

Visual Feedback: 36

BOM: RC Car 39

Bill of Materials 40

Design Review: Functional Diagram

[pic]

Figure 1: Overall System Functional Diagram

Design Review: Front End

[pic]

Figure 2: Front End Functional Diagram

Customer Needs for the Front End

|Category |

|Wrist Breath |Elbow Breadth |Wrist to Elbow |

|Female |Male |Female |Male |Male |

| | | |

| | | |

| | | |

| | | |

| | | |

[pic]

Figure 2: Three-Dimensional View of the Strap

[pic]

Figure 3: Strap Components with Measurements

BOM: Strap

|Primary Sources |  |  |

|Item |Quantity (Roll) |Total Price |

|1" Nylon Webbing |1 - 50 ft Roll |$22.90 |

|1" Nylon Web Tubing |1 - 50 ft Roll |$20.50 |

|2" Nylon Webbing |1 - 50 ft Roll |$30.50 |

|1.0" Duragrip ™ Black Hook Std |1 - 25 ft Roll |$12.50 |

|1.0" Duragrip™ Black Loop Sew-On |1 - 25 ft Roll |$12.50 |

|1" Ladder Locks |10 @ $1.17 |$11.70 |

|500 Denier Cordura Plus® |1 yd |$13.40 |

| |Sub-total |$124.00 |

| |Est. Shipping |$20.00 |

| |Total |$144.00 |

[pic]

Design Review: Signal Processing

[pic]

Figure 4: Data Processing Functional Diagram

Customer Needs for the Filter and DSP

|Category |Number |Specification |Units |Ideal |Marginal |After |Number |Docu|

| | | | | | |A/D |of |ment|

| | | | | | |conversi|inputs |atio|

| | | | | | |on, |for each|n |

| | | | | | |sampling|command | |

| | | | | | |is high |and | |

| | | | | | | |clarity | |

|Filter/DSP |B |  |  |  |  |  |  |  |

|Sampling (Digital per line) |B1 |Range |second |500 |±250 |9 |  |1 |

|Sampling Lines |B2 |Input |N/A |4 |>4 |  |9 |1 |

|Speaker, Analog Output |B3 |Output |N/A |1 |  |  |9 |1 |

Implementation of Filter in the system

The 4 lines of on analog data enter DAQ and leave digitized and enter MATLAB. From here the filtration process will start. As of right now, a sampling frequency of 500Hz is being used.

In senior design II, the filtration process ADC will happen inside of the DSP along with the filtering. After the data is filtered, it is sent the control system to figure out how to process the data further.

Unfiltered EMG data after RMS

[pic] [pic]

Figure 5: an example of the A movement with a hold Figure 6: example of the B movement

(20K amplification) (5K amplification)

[pic] [pic]

Figure 7: example of the B movement with a hold Figure 8: example of the A movement

(5K amplification) (20K amplification)

Filter types

From the International Encyclopedia of Ergonomics and Human Text, it is seen that the three main filters to look at are a Low pass, a High pass and Notch filter.

The low pass will be used with a 600hz cutoff frequency when working with surface emg and 1000Hz when working with fine wire EMG to prevent aliasing. It is suggested to use an analog filter for this.

The High pass filter would be used with a 15 cutoff, due to the rapid hand movements to remove movement artifacts. It is suggested to use a 4th order Butterworth filter.

The notch filter is used at 60Hz to get rid of noise from power lines.

Working with RMS data

When working with the EMG signal, we want to work with the RMS data (root mean squared). In order to replicate this on the grass telefactor, the RMS function will have to be performed on the DSP.

An equation similar to this will have to be used.

[pic]

Exploration of Crosstalk

Shown in the following graph is data obtained of a person doing the A movement with electrodes on both the arm and thumb. 50K amplification was used was the forearm while 5k was used on the thumb.

[pic]

Figure 9: Crosstalk on Movement A

In the next graph is data obtained of a person doing the B movement with electrodes on both the arm and the thumb thenar muscle group. 50K amplification was used was the forearm while 5k was used on the thumb.

[pic]

Figure 10: Crosstalk on Movement B

With these two movements, there is minimal cross talk to be seen.

Control System

The control system along with the situation is properly modeled here. How the control system fits into the overall project architecture is shown in the block diagram below. The controller and the digital filter is both implemented in the DSP processor.

[pic]

Figure 11: System architecture under scrutiny

The control system was designed qualitatively by modeling the situation at hand. For instance, the situation is presented where a muscle is flexed from its initial rest position at point (a) in the figure below to the point (b) and returned back to its original rest position. The user’s motion does not have to be like this, however it represents the range of motion any muscle can have. The EMG data is recorded to process and develop the control system in a similar manner.

[pic]

Figure 12: The range of movement of muscle under scrutiny

The figure below shows how this can be shown through a graph. The points (a) and (b) from figure above is shown on the figure above. This graph can be seen as the input to the controller. The only exception is that 4 different muscles excerpt properties to a similar model. The 4 different muscles exhibit the same range of force. IT SHOULD BE NOTED THAT THESE GRAPHS ONLY MODEL THE SITUATION AND DOES NOT REFLECT ANY EMG DATA.

[pic]

Figure 13: Controller input model

For this project we have 4 different muscular inputs that translate to subsequent outputs that go through a wireless transmitter to the RC car. For instance how one input is related to the output is shown in figure below.

[pic]

Figure 3: Relationship of EMG input data to move left to the output on the RC car

It can be noted that the EMG data to move right works in a similar way, except the output will be taking into account the range in which the tires of the RC car turn right. However, the input-output relation to move forward and backward is slightly different. This is more clearly shown in figure below.

[pic]

Figure 3: Relationship of EMG input data to move forward to the output of the RC car.

Here, it can be seen that the input is tied to the velocity of the RC car to move forward. The same relationship is applied to move the car backward. This whole modeling idea is influenced from fuzzy logic modeling. However, the lack of overlapping membership functions, made fully fledged implementation of fuzzy logic unnecessary and impractical. However, concepts from fuzzy logic are used in this digital controller.

A much clear representation of this modeling is shown in figure below.

[pic]

Figure 3: The explicit modeling of the control system

Everything explained till now is shown in the figure above. How the force excerpted by the muscle should translate to the movement of the RC car is explained in the figure above. A further explanation of how this is done in the DSP processor is explained below.

DSP 537 Architecture

[pic]

Figure 3: BF537 Board Architecture

It can be seen from the figure above that the processor does not have an in-built ADC or DAC. The ADC/DAC is on the Development board.

General-Purpose I/O Modules

The processor supports 48 bidirectional or general-purpose I/O (GPIO) signals. These 48 GPIOs are managed by three different GPIO modules, which are functionally identical. One is associated with port F, one with port G, and one with port H. Every module controls 16 GPIOs available through the pins PF15–0, PG15–0, and PH15–0. Each GPIO can be individually configured as either an input or an output by using the GPIO direction registers (PORTxIO_DIR). When configured as output, the GPIO data registers (PORTFIO, PORTGIO, and PORTHIO) can be directly written to specify the state of the GPIOs.

The GPIO direction registers are read-write registers with each bit position corresponding to a particular GPIO. Logic 1 configures a GPIO as an output, driving the state contained in the GPIO data register if the peripheral function is not enabled by the function enable registers. Logic 0 configures a GPIO as an input.

Note when using the GPIO as an input, the corresponding bit should also be set in the GPIO input enable register. Otherwise, changes at the input pins will not be recognized by the processor. The GPIO input enable registers (PORTFIO_INEN, PORTGIO_INEN, and PORTHIO_INEN) are used to enable the input buffers on any GPIO that is being used as an input. Leaving the input buffer disabled eliminates the need for pull-ups and pull-downs when a particular PFx, PGx, or PHx pin is not used in the system. By default, the input buffers are disabled.

Once the input driver of a GPIO pin is enabled, the GPIO is not allowed to operate as an output anymore. Never enable the input driver (by setting PORTxIO_INEN bits) and the output driver (by setting PORTxIO_DIR bits) for the same GPIO. A write operation to any of the GPIO data registers sets the value of all GPIOs in this port that are configured as outputs. GPIOs configured as inputs ignore the written value. A read operation returns the state of the GPIOs defined as outputs and the sense of the inputs, based on the polarity and sensitivity settings, if their input buffers are enabled.

The GPIO pins on the processor are also hooked up to various switches on the board, which can be accessed only when the switches are turned OFF.

The figures below show the detailed review of the processor and its GPIOs. Here, four GPIOs are used as the input for the four EMG signals, before they are filtered. These four pins are pins 47, 48, 49, 50 on connector J2 this is connected to the PG ports 8-11. This is circled in figure 9, also the particular EMG input data is also labeled. All four of these pins are hooked up to the PG port on the processor as shown in figures 8 and 9.

[pic]

Figure 3: GPIOs in the BF537 processor

[pic]

Figure 3: J2 connector on the Development board

It is apparent from the functional diagram that there needs to be one GPIO for the wireless transmitter. This is PG13 which will be connected to the J2 connector.

CONTROL SYSTEM OPERATION

How the control system functions will be explained in detail in this section. At this point, it is assumed that the digital filter cleans out the raw EMG data. The filtered EMG data is fed to the controller; this is clearly shown in the figure below.

[pic]

Figure 3: Detailed operations diagram of the control system

The controller accepts the inputs and transmits 8 bits of data as the output through the wireless transmitter. The controller logic is pretty important in deciding the output and is briefly explained here. The truth table clearly shows the situations in which a particular output can be high.

|Left (i) |Right (i) |Forward(i) |Reverse(i) |Left(o) |Right(o) |Forward(o) |Reverse(o) |

|0 |0 |0 |0 |0 |0 |0 |0 |

|0 |0 |0 |1 |0 |0 |0 |1 |

|0 |0 |1 |0 |0 |0 |1 |0 |

|0 |0 |1 |1 |0 |0 |0 |0 |

|0 |1 |0 |0 |0 |1 |0 |0 |

|0 |1 |0 |1 |0 |1 |0 |1 |

|0 |1 |1 |0 |0 |1 |1 |0 |

|0 |1 |1 |1 |0 |1 |0 |0 |

|1 |0 |0 |0 |1 |0 |0 |0 |

|1 |0 |0 |1 |1 |0 |0 |1 |

|1 |0 |1 |0 |1 |0 |1 |0 |

|1 |0 |1 |1 |1 |0 |0 |0 |

|1 |1 |0 |0 |0 |0 |0 |0 |

|1 |1 |0 |1 |0 |0 |0 |1 |

|1 |1 |1 |0 |0 |0 |1 |0 |

|1 |1 |1 |1 |0 |0 |0 |0 |

Table 1: Truth Table for the input-output relation

The truth table can be summarized to the follow assumptions:

Left output is high when the Left input is high and when the Right input is low.

Right output is high when the Right input is high and when the Left input is Low.

Forward input is high when the Forward input is high and when the Reverse input is low.

Reverse input is high when the Reverse input is high and when the Forward input is low.

Depending on the inputs, the output that will go through the wireless transmitter is an 8 bit number. How the 8-bit data is allocated is shown in the figure below.

Figure 3: Bit allocation for the 8-bit output

From the above figure, it is apparent that there are 16 positions for forward/Reverse Directions and 16 positions for Left and Right Directions.

All of this information is integrated using the following pseudo code:

a= 4bits of information for right/left turn

b=4bits of information for forward/reverse direction

If (left amplitude > right amplitude)

Then (resulting left turn= (left – right) of a’s left magnitude)

If (right amplitude > left amplitude)

Then (resulting right turn = (right-left) of signed a’s magnitude)

If (right amplitude = left amplitude)

Then (a=0000)

If (forward amplitude > reverse amplitude)

Then (resulting forward magnitude = (forward – reverse) b magnitude)

If (reverse amplitude > forward amplitude)

Then (resulting reverse magnitude = (reverse – forward) signed b magnitude)

If (forward amplitude = reverse amplitude)

Then (b=0000)

This clearly means that each direction’s magnitude is divided into 8 divisions. Also, the control system is itself an open loop control system were the only feedback is the user’s eyes. Also it can be seen the user is the actual control system while the digital controller could be seen as a simple interface, since no major control algorithm is being used there.

PROCESSING REQUIREMENTS AND SPECIFICATIONS

For this project the Nyquist frequency is assumed to be around fN= 1kHz.

Thus:

fS ~ 10 fN = 10kHz

Therefore: BW = 10kHz

Thus the dynamic range for the Analog to Digital converter is from 1 kHz to 10 kHz. This results in a dynamic range of 23.52dB.

A total of 6 GPIOs are needed, 4 GPIOs for the 4 EMG channels, 1 GPIO as the output from the controller to wireless transmitter. Also 1 GPIO is needed for the audio feedback that was added in this project.

The 4 EMG input signals needs to be sampled simultaneously than serially. Although multiplexing 2 inputs such as forward and reverse as one along with right and left as another might workout.

This results in a resolution of 8 bits or higher. Thus the skew rate is .

The propagation delay for the GPIOs is assumed to be something less than the clock cycle on the DSP board.

Time frame for the DSP

Fidelity of the Signal is tested by conducting the dynamic and static tests. A good shape of the curve is anticipated before it’s generated from various tests. The possibility of getting an unwanted signal is limited.

The 8 bit output has a refresh rate with the maximum of 4800 baud rate. This translates to a maximum transfer of 150 transfers/sec. The normal human eye can perceive about 26 frames/sec. Any, transfer rate higher than that, will work in this case.

Design Review: Audio System

[pic]

Figure 3: Audio Capability Functional Diagram

Audio Analog-to-Digital Converter (ADC)

The ADC is AD1871 96 kHz analog-to-digital codec (ADC); it also has a DAC, which is AD1854 96 kHz digital-to-audio codec (DAC). It also has 1 input stereo jack and 1 output stereo jack. This should be enough for Audio evaluation processes. [pic]The AD1871 is a stereo audio ADC intended for digital audio applications requiring high performance analog-to-digital conversion. It features two 24-bit conversion channels each with programmable gain amplifier (PGA), multi-bit sigma-delta modulator and decimation filters. Each channel provides 97 dB of THD+N and 107 db of Dynamic Range making the AD1871 suitable for applications such as Digital Audio Recorders and Mixing Consoles. On the other hand, the AD1854 is a high performance, single-chip stereo, audio DAC delivering 113 dB Dynamic Range and 112 dB SNR (A-weighted—not muted) at 48 kHz sample rate. It is comprised of a multibit sigma-delta modulator with dither, continuous time analog filters and analog output drive circuitry. Other features include an on-chip stereo attenuator and mute, programmed through an SPI-compatible serial control port. The AD1854 is fully compatible with current DVD formats; including 96 kHz sample frequency and 24 bits. It is also backwards compatible by supporting 50 ms/15 ms digital de-emphasis intended for "redbook" 44.1 kHz sample frequency playback from compact discs.

The AD1854 has a very simple but very flexible serial data input port that allows for glue less interconnection to a variety of ADCs, DSP chips, AES/EBU receivers and sample rate converters. The AD1854 can be configured in left-justified, I 2 S, right-justified, or DSP serial port compatible modes. The AD1854 accepts serial audio data in MSB first, twos-complement format. A power-down mode is offered to minimize power consumption when the device is inactive. The AD1854 operates from a single 5 V power supply.

Design Review: Wireless Communication

[pic]

Figure 3: Wireless Functional Diagram

Wireless System

The wireless link between the DSP and RC car consists of a paired ASK transmitter module with an output of up to 8mW depending on power supply voltage and a receiver with a sensitivity of 3uV.

• Frequency: 434 MHz

• Range: 500 ft

• Max Data Throughput: 4800bps

• Transmitter Voltage Range: 2 – 12V

• Receiver Voltage Range: 4.5 – 5.5V

• Optional Antenna: 30-35cm of wire

• From development board: 5V

[pic]

Figure 3: Wireless Transmitter/Receiver Hardware

Design Review: RC Vehicle

[pic]

Figure 3: Robot Functional Diagram

The QFD as it relates to the RC Car.

|Category |

• Four PWM Channels

• Operating Voltage Range: 2.7 – 5.5V (@10MHz)

• Typical Power Consumption

o Active Mode

▪ 1MHz, 1.8V: 230uA

o Power-down Mode

▪ ................
................

In order to avoid copyright disputes, this page is only a partial summary.

Google Online Preview   Download