Well that was really simple to do, can be done from any micro controller to be honest or anything that can supply the logic high of 3.3v to the power switch pin.
so, um, excuse the connectors, they are just for illustration purposes
- Yellow Wire - Signal wire from the Raspberry Pi Pico This can be any non power/GND pin just as long as you program the correct pin
- Black Wire (to top connector) - basically ground pin on the UI PCB, can be any ground pin to the pi-top
- Green Wire - its just a reset switch to reset the Pico (RUN pin to GND)
Power can be from USB or VSYS, please ignore the battery, as its there as illustration to represent that power from an external source.
Program is extremely simple, and do remember that this is a test
from machine import Pin import utime #Pin to turn pi-top power on wake_sw = Pin(16, Pin.OUT, Pin.PULL_DOWN) #On board LED pin, used to show signal being sent led = Pin(25, Pin.OUT) # ensure that the power on pin is set to logic low of 0v wake_sw.value(0) power_on = False while not power_on: # turn signal to Logic High 3.3V and turn LED on wake_sw.toggle() led.toggle() # Sleep for 1 second leaving Logic High 3V3 utime.sleep(1) # set power switch to Logic Low 0v and turn LED off wake_sw.toggle() led.toggle() power_on = True
Powering the Pico directly from the UI PCB connected to the pi-top had an oddity. @wil maybe you can explain.
I had the signal wire (yellow wire) connected to the power switch on the UI PCB and when I connected the 3v3 Always on power to the VSYS pin of the Pico the pi-top powered on, could not power it off unless either the signal wire or 3v3 always on was disconnected. note, GND was not connected this created a latch keeping the power switch held on.
This made me power the Pico from USB from my Xavier NX as it was the closest device to the Pico. I have also tested taking a 3v3 and GND from the Xavier NX GPIO to GND and VSYS to the Pico and that also works.
0.3 Seconds and 0.5 seconds sleep timer was too short, 1 second is perfectly fine
@wil NOW its tested and works, nothing went boom or went up in smoke
This is the pico powered by Xavier NX GPIO to switch on the pi-top