4183 views|21 replies

52

Posts

3

Resources
The OP
 

5v relay [Copy link]

 

This is using the stm32 microcontroller to control the relay. I would like to ask the big guys whether I should use a 3.3v relay or a 5v relay?

This post is from Analog electronics

Latest reply

Relays are very common devices and are generally available in electronic shopping malls. LiChuang Mall, Huaqiangbei, Wiki , etc. The statement is not theirs, you can go to them to see what the parameters are   Details Published on 2020-8-19 17:07

2w

Posts

0

Resources
2
 

How high is the voltage of VCC in the figure? The higher the voltage of VCC, the higher the voltage of the relay. If VCC is 5V, use a 5V relay. If VCC is 12V, use a 12V relay.

This post is from Analog electronics

Comments

If VCC uses 12V, do you need to adjust the resistance value of the resistor to prevent the VCC current from being too large and flowing into the microcontroller. The operating voltage of the microcontroller is 3.3V.  Details Published on 2020-8-18 08:38
 
 

1w

Posts

142

Resources
3
 

It depends on the power supply voltage and drive capability you use. Your diagram does not reflect the relevant information.

This post is from Analog electronics
 
Personal signature上传了一些书籍资料,也许有你想要的:https://download.eeworld.com.cn/user/chunyang
 
 
 

1w

Posts

142

Resources
4
 

If your system has both 5V and 3V, and the 3V comes from the 5V, then it is obviously better to use a 5V relay, and the price and selection are also more advantageous.

This post is from Analog electronics
 
Personal signature上传了一些书籍资料,也许有你想要的:https://download.eeworld.com.cn/user/chunyang
 
 
 

2w

Posts

341

Resources
5
 

The IO drive output capacity of the stm32 microcontroller is up to tens of mA

Whether using 5V or 3.3V relay microcontroller can not directly drive

Both require transistors or driver chips

This post is from Analog electronics

Comments

In the picture above, an NPN transistor 8050 is used to drive the relay, and it is also equipped with a freewheeling diode.  Details Published on 2020-8-17 16:44
 
 
 
 

2w

Posts

0

Resources
6
 
qwqwqw2088 Published on 2020-8-17 16:06 The IO drive output capacity of the stm32 microcontroller is up to tens of mA. Whether using 5V or 3.3V relays, the microcontroller cannot drive them directly. They all need three...

In the picture above, an NPN transistor 8050 is used to drive the relay, and it is also equipped with a freewheeling diode.

This post is from Analog electronics
 
 
 
 

7462

Posts

2

Resources
7
 

Small investment, big investment

This post is from Analog electronics
 
Personal signature

默认摸鱼,再摸鱼。2022、9、28

 
 
 

52

Posts

3

Resources
8
 
maychang posted on 2020-8-17 15:56 How high is the voltage of VCC in the picture? The higher the voltage of VCC, the higher the voltage of the relay. If VCC is 5V, use a 5V relay. If VCC is 12V, then...

If VCC uses 12V, do you need to adjust the resistance value of the resistor to prevent the VCC current from being too large and flowing into the microcontroller. The operating voltage of the microcontroller is 3.3V.

This post is from Analog electronics

Comments

When VCC is 12V or even higher, the problem of "VCC current is too large and flows into the microcontroller" will not occur during normal operation unless Q1 is damaged. The resistance value of R91 should ensure that when the microcontroller pin is at a high level, there is enough current flowing into the base of the transistor Q1.  Details Published on 2020-8-18 09:20
 
 
 
 

2w

Posts

0

Resources
9
 
Plum blossoms fall and lonely people get drunk Published on 2020-8-18 08:38 If VCC uses 12V, do you need to adjust the resistance value of the resistor to prevent the VCC current from being too large and flowing into the microcontroller. The operating voltage of the microcontroller is 3.3V. ...

When VCC is 12V or even higher, the problem of "VCC current is too large and flows into the microcontroller" will not occur during normal operation unless Q1 is damaged.

The resistance value of R91 should ensure that when the microcontroller pin is at a high level, sufficient current flows into the base of transistor Q1.

This post is from Analog electronics

Comments

How should I calculate the resistance of R91?  Details Published on 2020-8-18 11:40
 
 
 
 

52

Posts

3

Resources
10
 
maychang published on 2020-8-18 09:20 When VCC is 12V or even higher, the problem of "VCC current is too large and flows into the microcontroller" will not occur during normal operation unless Q1 is damaged. ...

How should I calculate the resistance of R91?

This post is from Analog electronics

Comments

In the 9th floor, it was said: "The resistance value of R91 should ensure that when the microcontroller pin is at a high level, there is enough current flowing into the base of the transistor Q1." The microcontroller power supply voltage is 3.3V, and the pin's maximum voltage can only reach 3.3V (actually a little lower). The relay manual must have a parameter for the winding resistance value R.  Details Published on 2020-8-18 12:08
In the 9th floor, it was said: "The resistance value of R91 should ensure that when the microcontroller pin is at a high level, there is enough current flowing into the base of the transistor Q1." The microcontroller power supply voltage is 3.3V, and the pin's maximum voltage can only reach 3.3V (actually a little lower). The relay manual must have a parameter for the winding resistance value R.  Details Published on 2020-8-18 12:05
In the 9th floor, it was said: "The resistance value of R91 should ensure that when the microcontroller pin is at a high level, there is enough current flowing into the base of the transistor Q1." The microcontroller power supply voltage is 3.3V, and the pin's maximum voltage can only reach 3.3V (actually a little lower). The relay manual must have a parameter for the winding resistance value R.  Details Published on 2020-8-18 12:03
In the 9th floor, it was said: "The resistance value of R91 should ensure that when the microcontroller pin is at a high level, there is enough current flowing into the base of the transistor Q1." The microcontroller power supply voltage is 3.3V, and the pin's maximum voltage can only reach 3.3V (actually a little lower). The relay manual must have a parameter for the winding resistance value R.  Details Published on 2020-8-18 11:59
 
 
 
 

2w

Posts

0

Resources
11
 
This post was last edited by maychang on 2020-8-18 12:01
Plum blossoms fall and lonely people get drunk published on 2020-8-18 11:40 How should the resistance of R91 be calculated?

It was said on the 9th floor: "The resistance value of R91 should ensure that when the microcontroller pin is at a high level, sufficient current flows into the base of transistor Q1."

The power supply voltage of the microcontroller is 3.3V, and the maximum voltage of the pin can only reach 3.3V (actually it is a little lower). The relay manual must have the parameter of the winding resistance value R. According to the winding resistance value and the power supply voltage (12V), the relay operating current can be calculated, assuming it is I (I is approximately equal to the power supply voltage divided by the winding resistance, that is, I = 12/R). The ratio of the collector current to the base current of the transistor is called the current gain factor β. R91 must ensure that the current flowing into the base is greater than I/β. When the transistor is turned on, the voltage drop between the base and the emitter is approximately a PN junction voltage drop, that is, 0.7V. Therefore, it must satisfy (3.3V-0.7V)/R91>I/β, and leave an appropriate margin (slightly smaller than the value calculated by the previous formula, so that there is enough current in R92 to make the voltage across R92 reach 0.7V).

This post is from Analog electronics

Comments

Got it, thank you.  Details Published on 2020-8-18 13:47
 
 
 
 

2w

Posts

0

Resources
12
 

Therefore, the value of R91 is related to the power of the relay you use (the product of the current in the winding and the operating voltage). If you use a larger power relay, R91 must be smaller.

This post is from Analog electronics
 
 
 
 

2w

Posts

0

Resources
13
 
This post was last edited by maychang on 2020-8-18 12:07
Plum blossoms fall and lonely people get drunk published on 2020-8-18 11:40 How should the resistance of R91 be calculated?

The dispersion of transistor current amplification factor β is relatively large, and the manual often gives a range, such as 40 to 200. When calculating R91, it is obviously necessary to calculate it based on the minimum amplification factor β. If the actual transistor amplification factor β is not that large, the transistor cannot enter saturation conduction, and the relay winding cannot obtain a voltage as large as the power supply voltage, which may cause malfunction, and the transistor will also heat up or even burn out.

This post is from Analog electronics
 
 
 
 

2w

Posts

0

Resources
14
 

These are the simplest calculations, mainly applying Ohm's law, and are knowledge that must be mastered.

This post is from Analog electronics
 
 
 
 

52

Posts

3

Resources
15
 
maychang posted on 2020-8-18 11:59 梅花飘落孤人醉 posted on 2020-8-18 11:40 How should I calculate the resistance of R91? I said on the 9th floor: "The resistance value of R91 should be...

Got it, thank you.

This post is from Analog electronics

Comments

After saying so much, it all boils down to one sentence: R91 must ensure that Q1 can be saturated and turned on even under the most unfavorable conditions.  Details Published on 2020-8-18 14:59
 
 
 
 

2w

Posts

0

Resources
16
 

After saying so much, it all boils down to one sentence: R91 must ensure that Q1 can be saturated and turned on even under the most unfavorable conditions.

This post is from Analog electronics

Comments

Hi, do you have any electronic component suppliers or websites? I want to find some relays that meet my requirements.  Details Published on 2020-8-19 15:44
 
 
 
 

52

Posts

3

Resources
17
 
maychang posted on 2020-8-18 14:59 After saying so much, it all comes down to one sentence: R91 must ensure that Q1 can be saturated and turned on under the most unfavorable conditions.

Hi, do you have any electronic component suppliers or websites? I want to find some relays that meet my requirements.

This post is from Analog electronics

Comments

For this, I only know how to search on the Internet, and I don’t know any professional suppliers.   Details Published on 2020-8-19 17:07
For this, I only know how to search on the Internet, and I don’t know any professional suppliers.   Details Published on 2020-8-19 17:01
For this, I only know how to search on the Internet, and I don’t know any professional suppliers.   Details Published on 2020-8-19 17:01
 
 
 
 

2w

Posts

0

Resources
18
 
梅花飘落孤人醉 posted on 2020-8-19 15:44 Boss, do you have any electronic component suppliers or websites? I want to find some relays that meet the requirements.

For this, I only know how to search on the Internet, and I don’t know any professional suppliers.

This post is from Analog electronics
 
 
 
 

2w

Posts

0

Resources
19
 
梅花飘落孤人醉 posted on 2020-8-19 15:44 Boss, do you have any electronic component suppliers or websites? I want to find some relays that meet the requirements.

Ask qwqwqw2088, he may be more familiar with it.

This post is from Analog electronics

Comments

thank you.  Details Published on 2020-8-19 18:04
 
 
 
 

2w

Posts

341

Resources
20
 
梅花飘落孤人醉 posted on 2020-8-19 15:44 Boss, do you have any electronic component suppliers or websites? I want to find some relays that meet the requirements.

Relays are very common devices and are generally available in electronic shopping malls.

LiChuang Mall, Huaqiangbei, Wiki , etc.

The statement is not theirs, you can go to them to see what the parameters are

This post is from Analog electronics

Comments

Okay, thank you.  Details Published on 2020-8-19 18:04
 
 
 
 

Guess Your Favourite
Find a datasheet?

EEWorld Datasheet Technical Support

EEWorld
subscription
account

EEWorld
service
account

Automotive
development
circle

Copyright © 2005-2024 EEWORLD.com.cn, Inc. All rights reserved 京B2-20211791 京ICP备10001474号-1 电信业务审批[2006]字第258号函 京公网安备 11010802033920号
快速回复 返回顶部 Return list