Design of clothing pressure detection system based on AVR microcontroller

Publisher:月光男孩Latest update time:2010-09-29 Source: 现代电子技术Keywords:AVR Reading articles on mobile phones Scan QR code
Read articles on your mobile phone anytime, anywhere

O Introduction

Clothing is an important part of people's lives. In addition to appearance factors such as style, color, and gloss, comfort is also an important part of clothing functionality. The so-called clothing comfort refers to the performance of clothing that meets the requirements of the human body and eliminates any uncomfortable factors after the human body is dressed. Clothing pressure can be divided into two types: vertical pressure formed by the weight of the clothing itself and restraint pressure caused by the clothing tightly wrapped around the body.

Traditional clothing pressure comfort test methods mainly include: fluid pressure method, resistance method, and plaster method. Among them, the method of using a fluid mercury pressure gauge or a hydraulic press to measure clothing pressure is simple and direct, but the accuracy is low, especially dynamic measurement is quite difficult; the resistance measurement method is to insert a resistance strain gauge sensor into the clothing, and the strain gauge is deformed due to clothing pressure, resulting in a change in resistance value, thereby converting the pressure change into a changing voltage signal, and the clothing pressure test result is obtained by measuring the changing voltage value. This method has high test accuracy and stable results, but it is easily affected by external conditions, and it is difficult to measure clothing pressure dynamically; the plaster method is mainly realized through model detection. This method can measure the natural pressure value close to that when wearing clothes, but it cannot perform clothing pressure tests during continuous movements, and the plaster model is difficult to make. The above various test methods are limited by time and space, and it is difficult to adapt to the needs of different test conditions, and the accuracy of the test data is not high, and there is no data storage function.

In view of the defects of traditional testing methods, this system uses AVR low-power, high-performance single-chip microcomputer as the core CPU, selects the new Flexiforce sensor developed by Tekscan Company of the United States to measure clothing pressure, and designs it into a portable clothing pressure testing system that can perform dynamic and static measurements and has data storage functions.

1 System composition

The functional modules of this system mainly include: parameter detection module, data display module, storage module, real-time clock module, PC communication module and control module. The clothing pressure detection adopts a multi-point test method, that is, multiple pressure sensors are connected to the test module. After each sensor completes a data test, its data is sent to the core CPU, and then the main chip performs calculations on the data, and stores the data in the memory according to certain rules, and displays the data on the LCD screen in real time. After the test is completed, the data in the memory can be read into the PC through the serial port for analysis and storage. The control module mainly completes the setting of system functions. The system structure is shown in Figure 1.

22a.jpg



2 Functional module design

2.1 Microprocessor

The microprocessor of this system adopts ATmegal6L from the AVR series of high-performance and low-power microcontrollers, which integrates timers, ADC, on-chip clock, USART, SPI, TWI, and 21 interrupt sources. The power consumption of ATmegal6L at 1 MHz, 3V, and 25℃ is 1.1 mA in normal mode, 0.35 mA in idle mode, and less than μA in power-down mode. The AVR microcontroller adopts a large fast access register group, a fast monotonic instruction system, and a single-stage pipeline technology, which enables its processing speed to reach 1 MIPS/MHz. The internal programmable FLASH is 16 KB, and the number of erase and write times can reach 10,000 times. AVR integrates 8-channel 10-bit successive approximation ADC. The ADC is connected to an 8-channel analog multiplexer and can
sample 8 single-ended input voltages from port A. The device also supports 16 differential voltage input combinations and has programmable gain stage control function. Its powerful data processing capability and highly integrated core fully meet the design requirements of the system.

2.2 Clothing pressure detection module

This system uses the new Flexiforce sensor developed by Tekscan in the United States to measure clothing pressure. Compared with the sensors used in traditional clothing pressure testing systems, the Flexiforce sensor is as thin as paper and has strong flexibility. It can measure the pressure between almost all contact surfaces. It has better characteristics in terms of linearity, hysteresis, drift and temperature sensitivity. According to the clothing pressure value to be measured, the Flexiforce A201 pressure sensor with a pressure range of 0 to 1 lb (4.4 N) is selected. The Flexiforce A201 pressure sensor consists of two layers of film, each of which is covered with a silver conductor and coated with a layer of special pressure-sensitive semiconductor material. The two films are pressed together to form a sensor. The silver conductor extends from the sensing point to the connection end of the sensor. The sensor point of Flexiforce A201 acts as a resistor in the circuit. When an external force acts on the sensing point, the resistance of the sensor point changes proportionally with the external force. When the sensor is not subjected to force, the resistance of the sensing point is the largest. The greater the pressure, the smaller the resistance of the sensing point.

22b.jpg

The output signal of the pressure sensor is in the millivolt level, and the detected signal needs to be amplified before it can be input to the CPU port. The amplifier circuit of the Flexiforce sensor is shown in Figure 2, RF=R1+RF1, Vout=-V0(RF+RS1). Among them, RF1 is a variable resistor, and its resistance change corresponds to the change of the external force applied to the sensor. This circuit uses the MC34071 amplifier. The sensor passes through the amplifier, and the output voltage value is Vout. After the corresponding relationship between the calibrated pressure and voltage, the measured clothing pressure value can be obtained.

This system uses 8 Flexiforce A201 pressure sensors, which are directly connected to the PA port of ATmega16L in parallel.

2.3 Data storage module

The system designs a data storage module. Since the space occupied by the system for storing data is not very large, the memory uses the AT24C256 chip produced by Atmel, which is a 256 KB data storage device and uses the I2C bus communication method to exchange data with the main CPU.

In order to facilitate better reading of data after testing, a certain storage mode is used to save the data in AT24C256. Therefore, when designing the software, the data transmission protocol is adopted: first transmit the detection channel number, then transmit the test time, and finally transmit the pressure value. The specific transmission format is shown in Figure 3.

22c.jpg


The ATmegal6L microcontroller has an I2C communication module integrated inside. Its external port is multiplexed with the PC0 and PC1 ports. When using this port, you only need to connect a pull-up resistor to each of the two transmission buses. The I2C communication chip can be directly connected to this port.

2.4 Display module

This system uses SMGl2864 liquid crystal, which is small in size, light in weight, low in power consumption, and high in display quality. It can display 4 channels of collected data at the same time, and a circular display method can be used for 8 channels of data. The displayed data are channel number and pressure data. If the display data is not needed, the function key can be used to turn off the display.

The connection between SMG12864 LCD and ATmegal6L is very simple. The data port is directly connected to the PD port, and the function control terminal is connected to the PB port.

2.5 Serial port module, real-time clock module and function module

The serial port module mainly realizes the communication between the PC and the detection system. The PC can read the data in AT24C256 through the serial port. The system uses the MAX232 serial port communication conversion chip of Maxim.

This system uses the DS1302 real-time clock chip launched by the American DALLAS company. It uses a three-wire serial interface and integrates a programmable calendar clock and 31 bytes of static RAM. The DS1302 clock can automatically compensate for leap years. The DS1302 chip itself also has the function of trickle charging the backup battery, which can effectively extend the service life of the backup battery.

The DS1302 is powered by the system power supply when the system is working normally, and by a dedicated button battery when the system is not working.

The system sets 3 function keys to complete the system time configuration and auxiliary function selection. These auxiliary functions are mainly: one function key is used to display only the time when the system does not need to detect the comfort pressure of clothing. At this time, it can be used as a real-time clock. When a pressure test experiment is required, press this function key to enter the system pressure detection mode.

After the system starts, the whole system is initialized first, and then the function key is tested. If the function key is pressed, the system starts the A/D conversion and stores the detected data in a certain data format in AT24C256. At the same time, the detected data is displayed on the SMG12864 LCD screen in a loop. After the data test is completed, if there is no pressure data detection, the A/D conversion module is turned off, and the data storage port is closed, so the system enters the dormant state.

3 Implementation of pressure comfort detection algorithm

The collected data from the pressure sensor must be processed to obtain a specific and readable clothing comfort pressure value. First, the clothing pressure sensor converts the collected pressure value into an analog voltage value, then converts it into a standard voltage value through A/D, and after the MCU calculates the data, it converts it into a clothing comfort pressure value.

The specific algorithm is as follows:

The actual voltage value calculation formula of ATmegal6L A/D conversion is:
22d.jpg
Where: ADC is the result value corresponding to the A/D conversion of the analog voltage value output by the pressure sensor; Vin is the analog voltage value output by the pressure sensor; VREF is the A/D conversion reference voltage value. In order to improve the accuracy, the internal A/D conversion reference voltage of ATmegal6L is selected as 2.56V.

Take G as the actual voltage value obtained by standard A/D conversion after loading the pressure sensor with a 100g weight, then:
22e.jpg
Where: F is the clothing pressure, unit: g.

4 Test experiment

After the design of this system is completed, its stability and reliability are tested by testing the change of pressure at a point on the shoulder of the human body after wearing the clothes. The test curve is shown in Figure 4: the pressure change is relatively stable after the initial wearing of the clothes (0~12min); the clothing pressure also changes with time after the arm movement (12~18 min); the pressure value returns to the initial value when the arm stops moving (18~23 min).

22f.jpg



5 Conclusion

The experimental results show that the clothing pressure detection system can correctly test the clothing comfort pressure value. It is easy to use, powerful and has excellent performance. It is an ideal platform for clothing testing. It solves the difficulty of not being able to measure dynamic clothing pressure in traditional clothing pressure testing, and has data storage function. The device is small and can be carried around; it has low power consumption and is battery-powered. It can provide a reliable data foundation and basis for improving clothing pressure comfort in the future. Through objective measurement and research of pressure, it will contribute to the development of digital clothing pressure comfort research.

Keywords:AVR Reference address:Design of clothing pressure detection system based on AVR microcontroller

Previous article:Design of ISP1362OTG based on AVR microcontroller
Next article:Design of data acquisition system for laser scanning car body coordinate measurement

Recommended ReadingLatest update time:2024-11-16 16:39

AVR single chip microcomputer control design of mining robot
introduction The emergence of excavators has freed humans from heavy physical labor. However, traditional excavators are complex to operate and require high skills from the operator. People have been seeking a more labor-saving, more efficient and more precise excavation operation mode. With the further development of
[Microcontroller]
AVR single chip microcomputer control design of mining robot
AVR MCU Tutorial - Digital IO Registers
In the first two tutorials, we learned the basic principles of LED, button, switch, the use of digital input and output and the relationship between them. We used the three functions of pin_mode, pin_read and pin_write, which are actually only one step away from the bottom layer (at least the bottom layer that the mic
[Microcontroller]
ATtiny13 Core Introduction
This section discusses the structure of the ATtiny13 AVR core in general. The main task of the CPU is to ensure the correct execution of the program. Therefore, it must be able to access memory, perform calculations, control peripherals, and handle interrupts. (Click on the image to enlarge) Figure 3. Block diagram
[Microcontroller]
ATtiny13 Core Introduction
Development of three-phase thyristor trigger circuit based on AVR microcontroller
0 Introduction The trigger circuit used for thyristor three-phase fully controlled bridge rectifier device, if only from the phase control mode of trigger signal, has only two types: multi-channel phase control and single-channel phase control. The typical circuit of the former is sawtooth wave phase shift trigger c
[Microcontroller]
Development of three-phase thyristor trigger circuit based on AVR microcontroller
Design of ISP1362OTG based on AVR microcontroller
0 Introduction     With the popularity of consumer products such as PDAs, mobile phones, digital cameras, printers, etc., the high-speed data transmission technology used for these devices and computers, or between devices, has attracted more and more attention. In the past, the data transmission structure with comput
[Microcontroller]
Design of ISP1362OTG based on AVR microcontroller
AVR MCU Keyboard Programming
#i nclude《90s8515.h》 #define uchar unsigned char #asm equ __LCD_port=0x18 ;PORTB #endasm #i nclude #i nclude /************Key function description: 0--9 are number keys********/ #define cEnter 16 //Confirm key #define cFuntion 15 //Function menu key #define cDown 14 //Up and down selection keys #define cUp 13 #define
[Microcontroller]
AVR MCU Keyboard Programming
Treat the symptoms and root causes, and completely solve the problem of AVR microcontroller EEPROM data loss
Compilation environment: WinAVR-20060421 + AVR Studio 4.12.498 Service Pack 4      Basic idea: Each data written to EEPROM is backed up three times, and each backup data is verified by CRC16. As long as an error occurs during system operation and EEPROM data is modified by mistake,            Then, based on the
[Microcontroller]
Electrolyte Analyzer Based on AVR Microprocessor XMEGA128 Single Chip Computer
Here we propose a portable electrolyte analyzer powered by a battery, which is designed with the high-performance XMEGA128 microcontroller launched by ATMEL as the core device and can meet the needs of field use. 1 Introduction to XMEGA XMEGA is a powerful performance upgrade of the 8-bit AVR microprocesso
[Analog Electronics]
Electrolyte Analyzer Based on AVR Microprocessor XMEGA128 Single Chip Computer
Latest Microcontroller Articles
  • Download from the Internet--ARM Getting Started Notes
    A brief introduction: From today on, the ARM notebook of the rookie is open, and it can be regarded as a place to store these notes. Why publish it? Maybe you are interested in it. In fact, the reason for these notes is ...
  • Learn ARM development(22)
    Turning off and on interrupts Interrupts are an efficient dialogue mechanism, but sometimes you don't want to interrupt the program while it is running. For example, when you are printing something, the program suddenly interrupts and another ...
  • Learn ARM development(21)
    First, declare the task pointer, because it will be used later. Task pointer volatile TASK_TCB* volatile g_pCurrentTask = NULL;volatile TASK_TCB* vol ...
  • Learn ARM development(20)
    With the previous Tick interrupt, the basic task switching conditions are ready. However, this "easterly" is also difficult to understand. Only through continuous practice can we understand it. ...
  • Learn ARM development(19)
    After many days of hard work, I finally got the interrupt working. But in order to allow RTOS to use timer interrupts, what kind of interrupts can be implemented in S3C44B0? There are two methods in S3C44B0. ...
  • Learn ARM development(14)
  • Learn ARM development(15)
  • Learn ARM development(16)
  • Learn ARM development(17)
Change More Related Popular Components

EEWorld
subscription
account

EEWorld
service
account

Automotive
development
circle

About Us Customer Service Contact Information Datasheet Sitemap LatestNews


Room 1530, 15th Floor, Building B, No.18 Zhongguancun Street, Haidian District, Beijing, Postal Code: 100190 China Telephone: 008610 8235 0740

Copyright © 2005-2024 EEWORLD.com.cn, Inc. All rights reserved 京ICP证060456号 京ICP备10001474号-1 电信业务审批[2006]字第258号函 京公网安备 11010802033920号