3147 views|12 replies

22

Posts

0

Resources
The OP
 

Combination key to shut down system power supply problem [Copy link]

 
1. The company is going to make a product with a battery. There is no toggle switch on the battery path, which means that there must be a way to cut off the power or reset after the software crashes. 2. The battery will pass through the MOS tube and then the system to supply power. 3. Products with batteries usually have a reset (or power-off) hole. In case the software crashes, you can poke this hole with something to reset or power off. 4. There are 5 buttons on the product, all of which are detected by ADC. 5. The current idea is not to leave this reset hole. I want to realize the function of hardware power off or hardware reset by pressing two buttons at the same time. I want a schematic diagram. The attachment is someone else's idea, but it feels that after the system is working, the Power button cannot be detected by ADC.


开关.jpg (27.39 KB, downloads: 0)

开关.jpg
This post is from Analog electronics

Latest reply

This post was last edited by topwon on 2018-9-13 09:13 The circuit of the flip-flop can refer to my reply on another post about the self-latching relay. In this way, each time the POWER button is pressed, the state of the PMOS tube will change and remain until the next button operation. There is no need for MCU intervention, and it is completely hardware controlled.  Details Published on 2018-9-13 09:11

4005

Posts

0

Resources
2
 
I don't quite understand your product. What's the difference between the reset hole and the button?
This post is from Analog electronics

Comments

1. The reset hole is used when the software crashes. It is used to cut off the power of the system or reset it. There is actually a button inside the reset hole that can shut down the MOS. When the software crashes, all buttons do not work. There is no toggle switch in the product to cut off the power, and the battery cannot be removed. 2. The power button in the button  Details Published on 2018-9-12 11:15
 
 

22

Posts

0

Resources
3
 
huo_hu posted on 2018-9-12 09:53 I don't quite understand your product. What is the difference between the reset hole and the button?
1. The reset hole is used when the software crashes. It is used to cut off the power of the system or reset it. There is actually a button inside the reset hole, which can shut down the MOS. When the software crashes, all buttons do not work. There is no toggle switch in the product to cut off the power, and the battery cannot be removed. 2. The power button in the button is used when the software is working normally. It is used to turn the machine on and off. 3. The current idea is whether the reset hole can be omitted. Use a combination of buttons to cut off the power.
This post is from Analog electronics

Comments

I roughly understand what you mean. The whole thing is sealed in a box and cannot be opened. The reset hole is a method of cutting off the power and then powering on. If the microcontroller is abnormal for unknown reasons, all functions that rely on the software will fail. Cutting off the power and then powering on is the last resort. There is no better way to replace it. If it still doesn't work, you can only open  Details Published on 2018-9-12 17:51
 
 
 
 

2w

Posts

0

Resources
4
 
After the MCU crashes, no matter what method is used, it cannot detect the key, so "trying to achieve the hardware power-off or hardware reset function by pressing two keys at the same time" does not work. You can only reset the MCU by pressing the reset button or the power-off button.
This post is from Analog electronics

Comments

The picture I gave is fine. It's just that when the software is working normally, the power button seems to be unable to be detected.  Details Published on 2018-9-12 12:03
 
 
 
 

22

Posts

0

Resources
5
 
maychang posted on 2018-9-12 11:53 After the microcontroller crashes, no matter what method is used, the key cannot be detected, so "if you want to achieve hardware power off or hardware reset by pressing two keys at the same time...
The picture I gave is fine. It's just that when the software is working normally, the power button seems to be undetectable.
This post is from Analog electronics

Comments

“The diagram I gave is fine.” Since the diagram you gave is fine, does that mean there is nothing wrong with your diagram? Right?  Details Published on 2018-9-12 13:34
 
 
 
 

2w

Posts

0

Resources
6
 
Chengfeng posted on 2018-9-12 12:03 The picture I gave is OK. It's just that when the software is working normally, the power button seems to be unable to be detected.
"The picture I gave is OK." Since the picture you gave is OK, does that mean there is no problem with your picture? Is that right?
This post is from Analog electronics

Comments

There is no problem with using it to power off when the software crashes. There are just other problems. I have used two different ways to describe this problem. Method 1: "But it seems that after the system is working, the Power button cannot be detected by ADC." Method 2: "It seems that the power button cannot be detected when the software is working normally."  Details Published on 2018-9-12 14:48
 
 
 
 

22

Posts

0

Resources
7
 
maychang posted on 2018-9-12 13:34 "The diagram I provided is OK." Since the diagram you provided is OK, does that mean your diagram is OK? Is that right?
It is OK to use it to power off when the software crashes. It is just that there are other problems. I have used two different ways to describe this problem. Method 1: "But it feels that after the system works, the Power button cannot be detected by ADC." Method 2: "It seems that the Power button cannot be detected when the software works normally." Now I will use another way of description, Method 3: When the software is normal, pressing the Power button cannot shut down the machine, because when the Power button is pressed, the voltage of the MCU AD Pin will not change. I don't know if I have described it clearly now.
This post is from Analog electronics

Comments

The 7th post says "Method 3: When the software is working normally, pressing the power button will not turn off the computer." The 3rd post says "2. The power button is used when the software is working normally, to turn the computer on and off." These two sentences contradict each other. So you haven't described it clearly yet.  Details Published on 2018-9-12 15:49
 
 
 
 

2w

Posts

0

Resources
8
 
Chengfeng published on 2018-9-12 14:48 It is fine to use it to cut off the power when the software crashes. It's just that there are other problems. I have used two different ways to describe this problem. Method 1: "...
The 7th floor said "Method 3: When the software is normal, pressing the power button will not shut down the computer" The 3rd floor said "2. The power button is used when the software is working normally, and is used to turn the computer on and off." These two sentences contradict each other. So you haven't described it clearly yet.
This post is from Analog electronics
 
 
 
 

4005

Posts

0

Resources
9
 
Chengfeng published on 2018-9-12 11:15 1. The reset hole is used when the software crashes, to cut off the power of the system or reset it. There is actually a button inside the reset hole, which can turn off the MOS...
I roughly understand what you mean. The whole thing is sealed in the box and cannot be opened. The reset hole is a way to cut off the power and then power it on. If the microcontroller is abnormal for unknown reasons, all functions that rely on the software will fail. Cutting off the power and then powering it on is the last resort, and there is no better way to replace it. If it still doesn't work, you can only open the cover.
This post is from Analog electronics
 
 
 
 

4005

Posts

0

Resources
10
 
Do you want to make a switch that can change the IO state of the microcontroller and reset it by long pressing the power off?
This post is from Analog electronics
 
 
 
 

4005

Posts

0

Resources
11
 
The simplest method I can think of is to use the reset voltage state of the reset pin and the power supply voltage difference. The reset pin reset and power-off reset have the same effect.
This post is from Analog electronics
 
 
 
 

1048

Posts

1

Resources
12
 
To avoid the impact of software crashes, the power button is not connected to the MCU, but uses an independent circuit (digital circuit, flip-flop) to control the power on and off of the entire machine (PMOS tube switch). Therefore, there is no ADC problem of the MCU detecting the power button.
This post is from Analog electronics
 
 
 
 

1048

Posts

1

Resources
13
 
This post was last edited by topwon on 2018-9-13 09:13 The circuit of the flip-flop can refer to my reply on another post about the self-latching relay. In this way, each time the POWER button is pressed, the state of the PMOS tube will change and remain until the next button operation. There is no need for MCU intervention, and it is completely hardware controlled.
This post is from Analog electronics
 
 
 
 

Guess Your Favourite
Just looking around
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