YouTube player

If you have pets or children that you need to feed or check on via the internet, here’s a cheap and easy way to control motors, lights, and other devices at home from another computer online, like the one at work. You can set this system up in minutes and it requires no programming. All you need is a webcam, a flashlight, a standard computer running free software, and about $15 worth of analog electronics you can buy at RadioShack.

The system works through a Yahoo Messenger video chat connection between your home computer and any remote computer. But instead of showing people talking, the video stream conveys simple control information that you “encode” using a flashlight on a plain dark surface.

With my setup, for example, shining a light in the upper left corner of the image powers a dog food “allower” that uncovers a dog dish, and shining it in the lower right sounds a buzzer to signal dinnertime.

On the home computer, the video chat window runs full-screen, and cheap photosensors taped onto the screen’s surface detect the changes in brightness when the flashlight spot image hits their locations. Each sensor then switches its device at home via a transistor or relay. Voilà!

By using the screen itself as a port, you bypass having to unpack USB or some other protocol, and you can add additional actuators by simply taping sensors to different parts of the screen.

This setup also keeps your home computer more secure than remote desktop access software such as VNC, unless Yahoo Messenger has some super-secret way of controlling your whole computer, which is unlikely.

What will the next generation of Make: look like? We’re inviting you to shape the future by investing in Make:. By becoming an investor, you help decide what’s next. The future of Make: is in your hands. Learn More.

Project Steps

Set it up.

Install Yahoo Messenger (http://messenger.yahoo.com) on both your home and remote computers. Make 2 accounts under 2 matching names, one ending in “home” and the other ending in “work” (you’ll need 2 email addresses for this; get free ones from Gmail or Hotmail or something).

Separately log into each account from their respective machines, add them as friends for each other, and configure their Webcam preferences to “Allow everyone to view my webcam” and their Super Webcam preferences to “Start Super Webcam mode automatically.”

For each device you want to control, solder or wire-wrap a long length of wire to each of the 2 leads of a photoresistor. Set up a power circuit for each device on a breadboard, following the schematic. All of the power supplies should be plugged into a surge protector, like a power strip with a circuit breaker.

You may need to insert an additional transistor/relay for higher-powered devices.

Then test whether the switching works for each device by covering and uncovering the photoresistors with your hand.

Use electrical tape to tape the photo-resistors sensor-side down on the computer screen, spaced apart. Adjust the screen brightness to a level such that the devices switch off when the screen is black.

With some circuits, I found that I had to put a piece of paper between the photoresistor and the screen to reduce the light. I recommend also putting the computer screen in a box to exclude non-screen light that could interfere with the sensor readings.

Set up your devices however they’re going to work. It helps if your home computer has a webcam pointed at the devices, so you can remotely watch what’s happening.

At your work computer, connect a webcam and set it up so that it looks at a dark, flat surface. I used a PVC stand that I’d already made for the camera and pointed it down onto a black T-shirt.

Establish the connection.

On your work computer, run Yahoo Messenger. Next to your home username, select View My Webcam to open a webcam feed, then leave it running.

On your home computer, click to view your work video feed. Change the window size so it fills your home computer’s screen, or at least covers the area around all the sensors.

Back at work, shine a flashlight into the camera’s field of view at different locations to activate the devices controlled by your home computer screen.

Some recommendations.

Test your system for a full day before you put it to use while you’re away. Because it’s based on analog sensors taped to a screen, there are little ways in which the “real world” will interfere with it. For instance, the photoresistors might fall off, or be triggered by changes in daylight coming through the windows.

If you want to control home devices wirelessly, I suggest an inexpensive, low-power infrared remote system like the Tiny-IR-II from Reynolds Electronics (http://rentron.com). Just replace the switches in the Tiny-IR-II encoder chip schematic with your photo-resistor circuits’ transistors, and use a decoder chip for each device.

Note that the system’s range isn’t great, and it uses infrared, like a TV remote, so all the devices should be in the same room as the transmitter.

With an IR remote system, it would also be good to dedicate an additional photoresistor circuit to a relay that all the other device circuits traverse. That way, you would have a “kill switch” that can shut the whole thing down if it starts acting wacky.

For more complex control, you can connect the sensor signals to a microcontroller. For my home system, I connected the transistor outputs to a PIC microcontroller and H-bridge motor controller IC that run a simple motorized dog food allower and a piezo buzzer.

Both could be connected directly, as shown in the diagram in Step 1, but I put a PIC in the loop to allow more complex outputs in the future.

I hope that this system helps people and also helps make some pets happier when they’re at home alone.

Conclusion

This project first appeared in MAKE Volume 22, page 57.