MCU drive relay mode

Publisher:快乐兔子Latest update time:2016-01-19 Source: eefocusKeywords:MCU Reading articles on mobile phones Scan QR code
Read articles on your mobile phone anytime, anywhere
Circuit 1:

 
Many designs use this circuit to drive the relay. Although it can work, it is unreasonable to do so. After careful analysis, it is found that Q3 cannot be fully saturated.
Let's not count the resistance of R1. Assume that we make the base current of Q1 the largest and take R1=0. When the control signal voltage is 0, the voltage of Q1 eb is 0.7V, and the voltage of ec is also 0.7V. When the 9012 tube is fully saturated, the voltage of ec should be 0.2V. Obviously, the tube is not fully saturated; the maximum voltage on the relay can only be 11.3V.
In order to fully saturate the tube, the base current must be large enough, so the base voltage needs to be below -0.7V.
 
Circuit 2:
 
Let's take a look at this circuit again.

When the control terminal voltage is 0, the base voltage of Q1 is (12-0.7=11.3V). Changing the size of R1 can change the base current. When the base current is large enough, the triode is saturated.
In order to verify the above analysis, we built a circuit, R1 is 4.7K, the base current is 2.4ma, the Q1 ec voltage is 0.2V, and the voltage across the relay is 11.8V.
Note: The value of R1 cannot be too small to ensure that the base current is within the safe range, and it cannot be too large to ensure that the transistor can be fully saturated. This can be calculated through voltage and resistance.
The first circuit can work because the relay has a wide voltage range. Sometimes it can barely work even if it is undervoltage, but the situation is unstable. Therefore, we do not recommend this method when designing. The
correct circuit should be circuit 2. The correct connection method and the appropriate base resistance can ensure the rationality and stability of the design.
Finally, it should be noted that the 12V relay used in this experiment cannot be directly driven by the IO port of the microcontroller, otherwise it will not be turned off. If a 5V relay is selected, it can be used, and the principle is the same as above.
Keywords:MCU Reference address:MCU drive relay mode

Previous article:MCU overclocking PLL phase-locked loop settings
Next article:How to combine multiple C language modules into one program

Recommended ReadingLatest update time:2024-11-16 21:54

C51 single chip microcomputer watchdog circuit
The watchdog circuit is composed of 89C51 single-chip microcomputer and X25045. The hardware connection diagram of X25045 is shown in Figure 1. The X25045 chip contains a watchdog timer, and the system monitoring time can be preset by software. If there is no bus activity within the preset time of the watchdog timer
[Microcontroller]
C51 single chip microcomputer watchdog circuit
Interpretation of ID code of PIC16 series microcontroller
I have seen many beginners confused about reading and writing ID codes of PIC16 series microcontrollers. To be honest, the information on this aspect is not very complete. Some textbooks may involve the introduction of the ID area, but they are often passed over in one generation. This is a place where beginners are p
[Microcontroller]
Design of "Dingdong" doorbell based on 51 single chip microcomputer
1. Experimental task:   When the switch SP1 is pressed, the AT89S51 microcontroller generates a "ding-dong" sound which is output from the P1.0 port to the LM386 and then sent to the speaker after amplification. 2. Circuit schematic diagram Figure 4.19.1 3. Hardware connection on the system board (1) Connect the P1.0
[Microcontroller]
Design of
How to use microcontroller? What should I do if the microcontroller can only use routines?
"Single-chip microcomputer" can be said to be a professional term. Only those who work in electronics or related to electronic products will know what a single-chip microcomputer does. When I was dating my girlfriend in college, she asked me what I learned in the laboratory every day. I said microcontroller software d
[Microcontroller]
Detailed explanation of PIC microcontroller application design skills
The PIC series 8-bit single-chip microcomputer (RISC microcontroller) developed by Microchip Technology Inc. of the United States, especially the microcontroller with built-in second-generation Flash memory (40-year storage life), is unique in terms of rapid application. Due to its ease of use and high reliability,
[Microcontroller]
Detailed explanation of PIC microcontroller application design skills
Design of audio mouse repeller using 51 microcontroller
introduction For a long time, rats have caused great trouble to domestic cattle work and agricultural production. However, existing mechanical methods, chemical methods, and biological control all have obvious shortcomings. The disadvantage of mechanical rodent control is that after being injured by such a device, rat
[Microcontroller]
Design of audio mouse repeller using 51 microcontroller
Explanation of the header file of the microcontroller c51
#include reg51.h is the header file of c51 (a C language used for microcontroller development). It is similar to the header file AT89X51.h. These two header files are basically the same, except that the bit definitions are different when used. The operation of P1.1 in the at89x51.h file is written as P1_
[Microcontroller]
Design of hardware structure and control system of descending device based on single chip microcomputer control
This paper introduces a hardware structure and control system of a descent control device based on single-chip microcomputer control. The system uses a single-chip microcomputer as the control core of the system and combines photoelectric sensor technology to realize the measurement of the descent speed, thereby achie
[Microcontroller]
Design of hardware structure and control system of descending device based on single chip microcomputer control
Latest Microcontroller Articles
  • Download from the Internet--ARM Getting Started Notes
    A brief introduction: From today on, the ARM notebook of the rookie is open, and it can be regarded as a place to store these notes. Why publish it? Maybe you are interested in it. In fact, the reason for these notes is ...
  • Learn ARM development(22)
    Turning off and on interrupts Interrupts are an efficient dialogue mechanism, but sometimes you don't want to interrupt the program while it is running. For example, when you are printing something, the program suddenly interrupts and another ...
  • Learn ARM development(21)
    First, declare the task pointer, because it will be used later. Task pointer volatile TASK_TCB* volatile g_pCurrentTask = NULL;volatile TASK_TCB* vol ...
  • Learn ARM development(20)
    With the previous Tick interrupt, the basic task switching conditions are ready. However, this "easterly" is also difficult to understand. Only through continuous practice can we understand it. ...
  • Learn ARM development(19)
    After many days of hard work, I finally got the interrupt working. But in order to allow RTOS to use timer interrupts, what kind of interrupts can be implemented in S3C44B0? There are two methods in S3C44B0. ...
  • Learn ARM development(14)
  • Learn ARM development(15)
  • Learn ARM development(16)
  • Learn ARM development(17)
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号