diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..b22560a --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +*.drawio.bkp \ No newline at end of file diff --git a/README.md b/README.md index 3a5330c..5af4023 100644 --- a/README.md +++ b/README.md @@ -1,32 +1,11 @@ # Arduino Remote Switch -Remote switch to turn on, off or reset PC. +Remote switch to turn on, off, reset or kill PC via a web interface. + +This project is based on a Arduino with a ethernet shield and a small daugtherboard to connect to PC headers by decoupling the two circuits with optocouplers. The power for the Arduino is sourced from the PC's motherboard USB header. The switch interface is hosted on the ethernet shield as a website and can be accessed from anywhere on the network via a webbrowser. ![Web interface](./web.png) ## Getting started -### Hardware - -- Arduino Uno -- Arduino Ethernet Shield -- Ethernet cable -- Micro SD card -- Wires - // TODO how many wires? - -### Software - -- Arduino IDE - -### Steps - -> **Disclaimer:** Follow these instruction at your own risk. - -1. Format SD card to FAT16. -2. Store website (content of `web/src/`) on SD card. -3. Put SD card into ethernet shield. -4. Upload server program `server.ino` to Arduino via Arduino IDE. -5. Turn off Arduino and PC and detach from power. -6. Wire cables between your PC and Arduino like following: - TODO Picture wiring of schematic +Check [what is needed](./docs/ToolsAndMaterials.md) and follow the [build instructions](./docs/BuildInstructions.md) to build this project. diff --git a/docs/Assets/daughterboard.png b/docs/Assets/daughterboard.png new file mode 100644 index 0000000..83da9e2 Binary files /dev/null and b/docs/Assets/daughterboard.png differ diff --git a/docs/Assets/frontpanelIO.png b/docs/Assets/frontpanelIO.png new file mode 100644 index 0000000..9d3b05e Binary files /dev/null and b/docs/Assets/frontpanelIO.png differ diff --git a/docs/Assets/schematic.drawio b/docs/Assets/schematic.drawio new file mode 100644 index 0000000..43f3841 --- /dev/null +++ b/docs/Assets/schematic.drawio @@ -0,0 +1,303 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/docs/Assets/schematic.png b/docs/Assets/schematic.png new file mode 100644 index 0000000..9fecc0f Binary files /dev/null and b/docs/Assets/schematic.png differ diff --git a/docs/BuildInstructions.md b/docs/BuildInstructions.md new file mode 100644 index 0000000..a605d68 --- /dev/null +++ b/docs/BuildInstructions.md @@ -0,0 +1,43 @@ +# Build instructions + +> **Disclaimer:** Follow these instruction at your own risk. +> +> Also check your motherboard's manual for the available headers, since these might differ. + +## Soldering and board installation + +![Schematic](./Assets/schematic.png) + +1. Cut PCB to the right size if neccessary. +2. Drill two mounting holes into PCB to fit the board at the end of the case. +3. Solder the componentes onto PCB (daughterboard). +4. Screw Arduino with shield and spacers into case (saw spacers to the right length in neccessary). +5. Install daughterboard. +6. Wire daughterboard to Arduino. + +![Daughterboard](./Assets/daughterboard.png) + +## Installing software + +1. Format SD card to FAT16 with [SDcard formatter (recommended)](https://www.sdcard.org/downloads/formatter/) +2. Store website (content of `web/src/`) on SD card. +3. Put SD card into ethernet shield. +4. Connect Arduino to a powerd on PC via USB and the shield to a router via ethernet. +5. Open router configuration, set a static IP range and choose a free IP address. +6. Set the IP address in the `server.ino` file and save. +7. Open Arduino IDE and upload `server.ino` to Arduino. +8. Test if the website can be reached by typing the IP into the webbrowser. +9. Unplug all the cables from the Arduino for the next steps. + +## Installing into PC + +1. Turn off Arduino and PC and detach from power. +2. Install USB internal header on the PC's motherboard. See your motherboard manual for a free USB header. +3. Wire cables between your PC and Arduino like following and close the case. +4. Connect Arduino to the USB header. +5. Connect the shield to ethernet to router. +6. Restore power to PC again. Arduino should turn on. +7. Open webbrowser on phone to open the website and turn on PC by pressing the power on button. +8. PC should start. + +![Front panel IO](./Assets/frontpanelIO.png) diff --git a/docs/ToolsAndMaterials.md b/docs/ToolsAndMaterials.md new file mode 100644 index 0000000..cd2b117 --- /dev/null +++ b/docs/ToolsAndMaterials.md @@ -0,0 +1,26 @@ +# Tools and materials + +## Materials + +These are all the materials needed to rebuild the project: + +- Arduino Uno +- Arduino Ethernet Shield +- USB-B to USB-A cable (to power Arduino) +- USB internal motherboard header to USB-A (to power Arduino from inside the the PC case) +- Ethernet cable +- Micro SD card (to store website) +- Set of Dupont cables 100mm and 300mm +- 16x pin headers for dupont cables +- 3x PC817 optocoplers +- Resistors (1x 200 Ohm, 2x 330 Ohm, 1x 1 kOhm) +- PCB 30mm x 55mm +- KKSB Arduino Case for Arduino UNO and Arduino Mega +- 4x M2.5 x 14mm hexagonal nylon spacers (to screw Arduino with shield to case) + +## Tools + +- Soldering iron and solder +- Drill (for mounting holes on PCB) +- Thin wood saw (to shorten the nylon spacers) +- Screwdriver