I have a few questions about the on/off and ctrl pins.
Firstly, for on and off, can the voltage supply connected to vin be used? Docs say >1v but is it ok to use a moment switch to connect input supply directly to operate these pins? i.e. 20v?
Secondly… For the control switch, the docs talks about a ‘pulse’. Does that mean to use it we should ‘pulse’ high and then disconnect it, leaving the pin float? Or should we hold the high while we want the circuit on, driving low when we want it off?
Is it acceptable to configure in the following way:
Moment switch connects ‘on’ to ‘vin’. This turns the circuit on and powers a SBC like a Raspberry Pi.
CTRL pin is connected to a GPIO with a pullup resistor which means it is driven high when power is connected.
At shutdown, we drive the GPIO low which in turn drives the CTRL pin low, cutting power to the circuit.
Thanks for your time.
You do not need to disconnect the pin after applying the pulse. Instead, you can hold the CTRL pin high to keep the circuit powered on and drive it low to turn it off.
Thanks for your reply. The documentation talks about pulses so I guess it’s a bit confusing.
It is okay to connect the VIN voltage to the control pins (ON, OFF, and CTRL), but do not connect voltages higher that VIN to those pins.
Once a high pulse is received, the circuit will latch on or off. After that, the state of the pin does not matter until you want the latching circuit to change state again. However, as mentioned in the product page description under the “Using the Pushbutton Power Switch” header, the CTRL and OFF pins should never be high at the same time, so it is best not to hold them high.
Your proposed connections sound okay. In case you have not considered it already, connecting your momentary switch to the A and B pins on the right side of the board might also be an option, though that will make it possible for someone to cut power later with the same button.
Avoiding poweroff with the A/B pins is what I am trying to avoid. I think unplugging the battery will be the manual poweroff method. Or perhaps a recessed slider switch.
I’ve decided to change my tactic a little and use the on/off pins.
On - Connected to a moment switch and then to vin.
Off - Connected to a GPIO pin on the rPi that is set high (3.3v) at shutdown using rPi’s gpio-poweroff overlay. This seems to be the accepted method.
Is there any danger if someone were to hold the poweron moment switch and then initial a shutdown?
This would mean the On switch would be high with vin (8-16v) at the same time the rPi would put Off high with 3.3v? I just want to make sure there’s no risk to the pi or to the switch…
Also, unrelated… Is there a place I can download the symbols for kicad for Pololu components?
I do not expect the setup you described to present any risk of damaging the board or your Raspberry Pi. If the ON and OFF pins are both high, then the switch should be on.
We do not use KiCAD, so unfortunately, we do not have KiCAD schematic symbols for our products. In case it helps though, you can find a dimension diagram, a 3D model (STEP), and a drill guide (DXF) for the board on its product page under the “Resources” tab.
One more question if I may. To add some extra protection to the circuit I was thinking of adding a capacitor to the output of the reg (I plan on using the S13V20F5 for this purpose - I think that should be fine for a rPi 3a+ which is only likely to draw 400mA and perhaps spike to 1A).
Is it safe to connect a cap in parallel to the reg output like this? I have heard an empty cap can act like a short circuit initially, so I thought I would ask…
I do not expect adding a cap of several hundred μF to the regulator output to cause any trouble.
By the way, since you mentioned using a 20V supply earlier, you might also consider adding an electrolytic capacitor close to the input side of the regulator (between VIN and GND) to mitigate the possibility of hazardous LC voltage spikes. There is more information about that near the bottom of the S13V20F5 regulator’s product page.
Thanks Patrick. I will have a look…