2586 views|20 replies

6

Posts

0

Resources
The OP
 

I want to use a 3.3v microcontroller to share power to control a relay, but the microcontroller stops working after grounding. [Copy link]

 


I want to use a 3.3v microcontroller to share power to control a relay. I use a 5v boost module bought from Taobao. The microcontroller controls the relay using an NPN transistor to amplify the current. Why does the microcontroller not work after the circuit is grounded? How do I modify this circuit diagram? ?

This post is from 51mcu

Latest reply

This picture directly makes me doubt my life   Details Published on 2023-2-21 11:07
 

1w

Posts

25

Resources
2
 

Is the boost module powerful enough to drive the relay?

This post is from 51mcu

Comments

The power is sufficient, but the main problem is that the microcontroller is not running.  Details Published on 2022-7-29 16:12
 
 
 

1w

Posts

142

Resources
3
 

First, measure the change of power supply voltage after the relay is closed. If 3.3V is normal and only the MCU stops running, it means that it is caused by interference. Otherwise, it is caused by insufficient power supply. Obviously, the two countermeasures are different.

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

1w

Posts

142

Resources
4
 

The simplest test method is to not connect the relay contacts to any other circuits, and only measure the impact of the relay itself on the MCU before and after the action. If there is no impact at this time, it means that it is not a contact spark interference, but a power supply problem. At this time, further testing and analysis is required to determine whether it is a 3.3V power supply problem or a boost power supply problem.

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

1w

Posts

142

Resources
5
 

In addition, the relay should not be connected in parallel with a resistor, but a freewheeling diode should be connected in anti-parallel.

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

17

Posts

0

Resources
6
 
What is that thing in the middle of the relay? It doesn't look like a relay.
This post is from 51mcu
 
 
 

6

Posts

0

Resources
7
 

The relay has a pin, a positive, a negative, and an input control pin.

This post is from 51mcu
 
 
 

6

Posts

0

Resources
8
 
waterssj posted on 2022-7-29 15:39 What is this thing in the middle and bottom of the relay? It doesn't look like a relay.

That is ground. The relay has 3 pins, one positive, one negative, and one input control pin.

This post is from 51mcu
 
 
 

6

Posts

0

Resources
9
 
dcexpert posted on 2022-7-29 14:55 Is the power of the boost module large enough to drive the relay?

The power is sufficient, but the main problem is that the microcontroller is not running.

This post is from 51mcu
 
 
 

2870

Posts

4

Resources
10
 

Can you draw the schematic diagram first? This diagram is really hard to understand. The relay coil has only two wires. The control pins should not be related to the MCU motherboard. The execution components should not use the same power supply as the MCU power supply.

This post is from 51mcu

Comments

I just want to use the same power supply. I don't want to power it separately with a dry battery. IN is the control pin of the collector.  Details Published on 2022-7-29 16:43
 
 
 

6

Posts

0

Resources
11
 
bigbat posted on 2022-7-29 16:32 Can you draw the schematic diagram better first? This diagram is really hard to understand, and the relay coil has only two wires, and the control pins should not be connected to the MCU motherboard...

I just want to use the same power supply. I don't want to power it separately with a dry battery. IN is the control pin of the collector.

This post is from 51mcu

Comments

in is the control pin of the relay, and the io port of the microcontroller is connected to the in pin through a transistor  Details Published on 2022-7-29 16:44
 
 
 

6

Posts

0

Resources
12
 
xiaoxiaoai88 posted on 2022-7-29 16:43 I just want to use the same power supply. I don’t want to use a separate power supply for the dry battery I use. IN is the control pin of the collector

in is the control pin of the relay, and the io port of the microcontroller is connected to the in pin through a transistor

This post is from 51mcu

Comments

I tell you to draw the circuit correctly, otherwise no one will know how you connected the wires. [attachimg]627069[/attachimg] Can you understand this picture?  Details Published on 2022-7-29 17:38
 
 
 

2870

Posts

4

Resources
13
 
xiaoxiaoai88 posted on 2022-7-29 16:44 in is the control pin of the relay, and the io port of the microcontroller is connected to the in pin through a transistor

I tell you to draw the circuit diagram correctly, otherwise no one will know how you connected the wires.

Can you understand this picture?

This post is from 51mcu
 
 
 

1131

Posts

17

Resources
14
 

This kid posts everywhere, and the entire internet is filled with just this one post of yours.

This post is from 51mcu
 
 
 

6060

Posts

6

Resources
15
 

You can debug the program online to see if there is any hardware error, and then use an oscilloscope to see if the power supply drops at the moment of power-on. Generally, a voltage drop in the microcontroller at an instant will cause a reset, resulting in an abnormality.

This post is from 51mcu
 
Personal signature

在爱好的道路上不断前进,在生活的迷雾中播撒光引

 
 

210

Posts

3

Resources
16
 

Looking at your circuit diagram (which is also not standard), the relay has three terminals used. One of them is directly grounded. I don't know which one is the common terminal. This solution may cause a short circuit. You'd better fully understand how to use the relay terminals.

This post is from 51mcu
 
 
 

3

Posts

0

Resources
17
 

There is something wrong with your relay circuit diagram. The transistor is always in the on state. At the moment of power-on, 5V passes through the coil and there is a possibility of direct short circuit.

This post is from 51mcu
 
 
 

539

Posts

1

Resources
18
 
Is the current enough? The transistor has a current limit, right?
This post is from 51mcu
 
 
 

1

Posts

0

Resources
19
 
To achieve signal isolation and power isolation, the relay has such a large working current that it is very likely to lower the working voltage of the microcontroller.
This post is from 51mcu
 
 
 

65

Posts

0

Resources
20
 

You can use the elimination method. If the microcontroller is normal after disconnecting the relay, then check the power supply problem. Is the 3.3V pulled down, or is the interference too strong to affect the reset?

This post is from 51mcu
 
 
 

Guess Your Favourite
Find a datasheet?

EEWorld Datasheet Technical Support

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