Wirless PC Powerbutton

What is it?

I have created a wireless Power button that gives you an alternative to WOL (Wake On Lan) or off-the-shelf versions that often utilize RF (Radio Frequency) remotes that get lost or apps/websites. This might be practical but requires an Internet connection.

What does it do?

Exactly what it says – you can use either a touch or conventional button when building this yourself. When the button is activated, it sends a short impulse to the ESP32 controller that then sends a signal over WiFi to the receiver. When the receiver gets this message, it activates a relay to switch on the PC. Alternatively, there’s a header on the receiver to plug in the front panel power button that then can also switch the relay on or off.

What do you need?

There are two versions to recreate this at home:

  1. With off-the-shelf parts.
  2. With a custom PCB.

For the easier version, you will need:

  • 2x ESP32 Controllers (That support WiFi and has a decent antenna).
  • 1x Button or Touch sensor. I used a TTP223.
  • 1x 5V Relay.
  • 1x 2-pin header.
  • Optional! 2x WiFi antennas.
  • Wires, soldering iron. Alternatively, you can use a breadboard, but I would not suggest this since it has a messy appearance.
  • Optional! A 3D Printer to print the enclosure for the project.

For the PCB Version

  • 1 sender PCB
  • 1 receiver PCB
  • 1 Button or Touch sensor. I used the TTP223
  • Optional! A 3D Printer to print the enclosure.

How to Build it V1

I used the ESP32 Super Mini, but they often have very bad antennas. In my case, I had to use WiFi antennas from an old WiFi router. So, if the project isn’t working for you, try soldering an antenna onto the existing one; this worked amazingly for me.

1.Step

Take your Button or touch sensor and connect (when using a button it doesn’t matter what side you connect what to):

  • GND to G (only when using touch sensor)
  • I/O to 21
  • VCC to 3.3

Now would be a good opportunity to add the optional antenna.

2.Step

Take the Second ESP32, relay board, and 2-pin header (for the front panel Power button) and connect:

  • VCC to 5V
  • GND to G
  • IN to 5
  • PIN1 to 3.3
  • PIN2 to 21

3.Step

Go to the Arduino IDE Website and download The latest version. Install it and then go to File > Preferences and add this link: https://dl.espressif.com/dl/package_esp32_index.json into the field “Additional boards manager URLs:”. Now you can plug in the 1st ESP32 while holding the BOOT button. At the top select the right COM-Port and select the board “LOLIN C3 Mini”, then open my GitHub page and copy the MCU_1 script into the Arduino IDE and press Upload. Now repeat this with the 2nd ESP32; watch out, though, copy the script MCU_2 now and press Upload.

4.Step

Plug both ESP32’s into Power, give it a few seconds to connect, and press the button to see if the relay is switching; you can usually hear this, no need for any LEDs or other test circuits. If it doesn’t work, this may be the part where you have to add the optional antennas to the existing one.

5.Step

You can now go to my GitHub repository and download the files “MCU_1_V1.stl” and “MCU_2_V1.stl”, bring those into your preferred slicer or Printing service and get those made.

6.Step

Assemble everything and Enjoy!

How to Build it V2

1.Step

Get the PCBs and assemble them like the instructions say or get them assembled by the factory.

2.Step

Go to the Arduino IDE Website and download The latest version. Install it and then go to File > Preferences and add this link: https://dl.espressif.com/dl/package_esp32_index.json into the field “Additional boards manager URLs:”. Now you can plug in the 1st ESP32 while holding the BOOT button. At the top select the right COM-Port and select the board “LOLIN S3”, then open my GitHub page and copy the MCU_1 script into the Arduino IDE and press Upload. Now repeat this with the 2nd ESP32; watch out, though, copy the script MCU_2 now and press Upload.

3.Step

Plug both ESP32’s into Power, give it a few seconds to connect, and press the button to see if the relay is switching; you can usually hear this, no need for any LEDs or other test circuits.

4.Step

You can now go to my GitHub repository and download the files “MCU_1_V2.stl” and “MCU_2_V2.stl”, bring those into your preferred slicer or Printing service and get those made.

5.Step

Put the Modules and put them in their cases and enjoy!


Leave a Reply

Your email address will not be published. Required fields are marked *