0

I'm experimenting with a MOSFET that controls power to another component so that I can remove all current from it when it's not in use and save power. In regards to that, this question is awesome: Switching DC with MOSFET: p-Channel or n-Channel; Low Side Load or High Side Load?

But I'm running into some snags when it comes to practical use.

First approach:

schematic

simulate this circuit – Schematic created using CircuitLab

I was able to switch this off fine, but when it was on, I was only getting half voltage out. Turns out I was using an N channel MOSFET wrong, and it's not good as a high side switch like this.

Ideas to fix:

I could move the MOSFET to GND of the LED array with a 100 ohm resistor on the gate. I believe this would allow it to act like a switch in the manner that I really want. However, the addressable LEDs still draw a decent amount of power when their GND is disconnected! It seems the return path goes down the CLK and DAT lines. This is not a problem when VCC is disconnected. This means I would need three MOSFETS, one for each of CLK, DAT and GND, driven by one pin.

I could use a P-Channel on the high side, but to turn it off I need to supply voltage. When turned off, I want to be conserving power with the micro controller in a super low power mode . In that state wasting current holding the MOSFET closed seems wasteful, and I'm not the micro controller could do that in sleep mode.

Both those options seem kind of inelegant. What I seem to need is a simple 4 pin component (VCC, GND, GATE, OUTPUT) that can connect VCC and OUTPUT when I pull GATE high. Does such a thing exist?

What do you think is my best bet for making this work with the fewest/simplest components?

Alex Wayne
  • 353
  • 4
  • 17
  • You [REALLY, REALLY](http://electronics.stackexchange.com/questions/91716/why-my-dac-works-without-gnd-and-vcc) don't want to only switch power... – Ignacio Vazquez-Abrams Jan 23 '15 at 07:14
  • @IgnacioVazquez-Abrams indeed. However, I can easily ensure that the non-power pins have 0V when the MOSFET should disconnect. That should prevent any powering of the LEDs, right? I tested this with a multimeter and saw the current drop from 8mA to 0mA when I pulled the VCC wire out while in sleep mode. Where pulling out GND caused in increase in current to 13mA, which is obviously not good. – Alex Wayne Jan 23 '15 at 07:19

2 Answers2

2

Holding the P-channel MOSFET closed (gate at 5V) will use hardly any power. It is basically the same as holding an N-channel MOSFET gate at 0V.

(See http://www.vishay.com/docs/91076/91076.pdf for a p-channel version of the IRF530 - same gate-source leakage current of +-100nA max)

To prevent powering the LED array via CLK or DAT you will need to either drive them low or set them to high-impedence when the MOSFET is off. Since CLK and DAT are both outputs, simply driving low is fine.

Note: This does not apply to your circuit here, but for inputs you can use a tristate buffer like the 74LVC1T45 or similar to prevent powering via signal pins... See FTDI (FT232RL) powers itself through RX/TX lines for the solution I used.

Edit:

Alternative solution with existing parts

Actually, you could just move the N-channel MOSFET to the low side and drive CLK and DAT to 5V when you want to turn the LEDs off and go to sleep. That would address the problem in your first idea.

geometrikal
  • 4,921
  • 2
  • 23
  • 41
  • Interesting. It looks likes my ATTINY85 _can_ keep voltage on a pin in `SLEEP_MODE_PWR_DOWN` mode. So to turn off, I can set the MOSFET gate to 5V, and DAT and CLK to 0V and it should work as I expect. In this scenario the MOSFET is drawing max 100nA? – Alex Wayne Jan 23 '15 at 07:50
  • Yep. I have an ATMega328P running at 20uA with a mixture of pins in low, high and high-impedence states. – geometrikal Jan 23 '15 at 08:05
  • 1
    @AlexWayne please see my edit. You make the low side switch work by driving CLK and DAT high when the N-channel MOSFET is off. – geometrikal Jan 23 '15 at 08:15
1

you can use an LT1157. Refer to the datasheet for the driving section. I used it for a similar application where my uC had to control the Vcc pin for a 5v@1A device.

user2967920
  • 319
  • 3
  • 12