Turning A Light Off Over The Internet

Because reaching over a few feet to turn off a switch is too much to bear for [Bruce], he connected his desk lamp to the Internet. It’s a pretty cool build that’s the perfect tutorial for connecting just about anything to the internet.

For his build, [Bruce] used an Arduino with a relay attached to an output pin. When the Arduino receives a signal on its serial port, a tiny voltage is applied to the relay, turning on the light.

This could have been done with an Arduino Ethernet, but the PHP script [Bruce] went with is a little more¬†versatile. Whenever someone pulls up this digital light switch web page, they can turn [Bruce]’s desk lamp on and off.

For an introduction to connecting bare bones projects to the Internet, we’re really liking [Bruce]’s build. Just try no to go crazy with that link and leave the failure testing to the professionals. You can check out the demo video after the break.


23 thoughts on “Turning A Light Off Over The Internet

  1. A live cam to see this is actually turning the lamp on and off would be great…aswell as seeing the effect of my rapid switching…the fact the page is named example.php gives me doubts :-( ….

  2. It would be nice if the page used ajax, so it wouldn’t keep reloading the page and the stream applet. Also, it would be cool if the switch graphic would switch with the status of the lamp, but that would be a bit more coding I think.
    Also, I love things like this where I can give input to an output somewhere across the world. :D And cheers for surviving the flood.

    1. the switch is standing in the right position
      but the light is flashing like crazy here

      and the webcam stream isn’t that fast (so it doesn’t match the switch’s status)
      skype/msn is a lot faster

      but when you press the button the light change’s instantly

  3. I put a webcam on a servo turret in my apartment a couple weeks ago. You should look into using jQuery to asynchronously send POSTs to your PHP page. That way you avoid the whole page refreshing. I’m sure you can find some useable examples by googling.

  4. Not to knock this down at all but this has been done many times. There’s Misterhouse, there’s BlueLave (X10 with The Firecracker), there’s a very long list on my web site, … I think you get the point.

    Of course in a few weeks I hope to contribute something to this list of Arduino and something does Home Automation. I just hope to have a bit more than this.

Leave a Reply

Please be kind and respectful to help make the comments section excellent. (Comment Policy)

This site uses Akismet to reduce spam. Learn how your comment data is processed.