Practical single-chip PSD data acquisition based on fast acquisition

Publisher:名字太长了吗Latest update time:2014-01-16 Source: 电源网Keywords:MCU  PSD Reading articles on mobile phones Scan QR code
Read articles on your mobile phone anytime, anywhere

As a precision photoelectric position sensor, PSD has the characteristics of high sensitivity, short response time, high position resolution, and large spectral response range. Therefore, it is widely used in modern photoelectric detection technology, especially in high-precision and high-speed data acquisition technology. How to realize the acquisition of multiple data in a very short response time has become the key to collecting PSD output data. Based on single-chip microcomputer technology, this paper designs and builds a set of high-speed PSD output data acquisition and control circuits . By collecting PSD output data under laboratory conditions, it lays a theoretical foundation for subsequent PSD positioning accuracy and anti-interference research.

1 How PSD works

Photoelectric position sensitive device ( PSD ) is a semiconductor position detection device based on the lateral photoelectric effect and continuous distribution. It can quickly and accurately give the position of the incident light spot on the photosensitive surface, that is, the signal output by the PSD is related to the position of the light spot on the photosensitive surface. As shown in Figure 1, the surface P+ layer is the photosensitive surface, and there is a signal output electrode on each side. The middle is the I layer, and the common electrode on the bottom layer is used to apply reverse bias. When light is incident on the photosensitive surface, due to the lateral electric field parallel to the junction surface, the photogenerated carriers form currents X1 and X2 that flow to the electrodes at both ends, and the total current X0 = X1 + X2.

When the distance between the incident light spot and the two electrodes changes, the output current of the two electrodes also changes accordingly, thereby realizing the position measurement function.

As shown in Figure 2, if the surface resistance of the PSD is uniform and the resistances R1 and R2 are much larger than the load resistance RL, then the values ​​of R1 and R2 depend only on the position of the light spot, that is:

Where: L is the distance from the midpoint of PSD to the signal electrode; x is the distance from the incident light point to the midpoint of PSD.

Substituting X0 = X1 + X2 into equation (1), we can get the coordinates of the light spot:

Obviously, the above formula has nothing to do with the incident light intensity X0. This is the positioning principle of one-dimensional PSD. The basic principle of two-dimensional PSD is the same as that of one-dimensional PSD, but the calculation formula is different. 2 Selection of PSD

This article selects the SPC01 photoelectric position sensor produced by Swedish SiTek. It is a two-dimensional two-sided shunt type PSD, manufactured using PSD thick film technology, integrating the PSD  sensor and the processing circuit. The processing circuit only has a preamplifier, adder and subtractor. The processing circuit block diagram is shown in Figure 3.

The relationship between the output voltages Diff X, Diff Y and Sum X, Sum Y and the two-dimensional position is:

Therefore, the collection objects are the four output quantities of Diff X, DiffY, Sum X, and Sum Y. By collecting the four output quantities, the principle operation can be used to realize the position data of PSD in two-dimensional coordinates.

3 Data acquisition and control circuit

The PSD data acquisition and control circuit based on single-chip microcomputer is composed of Atmega16 single-chip microcomputer, AD1674 analog/digital conversion chip, AD7501 multiplexer, MAX232 serial communication chip, etc. Its circuit block diagram is shown in Figure 4.

3.1 Multiplexer

AD7501 is an 8-channel multiplexer switch whose function is to select a valid input through three binary address lines [5]. Its specific connection relationship is shown in Figure 5.

In Figure 5, the enable terminal EN (3) is connected to +5 V to keep it in working state all the time; the signal input terminals S1~S4 (13, 11, 10, 9) are respectively connected to the PSD output signals Diff X, Diff Y, Sum X, Sum Y; the input signal selection terminals A0 and A1 (16, 1) are respectively controlled by the I/O ports PC3 (25) and PC4 (26) of the Mgea16 microcontroller, and A2 (4) is connected to GND, which selects the 4 input voltage signals in sequence and sends them to the voltage follower shown in Figure 6 and then enters the AD1674 for analog/digital conversion.

3.2 Analog/digital conversion circuit

AD1674 is a 12-bit successive approximation analog/digital conversion chip with a parallel microcomputer interface launched by AD Corporation of the United States. The basic features and main parameters are as follows:

Full 12-bit successive approximation register (SAR) analog-to-digital converter with internal sample-and-hold; sampling frequency is 100 kHz; conversion time is 10 μs; data can be output in parallel, using an 8/12-bit selectable microprocessor bus interface; dual power supply: ±12 V or ±15 V for the analog part and +5 V for the digital part.

As shown in Figure 7, the data output ports DB4~DB11 (20~27) of AD1674 are connected to the PB ports (1~8) of the microcontroller; the working state of AD1674 is controlled by the logic port (2~6), and its true value is shown in Table 1.

The microcontroller controls CE to be high, CS, R/C, and A0 to be low, and starts the 12-bit data conversion. The conversion status output port STS (28) is connected to the PD2 (16) of the microcontroller. When STS is high, AD1674 is in the analog/digital conversion state, and when STS is low, the analog/digital conversion is completed and the conversion data can be read. Since only 8 input ports are used to read data, the converted 12-bit data needs to be read out twice: first set the R/C and A0 ports (5, 4) levels high, read the lower 4 bits of data to the microcontroller, and then set the A0 port level low, read the upper 8 bits of data to the microcontroller.

3.3 Single chip microcomputer control circuit

The single-chip microcomputer is the core component of the whole circuit system. Its function is to control the experimental process and the conversion, storage and transmission of data. This experiment uses the Atmega16 single-chip microcomputer of ATMEL Company , and its pins and functions are shown in Figure 8.

3.3.1 Signal control

The PC1 port (23) of the single-chip microcomputer is connected to the 7407 in-phase buffer, and the signal is driven by current to modulate the laser to emit light.

3.3.2 Data storage and serial transmission

(1) Data storage

As shown in Figure 4, the PB port (1~8) of the microcontroller is connected to the data output terminal (20~27) of AD1674, which is the digital voltage input port after A/D conversion, and transmits 8 bits of data each time. As can be seen from Section 3.2, the voltage signal is a 12-bit digital signal after A/D conversion, which needs to be divided into 2 transmissions, and the microcontroller also needs 2 bytes to store 1 data. That is, the 4 data of Diff X, DiffY, Sum X, Sum Y output by the PSD need 8 bytes to store.

(2) Data transmission

Since the collected data is stored continuously in the microcontroller , when the data is transmitted to the computer via RS 232 serial transmission, the collected data needs to be grouped and labeled to avoid errors when the data is combined.

Table 2 gives the rules for encoding the four 12-bit binary data Diff X, Diff Y, Sum X, and Sum Y.

That is, in a set of collected data, the first 2 bits of each byte are identification bits, the last 6 bits are data bits, and only the identification bits of the first 4 bytes are encoded.

The serial communication ports RXD (14) and TXD (15) of the Mega16 microcontroller are connected to the RXD (11) and TXD (12) of the MAX232 serial communication chip [8] respectively, and communication with the computer is achieved through the serial port. The serial port debugging tool Comtools software can be used in the computer to read the data. Finally, after mathematical processing, the digital voltage value representing the x, y position information is obtained.

3.4 Actual Circuit

Figure 9 is a physical diagram of the single-chip microcomputer circuit for data acquisition, signal transmission and process control.

4 Conclusion

This paper first introduces the working principle of the high-precision photoelectric position sensor PSD , and based on the structure and output characteristics of the SPC01 PSD produced by SiTek, a design scheme for PSD output signal data acquisition circuit based on single-chip microcomputer technology is proposed. The circuit in this design scheme has the advantages of simple structure, low cost, and small size on the basis of ensuring effective and rapid data acquisition. It is suitable for experimental operation under laboratory conditions and lays the foundation for subsequent research on PSD positioning accuracy, output characteristics, and anti-interference measures.

Keywords:MCU  PSD Reference address:Practical single-chip PSD data acquisition based on fast acquisition

Previous article:Introduction to the intelligent debugging principle and process of cavity filter and the intelligent debugging platform
Next article:Make a good MCU 89C51 programmer according to the crooked circuit diagram

Recommended ReadingLatest update time:2024-11-16 17:58

WiFi IoT car designed with Cortex-M3 MCU
  The design scheme of WiFi Internet of Things car uses computer host software to control the movement of the car through wireless WiFi and collect information about the car. Compared with the traditional "smart car", the main features are the use of 32-bit high-performance single-chip microcomputer control, Internet
[Power Management]
WiFi IoT car designed with Cortex-M3 MCU
Environmental Noise Measuring Instrument Based on 89C51 Single Chip Microcomputer
Introduction Environmental noise monitoring is an important part of improving the quality of life and strengthening environmental protection. In the busy streets and residential areas of major cities, large environmental noise displays have been erected on the streets. However, most of the portable noise teste
[Microcontroller]
Environmental Noise Measuring Instrument Based on 89C51 Single Chip Microcomputer
Application of anti-interference strategy of single-chip system software in communication power supply
1 Introduction Monitoring systems composed of single-chip microcomputers are widely used in various fields such as industrial automation devices, production process control, and instrumentation. When single-chip microcomputers are used in industrial environments, there are not only weak current equipment in th
[Power Management]
Using C language to design a single chip electronic clock course
Chapter 1 Design Purpose and Requirements 1. Purpose Through programming and Protues simulation of the electronic clock system, further master the composition of the single-chip microcomputer, the application of P1, P0, P2, and P3 ports, the application of the buzzer, the writing and application of the timing interr
[Microcontroller]
Using C language to design a single chip electronic clock course
Expanding 4KB EPROM Program Memory on 8031 ​​Microcontroller
    The commonly used chips for expanding program memory are EPROM (Erasable Programmable Read Only Memory) type (UV erasable type), such as 2716 (2K×8), 2732 (4K×8), 2764 (8K×8), 27128 (16K×8), 27256 (32K×8), 27512 (64K×8), etc. In addition, there are +5 V electrically erasable EEPROM, such as 2816 (2K×8), 2864 (8K×8
[Microcontroller]
Expanding 4KB EPROM Program Memory on 8031 ​​Microcontroller
My MCU Methodology 2: Special Edition of STM32 MCU
My MCU Methodology Part 2 STM32 MCU Special Edition Written by zzw YanJun.tech Because I was really busy during this period, and of course because of my procrastination, I have not started writing this STM32 microcontroller learning experience. On the afternoon of the third day of the Chinese New Year, I was a little
[Microcontroller]
89C51 MCU realizes the running light
/******************************************* Copyright: 2014.02.09.version1.0 File name: led.c Description: DIY running light 89C51 Author: lxl Version: version1.0 Date: 2014.02.09 History: None **************************************************/ #include reg51.h /**********
[Microcontroller]
Relay Control Based on Single Chip Microcomputer
1. Experimental purpose Master the basic methods and programming of relay control. 2. Experimental content 1. Experimental schematic diagram: 2. Experimental content Use the high and low levels output by port P1 to control the opening and closing of the relay to achieve control of external
[Microcontroller]
Relay Control Based on Single Chip Microcomputer
Latest Power Management Articles
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号