cancel
Showing results for 
Search instead for 
Did you mean: 

ON/OFF Microcontroller

Omkar Teli
Associate II
Posted on January 19, 2018 at 16:09

We are using STM8L051F3 and it has 2 inputs which is 2 key keypad which we are using for our application. Now i want to use that keypad for ON/OFF of microcontroller also.How i can do that? I want to ON controller power supply when i press keypad key and then i will use those key for my application also and then if i key for long time or press both keys it will OFF, i.e. power supply cut off. This is like our old keypad mobile phones which has 1 key for Mobile phone ON and that same key we can use for receiving call also. How can i do that for my STM8L051F3?

7 REPLIES 7
Vyacheslav Azarov
Associate III
Posted on January 19, 2018 at 16:35

Maybe these materials will be useful to you: 

https://sourceforge.net/p/s3-code/code/ci/master/tree/superbutton/

Omkar Teli
Associate II
Posted on January 20, 2018 at 05:55

Hi thanks for response, Yea i can do that longer button press detection using timer. Main thing is hardware i think, That i want to give power supply to controller using 1 button not switch, means if i pressed once power supply goes to controller then our application will work and if i pressed that button little longer it will off. Problem cant be solved by just code i think, it needs hardware. So i built latch circuit which gets ON when i press a key and our controller gets power supply but then i cant use that key for my application as it is always high, as it is base pin of BC547.

Posted on January 20, 2018 at 07:27

It is how you want. Modern micro-controllers do not need to remove power.

The current consumption in sleep mode is very small. A wake up the

controller can be executed by the same button, connecting it to the wake up

input signal.

Posted on January 20, 2018 at 08:25

So there is no way to completely off microcontroller?

Posted on January 20, 2018 at 09:34

Is need small external electronics circuit for complete switch off the

micro-controller by SPST push button.

Posted on January 20, 2018 at 10:09

I found one circuit but i don't understood its working 100%, kindly check the link

http://www.mosaic-industries.com/embedded-systems/microcontroller-projects/electronic-circuits/push-button-switch-turn-on/microcontroller-latching-on-off

 
Posted on January 20, 2018 at 10:32

It's original. What you do not understand specifically? The author described the principles of the circuit quite well. You can improve your skills in circuitry understanding by study special education courses.