Introduction: Remotely Controlled Webcam Pan&tilt

You have probably seen many projects like this one already: some of them use face recognition software to follow after someones head, some of them use mobile phone to control pan/tilt, and some even use a wii's nunchuk but all of them in my opinion lack the usability that solves a real life need, so let me explain where I am coming from.

I usually talk on Skype with my relatives and friends, during those talks we often involve our kids (age 1 and 3). The problem with kids in that age is that they are in a constant move, thus having a camera mounted on a TV in front of the couch just misses them completely. What I wanted to have is a camera mount that could be easily operated during the talk, and focus on the little ones. After some trial and error, and checking various approaches I finally came with an idea to utilize a TV's remote control to operate the camera. In this Instructable I will share with you the build process.

Step 1: Materials and Tools

Materials

  • 2x 28BYJ-48 5V stepper motors with driver board Ebay
  • Arduino Nano Ebay
  • USB Type A Female Connector Ebay
  • USB Type A Male Connector Ebay
  • USB cable (I used the one that was supplied with the camera)
  • IR receiver TSOP2238 38kHz L-90 or similar (needs to be compatible with the remote) Ebay
  • Wires, screws, washers, heat shrink tube

Tools

  • 3D printer/online service to order printed parts
  • screwdriver, solder iron, pliers, hot air station or a lighter to heatshrink

Step 2: Pan/Tilt Mount

Print the supplied designs on a 3D printer or order it from one of the online 3D printing facilities. Files are available on Thingiverse

Step 3: Wiring Motors With Arduino

One thing worth mentioning is USB connectors. The male connector goes to the PC, and the female is for the camera. This way the whole device can be powered from a single USB port (no external power source needed). Normal 500 mA USB should be enough to power everything, as camera takes around 150mA, and the rest (Arduino, motors, ir receiver) around 200mA when moving. Initially I had problems with the camera restarting, due to the low power, and had to remove all the LEDs from motor drivers (they looked kind of bad anyway). I then cut the USB cable - around 20cm (8 inches) from the camera and attached the new male connector at the end. The rest of the cable was then soldered to the female USB connector. It is important, to solder also USB shielding to the connectors, so that the data signals would not be interrupted. All the electronics fit snugly in the casing, and the USB socket was glued to the case. Motor connectors had to be taken apart and assembled again so that the cables would go via the hole.

Step 4: Software

All the software is available on GitHub. It should not be to hard to read and understand. One thing to mention is that it uses external library to read ir codes, that needed to be downloaded and installed into Arduino IDE.

Step 5: Reading IR Codes

In line 63 there is a statement that will print the captured IR codes to the serial monitor. To read the codes this line need to be un-commented, and Arduino need to be connected to the PC. My remote fortunately has a little joystick with all four arrows, but any remote can be used. Then the codes are inserted in readIr function.

Step 6: Final Product

I am very pleased with the final product and I find it very useful. One small design flaw is the fact that the camera has the microphone built in, and when moving there is a little noise recognizable on the other side of the Skype (nothing to serious).

Step 7: Future Improvements

  • Head tracking :)
  • Operation from mobile phone
  • Operation with Nintendo Wii's Nunchuk ;)
  • Custom PCB board so that all electronics would fit into camera base
  • Giving the possibility to move the camera to the other party of the Skype call.
    • I have already investigated that possibility via IR hub and web gateway - but the lag was too big.

Comments

author
DIY+Hacks+and+How+Tos made it!(author)2017-07-08

Cool design. I would love to set up something like this at my local nature preserve to watch the local wildlife without scaring them away.

author
marcin.barabasz made it!(author)2017-07-10

Good to hear that. This device is not really suitable to work outside, but maybe after closing it in a jar it would be ;) just nail the lid to the branch, install the base of the device on it and screw the jar on top. Would work in my opinion. Of course to rotate the camera you would need to be hidden in the bushes with the remote ;)

author
cobourgdave made it!(author)2017-07-10

Nice design and build.

author
marcin.barabasz made it!(author)2017-07-10

I am glad that you like it.