Hello,
I am about to buy the Pololu “Big MOSFET Slide Switch with Reverse Voltage Protection, MP”, but before that I wanted to confirm with you guys if it’s going to do what I need it to do.
So the product I am developing will have a slide on/off switch to power the system and the microcontroller. So to switch on the system, the user will slide the button to ON position.Thats pretty straight forward and the Mosfet module will do it.
But what I want to happen when powering down the system, is for example the user will slide the button from on position to OFF position, but the microcontroller should not power down immediately, instead it will execute the last not finished functions, save the information and then shut the system by itself.
So is this possible with this Mosfet module?
Can the microcontroller power off the Mosfet module when it decides so after the user switch the power button to OFF position?
I hope I have explained myself clear enough.
Thank you.
If I interpret the official product description for the Mosfet slide switch (…If the physical switch is in the “off” position, the switch state can also be controlled by a digital signal (e.g. from a microcontroller) via the “ON” control pin. Driving the “ON” pin low (or leaving it disconnected) will leave the switch off; driving the pin beyond approximately 1 V will turn the switch on…)
If the user powers up the system using the physical slide button of the MOSFET module and once the microcontroller is powered up the microcontroller can pull the “ON” control pin of the Mosfet switch HIGH ( in my case 3.3V). When the user decides to shut down the system, he/she will switch off the MOSFET module via the physical slide switch, the microcontroller will see that the sliding button is in the OFF position, and then it will save the data, home the motors and after that switch the system off by driving the “ON” control pin LOW.
Is this possible?
Hello.
Unfortunately, it is probably not possible to make a one of the big MOSFET slide switches work in a setup like that by itself. Driving the ON pin high will keep the MOSFET switch on when the physical slide is moved to the off position like you predicted, but there is not a good way for you to detect when the physical switch state changes since driving ON high forces SW low.
One way around that might be to use the big MOSFET slide switch with an external double-pole switch. One pole can be used to turn on the big MOSFET slide switch, and the other pole can be used by your microcontroller to monitor when the switch is moved to the off position.
An alternative approach is to use one of our pushbutton power switch boards (like the equivalent Big Pushbutton Power Switch with Reverse Voltage Protection, MP) along with a second pushbutton connected to one of your microcontroller I/O. You could use the pushbutton power switch board as a turn-on button, and you can use the pushbutton connected to your microcontroller as a turn-off button which triggers the shut-down sequence and ends with the microcontroller turning off the pushbutton power switch board using either the OFF or CTRL pins.
- Patrick
Thanks Patrick, last night after I made the post here I realised that actually a dpst switch is what I need. This way I can use one pair of contacts to control your Mosfet switch and the other pair hooked to the microcontroller. This way the microcontroller will know the state of the physical switch and execute the shut off sequence as desired.
I was not sure only if I drive high the “ON” control switch high while the slide switch is still in the on position would damage the module. But if as you said it’s not a problem problem to driving the ON control switch high and latch the Mosfet module constantly on, regardless of the slide switch position after that is what I needed.
Thanks a lot.
That is correct; driving the ON pin high while the switch is in the on state from either the built-in slide switch or an externally connected switch should be fine.
- Patrick