• Updated 2023-07-12: Hello, Guest! Welcome back, and be sure to check out this follow-up post about our outage a week or so ago.

Remote power-on over ADB

eharmon

Well-known member
It occurred to me you could remotely boot a soft-power ADB Mac by sending the power-on key via a device connected to wifi. Something like an ESP32 and a passthrough cable with the regular keyboard/mouse connected downstream. Combined with VNC and other remote tools, or telnet/ssh (A/UX), you could start up the machine and remote in from anywhere!

From my understanding, you just need to momentarily bridge pin 2 (PSW) and pin 4 (ground), which should be....extremely easy with an ADB/S-Video cable with a splice connected to GPIOs.

I assume it won't work on bus power as I'm guessing it's just a trickle through pin 2, and the other pins are dead until the power supply comes up. But it's not too bad to plug it into the wall.

Theoretically it's a bit redundant with Macs that support server mode, but not every model supports that, and it's a pain to manage, so it might be a neat little device to whip up. I might build a little breadboard prototype if I get bored, but wanted to share with everyone in case there was interest in someone picking it up.
 

finkmac

NORTHERN TELECOM
This was sort of done before. There was a product called the PowerSwitch LT that attached to a LocalTalk network and could remote power a device... Although I think that one actually controlled a power switch.
One of the advertised usecases was remote starting a LaserWriter.
 

eharmon

Well-known member
Interesting! I knew there were some remote power switches, but from that article it does seem plausible it could use ADB in the Mac case.

In my case I just want to boot my A/UX system without going into the basement. The amount of effort we spend to keep being lazy...
 

AeSix

Active member
Interesting! I knew there were some remote power switches, but from that article it does seem plausible it could use ADB in the Mac case.

In my case I just want to boot my A/UX system without going into the basement. The amount of effort we spend to keep being lazy...
I found a Google smart home / IP fan controller I bought for my loft fan a while back, never got around to taking the fan down to install it... i digress...

I've been working on my Performa 630CD the last few weeks (just got it a month or so ago) - anyway... 1+1 and all, and I've come up with a theory that might be possible... to use the fan controller to interface with a fake keyboard power button to turn the Mac on via "hey google" - or phone app... etc. Obviously a fan controller with multiple power settings and dimmable circuit for the light is, well, overkill.

But here's how my idea would work...
"Hey Google, Turn on the Mac" - signal is sent to the fan controller - fan controller energizes the fan "side" of the device, sends electric to a control board. The control board (completely hypothetical at this point) would have a mechanism that would send a button press signal (only once) when it's powered on. That button press is a simulated power-key from an ADB keyboard.

But, here's where it breaks down for me. 1) The device would be powered on the entire time until either manually turned off, or some mechanism for turning it off is come up with. 2) turning the device does not turn off the mac (in reality, turning the device on a second time would send a second button press, initiating a Mac OS shutdown) 3) There's no way to shutdown the Mac with this method... unless using the light controller side of the device to send a second button press, as the Enter key...

I think someone who's way more up to date on modern remote control devices might be able to simplify this greatly. I also think it would be a lot easier to wedge into the physical power button inside the Mac than to have to emulate/simulate the ADB signals. Removing the logical signals from the downstream control lines makes it a dumb appliance, which means it's much simpler to build. This would work on the same principal as the ATX adapter board that can be used to replace the power supply in some of the classic Macs. This could also be used to power off the mac in an emergency (the same as pulling the power cable out, so /not/ a shutdown)

Either way is technically possible, and each has it's own advantages and disadvantages. AND yeah, don't try hooking up the IP fan controller directly to the mains on the Mac... this is how bad things happen. Makes me want to make this my first electronics project though. If I can focus long enough on it, I could have a design this evening, now that I know someone else would be interested in it!
 

cheesestraws

Well-known member
I also think it would be a lot easier to wedge into the physical power button inside the Mac than to have to emulate/simulate the ADB signals

I think you think this is more complicated than it is. The power key on the keyboard isn't a "real" key, it's just a switch that shorts two lines on the ADB plug together. It's essentially in parallel to the soft power button on the chassis. You don't have to emulate any ADB signals at all to simulate that button push.
 

AeSix

Active member
I think you think this is more complicated than it is. The power key on the keyboard isn't a "real" key, it's just a switch that shorts two lines on the ADB plug together. It's essentially in parallel to the soft power button on the chassis. You don't have to emulate any ADB signals at all to simulate that button push.
I got to thinking that might be the case, but seems there would be a pin on ADB dedicated to that then, which seemed like a waste... but I guess the kb power button was that important to the engineers (or at least management)

That seriously simplifies this a LOT. I was going to start working on this after I'm done with my current project... replacement clock battery. :D
 

Phipli

Well-known member
I got to thinking that might be the case, but seems there would be a pin on ADB dedicated to that then, which seemed like a waste... but I guess the kb power button was that important to the engineers (or at least management)
They'd already used 3 pin din for LocalTalk networking, so wanted to differentiate the connector for ADB, so chose 4pin. This left them with a spare pin. They used it for soft power. Weirdly the button was there from the start of ADB keyboards, but it was a little while before they implemented it on any macs.
 

LaPorta

Well-known member
Well, it did function as the “reset” button on the IIgs, which could use any of these keyboards.
 

Phipli

Well-known member
Well, it did function as the “reset” button on the IIgs, which could use any of these keyboards.
Interesting - I've never had a IIgs so wasn't sure what it did. I was wondering given they bothered including it. Makes sense too because with it being a hardware switch it will reset even if the CPU crashes.
 

AeSix

Active member
I'm waiting for parts to build batteries for the Mac, so, am shopping for parts to build this contraption. I wish I could find the connectors Logitech used for the Mouseman 3 button mouse. The cord comes off the side of the connector, giving the back end a female ADB connector. Something I read a good long while back suggested the Apple engineers originally wanted that style of connector (which matches up with the idea provoked by the ADB logo) - regardless, finding male 4-pin mini-din connectors that aren't 100% intended to be put on a cable, is turning out to be rather difficult, much less finding the split-passthrough connectors!


LP5Xcis[1].png
 

David Cook

Well-known member
You may be interested in reading sections of the Guide To Macintosh Family Hardware 2nd Edition 1990. Specifically, chapter 6 pages 269-271 "Power-control circuit in the Macintosh II-family computer", and chapter 8 (particularly pages 291-295) "Apple Desktop Bus".

The surprises that I learned are:
1. There is a thermal switch on the Macintosh II series of computers that powers off the computer if it gets too hot!

2. NuBus cards gain access to the power on signal and thus can power up the computer. So, a modem card?

3. The keyboard also sends a keycode event for the power key (7F7F) over ADB. This is how power key inits and later operating systems are able to detect the power key on early Macintosh II series machines even though the power key line (ADB pin 2) only goes to the power circuit. Later Macintosh II computers (IIsi and onward) have a microcontroller that watches both the power key and ADB. This means that a simple homebrew power-on key will work on all Mac II series for power up, but may only work on Mac-IIsi-and-later for inits and power down.
 

eharmon

Well-known member
2. NuBus cards gain access to the power on signal and thus can power up the computer. So, a modem card?
Hah, if anyone ever gets a hankering to make a modern NuBus network card, it could have wake-on-lan!

Except it'd need a super cap or something since I don't think NuBus gets any power when the machine is off?
 

finkmac

NORTHERN TELECOM
Hah, if anyone ever gets a hankering to make a modern NuBus network card, it could have wake-on-lan!

Except it'd need a super cap or something since I don't think NuBus gets any power when the machine is off?
Battery, PoE, external power adapter... Probs better and cheaper than a supercap.
 

Chopsticks

Well-known member
Hah, if anyone ever gets a hankering to make a modern NuBus network card, it could have wake-on-lan!

Except it'd need a super cap or something since I don't think NuBus gets any power when the machine is off?

This is this project on GitHub


its using a FPGA to get video output via hdmi, it apparently can do sound, has a RAM disk and mentions wanting to add networking support etc… might Be a good place to start or perhaps build upon/get ideas from in regards to making a network card with WoL
 

bigmessowires

Well-known member
I'm waiting for parts to build batteries for the Mac, so, am shopping for parts to build this contraption. I wish I could find the connectors Logitech used for the Mouseman 3 button mouse.
No parts needed! As others have said, it really is as simple as momentarily pulling PSW to GND. For testing purposes, just stick a couple of wires directly into the ADB port. Most S-Video cables can be used as ADB cables.


Apple-Desktop-Bus-Connector-Pinout.png
 

eharmon

Well-known member
I assume it won't work on bus power as I'm guessing it's just a trickle through pin 2, and the other pins are dead until the power supply comes up. But it's not too bad to plug it into the wall.
I realized the trickle is marked right on the power supply, duh. The 5v continuous rail provides a mighty and powerful....1mA. ;)
 
Top