servo motor control with PIC

Started by pakigenius786 August 5, 2003
does anyone know and can tell me how to porgram a servo motor with a
PIC in C or assembly not in PicBasic.

Thnkx a lot dudes

moe



Hobby servo or regular brush/brushless servo? Look at Microchip app notes
for PID control of brush and brushless servos. If a hobby servo a google
search is bound to turn up loads of hits.
Madhu

-----Original Message-----
From: pakigenius786 [mailto:]
Sent: Tuesday, August 05, 2003 3:01 PM
To:
Subject: [piclist] servo motor control with PIC does anyone know and can tell me how to porgram a servo motor with a
PIC in C or assembly not in PicBasic.

Thnkx a lot dudes

moe
to unsubscribe, go to http://www.yahoogroups.com and follow the instructions

">http://docs.yahoo.com/info/terms/



It's a hobby servo. Its the one that comes with the
BASIC stamp kit. I saw something that looked a little
too easy. it was basically producing a high (+5v) on
the input of the servo. and waited acertain time(
delay) to pull it back down to low. is that it?

__________________________________




> It's a hobby servo. Its the one that comes with the
> BASIC stamp kit. I saw something that looked a little
> too easy. it was basically producing a high (+5v) on
> the input of the servo. and waited acertain time(
> delay) to pull it back down to low. is that it?

Yes. Except that the pains is in the duration : it must be fairly
constant (better than 1%?) to keep the servo at one position. Jitter
(fast variations) will quickly wear out your servo.

Wouter van Ooijen

-- -------
Van Ooijen Technische Informatica: www.voti.nl
consultancy, development, PICmicro products




Yup. A hobby servo works with the pulse width and at a pulse rate of about
one pulse every 20ms (50 times a sec). A high pulse that is 1.5ms wide
(typical) will center the servo. A lower pulse width makes it move one way
and a higher pulse width makes it go the other. That is it.
Madhu

-----Original Message-----
It's a hobby servo. Its the one that comes with the
BASIC stamp kit. I saw something that looked a little
too easy. it was basically producing a high (+5v) on
the input of the servo. and waited acertain time(
delay) to pull it back down to low. is that it?




> Yes. Except that the pains is in the duration : it must be fairly
> constant (better than 1%?) to keep the servo at one position. Jitter
> (fast variations) will quickly wear out your servo.

(adding to my own post)

And you must repeat the pulse, but the repetition rate is not very
critical, so that will not be a big problem.

Wouter van Ooijen

-- -------
Van Ooijen Technische Informatica: www.voti.nl
consultancy, development, PICmicro products



kul. thnx a lot. great help.

mohammed __________________________________



when u say "the duration". Is that the 1.5 ms duration
time. By constant, do you mean do not shift it too
much. Because im trying to figure out how much to turn
the servo according to data from sensors. my angles
include: 90 degs( no turn), 45degs. 67.5 degrees.

I need to find a way to shift all the way to these
positions, smooth motion. Make it look sort of analog
instead of digital.

Please help
Mohammed Billoo

__________________________________