The various control signals used in conventional electrical equipment must be converted to digital signals that match the input/output ports of the microcontroller. The user equipment must input various control signals to the single-chip microcomputer, such as limit switches, operation buttons, selection switches, travel switches, and other switching outputs of the sensors, etc., and convert them into signals that can be received and processed by the single-chip microcomputer through the input circuit. The output circuit should convert and amplify the weak electric control signal sent by the single-chip microcomputer to the strong output signal required by the field to drive the actuators of the power tube, solenoid valve and relay, contactor, motor and other controlled devices, which can facilitate the actual control system. . In view of the characteristics of electrical control products, this paper discusses the design methods of common driving and coupling circuits of several kinds of single-chip I/O, which is practical for designing electrical control systems reasonably, improving circuit interface capability, enhancing system stability and anti-interference ability. Guiding significance.
Input circuit design
Figure 1 Switch signal input
Generally, the input signal will be input into the MCU in the form of a switch. From the engineering experience, the effective state of the control input of the switch input is much better than the high level effect, as shown in Figure 1. When the switch S1 is pressed, the command signal sent is low level, and when the switch S1 is not pressed normally, the level outputted to the single chip is high. This method has strong noise resistance.
If it is considered that the TTL level voltage is low and it is susceptible to external interference in long-line transmission, the input signal can be increased to +24 V, and the high-voltage signal is converted 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 contact of the switch contact good and reliable, as shown in Figure 2. Among them, D1 is a protection diode, and the reverse voltage is ≥50 V.
Figure 2 Increase the input signal level
Figure 3 input protection circuit
In order to prevent external spikes and static electricity from damaging the input pins, an anti-pulse diode can be added to the input to form a resistor bidirectional protection circuit, as shown in Figure 3. The forward voltage drop UF 二æžç®¡ 0.7 V of the diodes D1, D2, and D3, and the reverse breakdown voltage UBR ≈ 30 V, the protection circuit can limit the amplitude of the voltage regardless of the polarity of the input voltage at the input end. The input can withstand the range. That is: when a positive pulse occurs from VI to VCC, D1 is forward-conducting; when a negative pulse occurs from VI to VCC, D2 reverse-breaks; when a positive pulse occurs between VI and ground, D3 reverse-breaks; between VI and ground When a negative pulse occurs, D3 is forward-conducting and the diode acts as a clamp. The snubber resistor RS is about 1.5 to 2.5 kΩ, and forms an integration circuit with the input capacitor C, delaying the external induced voltage for a period of time. If the existence time of the interference voltage is less than Ï„, the effective voltage applied to the input terminal will be much lower than its amplitude; if the time is longer, D1 is turned on, and the current forms a certain voltage drop on the RS, thereby reducing the input voltage value.
There are some draft products here, which will not be displayed on the website. These products can be modified later to enrich the content of the website. If you want to know more about our company, you can go to our website to check, there will be what you want, or you can consult us. Nice to meet you and looking forward to our cooperation.
Draft-waiting For Releasing,Draft-waiting For Releasing,Draft-waiting For Releasing
ETOP WIREHARNESS LIMITED , https://www.oemwireharness.com