Shop OBEX P1 Docs P2 Docs Learn Events
2 questions regarding pak8 — Parallax Forums

2 questions regarding pak8

ArchiverArchiver Posts: 46,084
edited 2001-12-19 16:27 in General Discussion
I'm controlling four servos with the pak8.
Since two are always working in tandem anyway, it would be
best if i could wire two servos to one output pin of the pak8. That
would allow for smoother operation...and i could ramp two servos up
to speed at the same time in whatever direction. Would this be safe
for the chip ..current sink wise?
Also, should the servos be isolated from the pak8/stamp???

My other big question:
I'm pulsing IR transmitters at 40Khz, I'm wondering if the pak8 can
do this for me instead of the stamp. I figured at a 75% on time with
default prescale of 10us i'd have to send it a value of 2 for the on
time, and something like 0.6 off time in order to achieve a frequency
of 38500hz. so..is this possible? I can't actually send it a 0.6
though can I...has to be integer

Some help would be appreciated, thanks

PS: they are standard 4.8 volt servo's from acroname

Comments

  • ArchiverArchiver Posts: 46,084
    edited 2001-12-17 13:17
    You should be able to drive multiple servos with no trouble. The outputs
    are good for 25-30mA if I recall (not in the office this morning) and
    the servos should draw way less than that. I've never isolated servos,
    but others may have some experience with that. The servos I've used have
    logic-level inputs that seem to be pretty easy to drive. However, it is
    useful to have one battery supply for the servos and another for the
    Stamp (with grounds connected).

    With the default prescale of 10uS, you will not be able to get exactly
    40kHz. However, most IR detectors have some bandwidth so you may be able
    to get close to 40kHz and still be OK. The total period for a 40kHz wave
    would be 25uS. You can't add up 10uS periods to get 25 (if you drop the
    prescaler to 5uS then you can do it easy, but you can't run 8 channels
    at 5uS).

    The fastest you can get with the default prescaler is 10uS on and 10uS
    off which is 50kHz. You might try that but I don't know if the detector
    you are using is that wide (some remotes use 48kHz which would likely
    detect 50kHz OK). The next step would be 2+1 which is 33.333kHz That's
    closer to 40kHz but may or may not be close enough -- you'll have to
    experiment.

    At 5uS you could do 2+3 to get 40kHz exactly (your choice of 10uS on
    15uS off, or the other way around for a duty cycle of 40% or 60%).
    Again, the PAK-VIII can't do 8 channels at 5uS though so you limit your
    channels to 4 if you go to the 5uS steps.

    Al Williams
    AWC
    * Easy RS-232 Prototyping
    http://www.al-williams.com/awce/rs1.htm

    >
    Original Message
    > From: cbielek [noparse]/noparse]mailto:[url=http://forums.parallaxinc.com/group/basicstamps/post?postID=VZcYvUPrfTsi2UJx-b9U5dU4jRXPGX3j3oQ3asnJrqEvUzx2YX0_GexNZWOCF5OYZxHZ05YVYi1rdQM]cbielek@y...[/url
    > Sent: Sunday, December 16, 2001 11:47 PM
    > To: basicstamps@yahoogroups.com
    > Subject: [noparse][[/noparse]basicstamps] 2 questions regarding pak8
    >
    >
    > I'm controlling four servos with the pak8.
    > Since two are always working in tandem anyway, it would be
    > best if i could wire two servos to one output pin of the pak8. That
    > would allow for smoother operation...and i could ramp two servos up
    > to speed at the same time in whatever direction. Would this be safe
    > for the chip ..current sink wise?
    > Also, should the servos be isolated from the pak8/stamp???
    >
    > My other big question:
    > I'm pulsing IR transmitters at 40Khz, I'm wondering if the pak8 can
    > do this for me instead of the stamp. I figured at a 75% on time with
    > default prescale of 10us i'd have to send it a value of 2 for the on
    > time, and something like 0.6 off time in order to achieve a frequency
    > of 38500hz. so..is this possible? I can't actually send it a 0.6
    > though can I...has to be integer
    >
    > Some help would be appreciated, thanks
    >
    > PS: they are standard 4.8 volt servo's from acroname
    >
    >
    > To UNSUBSCRIBE, just send mail to:
    > basicstamps-unsubscribe@yahoogroups.com
    > from the same email address that you subscribed. Text in the
    > Subject and Body of the message will be ignored.
    >
    >
    > Your use of Yahoo! Groups is subject to
    > http://docs.yahoo.com/info/terms/
    >
  • ArchiverArchiver Posts: 46,084
    edited 2001-12-19 15:28
    Hi Al,

    Thank you very much for this info! It cleared up alot.

    I will now be using two servo's for one port..so that
    will use two ports. I'll set prescale to 5us shouldn't
    be a problem there..just means i'll have to be sending

    300on/400off for a center pulse ect that's easily
    done!

    Something I hadn't concidered was the current of the
    IR transmitters..ideal operation at 100mA...can handle
    10A. I've tested them at 20mA and that's fine for my
    purposes, but if I even wire two in parallel..I'll get
    a blown port. So those will have to be isolated
    somehow. I did some research into optoisolators but
    didnt' find one that could switch the current required
    in the nano seconds ..so I was thinking some sort of
    emitter follower buffer.

    Thanks again

    --- Al Williams <alw@a...> wrote:
    > You should be able to drive multiple servos with no
    > trouble. The outputs
    > are good for 25-30mA if I recall (not in the office
    > this morning) and
    > the servos should draw way less than that. I've
    > never isolated servos,
    > but others may have some experience with that. The
    > servos I've used have
    > logic-level inputs that seem to be pretty easy to
    > drive. However, it is
    > useful to have one battery supply for the servos and
    > another for the
    > Stamp (with grounds connected).
    >
    > With the default prescale of 10uS, you will not be
    > able to get exactly
    > 40kHz. However, most IR detectors have some
    > bandwidth so you may be able
    > to get close to 40kHz and still be OK. The total
    > period for a 40kHz wave
    > would be 25uS. You can't add up 10uS periods to get
    > 25 (if you drop the
    > prescaler to 5uS then you can do it easy, but you
    > can't run 8 channels
    > at 5uS).
    >
    > The fastest you can get with the default prescaler
    > is 10uS on and 10uS
    > off which is 50kHz. You might try that but I don't
    > know if the detector
    > you are using is that wide (some remotes use 48kHz
    > which would likely
    > detect 50kHz OK). The next step would be 2+1 which
    > is 33.333kHz That's
    > closer to 40kHz but may or may not be close enough
    > -- you'll have to
    > experiment.
    >
    > At 5uS you could do 2+3 to get 40kHz exactly (your
    > choice of 10uS on
    > 15uS off, or the other way around for a duty cycle
    > of 40% or 60%).
    > Again, the PAK-VIII can't do 8 channels at 5uS
    > though so you limit your
    > channels to 4 if you go to the 5uS steps.
    >
    > Al Williams
    > AWC
    > * Easy RS-232 Prototyping
    > http://www.al-williams.com/awce/rs1.htm
    >
    > >
    Original Message
    > > From: cbielek [noparse]/noparse]mailto:[url=http://forums.parallaxinc.com/group/basicstamps/post?postID=h07joiXrVPEWDFY8oALJ3Y-xzywwJdjaJtmPUehhuAkipJsfD73yM2nU_RYRfCI1zBJsVqy7Nmg]cbielek@y...[/url
    > > Sent: Sunday, December 16, 2001 11:47 PM
    > > To: basicstamps@yahoogroups.com
    > > Subject: [noparse][[/noparse]basicstamps] 2 questions regarding pak8
    > >
    > >
    > > I'm controlling four servos with the pak8.
    > > Since two are always working in tandem anyway, it
    > would be
    > > best if i could wire two servos to one output pin
    > of the pak8. That
    > > would allow for smoother operation...and i could
    > ramp two servos up
    > > to speed at the same time in whatever direction.
    > Would this be safe
    > > for the chip ..current sink wise?
    > > Also, should the servos be isolated from the
    > pak8/stamp???
    > >
    > > My other big question:
    > > I'm pulsing IR transmitters at 40Khz, I'm
    > wondering if the pak8 can
    > > do this for me instead of the stamp. I figured at
    > a 75% on time with
    > > default prescale of 10us i'd have to send it a
    > value of 2 for the on
    > > time, and something like 0.6 off time in order to
    > achieve a frequency
    > > of 38500hz. so..is this possible? I can't actually
    > send it a 0.6
    > > though can I...has to be integer
    > >
    > > Some help would be appreciated, thanks
    > >
    > > PS: they are standard 4.8 volt servo's from
    > acroname
    > >
    > >
    > > To UNSUBSCRIBE, just send mail to:
    > > basicstamps-unsubscribe@yahoogroups.com
    > > from the same email address that you subscribed.
    > Text in the
    > > Subject and Body of the message will be ignored.
    > >
    > >
    > > Your use of Yahoo! Groups is subject to
    > > http://docs.yahoo.com/info/terms/
    > >
    >
    >
    > To UNSUBSCRIBE, just send mail to:
    > basicstamps-unsubscribe@yahoogroups.com
    > from the same email address that you subscribed.
    > Text in the Subject and Body of the message will be
    > ignored.
    >
    >
    > Your use of Yahoo! Groups is subject to
    > http://docs.yahoo.com/info/terms/
    >
    >


    ______________________________________________________
    Send your holiday cheer with http://greetings.yahoo.ca
  • ArchiverArchiver Posts: 46,084
    edited 2001-12-19 16:27
    If your emitters require a lot of current drive them like a relay (I
    know the list has had that discussion within the last two weeks). Use a
    2N2222 on each LED between it and ground (connect to the collector).
    Connect the + side of the LED right to the power. Then ground the
    emitter and drive the base from the Stamp through a 1K resistor. This
    will take just a few mA from the Stamp or PAK and let the LED draw up to
    100mA or so (more with a bigger transistor). After all, you only need to
    turn the thing on and off, right?

    Al Williams
    AWC
    * Floating point A/D
    http://www.al-williams.com/awce/pak9.htm

    >
    Original Message
    > From: c bielek [noparse]/noparse]mailto:[url=http://forums.parallaxinc.com/group/basicstamps/post?postID=JPvV5bVOOCp1_18-0kLpVYUpa_kXI9czBC3Ne4J1z0xG7vfoT6yEtmIA4DjJ-sfyMxDKOFK-LQ]cbielek@y...[/url
    > Sent: Wednesday, December 19, 2001 9:28 AM
    > To: basicstamps@yahoogroups.com
    > Subject: RE: [noparse][[/noparse]basicstamps] 2 questions regarding pak8
    >
    >
    > Hi Al,
    >
    > Thank you very much for this info! It cleared up alot.
    >
    > I will now be using two servo's for one port..so that
    > will use two ports. I'll set prescale to 5us shouldn't
    > be a problem there..just means i'll have to be sending
    >
    > 300on/400off for a center pulse ect that's easily
    > done!
    >
    > Something I hadn't concidered was the current of the
    > IR transmitters..ideal operation at 100mA...can handle
    > 10A. I've tested them at 20mA and that's fine for my
    > purposes, but if I even wire two in parallel..I'll get
    > a blown port. So those will have to be isolated
    > somehow. I did some research into optoisolators but
    > didnt' find one that could switch the current required
    > in the nano seconds ..so I was thinking some sort of
    > emitter follower buffer.
    >
    > Thanks again
    >
    > --- Al Williams <alw@a...> wrote:
    > > You should be able to drive multiple servos with no
    > > trouble. The outputs
    > > are good for 25-30mA if I recall (not in the office
    > > this morning) and
    > > the servos should draw way less than that. I've
    > > never isolated servos,
    > > but others may have some experience with that. The
    > > servos I've used have
    > > logic-level inputs that seem to be pretty easy to
    > > drive. However, it is
    > > useful to have one battery supply for the servos and
    > > another for the
    > > Stamp (with grounds connected).
    > >
    > > With the default prescale of 10uS, you will not be
    > > able to get exactly
    > > 40kHz. However, most IR detectors have some
    > > bandwidth so you may be able
    > > to get close to 40kHz and still be OK. The total
    > > period for a 40kHz wave
    > > would be 25uS. You can't add up 10uS periods to get
    > > 25 (if you drop the
    > > prescaler to 5uS then you can do it easy, but you
    > > can't run 8 channels
    > > at 5uS).
    > >
    > > The fastest you can get with the default prescaler
    > > is 10uS on and 10uS
    > > off which is 50kHz. You might try that but I don't
    > > know if the detector
    > > you are using is that wide (some remotes use 48kHz
    > > which would likely
    > > detect 50kHz OK). The next step would be 2+1 which
    > > is 33.333kHz That's
    > > closer to 40kHz but may or may not be close enough
    > > -- you'll have to
    > > experiment.
    > >
    > > At 5uS you could do 2+3 to get 40kHz exactly (your
    > > choice of 10uS on
    > > 15uS off, or the other way around for a duty cycle
    > > of 40% or 60%).
    > > Again, the PAK-VIII can't do 8 channels at 5uS
    > > though so you limit your
    > > channels to 4 if you go to the 5uS steps.
    > >
    > > Al Williams
    > > AWC
    > > * Easy RS-232 Prototyping http://www.al-williams.com/awce/rs1.htm
    > >
    > > >
    Original Message
    > > > From: cbielek [noparse]/noparse]mailto:[url=http://forums.parallaxinc.com/group/basicstamps/post?postID=JPvV5bVOOCp1_18-0kLpVYUpa_kXI9czBC3Ne4J1z0xG7vfoT6yEtmIA4DjJ-sfyMxDKOFK-LQ]cbielek@y...[/url
    > > > Sent: Sunday, December 16, 2001 11:47 PM
    > > > To: basicstamps@yahoogroups.com
    > > > Subject: [noparse][[/noparse]basicstamps] 2 questions regarding pak8
    > > >
    > > >
    > > > I'm controlling four servos with the pak8.
    > > > Since two are always working in tandem anyway, it
    > > would be
    > > > best if i could wire two servos to one output pin
    > > of the pak8. That
    > > > would allow for smoother operation...and i could
    > > ramp two servos up
    > > > to speed at the same time in whatever direction.
    > > Would this be safe
    > > > for the chip ..current sink wise?
    > > > Also, should the servos be isolated from the
    > > pak8/stamp???
    > > >
    > > > My other big question:
    > > > I'm pulsing IR transmitters at 40Khz, I'm
    > > wondering if the pak8 can
    > > > do this for me instead of the stamp. I figured at
    > > a 75% on time with
    > > > default prescale of 10us i'd have to send it a
    > > value of 2 for the on
    > > > time, and something like 0.6 off time in order to
    > > achieve a frequency
    > > > of 38500hz. so..is this possible? I can't actually
    > > send it a 0.6
    > > > though can I...has to be integer
    > > >
    > > > Some help would be appreciated, thanks
    > > >
    > > > PS: they are standard 4.8 volt servo's from
    > > acroname
    > > >
    > > >
    > > > To UNSUBSCRIBE, just send mail to:
    > > > basicstamps-unsubscribe@yahoogroups.com
    > > > from the same email address that you subscribed.
    > > Text in the
    > > > Subject and Body of the message will be ignored.
    > > >
    > > >
    > > > Your use of Yahoo! Groups is subject to
    > > > http://docs.yahoo.com/info/terms/
    > > >
    > >
    > >
    > > To UNSUBSCRIBE, just send mail to:
    > > basicstamps-unsubscribe@yahoogroups.com
    > > from the same email address that you subscribed.
    > > Text in the Subject and Body of the message will be
    > > ignored.
    > >
    > >
    > > Your use of Yahoo! Groups is subject to
    > > http://docs.yahoo.com/info/terms/
    > >
    > >
    >
    >
    > ______________________________________________________
    > Send your holiday cheer with http://greetings.yahoo.ca
    >
    > To UNSUBSCRIBE, just send mail to:
    > basicstamps-unsubscribe@yahoogroups.com
    > from the same email address that you subscribed. Text in the
    > Subject and Body of the message will be ignored.
    >
    >
    > Your use of Yahoo! Groups is subject to
    > http://docs.yahoo.com/info/terms/
    >
Sign In or Register to comment.