With the rapid development of information technology, people's requirements for electronic products to be intelligent, convenient and user-friendly are also increasing. As a user-friendly input and output device, the touch screen has a very wide range of applications in China and is an extremely attractive multimedia interactive device. At present, the demand for touch screens mainly comes from consumer electronic products, such as mobile phones, PDAs, portable navigation devices, etc. With the continuous development of touch screen technology, its application in other electronic products will also be continuously extended. The touch screen controllers currently available on the market are generally more expensive and have relatively fixed performance, which cannot meet the actual needs of users in some occasions. Based on the above considerations, this paper selects the 51 series single-chip microcomputer as the control core according to the working principle of the resistive touch screen, and designs a practical and low-cost touch screen control system.
1 Working principle of touch screen
The touch screen consists of a touch detection component and a touch screen control device (as shown in Figure 1); the touch detection component is used to detect the user's touch position and send it to the touch screen controller after receiving it; the main function of the touch screen controller is to receive touch information from the touch point detection device and send it to the controller. It can also receive commands sent by the controller and execute them.
The three main types of touch screens are: resistive technology touch screens, surface acoustic wave technology touch screens, and capacitive technology touch screens. Among them, resistive touch screens, with their low price and good responsiveness to finger and input pen touch, cover 2/3 of more than 100 touch screen component manufacturers, becoming the touch screen product with the highest sales volume in the past five years. Here, based on the touch screen controller to be designed and applied, the four-wire resistive touch screen is introduced in detail.
The screen body of the resistive touch screen is a multi-layer composite film that matches the display surface. It is composed of a layer of glass or organic glass as the base layer, with a transparent conductive layer coated on the surface, and a layer of plastic layer with hardened outer surface, smooth and scratch-resistant on the top. Its inner surface is also coated with a transparent conductive layer. There are many tiny (less than one thousandth of an inch) transparent isolation points between the two conductive layers to separate and insulate them. When a finger touches the screen, the two conductive layers that are normally insulated from each other come into contact at the touch point. Because one of the conductive layers is connected to the 5 V uniform voltage field in the Y-axis direction, the voltage of the detection layer changes from zero to non-zero. After this connection state is detected by the controller, A/D conversion is performed, and the obtained voltage value is compared with 5 V to obtain the Y-axis coordinate of the touch point. Similarly, the X-axis coordinate is obtained. This is the basic principle of the four-wire resistive touch screen, and its principle is shown in Figure 2.
2 Touch screen control system hardware design
According to the working principle of the four-wire resistive touch screen, the main work in hardware design is to accurately identify the X-axis and Y-axis coordinates of the touch point through the control drive module.
2.1 Overall structural design
The key to the design of the touch screen controller lies in the control of the drive module. This paper uses AT89C2051 as the control core of the drive circuit. The ADS7843 module receives the signal obtained on the touch screen and controls the drive circuit to respond accordingly, and sends it to the computer for display through RS232 serial communication. The overall structural block diagram is shown in Figure 3.
2.2 Touch screen driving principle circuit
In the touch screen driving circuit design of this article, the ADS7843 chip is used as the driving module. Under the action of the controller, it completes the touch coordinate information acquisition and A/D conversion, and sends the processed information to the controller, realizing the information interaction function. Its internal driving circuit principle is shown in Figure 4.
It can be seen from Figure 4 that the control signal drives the four-wire resistive touch screen through a simple combination of resistors and transistors. The microcontroller outputs instructions to control the on and off of the transistors, forming a cyclic scan of the drive circuit to detect whether there is a pressing action and read the XY coordinates.
The main working sequence of the driving circuit is as follows:
(1) Detect whether there is a pressing action
①YCTR+=1, YCTR-=0 At this time, transistors V2 and V3 are both in the off state.
②XCTR+=0, XCTR-=1 At this time, transistors V1 and V4 are both in the on state.
③A/D converter reads the voltage value of ADC. If it is greater than the threshold value, it means there is a pressing action.
(2) Read the X coordinate
①YCTR+=1, YCTR-=0 At this time, transistors V2 and V3 are both in the off state.
②XCTR+=0, XCTR-=1 At this time, transistors V1 and V4 are both in the on state.
③A/D converter reads the voltage value of ADX.
(3) Read the Y coordinate
①XCTR+=1, XCTR-=0 At this time, transistors V1 and V4 are both in the off state.
②YCTR+=0, YCTR-=1 At this time, transistors V2 and V3 are both in the on state.
③The A/D converter reads the voltage value of ADY.
2.3 Principle circuit design of touch screen control system
This circuit uses the single-chip microcomputer AT89C2051 as the control device. It has fewer streamlined I/O ports and a small size, making it very suitable as a processor for small application systems. The ADS7843 touch screen control chip is used as the hardware driver module. ADS7843 has a power supply measurement circuit network composed of multiple analog switches and a 12-bit A/D conversion. ADS7843 turns on different analog switches according to different measurement commands sent by the microcontroller to provide voltage to the working surface electrode pair, and introduces the voltage analog quantity corresponding to the contact coordinate position on the corresponding measurement electrode into the A/D converter. In the process of measuring the X and Y coordinates of the touch point, the relationship between the measured voltage and the measurement point is shown in the equivalent circuit of Figure 5, where P is the measurement point.
Referring to the control drive circuit of FIG6 , when there is a pressing action on the touch screen, the ADS7843 chip completes the information collection and A/D conversion of the touch coordinates X+, X-, Y+, and Y- under the action of the single-chip microcomputer AT89C2051, and returns the data information to the single-chip microcomputer. The single-chip microcomputer processes the obtained digital information and communicates serially with the computer through the MAX232 chip to display the input.
3 Software Design
According to the hardware circuit design principle, the most critical part of the control drive circuit software design is to control the ADS7843 chip according to its internal principle and timing relationship to realize the acquisition of XY coordinates, and send the information to the computer through RS232 serial communication. The program design block diagram is shown in Figure 7.
4 Conclusion
Aiming at the high cost and low controllability of traditional touch screen controllers, this system adopts ADS7843 touch screen driver chip, generates drive signals through AT89C2051 microcontroller programming, and transmits information about the measurement process through serial communication. Through actual design and debugging, the design has the characteristics of fast touch response, high precision, small size, simple structure, high controllability, and low cost budget of software and hardware system, and has broad application prospects.
Previous article:Design of Constant Temperature Control System for Circuit Aging Test Chamber
Next article:Design of WSN node based on MSP430 and NRF2401
- Popular Resources
- Popular amplifiers
- Molex leverages SAP solutions to drive smart supply chain collaboration
- Pickering Launches New Future-Proof PXIe Single-Slot Controller for High-Performance Test and Measurement Applications
- CGD and Qorvo to jointly revolutionize motor control solutions
- Advanced gameplay, Harting takes your PCB board connection to a new level!
- Nidec Intelligent Motion is the first to launch an electric clutch ECU for two-wheeled vehicles
- Bosch and Tsinghua University renew cooperation agreement on artificial intelligence research to jointly promote the development of artificial intelligence in the industrial field
- GigaDevice unveils new MCU products, deeply unlocking industrial application scenarios with diversified products and solutions
- Advantech: Investing in Edge AI Innovation to Drive an Intelligent Future
- CGD and QORVO will revolutionize motor control solutions
- Innolux's intelligent steer-by-wire solution makes cars smarter and safer
- 8051 MCU - Parity Check
- How to efficiently balance the sensitivity of tactile sensing interfaces
- What should I do if the servo motor shakes? What causes the servo motor to shake quickly?
- 【Brushless Motor】Analysis of three-phase BLDC motor and sharing of two popular development boards
- Midea Industrial Technology's subsidiaries Clou Electronics and Hekang New Energy jointly appeared at the Munich Battery Energy Storage Exhibition and Solar Energy Exhibition
- Guoxin Sichen | Application of ferroelectric memory PB85RS2MC in power battery management, with a capacity of 2M
- Analysis of common faults of frequency converter
- In a head-on competition with Qualcomm, what kind of cockpit products has Intel come up with?
- Dalian Rongke's all-vanadium liquid flow battery energy storage equipment industrialization project has entered the sprint stage before production
- Allegro MicroSystems Introduces Advanced Magnetic and Inductive Position Sensing Solutions at Electronica 2024
- Car key in the left hand, liveness detection radar in the right hand, UWB is imperative for cars!
- After a decade of rapid development, domestic CIS has entered the market
- Aegis Dagger Battery + Thor EM-i Super Hybrid, Geely New Energy has thrown out two "king bombs"
- A brief discussion on functional safety - fault, error, and failure
- In the smart car 2.0 cycle, these core industry chains are facing major opportunities!
- The United States and Japan are developing new batteries. CATL faces challenges? How should China's new energy battery industry respond?
- Murata launches high-precision 6-axis inertial sensor for automobiles
- Ford patents pre-charge alarm to help save costs and respond to emergencies
- New real-time microcontroller system from Texas Instruments enables smarter processing in automotive and industrial applications
- [Personal Test] Notes on "jumping pits" in diode voltage test - onboard test verification of hardware
- [HARTING Live FAQ] How to quickly and cost-effectively install cables in electrical control cabinets
- What is it like to have an engineer boyfriend or girlfriend?
- Eliminating Software Failures with MSP432
- About the algorithm problem of brightness meter
- Qinhengwei CH549 minimum system schematic PCB
- Wen's Oscillation Problem
- [Fudan Micro FM33LC046N Review] + SPI driven OLED
- Sensor popular data download collection
- Keil also released a community version