[Hardware Project] Physical Security - Emergency/Panic Button 🚨

:eyes: :point_right: READ FIRST: As you may already know, the Incognito network is scheduled to shut down within the next 30 days so I’m releasing this write up “as is” and unfinished. This is something that I have been working on in my personal time to increase my physical security. If anyone is interested in this project feel free to message me on TG @lukemax to follow up.

:warning: Disclaimer: This project was not funded by, nor was it endorsed by Incognito. This project was done on my personal time and is being shared for the possible benefit to other privacy minded community members.


In today’s digitally connected world, ensuring personal security goes beyond just safeguarding our data online. Physical access security is often overlooked but is equally essential in protecting our digital lives. To address this concern, I took on a unique project: building an Ethernet-connected Internet of Things (IoT) device that allows me to remotely shutdown my computers, server, phone, and more. In this post, I’ll guide you through the process of creating your own personal emergency shutdown button, ensuring your physical security is never compromised.

359023864_2155797374614942_1423373456235360492_n__1_-removebg-preview

:building_construction: Bill of Materials (BOM)

  1. :rotating_light: Emergency or Panic Button: This will serve as the core interface for initiating the shutdown process.

  2. :black_square_button: 3D Printed Enclosure: A custom 3D printed enclosure will provide a clean and secure housing for the components.

  3. :abacus: ESP32 Ethernet Module: The versatile ESP32 microcontroller, offering Ethernet connectivity, will be at the heart of our device.

  4. :hole: DC Power Jack: This component will be essential for power input.

  5. :electric_plug: AC to DC Power Supply: To convert AC voltage to the required DC voltage for the device.

  6. :hammer_and_wrench: Wiring and Hardware: Various connectors, wires, and screws will be necessary for assembling the device.

  7. :speaker: Piezo Buzzer (optional): For audio notifications, a piezo buzzer can be added, providing an additional layer of feedback.

The majority of components required for this project can be sourced affordably from various online platforms (for example, Aliexpress.com).


359589178_273969105252223_2079660963362529198_n__1_-removebg-preview
Parts being spray painted and air drying


Assembly Steps:
  1. 3D Printing and Finishing: Start by 3D printing the enclosure and finish it by sanding the surface for a smoother finish. Prime and paint the enclosure in a color of your choice (for mine I chose to paint in flat black with a textured black on top, finishing with a light coating of glow-n-dark paint).

  2. Flashing the Code: Use the code found below (with required changes) and flash it onto the ESP32.

  3. Installing the Components: Assemble the 3D printed enclosure by placing the ESP32 and DC power jack inside.

  4. Wiring: Connect the various components, ensuring proper connections for safe and efficient operation (see added wiring diagram for further information).

  5. Attach Button: Attach the emergency button with the provided screws.

:open_book: Open Source Code:

The heart of this project lies in the open-source code running on the ESP32 microcontroller. The code enables communication with the devices to be shut down and processes the shutdown commands securely. You can find the complete code posted below.

Expand for Code

#include <SPI.h>
#include <Ethernet.h>
#include <Button.h>

// WiFi Configuration
const char* ssid = “YOUR_WIFI_SSID”;
const char* password = “YOUR_WIFI_PASSWORD”;

// Replace “COMMAND_X” with the desired command to execute on button press
void executePlaceholderFunction() {
// Your code to execute on button press goes here
}

// Pin for the button
const int buttonPin = 2; // Change this to the desired pin

Button button(buttonPin);

EthernetClient client;

void setup() {
// Initialize the button
button.begin();

// Start Ethernet connection
Ethernet.begin(mac); // Replace ‘mac’ with your Ethernet MAC address, if needed
delay(1000); // Allow time for Ethernet to initialize

// Connect to WiFi
Serial.begin(115200);
Serial.print(“Connecting to WiFi”);
WiFi.begin(ssid, password);
while (WiFi.status() != WL_CONNECTED) {
delay(500);
Serial.print(".");
}
Serial.println("");
Serial.println(“WiFi connected.”);
Serial.print("IP address: ");
Serial.println(WiFi.localIP());
}

void loop() {
// Check for button press
button.read();

if (button.wasPressed()) {
// Button was pressed, execute the placeholder function
executePlaceholderFunction();
}

// Maintain the Ethernet connection
if (!client.connected()) {
reconnect();
}
}

void reconnect() {
// Attempt to reconnect to the server
while (!client.connect(serverIP, serverPort)) {
delay(1000);
}
}

Make sure to change the following before flashing the code:

  • YOUR_WIFI_SSID - Set your WiFi SSID (optional) - This acts as a fallback in case something happens to your ethernet connection.

  • YOUR_WIFI_PASSWORD - Set your WiFi password so the connection will work.

  • buttonPin - Define the button pin being used, in my case pin 2.

  • ###

:spiral_notepad: Summary:

By building an Ethernet-connected IoT device to remotely shutdown important devices, you add an extra layer of physical security to your valuable assets. The majority of components required for this project can be sourced affordably from various online platforms. By using the versatile ESP32 microcontroller running open-source code, you create a cost-effective and customizable solution for safeguarding your digital life. As technology and security continue to evolve, I invite you to share your thoughts, suggestions, and improvements on this project. Let’s make our lives more secure together.


F.A.Q’s

Question: Why not use WiFi as the connection method. Don’t the ESP32 boards come with that built-in and are cheaper?

Answer

Yes, it is more expensive to purchase ESP32 boards with an ethernet connection. The reasons for using ethernet over WiFi are as follows: higher power consumption, susceptibility to interference, network congestion, and security concerns. Security concerns being the main point. Anyone can create an [illegal] WiFi jammer which would prevent the shutdown signal making it to your devices.

Question: ESP32 boards seem very capable. Is there anything else they can do?

Answer

Yes, of course, these IoT boards are amazing little power efficient devices. I’m using the (optional) piezo buzzer to provide me with an audio alert if my server goes down (doesn’t respond after X amount of ping attempts).

The options are practically endless. If you can imagine it, I’m sure some has written code for it and is sharing it online. I’m considering making a text based screen that shows me my server stats at a glance.


:dollar: Purchase Links:

Panic Button: AliExpress.com :arrow_upper_right:
Female Power Jack Screw Mount: AliExpress.com :arrow_upper_right:
5v 2a Power Adapter (with matching plug): Depends on Country
Alternative Emergency Stop Button: AliExpress.com :arrow_upper_right:
Piezo Buzzer (optional): AliExpress.com :arrow_upper_right:

AliExpress shipping can take 15 - 30 days. While it is very slow, it is usually the cheapest option.

1 Like

@Jared…damn it man!!!.. :100: :sunglasses: :+1:…once again you hit it right out of the park Bro… :smiley:…just when you think one has seen everything from @Jared…he hits another one out of the ballpark… :smile:…hey Bro…I need to look over this posting real well but the fact that you put it out there…well guess what…good for you… What do you have to lose at this point…anyway Bro…well check it out and hit you back …but once again… You Da Man… :grinning::sunglasses:

1 Like