Hardware Hookup
In this section, we will go over how to connect to the Soft Power Switch - USB-C.
Connecting via PTH
For temporary connections to the PTHs, you could use IC hooks to test out the pins. However, you'll need to solder headers or wires of your choice to the board for a secure connection. You can choose between a combination of header pins and jumper wires, or stripping wire and soldering the wire directly to the board.
Input Power
The board was designed to be used with USB. Simply insert the USB-C connector into the USB connector labeled as IN.
Of course, power can also be soldered directly to the PTH as well.
Power Supply | Soft Power Switch - USB-C |
---|---|
1.8V to 5.5V Typically 5V if using USB |
VIN |
GND | GND |
Output Power
Then you can insert it between the Soft Power Switch's USB connector labeled OUT and the other end will be inserted into the USB connector of the target board being powered (in this case, the SparkFun IoT RedBoard - ESP32 Development Board).
Of course, power can also be soldered directly to the PTH as well. Since we are powering the output with a USB, you will need to connect it to your system's USB power. In this case, VUSB net was labeled as V on the board. Depending on your system, it may be labeled as VUSB, RAW, or VCC. Make sure to check the board's hardware design before deciding to connect VOUT to your system.
Soft Power Switch - USB-C | SparkFun IoT RedBoard - ESP32 Development Board |
---|---|
VOUT | 5V (or V) |
GND | - |
Note
The voltage range of the Soft Power Switch - USB-C is between 1.8V to 5.5V. Users can also connect a different power source and connect the output to VIN of their system. Just make that the voltage is within the operating range of the target device.
External Button
For users that need to connect an external button, you will simply need to connect one terminal of the button to BTN and the other terminal to GND. In this case, IC hooks and F/M jumper wires were used to connect an external momentary push button.
Soft Power Switch - USB-C | Button |
---|---|
BTN | Normally Open Pin |
GND | Common Pin |
Off and Push
To connect to the OFF and PUSH pins with a microcontroller, you will need two GPIO pins with code to control or read the Soft Power Switch. Depending on your microcontroller, you may need to adjust the pin connections and definitions with respect to the microcontroller's GPIO pins.
Soft Power Switch - USB-C | SparkFun IoT RedBoard - ESP32 Development Board |
---|---|
OFF | 32 (or A4 )
|
PUSH | 14
|
Tip
Remember, the PUSH pin requires a pull-up resistor when connecting it to a microcontroller's GPIO pin. You can use the internal pull-up resistor on the microcontroller so that the pin is not floating.
Arduino Serial Output
To view the Arduino's serial output when powering the system through USB battery, you will need to wire a 3.3V Serial Basic Breakout to the Arduino's serial UART. In this case, we connected to the SparkFun IoT RedBoard - ESP32 Development Board primary UART port. Depending on your microcontroller, you may need to adjust the pin connections and definitions with respect to the microcontroller's UART pins.
3.3V Serial Basic | SparkFun IoT RedBoard - ESP32 Development Board |
---|---|
TXO | 3/RX-0 |
RXI | 1/TX-0 |
GND | GND |