Interrupt ground of microcontroller using n-channel MOSFET - Page 1
Forum section: electronics / beginners

author: x4ce
author_rank: Contributor
timestamp: June 18, 2024, 04:54:35 pm
content: Hello,Please someone can comment that this design of interrupting a micro's power will work. How can I implement this to control a micro's supply.Thanks

author: xvr
author_rank: Frequent Contributor
timestamp: June 18, 2024, 07:09:05 pm
content: Not a good idea. If you break ground of IC you also should turn off ALL inputs and outputs, otherwise your IC still will be powered by connected inputs. It will not work properly, but it still be connected to power supply and do some weird things.If you want to control power - use high side switch and bring all inputs to zero potential (or disconnect).

author: Andy Chee
author_rank: Super Contributor
timestamp: June 18, 2024, 07:21:05 pm
content: Depending on what you're attempting to do, perhaps holding the microcontroller's reset pin inactive, is a more appropriate technique of disabling it.

author: temperance
author_rank: Super Contributor
timestamp: June 18, 2024, 07:29:45 pm
content: Circuit not work and smokes every tenth of the month around ten except on Mondays. Dnt no wht to do. Pls hlp.

author: JustMeHere
author_rank: Frequent Contributor
timestamp: June 18, 2024, 07:34:24 pm
content: If you want to put a uC into a low power state, then RTFM and do it the right way. They can often be put in a low power state gracefully by holding them in reset, asserting disable on a pin, or a software command can be issued. The last thing you want is an unstable shutdown damaging data in flashUsing reset could have problems. In some uCs being held in reset puts them into programming mode. So it might not be safe to hold it in reset. You just need to RTFM and realize datasheets are your best friend.

author: Kim Christensen
author_rank: Super Contributor
timestamp: June 18, 2024, 07:55:58 pm
content: You can do this ifeverythingelse connected to the micro uses the same "ground" point as the micro's Vss pin. (FET's drain)If not, you're going to have to add some extra interface circuitry between stuff powered from the "unswitched ground" and any IO pin on the micro.As others have mentioned, there are ways to put most micros into sleep mode which would be a better, easier, and more graceful solution.Not sure what you're doing with R9?

author: JustMeHere
author_rank: Frequent Contributor
timestamp: June 20, 2024, 04:20:55 am
content: You also need to stop your gate from floating when whatever is controlling it is in an unknown state. Use a pull down resistor to pull the gate to ground when there isn't an actual signal on the gate pin.Micros may put their IO pins into high-z when booting. This means whatever is connected to those pins are also floating. If you let the gate float, it may be on, it may be off, it may be somewhere in between.

author: ArdWar
author_rank: Frequent Contributor
timestamp: June 20, 2024, 04:35:40 am
content: Quote from: xvr on June 18, 2024, 07:09:05 pmShould not be a problem IF those I/O pulldowns are connected to the interrupted "ground" instead of the supply ground.It's the exact same situation with how I/O works with switched VCC. For some reason a lot of people gets confused when messing with GND.

author: x4ce
author_rank: Contributor
timestamp: June 24, 2024, 04:24:41 pm
content: Thanks for the reply.I have a common ground on the PCB for all the components.R9 is DNP and will be placed in case this soft switching does not work.

author: x4ce
author_rank: Contributor
timestamp: June 24, 2024, 04:25:44 pm
content: Thank you for the suggestion and I will put it in the design.