Using a MOSFET to turn a controlling Arduino on or off

I’m trying to make a useless box with a Pro-Mini (3.3v) controlling an stp55nf06l to turn off the power after a time delay.
I’ve tried a wide variety of resistors on the MOSFET gate between the ground and source pin and can’t get the values right.
If I get the trigger pin to turn the MOSFET on and off, then when the Pro Mini is off, the MOSFET drifts back on.
Any Ideas?
P-Channel Logic Level MOSFET maybe?

Are you pulling down the gate pin to gnd?

INTP:
Are you pulling down the gate pin to gnd?

Yes. I stared with 10k and tried more and less, much less and the arduino wouldn't turn it on, much more and it wouldn't turn off.

Can you give us a schematic to show us how you have got your MOSFET connected, please?

A hand drawn circuit diagram / schematic is acceptable.

So Arduino ground is connected to the drain of the mosfet.
The pin protection diode of the power pin (gate) won't allow the power pin to go lower than ~0.65volt below Arduino ground.
If Arduino ground potential rises (to battery +), so will gate voltage through the pin protection diode.
Leo..

That makes sense. Perhaps a p-channel MOSFET so the arduino can be connected to ground and use the MOSFET to turn the battery on and off?

P-channel could end up in the same.
What are you trying to do (whole project).
Turning off sensors (with a p-channel fet) and putting Arduino to sleep could be a better option.
Leo..

A battery powered box with nothing but a switch on the outside.
When someone flips the switch the box opens and a finger comes out to flip the switch back off.
The box then closes again.
I’d like the power completely off because it’s likely to sit on the shelf for a long time.
Turning the power on is a cinch because the box doesn’t do anything until the switch is flipped.

Hi,
You need as advised to switch the positive supply.
I have just drawn this up as a concept to accomplish what you need,

I have one problem with your schematic, you can with proper layout CONNECT ALL the components to the UNO with wires, just labelling wire ends at the component and at the UNO does not help to trace signal flow.


Hope this helps.. Tom.. :slight_smile:

Thank you so much, that's what I'm looking for. :slight_smile:
An observation... Correct me if I'm wrong please,
D1 & D2 protect the arduino pin?

Sorry about my drawing. The arduino was originally connected by a 6 pin jumper that I deleted to put it all on one board. :confused:

redmiata:
Thank you so much, that's what I'm looking for. :slight_smile:
An observation... Correct me if I'm wrong please,
D1 & D2 protect the arduino pin?

Yes, as the arduino pin is an output, the diodes OR the two levels.
Tom... :slight_smile:

Tom, you have inadvertently shown the on switch connected to GND, it aught to go to Batt+.

Maybe easier to remove the diodes (Arduino pin via 10k directly to base).
And use the switch across the transistor (collector/emitter).
Leo..

JohnLincoln:
Tom, you have inadvertently shown the on switch connected to GND, it aught to go to Batt+.

Wawa:
Maybe easier to remove the diodes (Arduino pin via 10k directly to base).
And use the switch across the transistor (collector/emitter).
Leo..


Thanks for the input, to much blood in the coffee stream.
Tom... :slight_smile:

I'm surprised this hasn't come up before. I've got a NANO at work continuously wasting power to simply turn on a solenoid valve for a set period of time when a button is pressed.
Thanks to everybody for your concepts, ideas, experience and knowledge. Especially considering the uselessness of the project! :grinning:
I'll post a video of the finished product if you'd like.

A good example for anyone not familiar

redmiata:
I'm surprised this hasn't come up before.

It's come up many times before.