Pages: 1 [2]   Go Down
Author Topic: How to power off the μC by itself  (Read 3076 times)
0 Members and 1 Guest are viewing this topic.
Offline Offline
Newbie
*
Karma: 0
Posts: 17
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Try using the switch to turn the gate on, instead of 'shorting out' the MOSFET (like I had in my crude drawing).

A design like ajofscott suggested would be  more resilient, though.
Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 44
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I'll try this circuit tomorrow, i'm going to bed now.
Thanks guys smiley
Logged

0
Offline Offline
Shannon Member
****
Karma: 220
Posts: 12702
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
My brain says it should work, MOSFETs require so little current it should stay on easily.

Try adding a capacitor from the gate of the FET to ground, just to kill the odds that something is draining current there for a split second, causing your mosfet to shut down.

My circuit is in the attachments underneath.

Yes, I tried to add a 100uF and a 100nF cap without results

That circuit can't work, an N-channel MOSFET's gate has to be more positive than its source to turn on, yet you are expecting both to be at +5.0V when its on... It would be normal to use an n-channel to switch the 0V line, but here that would give exactly the original problem with + and - reversed.  CMOS inverter or similar required.
Logged

[ I won't respond to messages, use the forum please ]

nr Bundaberg, Australia
Online Online
Tesla Member
***
Karma: 130
Posts: 8620
Scattered showers my arse -- Noah, 2348BC.
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Here's a circuit I did a while back, I never built it though



There's probably stuff you don't need there but the general idea is to use an N-ch FET to switch the P-ch FET. For example D67 is only needed because I had 30v input, with a ~12v input you wouldn't need it.

Truth is there are high-side FET switches and controllable regulators that can do all this now so I doubt it's worth the effort to make a circuit up.

______
Rob
Logged

Rob Gray aka the GRAYnomad www.robgray.com

Offline Offline
God Member
*****
Karma: 1
Posts: 547
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Greynomad and I both do the same thing with different transistor families. Build our circuit(s) and then go from there. Both can be adapted to be on/off pb controllers with addition of an additional pb. Which would not be a bad idea anyway as it would allow forced powerdown by a human operator.
Logged

0
Offline Offline
Newbie
*
Karma: 0
Posts: 43
Creating futuristic, interactive installations which merge design, art and technology.
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

I don't know a lot about the transistors and FET's.

But you could have a look at the work done at jeelabs.com. The searchbar can be found at the bottom of the screen.
If you want your application to be batterypowered take a look at his battery board which power his nodes on a single AA battery for a LONG time.

Good luck,
Rob.
Logged

My best Arduino project: Bench. Interactive transformable furniture.

Offline Offline
Newbie
*
Karma: 0
Posts: 44
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Hi, I'm back with good news

I've built the circuit according to your suggestions (and drawed it =>attachment number 1), and it works smiley-lol.
Hope it's more or less complete. As you can see I didn't use limiting resistors on the gates, I heard somewhere that they aren't necessary for MOSFETs, am I right?
I also measured the current the circuit draws in the shutdown state, it's about 58 microA.

I tried to improve the circuit and it occored to me that I could use my enable pin of my vreg, instead of the N channel MOSFET . (I think they do the same in this case) Luckily it worked as expected and uses even less current in the shutdown state (about 29 microA)

I hope everthing is correct, otherwise tell me smiley

I'm grateful for your responses, you helped me a lot.
Andy


* Circuits.png (30.27 KB, 717x805 - viewed 39 times.)
Logged

Offline Offline
God Member
*****
Karma: 1
Posts: 547
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Use the pb referenced to ground not the mains. When you press your power button you are applying unregulated power to a micro output pint driving the 5V supply to whatever the high side is. The pb emulates the control transistor being on, not biasing the control transistor on. While your arrangement is sililar, it is completely different and will eventually fry a controller.
Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 44
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Sorry, I drawed the second one wrong. I just copy and paste the first and moved the parts around without changing the button.
However, it was late at night and I wanted to show you my results.
I built it up this way:


* Circuit2.png (15.04 KB, 674x385 - viewed 30 times.)
Logged

Cumming, GA
Offline Offline
Edison Member
*
Karma: 20
Posts: 1661
Ultimate DIY: Arduino
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Just Like Graynomad, I have a circuit that I drew up but have still yet to test.  In theory it should work.

Logged

Left Coast, CA (USA)
Offline Offline
Brattain Member
*****
Karma: 362
Posts: 17307
Measurement changes behavior
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

So many components, so much board space, makes my single coil latching relay solution look better all the time.  smiley-wink
Logged

nr Bundaberg, Australia
Online Online
Tesla Member
***
Karma: 130
Posts: 8620
Scattered showers my arse -- Noah, 2348BC.
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Yes I remember that seemed to be a simple solution. guest1102's last circuit only uses 3 components though.

______
Rob
Logged

Rob Gray aka the GRAYnomad www.robgray.com

Pages: 1 [2]   Go Up
Jump to: