Sudden Impact Wearables Design Challenge
Smart Clothes project
1st of December, 2014 — 8th of May, 2015
First of all, I would like to thanks to element14 and the supporters (Analog Devices, Tektronix, Electrolube, Leeds University) for selecting me as one of finalist of the Sudden Impact Wearables Design Challenge, it is a great pleasure for me.
A few words about myself: I were a researcher at Chemical Research Institute in Hungary when I started the Design Challenge in December. At this time, I worked on a renewable energy project on the field of reverse electrodialysis. Briefly about the technology: if there is a difference in the salt concentrations (e.g. seawater and fresh water), the salinity gradient power is generated. Using the alternating anion and cation exchange membranes between the different salt solutions, the different chemical potential generates a voltage over each membrane. The total potential of the system is the sum of the potential differences over all membranes. My main task was controlling some processes and logging the parameters during the measurements with microcontroller. I was a supervisor of a Bachelor Thesis (related Arduino project) and I led a laboratory excercise for power optimization.
The cycling is my beloved outdoor activity so the basis of my project is bound to cycling. The project had three parts:
- measuring the health parameters during the activity,
- logging the trip parameters,
- design a visible system for the cyclist.
My scheduling of the challenge was the following:
- Learn about the theoretical background: I have showed the methods of measuring the biosignals and the applied devices.
- Design and optimization: choosed the parts that wanted to used and optimized the elements
- Construction: built and wrote the codes for the application.
- Testing: there were some preliminary tests during the work, but the final system testing was expected near the beginning of May.
- Evaluation: created a final review about my project with videos.
Good luck to all competitors and dear Reader, enjoy my description of The Challenge!
Now I'm going to write a short summary of the structure of the Smart Clothes Project (SCP). There is a word that will be the keyword of my project in the coming weeks (months):
H I T
What does it mean? This is the abbreviation of the main properties of SCP such as
Health parameters: the ECG, pulse, body temperature and the impact of the head during the downfall will be measured and logged. The factor of dehydration will be an optional feature if my time will allow me.
Illumination of the cyclist: the visibility is an important quality during the cycling, especially in case of poor visibility. On the clothes sensors will measure the ambient light, and a (Fuzzy) logic will decide about the dress illumination.
Travel parameters: measure the acceleration and determine the speed and the profile of road.
HIT is going to be a very useful accessory for the afternoon (slight) cycling and for the hard bike tour too. HIT is going to be a low cost and light-weight electronic device which is provided by battery. The cycling is an outdoor activity (in most cases), so the communication with computer and/or WiFi connection is not required (and not the best choice). After that, you might ask, what could be the ideal communication for SCP? I think that the wireless communication is desired, so I chose the Bluetooth communication with Smart Phone (and after the communication is possible through the Internet).
The following factors will be optimized during the design:
- cost (low as possible)
- weight (light as possible)
- physical durability (durable and reliable are the most important parameters)
At the end of January, the standard items were shipped for the Challengers. Unfortunately I had problem with the customs: the package waited 16 (yes, sixteen!) days at the Hungarian UPS Custom Department. Thank to Dr. DeFeo, this administration problem was solved. I was optimistic: I received the package even before the deadline of Design Challenge, it was pretty good so thank to Hungarian customs officers for the fast administration
Once I got the package and after I could finalize my "wish list". Fortunately, in this case there were not any administration problems with customs, and almost all products has arrived. I have electrodes for the ECG measurement, shirt for the smart clothes and a Bluetooth module for the wireless connection, so the designing and implementation can do in parallel.
This is a single-lead, heart rate monitor front end is based on AD8232 chip. The functional block diagram is seen below. The measured bioelectric signals are sensed via attached electrodes on the human body. This device can operate with 2 (left, right) or 3 (left, right and driven) electrodes. The two (L and R) electrodes connect to the instrumental amplifier (IA), which is consists of the listened parts:
- RFI filter,
- Well-matched transconductance amplifiers,
- DC blocking amplifier,
The operational amplifier (A1) is a general-purpose, rail-to-rail device for additional gain and low-pass filtering.
The right leg drive amplifier (A2) inverts the presented common-mode signal of input of IA. The injected current by the RLD output counteracts the common-mode voltage and improving the common-mode rejection of measuring system.
The midsupply reference buffer (A3) generates the virtual ground.
The leads of detection can be work in two modes:
DC: only works with three electrodes configuration. This indicates that which electrode has fallen off.
AC: can be used for two electrodes configuration. This marks only the fact of falling.
The fast restore function (FR) reduces the duration of otherwise long settling tails of the high-pass filters.
The AD8232 can be used for several applications, like heart rate measurement or cardiac monitor.
2. ADuCM350EBZ Evaluation Board Development Kit
This is an ARM Cortex-M3 based microprocessor with 16 MHz clock speed. It has got 32 KB of SRAM, 16 KB of flash and 384 KB of embedded flash memory. It has 12-bit DAC and 16-bit ADC with 160 kSPS. It is designed for capabilities of amperometric, voltametric and impedometric measurement. There are three way to supply the board: via USB port, CR2032 battery or external supply (2,5-3,6 V).
The Development Kit contains the following items:
- main (mother) board
- J-Link emulator (USB-SWD/UART)
- AFE board
- Break out board
- GPIO test header board
3. ADT7320FBZ Flexi Board Evaluation Kit
This is a high accuracy (max. ± 0,25 C) digital temperature sensor. It has 16-bit sigma-delta ADC, the available temperature resolution is 0,0078 ºC. The default resolution is set to 13-bit (0,0625 ºC). The communication is done via SPI with low power consumption (700 μW typically).
4. Based on the ADXL362 chip, the following items are provided:
a. EVAL-ADXL362Z: It is a 3-axis digital accelerometer board with different, ± 2g, ± 4g and ± 8 g of measurement ranges. It operates in two modes: the first is the measurement mode with less then 3 μA and data rate between 12,5 and 400 Hz, the others is the wake up mode with 270 nA consumption. The output has 12-bit resolution via SPI protocol.
b. EVAL-ADXL362Z-MLP: It is a complete system for real-time evaluation of the accelerometer. It has a graphical user interface (GUI) to evaluate the parameters, for example power consumption, temperature coefficient and noise. The system consists of a motherboard and a satellite board.
5. Based on the ADXL375 chip, the following items are provided:
a. EVAL-ADXL375Z: It is a 3-axis digital accelerometer board ± 200 g of measurement ranges. This board is ideal for shock detection with high range of survival (10 000 g). The output has 16-bit two complement data via SPI (3- or 4-wire) or I2C protocol.
b. EVAL-ADXL375Z-M: It is a evaluation system of 3-axis digital accelerometer with high resolution (13-bit) measurement up ± 200 g. The system consists of main board and a satellite board.
It is a 3-axis, analog accelerometer with ± 200 g of measurement range. The analog outputs of ADXL362/375/377Z are ratiometric: that means that 0 g measurement output is always at half of the 3,3 V output (1.65 V), negative lower limit is at 0 V and positive higher limit is at 3,3 V with full scaling in between. The board is ideal for shock detection with high range of survival (10 000 g), therefore it is the basis of head impact monitor section.
7. Tektronix TBS 1202B-EDU
The provided oscilloscope is a digital model with 7'' WVGA TFT color display, 200 MHz bandwidth and 2 GS/s sample rate on 2 channels. It has a Courseware feature that is ideal for the teaching (this feature not been used during the design). The UK type plugin cable was included, nevertheless it was not problem, because a needed European cable was available at home.
8. UR5041 and UR5562 resins
The polyurethane resins were provided by Electrolube.
Compared to the other Arduino boards, the Arduino Micro was the best choice for the smart clothes. It is based on the 8-bit ATmega32u4 microcontroller with 16 MHz clock speed. It has 12 analog inputs and 20 digital input/output pins of which 7 can be used for pulse-width modulation (PWM) outputs. After the filtering, the PWM output can be operated as analog output. The amount of available memory is 32 KB. It is a well-equipped devices with tiny size: 17,8·48,3mm. Comparing the size of SD card logger to Arduino Micro, I used the SD card instead of the SD card logger board.
Because of the sustainable development and green aspects I decided to use rechargeable batteries for the power supply. Types of AA and PP3 were used.
The Ag/AgCl electrodes with foam tape has been selected for the ECG measurement.
The IRLD014PBF N-channel MOSFET (metal-oxide-semiconductor field-effect transistor) works as a switch device on the smart clothe. It has low on resistance (only 0,2 Ω), ideal Rds_on voltage (5 V) and low threshold voltage (2 V). The case style is DIP which is suitable for the prototype building.
The light emitting diodes (LEDs) are based of the active lighting system. The features of the applied items are varying luminous intensity (1-23,5 cd), almost the same forward voltage (1,85-2,1 V) and identical forward current (20 mA).
To detect the ambient light to change, the light dependent resistors (LDRs) has been selected. The resistance are between 5 kΩ and 20 MΩ.
JY-MCU Bluetooth module are the selected device for the wireless communication between the developed system and smart phone.
The Electrocardiography (ECG)
The contraction and relaxation of the heart muscle are controlled by the self-forming and impulse conduction system located in the heart, which is related to the central nervous system through external innervation.
The cardiac muscle stimulating electrical pulses start from the right atrium wall of sine knot, and getting the atrioventricular bundle through the atrial muscle wall, which is situated in the lower part of the right atrium, directly above the chamber. The atrioventricular bundle starts the atrioventricular knot starts and forks passing along both sides of the fence separating chambers. The impulse reaches to the muscle fibers through the end branches. In this way the electrical impulses of the heart muscle of the total passes through, depolarizing the cells. The repolarization also takes place exactly as specified.
It follows from the above, it described the current that flows around the heart muscle, which can be interpreted as a vector, it's magnitude and direction is constantly changing. So a measured ECG only shows the value of this vector projection of its share. The ECG curve built up by in different areas of the heart's electrical activity.
The electrical activity of the heart can be measured on the body surface thanks to the good conductivity of the human tissue. Sometimes they used to characterize the three planes: frontal, sagittal and transverse.
From these measurements to the frontal plane is the simplest. To do this the Einthoven's simplify conditions under must be used. According to which the heart's electrical activity at any moment can be described with only dipole; the leads of limb (right hand, left hand, left foot) correspond to the vertices of a regular triangle; between the heart and limb the homogeneous conductivity of tissue is located. One of the three conditions is not met, however, the distorting effect is low, compared to the simplifying assumptions can be easily adopted to standardize the measurement. Thus, sufficient to the electrodes placed on both hands and the left leg.
For the transverse plane of the measurement, the electrodes are placed on the front and on the side of the chest. They already want to attach more practice. Sagittal plane is much more circumstantial to place electrodes. The sensors are conveyed through the esophagus behind the heart. Due to the unpleasant process of what it was rarely used procedure.
The following devices are needed for the ECG measurement:
- AD8232-EVALZ board,
- 3 pieces of gel ECG electrodes,
- 3 pieces of ECG adapters,
- 3 pieces of jack plugs,
- flexible material for the chest strap,
Several options have been for the electrode placement. The one of point is the left and right arm, but I rejected this case, because the distance from the heart is greater than the in other options. Receiving of bioelectric signal is better, if measured on the torso and does not require complicated signal filter compare with the case of arm. The second of point is the chest, what seems obvious at best choice: close to the heart. Nevertheless the motion during the cycling, the pectoral muscle is used and generated muscle-type noises. The ECG electrodes are connected on the the meeting point of breastbone line and underarm bend line, which is a less busy area of the human body during cycling.
The made of flexible material chest strap is better than the (fix) *** belt, because it follows the upper body movement during the respiration which is not a negligible aspect during sports activities In addition, the electrode adapter provides good and safe connection between the electrode and wire (via jack plug).
My preliminary investigations show that the 3-wire measurement (L-R-RLD) is better then the 2-wire measurement (L-R). This is the reason that the RLD input of AD8232-EVALZ board is used and less noisy signal is obtained. The Fast Restore option is enabled, the leads off detection operates in DC mode and the LOD+ and LOD- outputs can indicate which electrode falling off.
The next (important) step is to select the processing unit. My first thought was the EFM32 Zero Gecko with JY-MCU Bluetooth module. I also started to work with them, but I realized that it would be just a redundant arrangement. On the one hand, at least one Arduino input remained not used, so it has become free for the ECG signal. On the other hand, the UART communication has not been used in Arduino, so it has become free for the Bluetooth communication. Not a negligible aspect is that the system is simplified and not exposed to bigger external injury on the bicycle frame, because the storage box is smaller.
The next two pictures is showing a typical ECG signal. The only difference is the sampling time: 1 ms and 20 ms. Seen that the chamfer line fast enough. This is important because the pulse measurement is based on the cycle length.
In both cases, indicated by yellow background if the measured voltage of output of AD8232-EVALZ is lower than 1,6 V. 16 vs 1 - hmmmm...
The method of pulse measurement is the following:
1. Measure the ECG signal (blue line).
2. Predefine the threshold voltage (gray line).
3. If the measured signal is lower than the threshold voltage, the T_down is counted.
4. If the measured signal is higher than the threshold voltage, the T_up is counted.
Using the simplification that
a) the signal of under the limit is symmetrical and
b) the minimum point is where T_down/2 and
c) all shape is similar T_down1 = T_down2 = T_down.
5. The cycle time is: T_down/2 + T_up + T_down/2 = T_down + T_up.
Intelligent lighing system
The bicycle accidents and injuries have number of reasons: for example the lack of protective equipment; inappropriate speed for the road conditions; abuse of alcohol and drug; and - unfortunately - the inadequate visibility.
The main feature of my project is the Fuzzy logic based visibility system. What is the Fuzzy logic? In contrast to the binary (yes-no) logic, there is not sharp boundaries in the Fuzzy logic. A typical fuzzy sets shown below:
There is a variable (e.g. temperature, deflection, illumination, etc.) and several (here three) sets. Each input case has a probability the extent to which a member of the set. For example, if the input is -50, it means that the input belongs to 76,5% of X feature and 23,5% of Y feature. In any case, the sum of the probability is exactly 100%.
In the case of designed system, the variable is the resistance of LDRs (~illumination), and there are 3 features: light, transition and dark. The output is set by experimental measurements.
The reaction time depends on two factors, as shown in the table below:
The table shows that how much time (millisec) is needed to the system be activated within given speed and given distance. This can be interesting if we go into a dark tunnel.
The lighing system consists of two parts, an active and a passive part. The active part consists of network of LEDs, which are driven by battery via PWM controlled MOSFET. The passive part consists of very well quality reflective strips.
Ha láthatósági terméket szeretnétek vásárolni, akkor lehetőségeitek szerint válasszátok a hazait:
www.fényvisszaverő.hu (igen, ékezettel!)
Illetve akinek fontos a közlekedésbiztonság kérdése:
„Mindenki hazaérjen” Közlekedésbiztonsági Alapítvány
www.mindenkihazaérjen.hu (igen, ékezettel!)
The durability is an important consideration, therefore the proposed system has the following structure:
The power supply is implemented by rechargeable battery and power bank via USB. Battery charging using solar cells is under investigation.
Future opportunities of development and Acknowledgement
My project is finished, but already I have ideas for the future development. The most obvious option for development is the smart phone app. The system will vastly "smarter" to using the ICTs: tracking, real time control by the coaches, emergency operation, database of records etc. The cost and size of additional circuits can be reduced by SMD technology. The total cost can be reduced and profitable by using high-volume production. It may be necessary the waterproof material of clothes. The further development and fine-tuning of fuzzy logic may be necessary and testing with large number of participants. The measurement of ECG can be extended by multi-channel board and using the real-time spectrum analysis for forecast heart problems.
I am thankful to the organizer element14 and the supporters such as Analog Devices, Tektronix, Electrolube, and Leeds University. I am also grateful to Róbert Lőrincz (www.fényvisszaverő.hu and 'Mindenki Hazaérjen' Közlekedésbiztonsági Alapítvány / 'Everybody Arrive Home Safely' Foundation for Traffic Safety) for providing very good quality reflective strips.
Finally, thank you to dear Reader your attention.