Servo Pod

by andreq in Circuits > Robots

20435 Views, 55 Favorites, 0 Comments

Servo Pod

ServoPod_001.jpg
You ever dreamed to have an orbitcam or any other Pan/Tilt webcam control?

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.

Get All the Parts and Tools

ServoPod_002.jpg
ServoPod_004.jpg
ServoPod_005.jpg
ServoPod_006.jpg
For this Servo Pod, you'll need :

Parts :
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

Tools :
1 x Soldering iron
1 x Pic Programmer (cheap on ebay or Diy)

Others :
1 x Webcam ?

Flash the Pic

ICProg.jpg
Get yourself a pic programmer and use the software you like (IcProg for me) and Flash the Pic with the following HEX file.

Look on the picture for the basic config.

Downloads

Soldering

ServoPodSchema.jpg
ServoPod_004.jpg
Using this schematic, solder everything on the breadboard. Use the Dip socket for the Pic as you might want to flash it again.

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...)
rb2 Down
rb3 up

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

The Software (for Serial Com)

DelphiServoPod.jpg
Just download my (soon to be good) crapy Delphi made software and have fun !

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

The other letters are not yet implemented. If you want to use this on a webpage you should basicly use javascript http request or send those request in a 1x1 iFrame

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!

Downloads