Abstract: Introducing a group analog signal detection system based on MC145027. This system can connect each probe and the host through a single signal line. The number of probes can reach up to 242 channels; the special coding method of MC145027 can make the data in It has extremely high reliability during the transmission process, which has high application value in industrial sites with strong electromagnetic interference.
Keywords: multi-point detection; single signal line; reliability; MC145026; MC145027
In industrial automation control systems, it is often necessary to detect multi-point analog quantities. The traditional method is to set up sensors at each detection point and connect them to the host computer with three or two lines, and use multiple analog switches and analog-to-digital conversion devices to detect each analog signal. Perform analog-to-digital conversion to obtain the corresponding data for host processing. This method has the following shortcomings:
·The analog voltage is susceptible to interference during the process of being transmitted to the host through the cable;
·The host must select the sensor through an analog switch, which limits the number of probes and the interface circuit of the host is relatively complex;
·The host cannot transmit control instructions to each detection point;
·If a sensor is added to the detection point, a cable must be added to the host, thus increasing the wiring complexity;
In response to the above problems, the author designed a group analog signal detection system based on MC145027, which enables two-way data transmission between the host and each probe through only three lines (as shown in Figure 1). Because the special decoding method of MC145027 can eliminate instantaneous strong electromagnetic interference, the data has high reliability during transmission.
1. MC145027 decoding method
MC145027 is usually used as a decoder, and the encoder used with it is MC145026. In order to explain the decoding method of MC145027, here we first introduce the encoding method of MC145026.
1.1MC145026 encoding
The pin functions and external circuit of the integrated encoder CM145026 are shown in Figure 2. A1~A9 are address or data input terminals. When used as addresses, they have three states (high level, open circuit, low level). When used as data, they have two states (high level, low level); , The value determines the operating frequency of the MC145026 internal clock oscillator;TE is the working control end of the internal clock oscillator. When TE is low level, the oscillator works;The output encoding signal is shown in Figure 3. Two consecutive wide pulses (duty ratio 7:1) represent "1", two consecutive narrow pulses (duty ratio 1:7) represent "0", and one wide A narrow pulse of two indicates an "open circuit". When sending, first send the low level for 17.5 clock cycles, and then send the status codes of A1 to A2 in sequence. If TE is still low level after the status codes of A1 to A9 are sent, send them in sequence after 24 clock cycles. Status codes of A1~A9. No matter when TE changes from low level to high level, its coded sending work must wait until the end of the current sending cycle to stop [1].
1.2MC145027 decoding method
MC145027 is a kind of decoder (MC145027/145028) used in conjunction with MC145026. It has 4-bit data output and 5-bit address encoding. It can generatedifferent address codes. Different combinations of their addresses can generatedifferent address codes. The pin functions and external circuit of MC145027 are shown in Figure 4, and its functional block diagram is shown in Figure 5.
MC145027 uses an RC integrating circuit to complete the identification of wide and narrow pulses. In Figure 5, the timing components R1 and C1 determine the identification of wide and narrow pulses. . R2 and C2 are the identification timing components of the entire transmission cycle, used to determine each valid word . When the encoding signal is input from the data input terminal (pin 9), the same signal as pin 9 will appear on pin 6. The signal is integrated by R1 and C1 integrating circuit and sent to the data extraction circuit through pin 7. The data extraction circuit inputs the signal Each rising edge detects the status of pin 7 to determine whether the input is a wide pulse or a narrow pulse. Figure 6 shows the waveforms of the pin 6 and pin 7 signals. It is assumed that the data input terminal inputs an "open circuit" code (i.e. a wide pulse and a narrow pulse). The wide pulse starts at time t0 and ends at time t1, and the narrow pulse It starts at time t2 and ends at time t3, and the entire encoding ends at time t4. Then, at time t1, the voltage at pin 7 is:
At this moment, the level of pin 7 detected by the data extraction circuit is high, indicating that the previous pulse is a wide pulse; after that, the narrow pulse charges C1 through R1. At the end of the narrow pulse at t3, the voltage of pin 7 is 0.74Vcc. In the following period of time, C1 is discharged through R1. At the t4 moment when the encoding ends, the voltage of pin 7 is 0.1Vcc. At this time, the data extraction circuit detects that the level of pin 7 is low, indicating that the previous pulse is a narrow pulse. It can be seen that the MC145027 does not directly decode the received pulse signal, but decodes the input signal after integrating it. Since the integrating circuit can filter out the instantaneous spike interference, even if the encoded signal received by the MC145027 is affected by some program Despite interference, MC145027 can still perform correct decoding, which is particularly important for industrial sites with complex environments.
2. Design of system hardware circuit
The hardware circuit of the detection system includes a probe circuit and a host interface circuit. The transmission format between the host and the probe follows the MC145026 encoding format.
2.1 Probe circuit
The schematic block diagram of the probe circuit is shown in Figure 7 .
The encoding signal line sent by the host to the probe is transmitted to each probe through the signal. After being processed by the amplification and shaping circuit, it is sent to MC145027 for decoding. When the address is determined to be consistent, VT changes from low to high to apply for an interrupt to the microcontroller, and the microcontroller reads the decoded data, MC145027 can decode the 4-bit data code, and the 4-bit binary data code can representAccording to the command, the microcontroller will output the collected data (temperature, pressure, humidity, etc.) through P1.7 according to the encoding format of MC145026, and then send it back to the host through the drive circuit.
2.2 Host interface circuit
Using a 486 or 586 microcomputer as the host computer, the host interface circuit for exchanging data with the probe through the parallel printing port is shown in Figure 8 . The status of the A1~A5 pins of MC145027 determines the host's address code (00000). D6~D9 are connected to pins 13, 12, 10, and 11 of the host's printing port respectively. The above four pins are the printer's status input ports. The port address is 379H (279H), corresponding to D4~D7 of the host data bus. The host sends commands to each probe through pin 14 of the printing port (port address 37AH/27AH, corresponding to data bit D1). After receiving the command, the probe returns the required data to the host, which is decoded by MC145027 and read by the host. The VT pin of MC145027 is connected to pin 1 of the printing port (port address 37AH/27AH, corresponding to data bit D0). The host determines whether response data has arrived by regularly detecting the status of the VT pin.
3. Software design
3.1 Definition of data format
According to the encoding format of MC145026, 9 bits of data information can be sent in one transmission cycle. We define A1 to A5 as the address information of the probe and the host. Since a total of 243 address codes can be represented, and the address code of the host is defined as 00000, so The remaining 242 address codes can be used by the probe; in the code sent by the host to the probe, in addition to A1 ~ A5 representing the address of the probe, there are 4 bits A6 ~ A9 that can represent the control command, which can be composed ofThese 16 command codes can be defined one by one according to the system requirements during design for system use. In the code sent by the probe to the host, the first five digits A1~A5 are in the fixed format 00000, indicating the address number of the host. The last four digits A6~A9 indicate the data sent to the host. One byte is sent in two times, with the high value sent first. nibble (high four bits), and then send the low nibble (lower four bits).
3.2 Setting of probe address code
The address input pins (A1~A5) of MC145027 have three states (high level, flat, low level), which means that the address line is ternary data, while the I/O port of the microcontroller is binary state (binary data format ), in the probe circuit, in order to make the address code sent by the microcontroller correspond to the address code of MC145027, the microcontroller must be able to automatically detect its own address. In the circuit shown in Figure 7, P1.0~P1.6 are used as address setting pins, and the address information they represent should be the same as the address of MC145027 (A1~A5), which involves binary to ternary conversion. question. Since 8-bit binary data is required to represent 243 addresses, the microcontroller only has 7-bit address setting pins, and the other bit (the highest bit) can only be set by the program. In this way, the address of the probe can be set more flexibly, so it has a certain degree of versatility.
3.3 Software design of microcontroller
The microcontroller in the probe circuit is mainly used to complete the following functions: (1) Complete the self-test of the probe circuit; (2) Receive and execute the control commands sent by the host; (3) Complete the corresponding actions according to the commands of the host; ( 4) Send data to the host according to the encoding format of MC145026.
3.4 Design of host software
The host software is the core of the entire control system. Here we only discuss content related to probe communication. Set up a scheduled interrupt program in the main control software to regularly detect the status of the VT pin of MC145027. When the VT pin changes from low level to high level, the data from the probe is received by reading the contents of port 379H/279H. . When the host computer sends a command to each probe, it can send the control command code through pin 14 of the parallel printing port. The sending format of the host command code should also follow the encoding format of MC145026.
4 Conclusion
The unique decoding method of MC145027 can effectively overcome the strong electromagnetic interference in industrial sites and ensure reliable transmission of data. Using the microcontroller (or 486/586 host) to imitate MC145026 to send coded data can effectively utilize system resources, save drug costs, and improve the overall system reliability.
Previous article:Using linear cumulative model to analyze cable insulation life test data
Next article:Digital Thermometer and ThermostatDS1625DigitalThermometerandThermostatDS1625LiNing
- Popular Resources
- Popular amplifiers
- Keysight Technologies Helps Samsung Electronics Successfully Validate FiRa® 2.0 Safe Distance Measurement Test Case
- From probes to power supplies, Tektronix is leading the way in comprehensive innovation in power electronics testing
- Seizing the Opportunities in the Chinese Application Market: NI's Challenges and Answers
- Tektronix Launches Breakthrough Power Measurement Tools to Accelerate Innovation as Global Electrification Accelerates
- Not all oscilloscopes are created equal: Why ADCs and low noise floor matter
- Enable TekHSI high-speed interface function to accelerate the remote transmission of waveform data
- How to measure the quality of soft start thyristor
- How to use a multimeter to judge whether a soft starter is good or bad
- What are the advantages and disadvantages of non-contact temperature sensors?
- 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
- EEWORLD University - Understanding and comparing high-speed analog-to-digital (ADC) and digital-to-analog converter (DAC) converter architectures
- Comprehensively explain the relationship between power supply PCB layout and EMC from nine aspects!
- Ask about copper plating and splitting power planes
- SHT31 Review + Unboxing
- MSP430: Input Capture
- High Voltage Impedance Tuning Quick Guide
- K210 face recognition environment construction process
- Charge up! The latest generation of ACF UCC28782 ultra-small fast charging adapter!
- Proteus simulation experiment of single chip microcomputer communication
- 【TI recommended course】#Power system design tools#