Wednesday, December 5, 2007

Controlling servos?

PLEASE NOTE:
When it comes to controlling a servo, there are many ways by which you you can control it, but in most cases you'll be using PIC microcontrollers.

If y'r a beginer or a novice with PIC microcontrollers, their programmers, compilers and the softwares used to burn the code on to the PIC's, please check out my other posts in this blog.I will try to post all the possible stuff for newbies.

In fact, handling PIC's, writing code, burninig the code onto the PIC's, and most important of all.....assembling y'r own PIC programmer!!!.......all this's not that difficult as it might sound!
It's just a matter of having a little prerequisite electronics knowledge(i'll cover even that), and above all, y'r passion and interest.

If y'r aware of PIC programming and all, check these links.

(there's code provided, which you need to compile in picBasic compiler(from Microchip technologies) or any other appropriate compiler, to convert the code into a HEX file( .HEX is a format that the pic's understand and execute, which is something like machine code) .More on programming stuff in the tutorials post.)

(The below links correspond to basic control of servos)

http://www.imagesco.com/articles/picservo/02.html
(first servo motor control program and the circuit)

http://www.imagesco.com/articles/picservo/03.html
(manual servo motor control)

http://www.imagesco.com/articles/picservo/04.html
(multiple servo motors)

http://www.newcircuits.com/circuit.php?id=uct001
(servo motor control with pic 16f84)

http://www.uashem.com/pageid-459.html
(another neat and simple link for controlling servos with pic 16f84 micro controllers)

PicBasic program and cicuit to center a servomotor:

The following program is for the PicBasic Pro compiler .

‘PicBasic Pro program to center a servomotor
start:
pulsout portb.0, 150 ‘Send pulse out on rb0
pause 18 ‘Delay needed to send pulse at 55 Hz
goto start ‘Repeat


Required parts list:
(2) 22pF capacitors
(1) Solderless breadboard RadioShack PN# 276175
(1) 0.1 mF capacitor RadioShack PN# 2721069
(2) Red LEDs RadioShack PN# 276208
(2) 470 V resistors* RadioShack PN# 2701115
(1) 4.7k V resistor RadioShack PN# 2711126
(1) Voltage regulator (7805) RadioShack PN# 2761770
(1) 9V battery clip RadioShack PN# 270325


No comments: