As mentioned before, the MCU has limited source and sink current, that is, limited output drive capability. How to drive high-power devices such as relays? The answer is simple: use transistors. How to determine the device parameters?
I have a HFD23 5V relay on hand, let's take a look at its parameters.
As can be seen:
The resistance of the coil is 125Ω;
The power of the coil is 200mW;
The rated voltage of the relay is 5V;
From this, the pick-up current of the relay can be calculated in two ways:
I = 0.2mW/5V = 40mA;
I = 5V/125Ω = 40mA;
Let's look at the parameters of the transistor:
The parameters are explained as follows:
PCM is the maximum permissible collector dissipation power;
ICM is the maximum allowable collector current;
BV (CEO) is the collector-emitter reverse breakdown voltage when the transistor base is open;
fT is the characteristic frequency;
hFE is the magnification factor;
In order to ensure the stability of the circuit, it is required that:
The PCM power of the transistor is at least twice the rated power of the relay, PCM ≥ 0.4W;
The ICM current of the transistor is at least twice the pull-in current of the relay, ICM ≥ 80mA;
The BV withstand voltage of the transistor is at least twice the rated voltage of the relay, BV ≥ 10V;
It can be seen that these four transistors can meet the needs. For stability considerations, we choose NPN S8050. The control circuit diagram is shown below:
Think about it: In actual application, will there be any problems with the above picture?
Since the coil of the relay is an inductive device, the coil will generate self-induced electromotive force when the changing current passes through the coil. According to Faraday's law, the magnitude of the self-induced electromotive force is proportional to the rate of change of the current passing through the coil (the rate of change of the magnetic flux in the coil). Therefore, when the power supply is disconnected, the current change rate is very large, and the coil will generate a self-induced electromotive force several times higher than the power supply voltage, and superimposed with the power supply voltage, this voltage may cause the transistor pole to be broken down, thereby causing the circuit to collapse.
solution
In order to eliminate the harmful effects of this induced electromotive force, a suppression diode is connected in reverse parallel at both ends of the relay coil to absorb the electromotive force. The sum of the self-inductance voltage and the power supply voltage is a forward bias voltage for the diode, which makes the diode conduct and forms a loop current. The induced high voltage will be released through the loop, ensuring the safety of the transistor. This diode is also called a freewheeling diode. The correct circuit diagram is shown below:
Previous article:Detailed explanation of the design of single-chip microcomputer driven digital tube (implemented by 74HC595)
Next article:Detailed explanation of MCU source current and sink current
- Popular Resources
- Popular amplifiers
- Learn ARM development(16)
- Learn ARM development(17)
- Learn ARM development(18)
- Embedded system debugging simulation tool
- A small question that has been bothering me recently has finally been solved~~
- Learn ARM development (1)
- Learn ARM development (2)
- Learn ARM development (4)
- Learn ARM development (6)
Professor at Beihang University, dedicated to promoting microcontrollers and embedded systems for over 20 years.
- LED chemical incompatibility test to see which chemicals LEDs can be used with
- Application of ARM9 hardware coprocessor on WinCE embedded motherboard
- What are the key points for selecting rotor flowmeter?
- LM317 high power charger circuit
- A brief analysis of Embest's application and development of embedded medical devices
- Single-phase RC protection circuit
- stm32 PVD programmable voltage monitor
- Introduction and measurement of edge trigger and level trigger of 51 single chip microcomputer
- Improved design of Linux system software shell protection technology
- What to do if the ABB robot protection device stops
- Detailed explanation of intelligent car body perception system
- How to solve the problem that the servo drive is not enabled
- Why does the servo drive not power on?
- What point should I connect to when the servo is turned on?
- How to turn on the internal enable of Panasonic servo drive?
- What is the rigidity setting of Panasonic servo drive?
- How to change the inertia ratio of Panasonic servo drive
- What is the inertia ratio of the servo motor?
- Is it better for the motor to have a large or small moment of inertia?
- What is the difference between low inertia and high inertia of servo motors?
- 【GD32450I-EVAL】TLI clock and RGB interface timing
- Follow the video step by step to learn the BearPi HM Nano development board introduction
- STM32F103 sends a specified number of pulses through TIM+DMA, the number will be more
- EEWORLD University ---- NXP Tech Video
- This might be my summary of the first half of 2020...what’s yours?
- Power supply interference
- Why is the voltage on the CSD pin of IRS2092 unstable and the LED on?
- The mysterious "step" problem in circuits
- 2020 TI Cup Provincial Undergraduate Electronic Design Competition Chip Recommendation List
- [Repost] I realized that the application range of crystal oscillators is so wide.