Design of electronic brush based on ARM and acceleration sensor

Publisher:MysticSerenadeLatest update time:2011-07-06 Keywords:ARM Reading articles on mobile phones Scan QR code
Read articles on your mobile phone anytime, anywhere

With the popularization of computers, electronic pens have developed rapidly as a new human-computer interaction tool. In China, Hanwang has always been in a leading position in handwriting recognition and has led the development of domestic electronic pens. Foreign countries have associated handwriting with office software and established the concept of digital ink. In June 2001, Ericsson announced the launch of the world's first digital pen - Chat2penCHA-30. This product makes full use of Bluetooth wireless technology and GPRS network to transmit handwritten text and interact with mobile phones, computers and the Internet. Although its appearance and writing method are the same as an ordinary pen, Chatpen can "read" its position with the help of an almost invisible dot pattern printed on ordinary paper. This information can be transmitted through Bluetooth and GPRS mobile phones, allowing consumers to write digitally on paper at the same time. Users will find that they are no longer limited to text-based short messages or emails. As long as they use Chatpen, they can send handwritten notes at any time through mobile phones, PCs or PDAs. Anything drawn or written can be transmitted immediately, information processing becomes more personalized, and the process of sending text messages is greatly simplified because there is no need to use letter input.

As the key technology behind electronic pens, handwriting recognition has always been the focus of research. In general, electronic pens can be divided into four categories according to different positioning methods: radio frequency positioning type, image recognition type, pressure sensing positioning type and acceleration positioning type. Radio frequency positioning type electronic pens need to place an acoustic wave generator near the writing plane or on the writing board, and use the ultrasonic waves emitted by the generator to complete the three-dimensional positioning of the pen strokes. It has high accuracy but complex structure and algorithm. Image recognition type electronic pens use image recognition algorithms to recognize the handwriting images scanned by the micro camera installed in the pen head part, and the handwriting is closest to the original. Pressure-sensitive electronic pens need a pressure-sensitive plate to feel the pressure of the pen tip and bend it into a note. Acceleration type electronic pens use kinematic algorithms to obtain the motion trajectory of the pen tip by calculating the acceleration, and the handwriting can be reproduced by combining the handwriting analysis algorithm, so the structure is simple and easy to implement. However, due to the limitation of sensor resolution, there has been no mature product of this type on the market.

This solution uses Freescale Semiconductor's MMA7260Q three-axis low-level acceleration sensor to achieve spatial positioning of pen strokes. Wireless USB devices provide plug-and-play connectivity for electronic pens. This electronic pen uses Cypress's 2.4GHz RF SoC CYRF6934 as a wireless USB network transceiver. As long as the Cypress Encore2 wireless USB bridge is connected to the PC's USB port on the PC side, the electronic pen can perform one-way data transmission to the PC.

1 Hardware Planning

In this design, MMA7260Q is used to measure the acceleration of the electronic pen in the three axes of X, Y, and Z, so that the software can calculate the position of the pen tip in real time and generate handwriting.

After the microcontroller ADuC7022 collects the signal output by the acceleration sensor, it uses the on-chip ADC to complete the conversion of the voltage signal to acceleration data and performs signal processing. Finally, it sends it to the wireless USB interface chip CYRF6934 through the SPI interface and transmits the data to the PC for post-processing.

The system is powered by a high-energy lithium battery. In order to obtain the longest possible battery life, all chips operate at 3.3V to reduce switching losses; after the microcontroller detects that the electronic pen is in a static state, the microcontroller software will put the wireless USB interface chip into sleep mode to further reduce power consumption.

2 Microcontroller Circuit

ADuC7022 is a new generation of precision analog microcontroller based on ARM7TDMI 32bit RISC core of ADI. It integrates 10-channel 12-bit ADC (1MSPS), voltage comparator, 62Kbytes FlashROM and 8Kbytes SRAM on chip, with the highest processing capacity of 40MIPS. Its analog peripherals include up to 10 channels with a sampling rate of 1MSPS and a resolution of 12bit, and a precision bandgap reference voltage source with a temperature drift better than 10ppm/℃. Other peripherals include on-chip programmable logic array (PLA), synchronous and asynchronous serial interfaces, etc. Its on-chip PLL circuit allows the use of external crystal oscillators with lower frequencies to reduce system EMI. Serial interfaces include UART, SPI and 2 I2C, JTAG port for download/debugging, 4 timers, and 14 general I/O pins. CPU clock is up to 45MHz, with on-chip crystal oscillator and on-chip PLL.

ADuC7022 operates at 2.7V to 3.6V and consumes only 40mA at the highest operating frequency of 41.78MHz. In addition, the ADuC7022 40-pin 6mm×6mm LFCSP package can significantly reduce the size of the circuit board, making it more suitable for systems with more stringent requirements on volume and power consumption than most microcontrollers.

In this design, the ADuC7022 ADC works in single-ended mode. The ADC0~ADC2 of the ADC module are connected to the MMA7260Q three-axis acceleration output pins. ADC2 is connected to the positive electrode of the battery to monitor the input battery voltage. When the battery voltage drops to close to the minimum input voltage of the LDO, the LED is lit to remind the user to replace the battery. The P0.0 and P0.1 pins of the microcontroller are connected to the SEL1 and SEL2 pins of the MMA7260Q as the control signals of the acceleration sensitivity.

The serial interface of ADuC7022 provides SPI, UART, and I2C interfaces. The I/O port of ADuC7022 is a multiplexed interface. Users can choose between GPIO, UART, UART/SPI/I2C, and programmable logic array by setting the control register of the SPM module. The hardware in this article uses an SPI module working in Master mode and connected to the wireless USB module. The schematic diagram of the microcontroller is shown in Figure 1.

Design of electronic brush based on ARM and acceleration sensor

3 Accelerometer

MMA7260Q is a single-chip three-axis low-level acceleration sensor launched by Freescale Semiconductor. It can accurately measure low-level descent, tilt, displacement, positioning, impact and vibration errors in the three directions of X, Y and Z. By selecting the sensitivity of MMA7260Q, it can be designed according to the gravity acceleration sensitivity of different levels (g) of 1.5g, 2g, 4g and 6g. MA7260Q is manufactured using MEMS technology. It integrates acceleration sensors and signal conditioning circuits such as low-pass filtering and temperature compensation in a volume of 6mm×6mm×1.45mm, and presets full-scale 0g bias. Its package size is very small and only requires a small board space. In addition, MMA7260Q can run at a low voltage of 2.2V~3.6V, consumes only 500?Zi A current when working, and is equipped with a 3μA sleep mode and a 1.0ms fast power response. It also provides fast startup and sleep modes. These features greatly extend the battery life of the electronic pen and reserve enough space for appearance design.

SEL1 and SEL2 are sensitivity selection input pins, and the corresponding sensitivity truth table is shown in Table 1. The output voltage VOUT of the acceleration sensor is: [page]

Where VOFFSET is the 0 acceleration offset, ΔV/ΔG is the acceleration sensitivity, 1G is the earth's gravity, and θ is the tilt angle.

Xout, Yout and Zout are the output pins of the acceleration signals in the three directions of X, Y and Z respectively. The relationship between the output voltage and acceleration is shown in equation (1). The 0g bias voltage of MMA7260Q is 1.65V. For a sensitivity of 1.5g, the output voltage of each axis is between 0.85V and 2.45V.

The acceleration sensor circuit is shown in Figure 2. An RC filter is set at the output of the MMA7260Q to filter out the interference of the internal switch filter capacitor clock and improve the measurement accuracy.

Design of electronic brush based on ARM and acceleration sensor

4 Wireless USB interface

CYRF6934 is a 2.4GHz RF SoC wireless USB network transceiver from Cypress Semiconductor. The wireless transceiver operates in the 2.4~2.483GHz ISM public frequency band, breaking through the various limitations common to many 27MHz, 400MHz and 900MHz systems, allowing users to promote and use their solutions worldwide without being constrained by regional frequency requirements, thus having global applicability, reasonable power specifications and higher communication bandwidth. With the help of DSSS technology, CYRF6934 can avoid signal interference from other systems such as 802.11b and Bluetooth in the 2.4GHz frequency band, as well as wireless radiation from cordless phones and microwave ovens; CYRF6934 has an operating voltage range of 1.8~3.6V and an effective range of 10 meters; it is equipped with a 62.5kbps data throughput and a SPI microcomputer interface with a transmission frequency of up to 2MHz to communicate with the microcontroller, which can achieve a 62.5kbps rate of bidirectional or unidirectional RF transmission, with an average delay of less than 10ms. When there is no data transmission, CYRF6934 can enter low power mode under the control of the microcontroller to reduce system energy consumption.

The wireless USB interface circuit is shown in Figure 3. The acceleration data collected by the microcontroller is sent to CYRF6934 through the SPI interface after preprocessing. CYRF6934 modulates the data and sends it to the wireless USB bridge on the PC through the printed antenna on the PCB. A 0.1uF capacitor is used for decoupling all VCCs of the chip and a 10uF capacitor is used as a charging and discharging capacitor.

Design of electronic brush based on ARM and acceleration sensor

5 Software Design

As the underlying hardware driver, the software needs to complete system initialization, data acquisition, processing and transmission. System initialization mainly includes the initialization of the microprocessor stack, queue and internal control registers, the selection of MMA7260Q acceleration sensitivity and the initialization of the CYRF6934 control registers. The assembly language completes the initialization of the microprocessor stack and queue and guides the system to execute the main() function in the C language. After the C language program completes the remaining initialization tasks, it starts the cycle of collecting data, processing data and sending data.

In addition to using the accelerometer solution of the MMA7269Q sensor, the software design can also use various components provided in the MMA7260Q reference design development tool to develop according to the needs, so as to improve the efficiency of software and hardware and minimize the factors of system instability caused by software conflicts.

At the same time, the hardware environment of KIT3109MMA7260Q is used to complete the development and testing of MMA7269Q and conduct a comprehensive evaluation to speed up product development. The software flow chart is shown in Figure 4.

Design of electronic brush based on ARM and acceleration sensor

After the driver design is completed, the application program needs to use some special API functions of the Windows operating system when accessing the driver. Since these function parameters are relatively large, a dynamic link library can be developed so that users can develop applications without involving the operation of the underlying driver device and can operate the hardware like ordinary API functions. The structure of the entire system is shown in Figure 5.

By using this layered structure, user programs can read and write devices through dll. The interface functions provided by dll to the application include initializing the device, closing the device, reading and writing ports, etc. In this way, after adding your own dynamic link library to the application, you can use inPortb and out-portb to operate the port.

Since the application and market prospects of electronic pens are very broad, some major related manufacturers in the world are now competing to develop and launch new products with their own characteristics. This design scheme organically combines the advantages of wireless communication with the traditional USB interface, which not only provides a higher data transmission rate, but also improves the data access method. At the same time, the MMA7260Q three-axis low-level acceleration sensor and SoC CYRF6934 wireless USB network transceiver can meet the needs of non-network terminals in the wireless field with their perfect performance and low cost, and make the transmission system more convenient and reliable.

Without changing the traditional way of pen-paper communication, this electronic pen can realize natural handwriting input on ordinary paper (or any medium) beyond keyboard, just like providing people with a golden key to open a new door to the information age. It combines the acceleration structure with the wireless network, and has many advantages such as simple structure, reliable operation, convenient data transmission and plug-and-play. The promotion and application of this electronic pen will surely become a super assistant for people to promote social informatization and a tool to promote office automation. In a certain sense, it can realize the writing of computers and mobile phones and occupy a place in the market.

References

[1] Analog Semiconductor. Precision analog microcontroller 12-bit analog I/O, ARM7TDMI MCU Rev A. 2006.

[2] Freescale Semiconductor. ±1.5g-6g Three axis low-g micromachined accelerometer. 2006, 2.

[3] Cypress Semiconductor. WirelessUSBTM LS 1-way hid networks. 2003, 8.

[4] Cypress Semiconductor. WirelessUSB LR 2.4GHz DSSS radio soc. 2005, 3.

[5] Cypress Semiconductor. WirelessUSBTM dual antenna design layout guidelines. 2005, 3.

分页
Keywords:ARM Reference address:Design of electronic brush based on ARM and acceleration sensor

Previous article:Design of digital network set-top box based on ARM and STi5x
Next article:Design of wireless endoscopy system based on ARM7

Recommended ReadingLatest update time:2024-11-16 18:03

ARM assembly instruction learning - implementing data block copy
Program Requirements: Design a program to complete the copying of data blocks. The data is copied from the source data area snum to the target data area dnum. The data size is NUM words (1 word = 4 bytes). The copying is done in units of 8 words. For the data with less than 8 words left, copy them in units of words.
[Microcontroller]
Use of ioctl function in ARM driver development
0. The impact of Linux version on ioctl The ioctl function pointer in struct file_operations in fs.h has been completely deleted in kernel 2.6.36, and replaced by unlocked_ioctl  We will still use the ioctl pointer here, but when actually using it, you should pay attention to your Linux version. If it is 2.6.36 or
[Microcontroller]
Use of ioctl function in ARM driver development
ARM Special Topic: Byte Alignment
What is byte alignment? If a piece of data is stored continuously starting from an address that is divisible by 4, then it is word aligned, otherwise it is non-word aligned. Take four-byte alignment as an example: when operating on memory, the address accessed must be a multiple of 4. If the address assigned is not a
[Microcontroller]
Design of digital audio playback system based on ARM embedded system
  0 Preface   MPEG (Moving Picture Experts Group) is the abbreviation of the Moving Picture Experts Group. MP3 is the abbreviation of MPEG Audio Layer-3, which is the MPEG layer 3 audio coding standard. Using the MP3 standard to encode audio data can not only obtain a larger music data compression ratio, but also obta
[Microcontroller]
Design of digital audio playback system based on ARM embedded system
A brief summary of the ARM processor architecture
I have been working on ARM for two months and have gained a lot, so I will talk about it. This article mainly introduces the ARM7 series processors. Haha, if you are not a related major, many people may not know what ARM is. I will now briefly introduce the classification of various processors. At present, our proce
[Microcontroller]
LCD touch screen system design strategy based on ARM
With the rapid development of embedded system technology, industrial equipment products are becoming more and more modernized, and generally require visual operation. LCD touch screens have low energy consumption, low heat dissipation, low cost, thin and light, small size, and easy installation. Using LCD touch screens
[Microcontroller]
LCD touch screen system design strategy based on ARM
How to design the fingerprint recognition access control system based on ARM
introduction With the rapid development of modern society, identity confirmation is required in many occasions, and traditional identity recognition technology can no longer meet social requirements. Human physical characteristics are non-replicable, so people began to study biometric technology, and fingerprints have
[Microcontroller]
How to design the fingerprint recognition access control system based on ARM
Arm and Ecarx jointly established a company in Wuhan specializing in automotive-grade SoC
On June 27, Wuhan Development Zone held a signing ceremony for major projects, with a total contract value of 135 billion yuan, covering next-generation automobiles, new energy, innovation and entrepreneurship and other fields. Peng Hao, director of the Wuhan Development Zone Management Committee, said that the sign
[Mobile phone portable]
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号