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.
Remove these ads by
Signing UpStep 1: Get all the parts and tools
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 ?








































Visit Our Store »
Go Pro Today »




[code]
'****************************************************************
'* Name : SERVOPOD.BAS *
'* Author : André Quirion *
'* Notice : Copyright (c) 2005 *
'* : All Rights Reserved *
'* Date : 31-03-2005 *
'* Version : 1.5 *
'****************************************************************
include "modedefs.bas"
CMCON = 7
'Initialisation des variable, constante
pos1 var byte 'Variables de positionement
pos2 var byte
cont var byte 'Compteur
mode var byte 'Variable du mode
'Initialisation des valeurs
pos1 = 157 'Position centrale du servo au demarrage
pos2 = 152
mode = 0 'Mode joystick au demarrage, changer au choix
high porta.2 'Allumer la LED du joystick, changer au choix
if mode = 0 then goto joystick
if mode = 1 then goto remote
remote:
for cont = 0 to 40
pulsout portb.4,pos1 'Impulsion vers les servos
pause 8
pulsout portb.5,pos2
pause 8
next cont
high portb.7 'Handshacking hardware
serin portb.6,N2400,100,fin,pos1,pos2 'Attente des données serie.
fin:
low portb.7 'Handshacking hardware
gosub modeDetect
if mode = 1 then
goto remote 'Retour au debut des instruction
else
high porta.2
goto joystick
endif
end
joystick:
if portb.3=0 then pos2=pos2-1
if portb.2=0 then pos2=pos2+1
if portb.0=0 then pos1=pos1+1
if portb.1=0 then pos1=pos1-1
pulsout portb.4,pos1 'Impulsions vers les servos
pause 8
pulsout portb.5,pos2
pause 8
pause 20
gosub modeDetect
if mode = 0 then
goto joystick 'Retour au debut des instruction
else
low porta.2
goto remote
endif
end
modeDetect : 'Quel mode ?
if porta.3 = 1 then mode = 1
if porta.3 = 0 then mode = 0
return
[/code]
Thats the BASIC code that compile using PicBasic Compiler. It's the code thats sits in the PIC
Don't know if you're still interested about it. Have fun :D
[code]
'****************************************************************
'* Name : SERVOPOD.BAS *
'* Author : André Quirion *
'* Notice : Copyright (c) 2005 *
'* : All Rights Reserved *
'* Date : 31-03-2005 *
'* Version : 1.5 *
'****************************************************************
include "modedefs.bas"
CMCON = 7
'Initialisation des variable, constante
pos1 var byte 'Variables de positionement
pos2 var byte
cont var byte 'Compteur
mode var byte 'Variable du mode
'Initialisation des valeurs
pos1 = 157 'Position centrale du servo au demarrage
pos2 = 152
mode = 0 'Mode joystick au demarrage, changer au choix
high porta.2 'Allumer la LED du joystick, changer au choix
if mode = 0 then goto joystick
if mode = 1 then goto remote
remote:
for cont = 0 to 40
pulsout portb.4,pos1 'Impulsion vers les servos
pause 8
pulsout portb.5,pos2
pause 8
next cont
high portb.7 'Handshacking hardware
serin portb.6,N2400,100,fin,pos1,pos2 'Attente des données serie.
fin:
low portb.7 'Handshacking hardware
gosub modeDetect
if mode = 1 then
goto remote 'Retour au debut des instruction
else
high porta.2
goto joystick
endif
end
joystick:
if portb.3=0 then pos2=pos2-1
if portb.2=0 then pos2=pos2+1
if portb.0=0 then pos1=pos1+1
if portb.1=0 then pos1=pos1-1
pulsout portb.4,pos1 'Impulsions vers les servos
pause 8
pulsout portb.5,pos2
pause 8
pause 20
gosub modeDetect
if mode = 0 then
goto joystick 'Retour au debut des instruction
else
low porta.2
goto remote
endif
end
modeDetect : 'Quel mode ?
if porta.3 = 1 then mode = 1
if porta.3 = 0 then mode = 0
return
[/code]
Thats the BASIC code that compile using PicBasic Compiler. It's the code thats sits in the PIC
Don't know if you're still interested about it. Have fun :D
i have built de servopod , and i like it , how can i use it online ?
cause at work i would like to see my doorway
for the frame i use nerd-cam 2 (google it) enclosure , it a well made acrylic housing
it look very professional at low cost ,i use webcam xp
http://linuxgazette.net/issue97/pramode.html
It could asle be "possible" to control the servo from your soundcard output.... as it only need "pulse"... anyway try google :)
[http://ticpu.net:8080/~andre/ServoPod%20007.avi" Here (17mb...sorry)]