AK5 mini PC, auto power on modification

I wanted to replace a Raspberry Pi 2 with something faster. So I got a AK5 mini PC with a J3455 quad core CPU, 4 GB of RAM and 64 GB of flash memory from AliExpress for $140. Should be plenty fast for running Hass.io in Docker. It’s powered from a external 12 V power supply. There’s a mSATA connector on the board that I haven’t tested.

The BIOS must have all possible settings enabled, except the most important; power on after power loss.This would definitively be a show stopper for an always on PC.

I made up a quick circuit with an Arduino Pro Mini to mimic a short power button press when the PC is off:

The red wire is connected to a 3.3 V regulator that’s always on as long as the external 12 V is connected. The white wire on pin 12 is connected via a 10k series resistor (limits the current) to a 5 V power supply that comes on when the PC is turned on. No idea what the USB-C connector is for BTW, could be a hard drive. The blue wire on pin 13 is connected to the power switch top right pin (sorry for the blurry picture):

The Arduino is running in a endless loop, checking if the power on pin 12 is low. If it is, it takes pin 13 low for a short while.

Code:

// Definitions
int vsense = 12;                      // Connects to the 5V supply via a 10k resistor to sense if power is on              
int pulseOut = 13;                    // Connect to power switch. The switch is grounded when pressed

void setup() {
 
  pinMode(pulseOut, OUTPUT);          // Set to output       
  pinMode(vsense, INPUT);             // Set to input, no pullup
  digitalWrite(pulseOut, HIGH);       // Initial state of output
}

void loop() {
  if (digitalRead(vsense) == LOW) {   // Pulse the power button if vsense is low
    digitalWrite(pulseOut, LOW);      // Ground the power button
    delay(500);                       // wait 0.5s
    digitalWrite(pulseOut, HIGH);     // Release the power button
    delay(4000);                      // 4s delay to let system start after button is "pressed"
    }
  }

The Arduino’s output pin may be damaged if the power button is pressed since this will ground the pin while it’s high. So either remove the button or use a series resistor to limit the current. This must be smaller than the pull up on the board for the Arduino to be able to pull the line low. I did’t bother with this.

I installed Ubuntu 16.04, Docker and Hass.io. The Aeotech Z-wave stick was found just fine after a reboot. I copied all the config files from the Raspberry and all came up as it should.

1 Like