Here it is! With this Made from scratch Servo Pod, you can now control your webcam (or wifi antenna ?) by the palm of your hand or even remotly with a web server.
Step 1: Get All the Parts and Tools
1 x Microchip pic16f628(a) (free sample from microchip, don't abuse...)
1 x Dip socket for pic
5 x 4.7kOhm resistor (or 5 "pullup" resistor)
1 x 22kOhm reisistor
1 x serial port plug
2 x Servo Motor (any 5v model witch is powerful enought to hold the webcam)
2 x 3pin plug for your servo
1 x Led
4 x push button
1 x switch
1 x Breadboard
1 x Soldering iron
1 x Pic Programmer (cheap on ebay or Diy)
1 x Webcam ?
Step 2: Flash the Pic
Look on the picture for the basic config.
Step 3: Soldering
Note : the 4 pushbutton are used for "joystick" mode. You should wire them ..on a another board with a cable.
The button wire like this :
rb0 Left (might be right..)
rb1 Right (migth be left...)
The led is used to show joystick mode, you might want to have it remotly on the joystick board. ALSO NOTE !!! I used a internal resistor 5v led. Add a resistor if your led is not like mine (100ohm should be OK)
Your servo pin could not be the same as mine (1-5v, 2-Signal, 3-Ground) change for your need.
You need a 5v Power source
R1 to 5 = 4.7kOhm
R6 : 22kOhm
J1 = Pan J2 = Tilt
Step 4: The Software (for Serial Com)
Note : The switch must be in remote mode (led not lit) to use the serial port
The software is not yet completed... don't forget to open the port before anything or it will crash.
The number on the left is Pan and right is Tilt. Should be something from 65 to 225 (anyway the Pic will ignore anything else)
The small light "arrow" is to move left.. Hold it (you see the pan number change) and release will send data to serial port
When you launch the .exe it also launch a web server on port 2020 where you can control the Servo Pod (connect to serial port before launching your web browser)
To use the webserver its quite simple.
http://localhost:2020/A130 A mean the Pan position this will be 130 (from 65 to 225) if you want 70 right : 070
http://localhost:2020/B130 B is the Tilt position
http://localhost:2020/C010 C will add the number to the current Pan pos
I might release the source code (witch is quite ugly...) sooner or later so anyone could finish it (and add more stuff)
NOTE : If some guru would like to dev a better software (im a web dev... not a software dude hehe) the thing is quite simple. All you need to send to the serial port is 2 bytes from 65 to 225. In my software, I convert the String to Int then the int to Char. The Chars (2 bytes) are then send on the serial port. You must also wait for the DSR line to be "high" as this is the hardware handshake to make sure the Pic is ready to receive. Thanks!