introduction
With the development of microelectronics and computer technology, the original electrical equipment, which was mainly based on strong electricity and electrical appliances and had simple functions, has developed into a new type of microelectronic equipment that combines strong and weak electricity, has digital characteristics, and has complete functions. In many occasions, more and more single-chip microcomputer products have replaced traditional electrical control products. The single-chip microcomputer that belongs to the stored program control realizes its control function through software instructions, and its hardware configuration is also variable and changeable. Therefore, once the production process changes, there is no need to redesign the line connection installation, which is conducive to product upgrading and order-based production.
The various control signals used in traditional electrical equipment must be converted into digital signals that match the input/output ports of the single-chip microcomputer. The user equipment must input various control signals to the single-chip microcomputer, such as limit switches, operating buttons, selection switches, travel switches, and switch quantities output by other sensors, etc., and convert them into signals that the single-chip microcomputer can receive and process through the input circuit. The output circuit should convert and amplify the weak current control signal sent by the single-chip microcomputer to the strong output signal required on site to drive the actuators of the controlled equipment such as power tubes, solenoid valves, relays, contactors, motors, etc., which can facilitate the use of the actual control system.
1 Input circuit design
Generally, the input signal will eventually be input to the single-chip microcomputer in the form of a switch. According to engineering experience, the control command of the switch input is much better when it is at a low level than at a high level, as shown in Figure 1. When the switch S1 is pressed, the command signal is at a low level, and when the switch S1 is not pressed, the level output to the single-chip microcomputer is at a high level. This method has a strong noise resistance.
If we consider that the TTL level voltage is low and is easily interfered by the outside world during long-distance transmission, we can increase the input signal to +24 V and convert the high voltage signal into a TTL signal at the entrance of the microcontroller. This high voltage transmission method not only improves the noise resistance, but also makes the switch contact good and reliable, as shown in Figure 2. Among them, D1 is a protection diode with a reverse voltage of ≥50 V.
In order to prevent external spike interference and static electricity from damaging the input pins, pulse-proof diodes can be added to the input end to form a resistor bidirectional protection circuit, as shown in Figure 3. The forward conduction voltage drop UF≈0.7 V of diodes D1, D2, and D3, and the reverse breakdown voltage UBR≈30 V. No matter what polarity of the destructive voltage appears at the input end, the protection circuit can limit the amplitude of the voltage to the range that the input end can withstand. That is: when a positive pulse appears in VI~VCC, D1 conducts forward; when a negative pulse appears in V1~VCC, D2 breaks down in reverse; when a positive pulse appears between VI and ground, D2 breaks down in reverse; when a negative pulse appears between V1 and ground, D3 conducts forward, and the diode plays a clamping protection role. The buffer resistor RS is about 1.5~2.5kΩ, and forms an integral circuit with the input capacitor C, which delays the external induced voltage for a period of time. If the interference voltage exists for less than t, the effective voltage borne by the input end will be much lower than its amplitude; if the time is longer, D1 is turned on. The current forms a certain voltage drop on RS, thereby reducing the input voltage value.
In addition, a commonly used input method is to use an optocoupler isolation circuit. As shown in Figure 4, R is the input current limiting resistor, which limits the current of the light-emitting diode in the optocoupler to 10-20 mA. The input end is coupled by optical signals and is electrically completely isolated. At the same time, the forward impedance of the light-emitting diode is low, while the internal resistance of the external interference source is generally high. According to the voltage division principle, the interference noise that the interference source can feed to the input end is very small, and no ground interference or other crosstalk will be generated, which enhances the anti-interference ability of the circuit.
Under the premise of meeting the functional requirements, the simplest solution to improve the reliability of the microcontroller input terminal is to connect a capacitor in parallel between the input terminal and the ground to absorb interference pulses, or to connect a metal film resistor in series to limit the peak current flowing into the port.
2 Output circuit design
The output port of the microcontroller is limited by the driving capability, and generally requires a dedicated interface chip. Although its output varies greatly depending on the control object, it generally meets the requirements for output voltage, current, switching frequency, waveform rise and fall rate, and isolation and anti-interference. Here we discuss several typical circuit implementation methods from the output end to the power end of the microcontroller. [page]
2.1 Direct coupling
In a direct-coupled output circuit, avoid the circuit shown in Figure 5.
During the period when T1 is turned off and T2 is turned on, in order to provide enough base current for T2, the resistance of R2 must be very small. Because T2 works in emitter follower mode, in order to reduce the loss of T2, the voltage drop between the collector and the emitter must be controlled within a small range. In this way, the voltage between the collector and the base is also very small, and the resistance of resistor R2 is very small to provide enough base current. If the resistance of R2 is too large, it will greatly increase the voltage drop of T2, causing serious heating of T2. During the period when L2 is turned off, T1 must be turned on, and the high voltage +15 V will all drop on resistor R2, generating a large current, which is obviously unreasonable. In addition, the conduction of T1 will cause the high-level output of the microcontroller to be pulled down to close to the ground potential, causing the output end to be unstable. The base of T2 is pulled to the ground potential by T1. If it is connected to an inductive load, due to the effect of the winding back electromotive force, the emitter of T2 may have a high level, which is easy to cause the reverse breakdown of the base-emitter junction of T2 tube.
Figure 6 is a direct coupled output circuit, which is composed of T1 and T2 to form a coupling circuit to drive T3. When T1 is turned on, current is generated in the series circuit of R3 and R4. The voltage division on R3 is greater than the base-emitter junction voltage drop of the T2 transistor, which causes T2 to turn on. T2 provides the base current of the power tube T3, making T3 turn on. When the input of T1 is at a low level, T1 is turned off, the voltage drop on R3 is zero, T2 is turned off, and finally T3 is turned off. The role of R5 is: on the one hand, it acts as a load on the collector of T2, and on the other hand, when T2 is turned off, the charge stored in the base of T3 can be quickly released through the resistor R3, which speeds up the cut-off speed of T3 and helps to reduce losses.
2.2 TTL or CMOS device coupling
If the microcontroller outputs through TTL or CMOS chip, open collector devices are generally used, as shown in Figure 7(a). The open collector device is connected to the +15 V power supply through the collector load resistor R1, which increases the driving voltage. However, it should be noted that the switching speed of this circuit is low. If it is used to directly drive the power tube, when the subsequent circuit has an inductive load, due to the phase relationship of the power tube, it will affect the waveform rise time, resulting in increased dynamic loss of the power tube.
In order to improve the switching speed, two improved output circuits can be used, as shown in Figure 7(b) and Figure 7(c). Figure 7(b) is an improved circuit that can be turned on quickly. When the TTL output is high, the output point obtains voltage and current through transistor T1, and the charging capacity is improved, thereby speeding up the turning-on speed and reducing the power consumption of the collector open-circuit TTL device. Figure 7(c) is a push-pull improved circuit. The use of this circuit can not only increase the speed of turning on, but also increase the speed of turning off. The output transistor T1 works as an emitter follower and will not be saturated, so it does not affect the output switching frequency.
2.3 Pulse transformer coupling
The pulse transformer is a typical electromagnetic isolation component. The switching signal output by the microcontroller is converted into a high-frequency carrier signal, which is coupled to the output stage through the pulse transformer. Since there is no circuit connection between the primary and secondary coils of the pulse transformer, the output is a floating signal, which can be directly coupled with strong electrical components such as power tubes, as shown in Figure 8.
This circuit must have a pulse source. The frequency of the pulse source is the carrier frequency, which should be at least 10 times higher than the output frequency of the single-chip microcomputer. The output pulse of the pulse source is sent to the control gate G, and the output signal of the single-chip microcomputer is input into the G gate from the other end. When the single-chip microcomputer outputs a high level, the G gate opens, and the output pulse enters the transformer. The secondary coil of the transformer outputs a pulse with the same frequency as the primary side, which is filtered and restored to a switch signal after detection by the two-diode D1 and D2, and sent to the power tube. When the single-chip microcomputer outputs a low level, the G gate is closed, the pulse source cannot enter the transformer through the G gate, and the transformer has no output.
Here, the transformer transmits both signals and energy, which increases the frequency of the pulse source and helps reduce the weight of the transformer. Since the transformer can adapt to different driving power requirements by adjusting the inductance, the number of primary and secondary turns, etc., it is more flexible to use. More importantly, there is no electrical connection between the primary and secondary coils of the transformer, and the output signal of the secondary coil can float with the voltage of the power component and is not affected by the size of its power supply.
When the microcontroller outputs a higher frequency pulse signal, the pulse source and G gate can be omitted, and appropriate adjustments can be made to the primary and secondary circuits of the transformer.
2.4 Photoelectric coupling
Optocouplers can transmit linear signals as well as switching signals. They are mainly used to transmit switching signals when used at the output stage. As shown in Figure 9, the microcontroller output control signal is amplified by buffer 7407 and then sent to the optocoupler. R2 is the load resistor of the optocoupler output transistor. Its selection should ensure that: when the optocoupler is turned on, its output transistor is reliably saturated; and when the optocoupler is turned off, Tl is reliably saturated. However, due to the slow response speed of the optocoupler, the switch delay time is prolonged, which limits its frequency of use.
Conclusion
The single-chip microcomputer interface technology is introduced in detail in many documents, but in the modification and design of a large number of electrical control products, problems that cannot be solved by interface chips (such as large driving current, slow switching speed, poor anti-interference, etc.) are often encountered, so another circuit solution must be sought. The above-mentioned input/output circuits have been widely used and have shown that they have high engineering practical value for reasonably and reliably realizing the single-chip microcomputer electrical control system.
Previous article:MCU Timer and MCU Counter
Next article:Application and research of multi-interrupt processing technology based on single chip microcomputer
Recommended ReadingLatest update time:2024-11-16 15:03
- Popular Resources
- Popular amplifiers
- Wireless Sensor Network Technology and Applications (Edited by Mou Si, Yin Hong, and Su Xing)
- Modern Electronic Technology Training Course (Edited by Yao Youfeng)
- Modern arc welding power supply and its control
- Small AC Servo Motor Control Circuit Design (by Masaru Ishijima; translated by Xue Liang and Zhu Jianjun, by Masaru Ishijima, Xue Liang, and Zhu Jianjun)
Professor at Beihang University, dedicated to promoting microcontrollers and embedded systems for over 20 years.
- 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 Hall----Intelligent Control System
- Body fat scale is broken, pry it open and see
- 【New Year's Festival Competition】+ "Big Head Doll" Amusement Park
- OLED Technology Consulting Part-time
- What issues should be paid attention to when developing 51 single-chip microcomputer operating system
- What are the advantages of Qorvo's Fusion 5G product portfolio, which won the "Global Electronics Achievement Award"?
- EEWORLD University ----TI DLP? Labs - Display
- Predictive Control Algorithm Program
- How to configure 2 network ports?
- Prize live broadcast: C-V2X (Internet of Vehicles) test challenges and solutions, make an appointment to win Keysight gifts