Have you ever wanted to start your computer while you are away from home to access some files? Or maybe you wanted to start a download of a new game, so that it would be done when you got home. This project will show how to start and control your computer from anywhere in the world.

We will use a NodeMCU and the Blynk app to start the computer. After it has been turn on, the TeamViewer App will be used to control the computer.

Step 1: Parts & Programs


  • A computer to turn on
  • NodeMCU (or ESP8266)
  • Project enclosure
  • Cables
  • Optocoupler (Opto-isolator) i used "Sharp PC817"
  • Resistor 200ohm


  • Blynk App (on Phone)
  • Arduino IDE (on Computer)
  • TeamViewer (on Computer and Phone)

Step 2: TeamViewer

Download the TeamViewer software on the PC that you want to control. Create an account and add your computer to your list of computers. You can control your computer from another computer or by phone.

Step 3: TeamViewer (To Control Computer)

Also download the TeamViewer App from the store, it is free. Login and go to your computers and from there it is just to click on the computer that you want to control.

Step 4: Blynk (To Start Computer)

The Blynk App will be used to trigger the NodeMCU board that will start our computer. Download the app from the store and make an account. Create a new project and add a button to pin 4 (if you use that pin).

Step 5: Program the NodeMCU With Arduino IDE

The pictures contains most of the information in this step.

Arduino IDE

https://www.arduino.cc/en/Main/Software (Here We can download the Arduino IDE)


https://github.com/blynkkk/blynk-library/releases (Here we can download the code library for the project)

Add the ESP8266 board to the Arduino IDE

https://github.com/esp8266/Arduino (This is the website where we find the following link)

"http://arduino.esp8266.com/stable/package_esp8266com_index.json" (We will need this link)

Step 6: Make the Hardware

solder the optocoupler as the schematics show.

Step 7: Power the NodeMCU

The board needs power and I do not want to cut open the wires on my power supply. I added a usb power plug to the back of the case to make it easy to supply the board with power.

Step 8: Connect the Wires

This part is quite easy. Dissconect the cable that goes from the power button to the motherboard and plug in one of the two cables from the NodeMCU instead. Now connect the power button cable (that you just dissconected) to the other cable from the NodeMCU board and you are done.

Remember that the current can only flow in one direction in the optocoupler so if it does not work, then you have plugged the cable in the wrong way. (This is not harmful to your computer).

Step 9: The Build in Moving Pictures

I provided a short video of the build. If you want to see a test of the build, there is some at the end of the video!

Thank you for reading my instructable!

<p>I will send you a pm</p>
<p>i cant use for esp standalone why ? cant upload</p>
<p>I guess this answer is a bit to late. But I might be able to help you now, but you will have to provide me with a bit more information about what you have done and what isn't working.</p>
<p>nice job :)</p>
<p>Lovely, always fun to see pictures of other peoples work :)</p>
<p>Hello and thanks for good news here, I like use alternative LiteManager software for free and fast remote control computers into local or Internet, cross-platform \ Windows, Android, Mac. It's very simple and secure. All the best!</p>
<p>Would it be a bad idea to use a transistor in place of the octocoupler?</p>
<p>Using an octocoupler allow me to power the nodeMCU from an external <br>power source (the 5v phone charger), while controlling the computer <br>connected to another power source (the computers psu). You can use a transistor with two sources of power like I did, if you connect the grond <br>of the power supplys together. You can also use a transistor and do it <br>like &quot;kpqowieuryt&quot; did, only use the internal power supply of the <br>computer. Read his comment for more info, hope this helps.</p>
thanks. I think I'll attach the high side of the on button to the collector and and the low side to the emitter in parallel. I think it would also be a good idea to attach a digital pin to the power indicator light, then map that to a blynk virtual pin.
Awesome proyect. Thanks for the ible. Has anyone tried powering this out of the +5vsb of the pc psu?
Thanks. :) and for the power of the psu. When the power supply is turned of it still supply power. But only to the big motherboard connector and not to the common +5v that is plugged to all the other components. But if one would cut the cable connected to the &quot;big&quot; connector and pull the power that way it should work. I have not tried this, I don't want to modify my power supply. I suppose one could make an adapter and cut that instead and keep the powersupply out of harms way.
I was in deed refering to the 5v rail that is always powered regardless of the computer being on. I plan to try this so i will come back with my results. Thanks again
<p>Yes, please do. I have not tried it myself, it will be fun to read the results. :)</p>
Done xd. I have it actually running inside my computer powered out of th 5v standby rail. So the nodmcu is always on even with the computer off. I bought a 20cm atx extension cable, with a male and female 24 pin conector, and soldered wires to this instead of directly to the psu cable. This way i am not touching either the motherboard or the psu and still getting +5vsb(purple wire on the atx connector). I can even change the node to a new computer or new psu without problem. I have also wired the 5v normal rail to the adc on the nodemcu through a 2:1 voltage divider so i can remotely monitored the level on this rail and wheter the computer is actuallt on or off instantly. Used a pc827 (2x optocouplers in a single package) so i can extend this to a second near computer. I am also thinkng on adding a servo to phisically press the power button on a laptop. If i come around to doing any of this i will update. Thanks for the indtructable
This is clearly a better upgrade than my solution. Good work!
<p>Blynk announced that they will move to a <br>new server so you will need to download the newest library and reflash <br>your nodeMCU. If you made this before today. cheers</p><p>You can read about it on there facebook page.<br></p><p>https://www.facebook.com/blynkapp/?ref=nf</p>
<p>god only for one ..</p>
<p>Great idea. The problem is bigger on an iMac. As you know, Apple computers (iMacs at least) have a well known power shut down issue. Wake on Lan does NOT work when this happens after a power outage/restore. All iMac users have the problem that if the utility power goes out, or fluctuates during a storm for just a second or two, the iMac will NOT power back on. And yes, that is even with the setting &quot;restore after power loss&quot; set. If the power goes out completely, even for a few minutes, and then returns on one time, then it will work. But here, VERY often, the power will go off, on, off, in a couple of seconds. Then, the iMac is not able to be remotely turned on. You have to physically be there to press and hold the power button, doing a forced OFF, then press it again to power back up. This is especially frustrating because I have home automation running on the iMac, and need it to come back on. Has anyone figured out a way to do this project by connecting into the iMac power button directly with the NodeMCU device? I even tried installing a &quot;Ring Rebooter&quot;, that you can call on the phone, and turn the power strip on and off. With the iMac plugged into this, it still won't power back on after a storm fluctuation. You still have to physically press and hold the iMac's power button for about 5 sec, then press it again to turn it back on. I was hoping someone would figure out a way to wire a device directly to the iMac's power button, so I could remotely turn it on?</p>
<p>Those other responses are all good ideas nt6. Two thoughts I have: 1) use a UPS so that the power will remain on until the UPS dies during an extended power outage. It would absorb the off/on problems that plague the iMac. 2) I use a microcontroller to turn on my PC also, using a similar hack of the power button wiring. I added a hard reset loop to my code where instead of just a push to close for x number of ms, I have it time the event until 4 seconds has expired, which keeps the PC power switch circuit closed for that long and simulates what you have to do in person to force your iMAC into its normal 'off' so you can press briefly to start it up again. I hope that helps you!</p>
<p>Would a Power Backup Unit (substantially a battery connected to the mains) be a solution to your problem? I'm not a geek, but to my knowledge sensitive IT infrastructure is always under power backup, just to allow company network to go suddenly in shut down (loosing the work of hundred people) just because the mains are powered off for some seconds.</p>
This sounds just perfekt for your problem. The octocupler is used in a way that when you have connected the NodeMCU to the computer. Pressing the button on the phone will do exactly the same thing as pressing the real button and the computer will not notice a difference. I am not the best person to talk to about macs, because I have never owned one. But if you remove the backplate from the imac and add your own wires to those of the power button. Then you would be able to bring those wires outside of the case and connect them to the NodeMCU. But, if you do not want to temper with the inside of the imac. Then actually fysically pressing the button might be what you want to do. You could use the NodeMCU to instead of closing the buttons circuits to &quot;press it&quot; you could use a solenoid that pushes the real button. You would need some other components but it would essentially be the same. Instead of closing the buttons circuit you would close the solenoids circuit. :)
<p>Are you using a battery backup?</p>
I did actually did think about it. I would not need it in the sense of having backup power for the NodeMCU because I would always have it connected to the mains. Which would mean that if the NodeMCU don't get any power then the computer would not get any either. Which means that I would not be able to start it either way. But I did think about only using a battery, without any external adapters. I would charge the battery from the computers own power supply, during the time the computer were turned on. It would use that power during the times when the computer were off. I did later decide that it would be a somewhat overkill and went with the version I mentioned earlier without any battery.
<p>Nicely done, but I'm confused! When TeamViewer starts on the remote computer, it assigns a new password. How is the controlling computer going to know what the password is?</p>
<p>It's possible to log in on a PC using your email and with a previously created password.</p><p>Without the need of knowing the current session code.</p>
<p>Make sure to set Teamviewer for Unattended Access on your computer by checking all three of the boxes under Unattended Access in the Console (lower left under the &quot;Allow Remote Control&quot; ID and Password.</p><p>Any idea about how big a load this system could handle? I'd like to remotely control my oxygen concentrator, which has an alarm that sounds if you just plug it into a remotely controlled mains outlet.</p>
<p>Yes it's as NakanoYamato said. When you make your account you add your computer to your list and then you won't need the on screen password anymore. :)</p>
<p>I must be dense. I'm not following this at all, please explain.</p>
<p>You can configure Teamviewer to be permanently installed and use a fixed password but remember Teamviewer is only free for personal use. There are other remote control apps which are free.</p>
<p>Ok , how does your phone reach the NodeMCU ? wifi ? bluetooth ? </p>
The NodeMCU uses WiFi to connect to the Internet. But the phone can use WiFi or the 3g network. It will work the same.
<p>What is the exact reason for using optocoupler in this setup?</p><p>And why the 200 ohms resistor?</p>
<p>I wanted to be able to trigger the button, but not have the NodeMCU electrically connected to the computer. You could use a transistor if you would want but this gives an extra layer of protection and is a bit cleaner. Why I used a 200ohm resistor is because the optocoupler I use is of the model sharp pc817. If you look at its datascheet you will see that it has a rated working current of 20mA when it has a voltage drop of 1.2V. If we would plug in the optocoupler directly to the NodeMCU the current would be 60mA. If we add a 200ohm resistor the current will just under 20mA you could also use 190ohm if you want exactly 20mA. I searched on google and found this if you want to watch it instead, https://www.youtube.com/watch?v=pYENAGK8qH4</p>
If what would want to know is how the device knows the password and the name of the network. There is a line of code that you will edit. Replace the words ssid with the name of the network and password with the password for the network. And when you make a new project in the app it will show you your project authentication token. The token is some numbers and letters. You will also copy this token to the code so the code knows who its &quot;working for&quot;. After that you are completely done editing the code and you can upload the code to the NodeMCU. When you plug in the power to the board it will automatically connect to the WiFi and listen to your app. :) Tell me if I got your question wrong, but I think this is what you wanted to know.
<p>This is a great Idea! very useful! Thanks about this!</p>
<p>use wake on lan instead ^^ most if not all routers support it, all computers as well.</p>
I actually used Wake on Lan before. I don't like to have cables through the house and would rather have a WiFi solution. But if you don't mind cables, then Wake on Lan works to.
<p>Well done for the work you have done - although readers could also consider some other methods. Wake on Lan being mentioned already - If you don't want cables, my Dell Laptop will Wake on Lan over WiFi as long as its power adapter is connected so check out it yours will. For a desktop that I didn't want to run ethernet cables to, I used a ethernet over the mains adapter and this then gives Wake on Lan to the PC. You can also get a Belkin Mains switch which you can control via a DO button on your phone. Just set the BIOS to turn on when mains is applied. You mention that TeamViewer is free. Yes it is free for personal use but users should not that commercial use requires quite an expensive license.</p>
<p>Thanks for your response! After reading your comment I understand that I should have written more about alternatives and why and why not one might choose to take on the issue the way I did. I thought I would put my thoughts here in a comment instead. There are many possibilities to get this working and one should choose the route that one is most comfortable with. The price would probably be one of the main benefits when comparing these alternatives. And one of the main flaws would be that one actually needs to build it to a higher degree than the others. Mains switches and Ethernet over mains is about 6 times the price of this build even though they are on the cheap side with some of the cheapest ones priced at &pound;30 and the Belkin &pound;39.99. One would get the benefit of plug and play with these alternatives which are a good thing. But one will in the case of the Mains switch get other problems. If power would to be lost and then returned for any reason, the computer would turn on. There is of course ways around this to. With the case with Ethernet over mains adapter, preparing and change the settings will take some time in both builds. If one is used to work with routers or if one is used to program micro-controllers might be the real deal breaker for these two. But to have a laptop with the ability as you mentioned &quot;my Dell Laptop will Wake on Lan over WiFi as long as its power adapter is connected&quot; is surely one of the best solutions and I will check it out!</p>
<p>I don't want to detract from the work you have done as it is a very good solution. I've also recently purchased an ESP8266 and will be using it soon. I use the Belkin WiFi switches for some of my similar requirements. You mentioned that they are expensive at &pound;39.99. I paid &pound;24.99 with free delivery from MyMemory.co.uk http://www.mymemory.co.uk/Belkin/Smart-Plugs and also bought some from Maplins at the same price as they offer a price match. My Ethernet over mains were a present so that was a no brainer !! Thanks for your instructable.</p>
<p>Stor anv&auml;ndning f&ouml;r en wifi gadget.</p>
<p>Ty its Lenovo G510 so i can easy remove the keyboard :D</p>
<p>i have laptop is this mby possible for laptop : D ?</p>
<p>If you don't want to remove your laptop keyboard to be able to get to the power button, or maybe can't because you got an Ultrabook or a MacBook.You could get into the habit of always putting your laptop into sleep-mode.<br> This will allow it to wake up from a push of a button, from usb device.<br> You would then modify the usb device so that the NodeMCU triggers one <br>of the buttons on that device, for example a wireless numbpad. If you do<br> have a laptop where you can get access to solder wires to the button then you could always remove the dvd-drive and instead use a HDD-caddy and put the NodeMCU in there. But if none of these suits you, then you could always use &ldquo;Wake on LAN&rdquo;. It does not work on Wi-Fi but you could walk your laptop to the router and plug in an Ethernet-cable. The process for setting it up is different on every router, but with a bit of effort you will get it working.</p>
<p>nice job bro...</p>
<p>Thanks ;)</p>
Could you not use a bluetooth dongle with developer privileges or would that be more difficult since it prob wouldnt give you easy access to booting
<p>In my experience that would probably be very hard to do and Bluetooth<br>is also close range. I want to be able to get access the computer while<br>traveling, that&rsquo;s why I went with the Wi-Fi approach. I am close to the computer<br>in the video, but it also work when the phone is on the 3G network. If you want<br>you could also set up your router and your computer to accept magic packets (Works<br>on LAN), but I myself think this way is easier and &ldquo;just works&rdquo; with Wi-Fi.</p>

About This Instructable




More by Ekras:3D-Print Your Favorite Minecraft World! Phone Controlled Computer Starter Motorized Pulldown Curtain (Phone & Radio Controlled) 
Add instructable to: