Battery charger/discharger using N mosfet only
You don't need to short the +5 got ground, only the bottom end or R2 needs to be connected to +5. That's going to be tricky to do with a N-channel-MOSFET because to do that you need a voltage higher than 5V for the MOSFET gate.

g8ven a 12V (or 10V) supply in addition to the 5V supply it's possible.







simulate this circuit &ndash; Schematic created using CircuitLab

The 12V doesn't need to be strong, you could use the +10V from a MAX232 or build your own capacitive booster

a simple voltage booster can be made like this. it don't do a very good job the voltage is higly load dependant, but it's probably enough if you just want to turn a mosfet on or off.







simulate this circuit