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.

Step 1: Get all the parts and tools

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 ?
Please have a try! This is from brandbagstore.net Now there are many famous brands of products on the world, such as LV, Ed hardy , Gucci ,and so on. I think you may go to shop to buy them or on other websites. At that time, you are worried about the price so high or the quality so low. You also worried about the sellers can’t do anything if the products are not work, We have going in business for a long time, And we have a lots of customers from all the world becoming our partner, Autumn is coming, we have opened the fall fashion door to all the customers, Would you mind making a decision to buy one or two product to have a try? I thins our perfect products and best service will make you satisfied! And you will never forget the websites brandbagstore.net Please have a try!
hi, how to comunicate con serial, for pan and til?, how to send data, one for pan and one for til?, width A o B and data?, i try to write delphi code, without exit. can explain please. jose.
I was lurking arround on the internet and tought I'd look at some of my old forum post... and guess what... I found this :<br><br><em>[code]</em><br><br><em>'****************************************************************<br><br>'* Name : SERVOPOD.BAS *<br><br>'* Author : Andr&eacute; Quirion *<br><br>'* Notice : Copyright (c) 2005 *<br><br>'* : All Rights Reserved *<br><br>'* Date : 31-03-2005 *<br><br>'* Version : 1.5 *<br><br>'****************************************************************<br><br>include &quot;modedefs.bas&quot;<br><br>CMCON = 7<br><br>'Initialisation des variable, constante<br><br>pos1 var byte 'Variables de positionement<br><br>pos2 var byte<br><br>cont var byte 'Compteur<br><br>mode var byte 'Variable du mode<br><br>'Initialisation des valeurs<br><br>pos1 = 157 'Position centrale du servo au demarrage<br><br>pos2 = 152<br><br>mode = 0 'Mode joystick au demarrage, changer au choix<br><br>high porta.2 'Allumer la LED du joystick, changer au choix<br><br>if mode = 0 then goto joystick<br><br>if mode = 1 then goto remote<br><br>remote:<br><br>for cont = 0 to 40<br><br>pulsout portb.4,pos1 'Impulsion vers les servos<br><br>pause 8<br><br>pulsout portb.5,pos2<br><br>pause 8<br><br>next cont<br><br>high portb.7 'Handshacking hardware<br><br>serin portb.6,N2400,100,fin,pos1,pos2 'Attente des donn&eacute;es serie.<br><br>fin:<br><br>low portb.7 'Handshacking hardware<br><br>gosub modeDetect<br><br>if mode = 1 then<br><br>goto remote 'Retour au debut des instruction<br><br>else<br><br>high porta.2<br><br>goto joystick<br><br>endif<br><br>end<br><br>joystick:<br><br>if portb.3=0 then pos2=pos2-1<br><br>if portb.2=0 then pos2=pos2+1<br><br>if portb.0=0 then pos1=pos1+1<br><br>if portb.1=0 then pos1=pos1-1<br><br>pulsout portb.4,pos1 'Impulsions vers les servos<br><br>pause 8<br><br>pulsout portb.5,pos2<br><br>pause 8<br><br>pause 20<br><br>gosub modeDetect<br><br>if mode = 0 then<br><br>goto joystick 'Retour au debut des instruction<br><br>else<br><br>low porta.2<br><br>goto remote<br><br>endif<br><br>end<br><br>modeDetect : 'Quel mode ?<br><br>if porta.3 = 1 then mode = 1<br><br>if porta.3 = 0 then mode = 0<br><br>return&nbsp; &nbsp;&nbsp;<br><br>[/code]</em><br><br>Thats the BASIC code that compile using PicBasic Compiler. It's the code thats sits in the PIC<br><br>Don't know if you're still interested about it. Have fun :D
Hello Any chance you could send me the source for the Pic and also the source code for the program please. Andy
I was lurking arround on the internet and tought I'd look at some of my old forum post... and guess what... I found this :<br> <br> <em>[code]</em><br> <br> <em>'****************************************************************<br> '* Name : SERVOPOD.BAS *<br> '* Author : Andr&eacute; Quirion *<br> '* Notice : Copyright (c) 2005 *<br> '* : All Rights Reserved *<br> '* Date : 31-03-2005 *<br> '* Version : 1.5 *<br> '****************************************************************<br> include &quot;modedefs.bas&quot;<br> CMCON = 7<br> 'Initialisation des variable, constante<br> pos1 var byte 'Variables de positionement<br> pos2 var byte<br> cont var byte 'Compteur<br> mode var byte 'Variable du mode<br> 'Initialisation des valeurs<br> pos1 = 157 'Position centrale du servo au demarrage<br> pos2 = 152<br> mode = 0 'Mode joystick au demarrage, changer au choix<br> high porta.2 'Allumer la LED du joystick, changer au choix<br> if mode = 0 then goto joystick<br> if mode = 1 then goto remote<br> remote:<br> for cont = 0 to 40<br> pulsout portb.4,pos1 'Impulsion vers les servos<br> pause 8<br> pulsout portb.5,pos2<br> pause 8<br> next cont<br> <br> high portb.7 'Handshacking hardware<br> serin portb.6,N2400,100,fin,pos1,pos2 'Attente des donn&eacute;es serie.<br> fin:<br> low portb.7 'Handshacking hardware<br> gosub modeDetect<br> if mode = 1 then<br> goto remote 'Retour au debut des instruction<br> else<br> high porta.2<br> goto joystick<br> endif<br> end<br> <br> joystick:<br> <br> if portb.3=0 then pos2=pos2-1<br> if portb.2=0 then pos2=pos2+1<br> if portb.0=0 then pos1=pos1+1<br> if portb.1=0 then pos1=pos1-1<br> <br> pulsout portb.4,pos1 'Impulsions vers les servos<br> pause 8<br> pulsout portb.5,pos2<br> pause 8<br> <br> pause 20<br> <br> gosub modeDetect<br> if mode = 0 then<br> goto joystick 'Retour au debut des instruction<br> else<br> low porta.2<br> goto remote<br> endif<br> end<br> <br> modeDetect : 'Quel mode ?<br> if porta.3 = 1 then mode = 1<br> if porta.3 = 0 then mode = 0<br> return&nbsp; &nbsp;&nbsp;<br> <br> [/code]</em><br> <br> Thats the BASIC code that compile using PicBasic Compiler. It's the code thats sits in the PIC<br> <br> Don't know if you're still interested about it. Have fun :D
Hi, Thanks for your interest in this project, but unfortunaly, I kinda lost the source code of both the PIC and Delphi program. I'm still trying to recover something this week, but I wouldn't bet on this. I think your best solution would be to start from scratch. It wasn't that complicated to code. The PIC code was done using Pic Basic Pro compiler. I've used the based Servo example project and built around it. There is also a simple Serial/RS232 sample you could use. Good luck ;) And just to let you know, my current wecam setup is a Logitech Orbit Cam with built-in Pan/Tilt functionality ;)
can you explain how to use javascript http request<br/>i have built de servopod , and i like it , how can i use it online ?<br/>cause at work i would like to see my doorway<br/><br/>for the frame i use <strong>nerd-cam 2</strong> (google it) enclosure , it a well made acrylic housing<br/>it look very professional at low cost ,i use webcam xp<br/>
Hi, It's a shame I never got time to finish the Delphi part of this project. I'm now using a nice logitech orbitcam :) Anyway, I think you could write your own software (VB or anything simple you might want to use). If I remember correctly (as I lost the sourcecode...in a backup problem)... to move the ServoPod from serial, you only need to send 2 coordinate (from 0 to 255) I was using PicBasicPro and ... I'm trying to remember... but I think I was only using a simple "SERIN DATA" and the data was 4 byte variable. Like... XXYY ... so if you wanted to move to 255,255... you just had to send FFFF... but also... I think on the PC part I was actualy sending 255,255 (byteshifted into each other) and the serial "socket" was converting this to a word... anyway this might sounds weird and really complicated, but I'll do my best to find the source-code... for the 4th time ;)
I just reread my instructable (funny...) and It's basicly explained (how cool I was back then!) in Step 4. Forget what I said before... I send Char... so I guest you'll have to send "FFFF" to the serial port (after waiting for DSR line to get high... I remember now!) and it will move the servo to 255,255 (actualy... 225,225 as this is the limit I implemented in the code.
i'd like to see an instructable where someone explains how to use servos, for the complete noob
i built a simple wireless one with an old RC car... it was cool and it took me ten minutes to make :)
Nice Work. :) Can u upload the source codes or send by mail sny2ksa@yahoo.com. Regards Shahid
Look at my reply to 01706... It's kinda sad, but anyway thanks for your interest in my project.
hi. first of all, i must say that this is a wonderful project. i've just completed this a few days ago and i m monitoring my home and my pooch from work. do you mind sending me a copy of the source code so i can work on the software itself? jasoncws@hotmail.com
hi...any chance to send me the source code soon? thanks in advance!
Hey andreq, a quick question did you try using the parallel port instead of a PIC controller? i dont know if the parallel port's power could move the servos you mentioned. but if that possible it'll be more fun that using a PIC controller to me... If you think its possible to control and move the servos with parallel port only please let me know. or if you know any other servos that could move with the parallel port.
If the parallel port is fast enought to pulse it's data line... it should be possible. You'd still have to power the servo from an external source, but the "data" line could be controlled by parallel port. You'll need to code some parallel port pulsing software but I think it could be done
can you explain the pulse software part? is it like, send data then stop then resend?
I don't have more time to search now (google it) but I found this :<br/><br/><a rel="nofollow" href="http://linuxgazette.net/issue97/pramode.html">http://linuxgazette.net/issue97/pramode.html</a><br/><br/>It could asle be &quot;possible&quot; to control the servo from your soundcard output.... as it only need &quot;pulse&quot;... anyway try google :)<br/>
i have a problem flashing my pic it says that there is no "config word" in the file i wondered if you could send me the .asm file or the actual .hex file?! passed07@hotmail.com
The config word are written in step2
sorry i fogot to mention how good this project is!!!!!!!!!!!! very good!!!!!!!!!!!!!!1
I got that same programmer maybe 2 months ago but I can not get it to program a chip!
Really cool project. Would be fun to build my own one. But it its not possible whit any servos to turn the camera 360 degrees or?
I stand corrected: <a rel="nofollow" href="http://www.parallax.com/detail.asp?product_id=900-00008">http://www.parallax.com/detail.asp?product_id=900-00008</a><br/>
I think you can acutaly mod servo so than can do full circle, but remember that if you do so you must think about the webcam cable.. and tilt servo cable. Anyway with this setup I can almost do 220 degre witch is not bad.
As far as I know, you can't get a 360 turn from a servo, because it has a variable resistor for feedback, this can only turn so far b4 it hits the end of the track, so even removing the plastic stop from the gears inside wont work, instead connect the servo to a gear and mount the camera on that, but you still can't go beyond a certain point, before you have to turn all the way back to continue from the end of the movement.
Yes but the cabels can always be fixed in some way.. 220 degrees should be enough anyway.
Yeah cable is a minor problem...But if it is for online broadcasting with public control, you must have some way to block over 360 circle... for exemple : you have 1 to 360... but can go from 360 to 1 in 1 step, only by 359 ,358....to 1 This would remove the cable problem. but anyway.. as you said. 220 or even 200 is enought. You place the webcam near a wall or a corner and you have a full view of a room :D
you could always use those phone-cord-detanglers, or make your own.
i did this ages ago forget about all this build your own PCI mumbo jumbo just get a good old RC controll unit from a old nitro car hook that up and controll it using a radio controll like i did. You could possibly even controll it up to a mile away and use wi-fi to tranmit the images back to your house if you placed your old win 98 laptop near a wi-fi hotspotand left it there!! its a good way to get rid of that old laptop as well.!!!!!!!
That is were the magic happend.... nah... Actualy the 22k resistor do the same job as a Max232. It limit the current from the serial port so the Pic can handle the communication. And for sending, (not used in this projet) 5volt is normaly working to receive on the port.
That's an incredibly cool trick--I've never seen that before
with the 22k resistor doing the RS232 conversion, I mean...
Thats interesting, would you mind of posting another schematic of the serial link the one above is kind of blurry ...
You can download a full size version by clicking on the small "i" on the top corner.
Still not a very clear picture.
Seems clear to me. <a href="http://static.instructables.com/data/uuid/E8/66A228/341F1029BC6B001143E7E506/E866A228341F1029BC6B001143E7E506.jpg">http://static.instructables.com/data/uuid/E8/66A228/341F1029BC6B001143E7E506/E866A228341F1029BC6B001143E7E506.jpg</a><br/>
I just uploaded a video so you can actualy how the thing move and work.<br/><br/>[http://ticpu.net:8080/~andre/ServoPod%20007.avi&quot; Here (17mb...sorry)]<br/>
This sounds really great, one question though: dont you need any extra hardware to communicate with a computer serial port, how does this work? I thought serial port is something like 12 V ??
I don't know much about much about PICs, so maybe they already include an RS232 to TLL regulator, but yes your right. Normally you'd need a MAX232, or similar, voltage regulator from Maxim ICs. Most devices I've worked with (mostly serial VFDs and Serial -> Parallel UARTS) will not function properly without the use of a MAX232.

About This Instructable


52 favorites


Bio: I do web programming for a living, but in my spare time, I'm an electronic hobbyist. I like to disassemble things just to see ... More »
More by andreq: Simple White Loaf Peter Reinhart - Lean Bread Cook a Poutine !
Add instructable to: