Shop OBEX P1 Docs P2 Docs Learn Events
Control Motor Speed and count at the same time? — Parallax Forums

Control Motor Speed and count at the same time?

ArchiverArchiver Posts: 46,084
edited 2000-10-08 15:53 in General Discussion
Can anybody tell me wether or not any of the basic stamps are capable
of allowing me to use PWM to control the speed of a DC Motor, via a H-
Bridge, and count pulses from an encoder at the same time? This is
for a two axis robot system that I would like to build.

Dan

Comments

  • ArchiverArchiver Posts: 46,084
    edited 2000-10-08 15:53
    The stamp can only do one thing at a time. However, you can use a mix of
    Stamps and PAKs to do what you want. In particular:

    PAK-IV - a PAK-IV (or a PAK-III) can generate PWM like the Stamp does (a
    burst of proportional pulses) or count like the Stamp does. It too only does
    one thing at a time, but the Stamp and the PAK-IV can both do one thing each
    at a time.

    PAK-V - The PAK-V generates 8 channels of 8-bit PWM at the same time without
    stopping. The Stamp can send a command to the PAK-V and change the PWM rate.
    It never stops or hiccups even when the Stamp sends commands (unless you
    send the command to turn off a channel, of course, at which point it stops
    that channel).

    PAK-VII - The PAK VII can measure pulse width and count pulses (on 8
    channels) in a very flexible way without intervention from the Stamp. The
    Stamp simply reads the pulses when it is ready.The counts go to 16 bits.

    The other alternative would be to use a counter and shift register to count
    the pulses and shift them into the Stamp a bit at a time. This is more or
    less what the PAK-VII is, but it also measures pulse widths and does 8
    channels at once!

    You can read the manuals for these at
    http://www.al-williams.com/awce/doclib.htm

    Regards,

    Al Williams
    AWC
    * Floating point math for the Stamp, PIC, SX, or any microcontroller at
    http://www.al-williams.com/awce/pak1.htm




    >
    Original Message
    > From: mcruz1@t... [noparse]/noparse]mailto:[url=http://forums.parallaxinc.com/group/basicstamps/post?postID=oDOCmv1rrGEpMgEGRJ26hEF0AD7iLnVvEgYAhdotIQrkGveOXidJxVtdJXDq6rsevTzisXPyshFR]mcruz1@t...[/url
    > Sent: Sunday, October 08, 2000 9:42 AM
    > To: basicstamps@egroups.com
    > Subject: [noparse][[/noparse]basicstamps] Control Motor Speed and count at the same time?
    >
    >
    > Can anybody tell me wether or not any of the basic stamps are capable
    > of allowing me to use PWM to control the speed of a DC Motor, via a H-
    > Bridge, and count pulses from an encoder at the same time? This is
    > for a two axis robot system that I would like to build.
    >
    > Dan
    >
    >
    >
Sign In or Register to comment.