Power control interface

The power driver provides a basic interface to the soft power facilities of an ATX power supply.

Enable with:


  • POWER_LED_PORT & POWER_LED_PIN - These define a pin to use to control an LED to indicate the power status.
  • POWER_SWITCH_PORT & POWER_SWITCH_PIN - These define an input to use as the (active low) power-off switch.
  • POWER_CONTROL_PORT & POWER_CONTROL_PIN - These define an output to be used (active high) to signal the power supply to switch off.
  • None
Major device id:
  • None
  • /sbin/poweroff

The power control interface uses a small latching switch mechanism to provide basic signalling to an ATX power supply.

The ATX system provides a “power on” connection which is connected to ground to switch the power supply on. It also provides a “Power OK” signal to show that the power levels are within operating parameters.

By providing a button to initially connect the “power on” connection to ground, the “power OK” connection can then be used to permanently bridge this connection so that the power is always on. A signal from the microcontroller can then be used to tell this latch to release the connection to ground, thus switching off the power.

A typical circuit for doing this is:

Switch S1 switches on the power. When the power is on Q2 is switched on through resistor R3, thus forcing the power to be on all the time. A signal from the microcontroller switches Q1 on. This then pulls the base of Q2 low switching it off. As Q2 switches off, so does the power.

The power driver provides an input which can be connected to a switch wired in an “active low” arrangement to signal the intent to switch the power off. A delay of (by default) 5 seconds is provided which is aborted by releasing the button at any time before shutdown occurs. A countdown is displayed on the console to indicate that the shutdown is being requested. Also during this time the power LED flashes.

Once the power-down timeout has elapsed the system performs a clean halt and then signals the power to be shut off.