Introduction to common input and output circuits of single-chip microcomputers (I)

Publisher:星辰古泉Latest update time:2013-09-24 Keywords:MCU Reading articles on mobile phones Scan QR code
Read articles on your mobile phone anytime, anywhere

In view of the characteristics of electrical control products, this paper discusses several design methods of commonly used input/ output circuits of single-chip microcomputers , which has practical guiding significance for rationally designing electrical control systems, improving the interface capabilities of circuits, and enhancing system stability and anti-interference capabilities.

  introduction

  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 the 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.

  

Switch signal input circuit

 

  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 electrostatic influence from damaging the input pin, a pulse-proof diode 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 is forward-conducted; when a negative pulse appears in V1~VCC, D2 is reversely broken down; when a positive pulse appears between VI and ground, D2 is reversely broken down; when a negative pulse appears between V1 and ground, D3 is forward-conducted, and the diode plays a clamping protection role. The buffer resistor RS is about 1.5~2.5kΩ, which forms an integral circuit with the input capacitor C, and 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.

  

Input protection circuit

 

  

Optocoupler isolation 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.

Keywords:MCU Reference address:Introduction to common input and output circuits of single-chip microcomputers (I)

Previous article:FPGA Design Computer Application Based on EDA Technology
Next article:Introduction to common input and output circuits of single chip microcomputers

Recommended ReadingLatest update time:2024-11-16 15:34

Research on automotive MCUs: Domestic suppliers seek independent alternatives under the "chip shortage" environment
The MCU shortage is unlikely to be alleviated due to the concentration of production capacity and repeated epidemics. MCU is the core chip used for automotive control, and its application scope covers body power, driving control, infotainment, assisted driving, etc.   The MCU chip market is mature and relatively sta
[Automotive Electronics]
Research on automotive MCUs: Domestic suppliers seek independent alternatives under the
51HX711+MCU 10kg electronic scale source program+online alarm setting (plus relay)
Production of electronic scales, capable of peeling, range 10KG The microcontroller source program is as follows: /************************************************ Function:      Button K1 is for tare function, K2 and K3 are for modifying alarm parameter value. K2 is for addition, K3 is for subtraction. When the mea
[Microcontroller]
MCU keyboard input and serial port transmission
#include"reg52.h" typedef unsigned char uchar; typedef unsigned int uint;                         //digital tube port control sbit SG = P0^0;  //control the ones digit  sbit SS = P0^1;  //control the tens digit unsigned char code rst ={0xe4,0xc0,0xe0,0xc0,0xe0,0x22};//define a code type to implement software re
[Microcontroller]
Microcontroller Circuit Design Suggestions
Introduction to the topic: Content: Introduce the basic circuit structure of single chip microcomputer; Source: Based on comprehensive actual use; Function: To summarize the circuits required for microcontroller design to avoid omissions; PCB environment: Altium Designer, PADS; Date: 2018-03-06; =====================D
[Microcontroller]
How long does it take to learn the basics of microcontroller? What can you do after learning the microcontroller?
Many friends are discouraged when they see that the microcontrollers circulated on the Internet are difficult and require both hardware and programming. In fact, to put it bluntly, this is a kind of human fear of unknown things. Afraid of spending time and energy and getting nothing in the end. There is a saying that
[Microcontroller]
A Practical Multi-Byte Division Program for Single-Chip Microcomputers
      In the actual application of single-chip microcomputer, division operation is a relatively common operation.      Take the MCS-51 microcontroller as an example. Although it provides division instructions, it can only perform single-byte operations. If you want to perform multi-byte division operations, you have
[Microcontroller]
SCI interrupt send
SCI is a full-duplex asynchronous serial communication interface, mainly used for communication between MCU and other computers or devices. Several independent MCUs can also realize serial communication through SCI to form a network. There are two SCIs (SCI0 and SCI1) in MC9S12XS128. To design an SCI serial communicat
[Microcontroller]
SCI interrupt send
High reliability system design based on 32-bit microcontroller MC68HC376
Introduction With the continuous development of industrial technology, the requirements for microcontroller control are becoming higher and higher. Microcontrollers are required to have higher response speed and stronger data processing capabilities. Various high-performance new microcontrollers have been rapidly dev
[Microcontroller]
Latest Analog Electronics 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号