Mini Pushbutton Power Switch - Feedback to Controller when using button

Mini Pushbutton Power Switch with Reverse Voltage Protection, LV

I’m using this board in conjunction with an A* 32u4 board & IR remote to turn on/off a model with lights. On the A* board, I’ve added logic to turn off the MPPSRVPLV after 3 min but that only works with the IR remote as I can set a state variable when receiving the remote command; the MPPSRVPLV on-board pushbutton has no way to let the A* board know it’s been pushed, so that state variable is never set and hence the model stays on continuously when activating via the MPPSRVPLV pushbutton.

Is there a way to send info back to the A* board when using the pushbutton? For example, does the CTRL pin reflect the on/off when using the pushbutton?

EDIT: It seems that the CTRL pin shows 0.77V when the switch is ON and 0V when OFF, so I may be able to use that except for this detail:

The ON, OFF, and CTRL pins on the pushbutton power switch do not require a pulse to operate, but leaving any of them in a high state could interfere with the switch’s other control methods, so we generally recommend using pulsed signals with them.

I’ve been toggling the board’s power with this code; is that what you mean by “pulsed signal”?

pinMode(CTRL_PIN, OUTPUT);      // Configure the CTRL pin as an output
digitalWrite(CTRL_PIN, HIGH);   // Drive CTRL high (power on)
delay(50);                      // Delay 50 ms (i.e. 50 ms high pulse)
pinMode(CTRL_PIN, INPUT);       // Configure CTRL as an input so it floats.


You might consider using the A-Star to monitor the voltage on the VOUT pin of the pushbutton power switch directly. If the voltage is higher than 5V, you can use an appropriate voltage divider to reduce it to something more appropriate.

Your proposed code for pulsing the CTRL pin like that should work fine.


1 Like

Thanks Brandon. As the input/output to the pushbutton power switch is 12V I used a voltage divider as you suggested:

1 Like