//Logo Image
Author: Che-Chang Yang (2006-08-27); recommended: Yeh-Liang Hsu (2006-09-01).
Note: This article is Chapter 4 of Che-Chang Yang’s Master thesis “Development of a Portable System for Physical Activity Assessment in a Home Environment.”

Chapter 4. Design of the wearable data acquisition unit

This chapter describes the instrumentation design of the wearable data acquisition unit (DAU) and the receiver module for the DDS.

4.1     Wearable data acquisition unit

The wearable data acquisition unit (DAU) has three major functions: Data acquisition, data calculation and wireless data transmission. This device collects accelerations produced by human physical motions and simultaneously identifies possible posture or postural transition with embedded algorithms. Identified events are then wirelessly transmitted to a receiver module installed in local DDS.

4.1.1 Schematic design

The physical configuration of the wearable DAU should be small in package while providing sufficient abilities in calculation and memory. Figure 4.1 shows the functional framework of the DAU. Detailed schematics are shown in Figure 4.2 to Figure 4.5.

Due to the fact that the signal level and precision of A/D conversion in the PIC microcontroller as well as the Voff level of the accelerometer output both change with the Vdd voltage. Therefore, it is imperative to provide a stable and constant voltage (Vdd) supply by using power regulation for precise signal calculation. A voltage regulator (LM3940) which accepts DC +4.5V to +9V input power from batteries provides the PIC microcontroller and the accelerometer with regulated and stable DC +3.3V power supply.

Figure 4.1 Block diagram of the wearable DAU

The accelerometer module based on Kionix KXM52-1050 tri-axial accelerometer introduced in Chapter 2 is used on this device. The DAU only provides the connector for this external accelerometer module. The PS (power shutdown) pin of the KXM52-1050 is set to normally activated. This means the accelerometer will not be in stand-by mode. It should also be noted that the ST (self test) function is disabled in this device. Three discrete analog signals from the accelerometer outputs are connected to the microcontroller for A/D conversion.

The microcontroller identical to that in the DDS (PIC18F6722, Microchip) is selected due to the advantages of low operating voltage range (2.0V to 5.5V), small SMD package (12mm×12mm×1.1mm) and large capacity of program memory (up to 128kB). This device can be programmed using ICP or MPLAB ICD2 through J3 and J2 connectors, respectively (Figure 4.5). J2 is in fact a serial RS-232 connector for data communication. Consequently, the user is able to receive text information outputs from DAU through this interface using a PC. Figure 4.2 shows the schematic of the PIC18F6722 microcontroller. The LED (D2) is used to indicate the system status.

Three buttons (switches) are used in this device (Figure 4.4). Switch S1 is the reset button and can be used to enter ICP mode when combined with the S2 ICP button. S3 is the self test button. When S3 is pressed, the device will output a randomized serial code which stands for a posture event. This function is to check the wireless connection between the transmitter (wearable DAU) and receiver (DDS). An optional external beeper can be connected to the LS1 connector to prompt a beeping sound which follows each recognized posture (event). This may help users to check or calibrate this system. Note that S2 and S3 are normally disabled. They can be in use when connected to external bottoms or switches.

Figure 4.2 Schematic of the wearable DAU (microcontroller)

A remote control encoder (PT2262, Princeton Technology) and a transmitter module (TWS-CS-2, Wenshing Electronics Co., LTD) are used for wireless data transmission. PT2262 encodes data and address pins into a serial coded waveform suitable for RF and IR modulation. TWS-CS-2 is a wireless RF transmitter through 433.92MHz frequency band. If any posture status or transition is recognized after calculation in the stage of the microcontroller, a serial code which includes the address ID of the source and the data to be delivered is generated by the microcontroller.

Figure 4.3 shows the schematic of the RF transmission device. Six pins (D0 to D5) of PT2262 which connect to digital RB ports of PIC18F6722 are assigned for 6-bit serial code, which includes 4 bits for data and the remaining 2 bits for address. By adjusting the output level of the RBx pins, there are up to 64 codes available for data and address encoding. The RB7 pin is for transmission enabling. If the level of RB7 is low (pulled down to GND), the PT2262 will encode the data and address according to each Dx status. The encoded signal is sent to the TWS-CS-2 transmitter immediately. The detailed I/O pin assignment of the DAU is listed in Table 4.1.

Figure 4.3 Schematic of the wearable DAU (RF transmission)

Figure 4.4 Schematic of the wearable DAU (bottoms and power supply)

Figure 4.5 Schematic of the wearable DAU (connectors)

Table 4.1 I/O pin assignment of PIC18F6722 microcontroller

Pin

Descriptions

Target

RB7

TE; MPLAB ICD2

PT2262

RB0

D0

RB1

D1

RB2

D2

RB4

D3

RB5

D4

RB6

D5; MPLAB ICD2

RA0

BAT check

Batteries

RA1

X axis

Kionix KXM52-1050

RA2

Y axis

RA3

Z axis

RC6

TX

Serial RS-232

RC7

RX

MCLR

System RESET

 

RA4

ICP; system indicator

 

4.1.2 PCB layout and physical package

Figure 4.6 shows the physical package of the DAU. The size of the DAU is 100mm×60mm×25mm (excluding the battery cartridge), and 140g in total weight. Figure 4.7 shows part layout on the PCB. The antenna is hidden inside the case. A beeper can be optionally connected to the board for self-test or calibration. As shown in Figure 4.8, the wearable DAU is designed to be attached to the front-right side at waist by clipping or mounting onto the belt of pants or skirt. The case in black is a battery cartridge with 3×AAA alkaline batteries which provides 4.5V power for the DAU. The DAU accepts power voltage from 3.5V to up 6V. Power voltage less than 3.5V will cause the voltage regulator to shutdown. Moreover, data transmission must be in the same frequency band. Figure 4.9 shows the relation between oscillation frequency and voltage for the decoder (PT2262) and encoder (PT2272). For both the encoder in the transmitter module and the decoder in the receiver module, the oscillating frequency (OSC) increases with increasing power voltage. Due to the fact that the receiver module uses 5V power from the DDS which corresponds to about 8 kHz oscillating frequency, the power for DAU should be within 6V for correct data delivering.

Figure 4.6 Physical DAU package

Figure 4.7PCB structure of the wearable DAU

Figure 4.8 Attachment of the wearable DAU (connectors)

Figure 4.9 OSC frequencies vs. voltages for encoder (PT2262) and decoder (PT2272)

4.2     Receiver module for DDS

The receiver module is a DDS-based device that receives real-time data transmitted from the transmitter in the DAU. This module can be connected to the DDS through sockets CN4, CN5 andCN6. Figure 4.10 shows the schematic design of the receiver module which primarily consists of two parts: Decoder and receiver. The decoder (PT2272, Princeton Tech. Corp.) pairs with the encoder PT2262 for RF wireless transmission. It decodes data obtained from the receiver (RWS-530-1, Wenshing Electronics Co., Ltd.) to binary series (address + data) identical to what is encoded in the PT2262 encoder. In this design, 6 data pins (D0 to D5) are used for data registration, and 6 LEDs are used to indicate the state of each data pin (on: 1, off: 0). The VT pin of the decoder is a decoding indicator. The pin assignment of data pins (D0 to D5) and the VT pin coupled to DDS are in the order: B6, B7, B2, B1, B4, G0 and B5. Data decoding is completed when the VT pin is pulled up at high state level, the DDS retrieves the data by reading the states of D0 to D5 of the decoder. On the contrary, the DDS will not read the states of the pins when the VT pin is pulled down to GND, which means that there is no data received by the receiver.  

Figure 4.11 shows the lab prototype of the receiver module, and Figure 4.12 shows the receiver module installed on the DDS.

Figure 4.10 Schematic of the receiver module

Figure 4.11 The receiver module

Figure 4.12 The receiver module installed on the DDS

4.3    Preliminary functional test

For portable electronic devices, power consumption is a major performance factor. The current consumption of the DAU is 45mA (at 4.5V battery power input) when the RF transmission is not enabled. When the RF transmitter is enabled, the current consumed may increase up to 50mA. With 4.5V alkaline batteries (3×AAA), the DAU lasts about 42 to 45 hours in continuous use. Among all components on the DAU, the voltage regulator (LM3940) consumes the most current. However, this component is necessary and cannot be removed from the DAU.

Another important performance factor of the DAU is the stability of wireless data transmission. The maximum effective transmission distance is 48m, which is measured in outdoor space without any barriers between the DAU and the receiver module on the DDS. Table 4.2 lists the results of a series of tests for transmission stability in different distances in an indoor space where barriers such as partitions, walls, doors, windows and furniture were present. In each test, the DAU transmitted data every 3 seconds for 500 times, and each transmission enabling time is set at 800ms. The percentages of data successfully received by the receiver module on the DDS were recorded. The results show good stability of wireless data transmission in short transmission distance in indoor space.

Table 4.2 Reception percentage of wireless data transmission in different distances

Distance (m)

Reception percentage (%)

<5

100.0

5~10

99.6

10~15

99.6

15~20

99.6

20~25

99.2

25~30

97.2

30~35

92.8