YAWC (Yet Another Web Camera)

You can buy prepackaged wifi networked cameras with pan and tilt.
I had all of the components to build my own and wanted to test an AJAX interface.
This was inspired by AJAX Remote Controlled Lego Robot

Linksys VWC54GC

Provides either cabled or wireless ethernet video in asf format.
asf format isn't particularly operating system or web browser netural, but that can be fixed with VideoLan.


Provides transcoding of video and snapshot capability along with a web browser client.

A Python module comes with VideoLan: Python binding documentation
This code runs as a CGI to grab a frame -


import vlc
import time
import cgi


vlc.Object(0).config_set("vout", "image")
vlc.Object(0).config_set("image-out-prefix", "../tmp/ptest")
vlc.Object(0).config_set("image-out-replace", 1)
vlc.Object(0).config_set("image-out-ratio", 1)
vlc.Object(0).config_set("image-out-format", "png")

print "Content-type:text/html\n\n"
print "<html>"
print "<head>"
print '<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">'
print '<meta http-equiv="Content-Language" content="en-us">'
print '<title>Web Camera</title>'
print '</head>'
print '<body>'
print '<img src="../../webtmp/ptest.png">'
print '</body>'
print '</html>'


gumstix + robostix

The gumstix provides the web server and a CGI for controlling the actuators and reading the sensors.

The user interface runs on a web browser using asynchronous Javascript (AJAX).
I used SAJAX with Python implementing the robot server. The server uses S.N.A.P. to talk to the robostix that controls the RC Servos for pan and tilt. The robostix is connected to the gumstix via a serial cable. The logic level of the gumstix serial port is 3.3v while the logic level of the robostix serial port is 5v. A 10K resistor in series with the robostix transmit data current limits the input clamp diode on the gumstix.

The gumstix is the SNAP master node. The Python coded implementation is

The robostix is an addressable SNAP node. <TODO - zip atmega code>

It is possible to have many addressable nodes connected to one master. The easiest way to do this is to use RS485 to connect the nodes.


Block Diagram

Block Diagram

The jumper on the Robostix must be removed so the motors in the servos can be powered separately from the Atmega CPU. If you don't use independent power supplies, a stalled motor can cause the CPU to reset.

I constructed the camera mount from materials available at a hobby shop - birch, telescoping brass, servo pushrod hardware, thick CA (cyanoacrylate), and a hot glue gun.


Running on a WRT54GL. Makes the gumstix wifi enabled. The gumstix wifistix can't be used because the development filesystem (Python) is on a MMC card connected via the 92 pin connex position.


| © 2005, 2008 Ken Staton