Pages: [1]   Go Down
Author Topic: Prevent ATmega328 from leaking current through ports when GND is disconnected  (Read 845 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

Hi guys

I have the following circuit to turn on the ATmega with a push button:


The idea is simple: a MOSFET opens and closes the path between the ATmega and GND.
Both the [push button] and [ATmega pin 17] go into an OR gate, which goes into the MOSFET gate.

Once the ATmega starts, pin 17 goes HIGH immediately, which keeps the fet gate HIGH and the fet ON after the button's released.

My problem is: with only VCC connected, the ATmega leaks current through the ports. Say, if I have an LED on pin 5, current will flow through:
VCC -> Pin5 -> LED+Resistor -> GND.

Which defeats the goal of completely killing power to the ATmega.

I thought about controlling the path between +5V and the ATmega's VCC, but due to the Vgs drop of the mosfet, I always get less than 5V at the source.

Thoughts?

Thanks!
Logged

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

I think I'll just use a 4016 CMOS switch and open/close the VCC line to the circuit.
Logged

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

Why on earth would you break ground? Anything attached to the cip will now source through the clamp diodes in the mpu's IO drivers. Not to mention the tiny detail that the mpu has voltage regulators who refence to ground.
Logged

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

We just had a thread about self power down have a look at that.

http://arduino.cc/forum/index.php?topic=85542.new;topicseen#new

Quote
due to the Vgs drop of the mosfet,
A MOSFET will work in the VCC path, there shouldn't be any appreciable voltage drop.

______
Rob
« Last Edit: January 05, 2012, 10:54:56 pm by Graynomad » Logged

Rob Gray aka the GRAYnomad www.robgray.com

Pages: [1]   Go Up
Jump to: