Archive for August 23rd, 2013

P-channel MOSFET Power Switch

This is a simulation showing that a p-channel power MOSFET should work fine as a battery cutoff / switch for the bike taillight (clicky for many more dots):

P-MOSFET power switch

P-MOSFET power switch

The general idea is to have a pushbutton or vibration sensor turn on the power, whereupon the Arduino wakes up and activates an output pin that holds the power on. When it’s time to shut down, the Arduino turns that output pin off, the power goes away, and everybody’s happy.

The MOSFET must be not only p-channel, but also have a logic-level gate, which is a rare and precious combination among cheap surplus MOSFETs. I’m hoping those FDS6675 MOSFETs work better than their package looks.

The capacitor and resistor over on the right simulate a reasonable load.

The voltage-controlled switch in the middle represents the vibration sensor, which is either shorted or open as determined by the voltage source at the bottom. There doesn’t seem to be any other Spice-ish way to do that.

The Arduino output, simulated by another voltage source drives the NPN transistor, which isolates the output pin from the 7.4 V (up to maybe 8.5 V when fully charged) Li-ion battery. It also isolates it from the switch, which would otherwise yank the output pin to ground if you pushed the button when the power was already on.

You’d want a few more pullup and pulldown resistors to ensure things stay where they’re put while the lights are out. I’d want to measure an actual vibration sensor; it may require a pulse stretcher to ensure the Arduino has enough time to wake up and smell the electrons.

The overall concept seems workable.