Introduction: Phone Controlled Computer Starter

Picture of Phone Controlled Computer Starter

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

Picture of 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

Picture of 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)

Picture of 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)

Picture of 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

Picture of Program the NodeMCU With Arduino IDE

The pictures contains most of the information in this step.

Arduino IDE (Here We can download the Arduino IDE)

Blynk (Here we can download the code library for the project)

Add the ESP8266 board to the Arduino IDE (This is the website where we find the following link)

"" (We will need this link)

Step 6: Make the Hardware

Picture of Make the Hardware

solder the optocoupler as the schematics show.

Step 7: Power the NodeMCU

Picture of 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

Picture of 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!


MohdH64 made it! (author)2017-04-12


Ekras (author)MohdH642017-04-12

I will send you a pm

MohdH64 (author)2017-01-09

i cant use for esp standalone why ? cant upload

Ekras (author)MohdH642017-03-22

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.

serkanö12 made it! (author)2017-03-05

nice job :)

Ekras (author)serkanö122017-03-22

Lovely, always fun to see pictures of other peoples work :)

FusionN (author)2016-12-23

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!

DTMan101 (author)2016-05-22

Would it be a bad idea to use a transistor in place of the octocoupler?

Ekras (author)DTMan1012016-05-24

Using an octocoupler allow me to power the nodeMCU from an external
power source (the 5v phone charger), while controlling the computer
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
of the power supplys together. You can also use a transistor and do it
like "kpqowieuryt" did, only use the internal power supply of the
computer. Read his comment for more info, hope this helps.

DTMan101 (author)Ekras2016-05-24

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.

kpqowieuryt (author)2016-03-03

Awesome proyect. Thanks for the ible. Has anyone tried powering this out of the +5vsb of the pc psu?

Ekras (author)kpqowieuryt2016-03-03

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 "big" 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.

kpqowieuryt (author)Ekras2016-03-11

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

Ekras (author)kpqowieuryt2016-03-11

Yes, please do. I have not tried it myself, it will be fun to read the results. :)

kpqowieuryt (author)Ekras2016-04-29

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

Ekras (author)kpqowieuryt2016-04-29

This is clearly a better upgrade than my solution. Good work!

Ekras (author)2016-03-23

Blynk announced that they will move to a
new server so you will need to download the newest library and reflash
your nodeMCU. If you made this before today. cheers

You can read about it on there facebook page.

Murray Locksmith (author)2016-03-03

god only for one ..

nt6 (author)2016-02-23

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 "restore after power loss" 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 "Ring Rebooter", 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?

destructor gadget (author)nt62016-03-02

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!

minimeccanica (author)nt62016-02-29

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.

Ekras (author)nt62016-02-23

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 "press it" 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. :)

Brian996 (author)nt62016-02-23

Are you using a battery backup?

Ekras (author)Brian9962016-02-23

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.

jderson (author)2016-02-23

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?

NakanoYamato (author)jderson2016-02-23

It's possible to log in on a PC using your email and with a previously created password.

Without the need of knowing the current session code.

woodnboats (author)NakanoYamato2016-02-28

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 "Allow Remote Control" ID and Password.

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.

Ekras (author)jderson2016-02-23

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. :)

jderson (author)Ekras2016-02-23

I must be dense. I'm not following this at all, please explain.

joneskdale (author)jderson2016-02-23

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.

Vazgi (author)2016-02-27

Ok , how does your phone reach the NodeMCU ? wifi ? bluetooth ?

Ekras (author)Vazgi2016-02-27

The NodeMCU uses WiFi to connect to the Internet. But the phone can use WiFi or the 3g network. It will work the same.

lurifax (author)2016-02-24

What is the exact reason for using optocoupler in this setup?

And why the 200 ohms resistor?

Ekras (author)lurifax2016-02-24

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,

Ekras (author)2016-02-24

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 "working for". 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.

This is a great Idea! very useful! Thanks about this!

TrucM (author)2016-02-21

use wake on lan instead ^^ most if not all routers support it, all computers as well.

Ekras (author)TrucM2016-02-22

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.

joneskdale (author)Ekras2016-02-23

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.

Ekras (author)joneskdale2016-02-23

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 £30 and the Belkin £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 "my Dell Laptop will Wake on Lan over WiFi as long as its power adapter is connected" is surely one of the best solutions and I will check it out!

joneskdale (author)Ekras2016-02-23

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 £39.99. I paid £24.99 with free delivery from 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.

james_cooks (author)2016-02-23

Stor användning för en wifi gadget.

EnergetikaO (author)2016-02-21

Ty its Lenovo G510 so i can easy remove the keyboard :D

EnergetikaO (author)2016-02-21

i have laptop is this mby possible for laptop : D ?

Ekras (author)EnergetikaO2016-02-21

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.
This will allow it to wake up from a push of a button, from usb device.
You would then modify the usb device so that the NodeMCU triggers one
of the buttons on that device, for example a wireless numbpad. If you do
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 “Wake on LAN”. 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.

chamaraent (author)2016-02-20

nice job bro...

Ekras (author)chamaraent2016-02-21

Thanks ;)

spacepymp (author)2016-02-19

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

Ekras (author)spacepymp2016-02-20

In my experience that would probably be very hard to do and Bluetooth
is also close range. I want to be able to get access the computer while
traveling, that’s why I went with the Wi-Fi approach. I am close to the computer
in the video, but it also work when the phone is on the 3G network. If you want
you could also set up your router and your computer to accept magic packets (Works
on LAN), but I myself think this way is easier and “just works” with Wi-Fi.

PhilipW9 (author)2016-02-19


About This Instructable




Add instructable to: