Lighted Power Switch

There isn't a more generic category so I figured I may as well ask this here since the UP2 is what I have.

I would like to have an external (i.e., mounted on the case) power switch that works just like a standard computer power button. I would also like for it to be lighted when the UP2 is booted up but off when it is not. There have been some discussions around the issue of power switches but none of them seem to really have resolved the issue. This same issue comes up with other SBC's like the Raspberry Pi, but at least the UP2 board has some provision for a power switch.

The first thing that strikes me as odd is the function of pins C2 and C3. C2 is supposed to be for a power button whereas C3 is for a reset (button). However, I am unable to get C2 to do anything. But I am able to boot the computer up or do a hard shutdown using a switch on C3. I'm not sure if this means I am doing something wrong, the pins are mislabeled on the Connector Reference (which begs the question of what the other jumpers are for), or there is something wrong in general. However, since C3 appears to do what I need for the most part, I guess it doesn't matter much at this point. It's just something I would like to understand going forward.

The next issue is to get the power switch LED lit. I am fairly sure that this could be accomplished using a couple of the GPIO pins which would then allow the switch to be dark when the computer is shut down (or perhaps in sleep mode). My question is, what is the best way to wire this feature to the GPIO? What pins make the most sense to use? Does anything else need to be done to light the LED since I am not looking to program some type of on/off function to run from the OS? The switch I intend to use is here: https://www.adafruit.com/product/3104.

One last thing would be if there is any way to prevent the UP2 from booting up automatically with power (i.e., so it works like a normal computer)? There are times when boot-on-power is useful, but there are also times when it is annoying if not undesirable. In a normal computer, you would just go into BIOS and either disable or enable the boot-on-power function. The ability does not appear to be present in the current UP2 BIOS. To some extent this is just an annoyance since after the first boot, if the power is left connected after a proper OS shutdown, the computer will boot up with the power button. For remote systems (which some of mine would be), boot-on-power is a desired feature, but in non-remote systems I would generally prefer that a computer only boot up when I tell it to (i.e., press the power button).

Ideas and feedback would be appreciated.

Thanks,
Ed.

Comments

  • WereCatf
    WereCatf New Member Posts: 201
    dsproducts wrote:
    The next issue is to get the power switch LED lit. I am fairly sure that this could be accomplished using a couple of the GPIO pins which would then allow the switch to be dark when the computer is shut down (or perhaps in sleep mode). My question is, what is the best way to wire this feature to the GPIO? What pins make the most sense to use? Does anything else need to be done to light the LED since I am not looking to program some type of on/off function to run from the OS? The switch I intend to use is here: https://www.adafruit.com/product/3104.

    I believe the fan-header only gets power when the board is running, so wiring the LED to the fan-header would be the easiest way of getting exactly you need, ie. the LED being on only when the board is running. You'll need a JST-PH 2.0-connector, but those can easily be bought with wires already included on e.g. eBay., then all you need is the resistor for the LED and off you go.
  • Edward Thomas
    Edward Thomas New Member Posts: 20
    Since I am using the fanless case, that is a great way to take care of the LED.

    Thanks,
    Ed.
  • Edward Thomas
    Edward Thomas New Member Posts: 20
    edited January 2018