Searching \ for '[OT] Re: PWM background' in subject line. ()
Make payments with PayPal - it's fast, free and secure! Help us get a faster server
FAQ page: www.piclist.com/techref/io/pwm/index.htm?key=pwm
Search entire site for: 'Re: PWM background'.

Exact match. Not showing close matches.
PICList Thread
'[OT] Re: PWM background'
1999\11\18@132625 by Mike M

flavicon
face
How do basic stamps 1 or 2 run servo motors?  Dont they use 16C56 that also does
not have a pwm port???

On Wed, 17 Nov 1999 17:26:23 -0500 Sean Breheny <spam_OUTshb7TakeThisOuTspamCORNELL.EDU> wrote:
{Quote hidden}

Send someone a cool Dynamitemail flashcard greeting!! And get rewarded.
GO AHEAD! http://cards.dynamitemail.com/index.php3?rid=fc-41

1999\11\18@140919 by Dan Creagan

flavicon
face
No.   The PWM for a servo is different than a continuous PWM
signal needed for a regular motor.  Hobby servos have their
own electronics and only require a moderately frequent
signal to keep the motor going.  The signal, for most 90
degree motors, is between 1 ms and 2 ms with a gap of about
20 ms between updates.  A signal of 1.5 ms will drive the
servo to the middle position.  The exact specs are just a
little bit different for different servos.

After updating the servo, there is a wait time before the
next update of about (avg) 20 ms.

That kind of a signal can be sent as part of the general
chores of the checking sensors and outputting other
information.

For a good summary of how to command the servo, see
http://www3.sympatico.com/donroy and look at the
instructions for the 1stBot kit.

Dan

{Original Message removed}

1999\11\18@145723 by Mike M

flavicon
face
Ah ha...i did not know that a servo motor only needs to be "updated" around 20ms
.  I thought it needed a continous pulse..  Again i pose the question though, o
n a basic stamp i assume they do that, update the pulse around 20ms, but how can
i check if my program is running when 20ms has elapsed?  timmer intterupt?  cau
se what if my main loop is longer then 20ms, it wont get bak to the line to upda
te the servo's in time correct?

On Thu, 18 Nov 1999 13:13:07 -0600 Dan Creagan <dcreaganspamKILLspamSCHOLARS.BELLEVUE.EDU>
wrote:
{Quote hidden}

>{Original Message removed}

1999\11\18@151144 by Dave VanHorn

flavicon
face
> Ah ha...i did not know that a servo motor only needs to be "updated"
around 20ms.  I thought it needed a continous pulse..

Isn't that an oxymoron? :)

Actually, they aren't real critical on the frame rate, there just has to be
a pause between pulses. I've tried various values from 2mS out to 200. at
10mS and below, the servo response is very smooth.  At slow intervals, the
motor gets "steppy", and if you ever want to stop a servo (say one converted
to continuous rotation) just stop feeding it pulses.

If you send a pulse, and target for a 20mS frame rate, you won't have much
trouble if the frame rate varies. Even out to 40mS it's not a horrible
problem.

In my app, I use a timer to generate a 1mS opsys tick that controls the
frame rate, and another timer to manage the servo output pulse widths. I use
it like an alarm clock, in that the idle loop application looks at the frame
delay, and if zero, it sets a servo output high, advances the servo counter
(determines which servo is output) and sets the timer to interrupt at XXXuS.
If we've just output the last servo, then I set the frame delay to start
again, holding off further servo updates.  The ISR then fires at the
appropriate time, and all it does is output "off" to all servo outputs. This
makes it very fast, since it dosen't have to decide anything.

1999\11\18@153016 by Quentin

flavicon
face
Dave VanHorn wrote:
>
> > Ah ha...i did not know that a servo motor only needs to be "updated"
> around 20ms.  I thought it needed a continous pulse..
>
> Isn't that an oxymoron? :)
>
>
:)
The way I figured it, is that the initial designers of R/C receivers
made the 20 millesecs delay so that they can fit 10 by 2 millisec pulses
for 10 servos in one radio train of Rx pulses.
When I do R/C servos with PIC, I actualy reduce the delay between pulses
below 20 millisecs, based on my PIC speed and amount of codes. Makes the
servo nice and smooth.

Quentin
"All we sense is vibration, nothing is material."

1999\11\18@154309 by Dave VanHorn

flavicon
face
> The way I figured it, is that the initial designers of R/C receivers
> made the 20 millesecs delay so that they can fit 10 by 2 millisec pulses
> for 10 servos in one radio train of Rx pulses

They use the wider delay to sync the receiver, so that it knows which pulse
goes to which servo. Otherwise, it would be impossible to sort out.  It was
a cool answer to the problem in 1960's technology.  Error correcting digital
would be cool now, but it dosen't seem to be happening.

1999\11\18@171417 by Mike M

flavicon
face
Ok continuing on with my never ending basic stamp clone project, im basically bu
ilding a stamp, so the user code is extracted from an eeprom and then executed.
If the user wants to run a servo, how would be able to run that servo and still
continue executing their code.  Their code may only set the servo forward and t
hen never go bak into a loop so at that point i have to have a way to go have my
inturpreter program to remmember not to forget to update the servo..can anyone
maybe show me some code or websites?

MikE

On Thu, 18 Nov 1999 15:39:24 -0500 Dave VanHorn <.....dvanhornKILLspamspam.....CEDAR.NET> wrote:
>> The way I figured it, is that the initial designers of R/C receivers
>> made the 20 millesecs delay so that they can fit 10 by 2 millisec pulses
>> for 10 servos in one radio train of Rx pulses
>
>They use the wider delay to sync the receiver, so that it knows which pulse
>goes to which servo. Otherwise, it would be impossible to sort out.  It was
>a cool answer to the problem in 1960's technology.  Error correcting digital
>would be cool now, but it dosen't seem to be happening.
>

Send someone a cool Dynamitemail flashcard greeting!! And get rewarded.
GO AHEAD! http://cards.dynamitemail.com/index.php3?rid=fc-41

1999\11\18@194510 by Dan Creagan

flavicon
face
Mike,

I believe I mentioned this in a previous message (you must have missed it).
Go to http://www3.sympatico.ca/donroy and visit the 1stBot link. It has
stamp code to run the servos (which have been modified for full rotation).

Note that you should not send one signal to the servo and then expect it to
go all the way over to the desired angle, you need to keep updating it until
it gets to its desired position (updating afterwards is ok, too .. stops
drift).

If you can't seem to find the referenced site, here is some bare bones Stamp
2 code that will drive the servo to its mid position and hold it there (this
assumes an unmodified hobby servo).


MidPoint var word
SERVNUM var byte
SERVNUM = 0                               ' this is the servo sig line port
MidPoint  = 750                              'pulsout command is in 2 us
                                                         'chunks, so
750=1.5 milliseconds
                                                         ' or half way

main:        pulsout SERNUM, MidPoint     'Send servo pulse
                pause 20                  'Wait 20 ms (50 Hz)
                goto main                 'Forever

end

Instead of putting "pause 20" in the above loop, call your subroutines that
handle other parameters. Guesstimate the time in the subroutines and then
make up the difference with a final pause statement in the above loop.


Dan
{Original Message removed}

1999\11\19@091453 by miked

flavicon
face
> Dave VanHorn wrote:
> >
> > > Ah ha...i did not know that a servo motor only needs to be "updated"
> > around 20ms.  I thought it needed a continous pulse..
> >
> > Isn't that an oxymoron? :)
> >
> >
> :)
> The way I figured it, is that the initial designers of R/C receivers
> made the 20 millesecs delay so that they can fit 10 by 2 millisec pulses
> for 10 servos in one radio train of Rx pulses.
> When I do R/C servos with PIC, I actualy reduce the delay between pulses
> below 20 millisecs, based on my PIC speed and amount of codes. Makes the
> servo nice and smooth.
>
Some new radios are down to 16-18mS. One JR radio can be put in a mode
where it only sends channels 7-10 every other frame to speed things
up(these are usually AUX channels). They also have a high speed servo,the
2700G(popular on the tails of helis) that can be updated very fast.

More... (looser matching)
- Last day of these posts
- In 1999 , 2000 only
- Today
- New search...