Shop OBEX P1 Docs P2 Docs Learn Events
Pak V w/motor — Parallax Forums

Pak V w/motor

ArchiverArchiver Posts: 46,084
edited 2001-04-12 00:57 in General Discussion
Please help,

I am a beginner. I just bought the Pak-V for pwm so that I could
run a motor while my Stamp was doing something else. But I am not
sure what I need to do to get the motor turning. I finally
determined the command to run the Pak-V on my Basic Stamp 2sx. I can
now get the desired voltage but the motor will not turn. It is only
a little Radio Shack motor. It is rated for 9 volts but I only need
to use 2-3 volts. Also, it only needs to run in one direction. Is
there anything easy I can do to get this motor turning? I am really
not sure exactly what I am doing.

Thank You for your input. Please be as detailed as possible.

Mike

Comments

  • ArchiverArchiver Posts: 46,084
    edited 2001-04-10 16:17
    Hi,
    I'm really interested in the answer to your question too. I'm also a beginner,
    and have just worked this same task. So I will relay some of what I've
    learned. Hopefully, other will review my words for correctness. First off,
    I also purchased a motor from Radio Shack. I drive it with a 9.7 volt
    cordless drill motor battery. So I had lots of power. That's the first item
    of discussion. Your motor needs to be powered by a separate circuit from your
    stamp, as the motor will draw down the voltage that your stamp will see, and
    cause it to shut down. I have a power mosfet switch that used the low amperage
    signal from the stamp to turn on the power for the motor.

    My second bit of experience is that the Radio Shack motor was of very low
    quality. The motor gave of a tremendous amount of EMI (electrical
    interference). I have other servos on my machine, and when I turned on the
    Radio Shack motor, those other servos started doing the Watusie (sp). So I
    changed motors in the end. The motor I finally used came out of an old Floppie
    disk drive.

    Finally, if you are applying 2-3 volts to your motor, than that may not be
    enough to turn a 9 volt motor. If you haven't done it already, power the motor
    directly from a 9 volt battery or power supply. If it doesn't turn, there is
    something wrong with it.
    Hope this helps,
    Dave Cousins

    --- mcmgamer@n... wrote:
    > Please help,
    >
    > I am a beginner. I just bought the Pak-V for pwm so that I could
    > run a motor while my Stamp was doing something else. But I am not
    > sure what I need to do to get the motor turning. I finally
    > determined the command to run the Pak-V on my Basic Stamp 2sx. I can
    > now get the desired voltage but the motor will not turn. It is only
    > a little Radio Shack motor. It is rated for 9 volts but I only need
    > to use 2-3 volts. Also, it only needs to run in one direction. Is
    > there anything easy I can do to get this motor turning? I am really
    > not sure exactly what I am doing.
    >
    > Thank You for your input. Please be as detailed as possible.
    >
    > Mike
    >
    >
    >
    >
    > Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/
    >
    >


    __________________________________________________
    Do You Yahoo!?
    Get email at your own domain with Yahoo! Mail.
    http://personal.mail.yahoo.com/
  • ArchiverArchiver Posts: 46,084
    edited 2001-04-10 16:43
    I'm not sure what you mean by "voltage". You don't want to use an RC with a
    motor.

    Here's some steps you might want to consider:

    1-Connect all grounds together.

    2-Hook one end of motor to +V (whatever 3V, 9V, etc.)

    3-Ground the other end of the motor and observe it spinning.

    4- Disconnect the ground end of the motor. Put a suitable transistor (2N2222
    for a 100mA or less) with the collector on the ground end of the motor, the
    emitter to ground. Put a small resistor (say 1K) from base to ground. Power
    up. No spin. Move the resistor from ground to +5. Motor should spin again.

    5-Remove the +5 end of the resistor and connect it to the output of the
    PAK-V.

    6-With the PAK-V software make sure that the baud rate constant is correct
    (remember, the BS2 does not use the same baudrate numbers as BS2SX, BS2P).

    At each stage, make sure you have it working. For example, if you can't get
    step 3 to spin the motor, you don't have enough battery power or something.
    At step 4, you should be able to turn the motor on and off. If not, you are
    not saturating the transistor, or some other transistor problem.

    Let me know if any of that helps.

    Al Williams
    AWC
    *NEW: PAK-IX floating point A/D: http://www.al-williams.com/awce/pak9.htm



    >
    Original Message
    > From: mcmgamer@n... [noparse]/noparse]mailto:[url=http://forums.parallaxinc.com/group/basicstamps/post?postID=rRp-lxIbCEGJNLW2LzaOw7oEzTVS7jOmG3lSFso3T9w7mbYrl2tThDeRkj98tGsgeCyk7Uu_jBb4h47D]mcmgamer@n...[/url
    > Sent: Monday, April 09, 2001 9:02 PM
    > To: basicstamps@yahoogroups.com
    > Subject: [noparse][[/noparse]basicstamps] Pak V w/motor
    >
    >
    > Please help,
    >
    > I am a beginner. I just bought the Pak-V for pwm so that I could
    > run a motor while my Stamp was doing something else. But I am not
    > sure what I need to do to get the motor turning. I finally
    > determined the command to run the Pak-V on my Basic Stamp 2sx. I can
    > now get the desired voltage but the motor will not turn. It is only
    > a little Radio Shack motor. It is rated for 9 volts but I only need
    > to use 2-3 volts. Also, it only needs to run in one direction. Is
    > there anything easy I can do to get this motor turning? I am really
    > not sure exactly what I am doing.
    >
    > Thank You for your input. Please be as detailed as possible.
    >
    > Mike
    >
    >
    >
    >
    > Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/
    >
  • ArchiverArchiver Posts: 46,084
    edited 2001-04-10 17:45
    Nope. You can run the stamp and motors from the same battery. The trick is
    to put some 0.1 Mfd capacitors across the motor leads at the motor, and to
    have a voltage regulator with a minor amount of filtering to power the BS2.

    My robot has a 4 Ah 12-volt gel-cell running two 12-volt gearmotors via
    MotorMind B's, and powering a BS2sx chip through a homemade board with its
    own regulator. I'm also powering all of my sensors, servos and stuff of the
    regulator.

    Original Message

    > I'm really interested in the answer to your question too. I'm also a
    beginner,
    > and have just worked this same task. So I will relay some of what I've
    > learned. Hopefully, other will review my words for correctness. First
    off,
    > I also purchased a motor from Radio Shack. I drive it with a 9.7 volt
    > cordless drill motor battery. So I had lots of power. That's the first
    item
    > of discussion. Your motor needs to be powered by a separate circuit from
    your
    > stamp, as the motor will draw down the voltage that your stamp will see,
    and
    > cause it to shut down. I have a power mosfet switch that used the low
    amperage
    > signal from the stamp to turn on the power for the motor.
  • ArchiverArchiver Posts: 46,084
    edited 2001-04-10 19:49
    The motor turns the way I want when I hook up two AA batteries
    directly to it (3 volts). So I know the motor works. I was hoping
    that all I would need to do was, via Pak-V, send 3 volts from the Pak
    to the motor. But that did not turn the motor. I have the command
    programmed correctly because I am measuring 3 volts with a multimeter
    off of the Pak-V connection to the motor.

    Given this information, do I just need to add a transistor to my
    circuit or is it more complicated than that? I have no spare parts
    (ie. transistors) to experiment.


    Al Williams - Do you still suggest the steps you posted below? If
    so, where can I purchase the transistor and I am not exactly sure
    where that 1k resistor goes ("base to ground"??). Thank you.


    Thank You Everyone for your input.
    Mike

    --- In basicstamps@y..., "Al Williams" <alw@a...> wrote:
    > I'm not sure what you mean by "voltage". You don't want to use an
    RC with a
    > motor.
    >
    > Here's some steps you might want to consider:
    >
    > 1-Connect all grounds together.
    >
    > 2-Hook one end of motor to +V (whatever 3V, 9V, etc.)
    >
    > 3-Ground the other end of the motor and observe it spinning.
    >
    > 4- Disconnect the ground end of the motor. Put a suitable
    transistor (2N2222
    > for a 100mA or less) with the collector on the ground end of the
    motor, the
    > emitter to ground. Put a small resistor (say 1K) from base to
    ground. Power
    > up. No spin. Move the resistor from ground to +5. Motor should spin
    again.
    >
    > 5-Remove the +5 end of the resistor and connect it to the output of
    the
    > PAK-V.
    >
    > 6-With the PAK-V software make sure that the baud rate constant is
    correct
    > (remember, the BS2 does not use the same baudrate numbers as BS2SX,
    BS2P).
    >
    > At each stage, make sure you have it working. For example, if you
    can't get
    > step 3 to spin the motor, you don't have enough battery power or
    something.
    > At step 4, you should be able to turn the motor on and off. If not,
    you are
    > not saturating the transistor, or some other transistor problem.
    >
    > Let me know if any of that helps.
    >
    > Al Williams
    > AWC
    > *NEW: PAK-IX floating point A/D: http://www.al-
    williams.com/awce/pak9.htm
    >
    >
    >
    > >
    Original Message
    > > From: mcmgamer@n... [noparse][[/noparse]mailto:mcmgamer@n...]
    > > Sent: Monday, April 09, 2001 9:02 PM
    > > To: basicstamps@y...
    > > Subject: [noparse][[/noparse]basicstamps] Pak V w/motor
    > >
    > >
    > > Please help,
    > >
    > > I am a beginner. I just bought the Pak-V for pwm so that I
    could
    > > run a motor while my Stamp was doing something else. But I am not
    > > sure what I need to do to get the motor turning. I finally
    > > determined the command to run the Pak-V on my Basic Stamp 2sx. I
    can
    > > now get the desired voltage but the motor will not turn. It is
    only
    > > a little Radio Shack motor. It is rated for 9 volts but I only
    need
    > > to use 2-3 volts. Also, it only needs to run in one direction.
    Is
    > > there anything easy I can do to get this motor turning? I am
    really
    > > not sure exactly what I am doing.
    > >
    > > Thank You for your input. Please be as detailed as possible.
    > >
    > > Mike
    > >
    > >
    > >
    > >
    > > Your use of Yahoo! Groups is subject to
    http://docs.yahoo.com/info/terms/
    > >
  • ArchiverArchiver Posts: 46,084
    edited 2001-04-10 20:02
    Hi Mike,

    You should not drive the motor directly from any logic IC output including
    the Stamp or the PAK-V. If you are measuring 3VDC with a meter directly at
    the output of the PAK-V then the meter is probably averaging the PWM for you
    (an analog meter perhaps?).

    You can find 2N2222s just about anywhere including Radio Shack, but be sure
    your motor doesn't draw over, say 100mA. If the motor has significant
    inductance you may also need a diode (for example a 1N914 or 1N4148 -- also
    at Radio Shack) across the motor "backwards" (that is, the stripe of the
    diode points to the + supply). This will absorb high voltage spikes the
    motor may produce when you start or stop it. Maybe $2 in parts.


    The final circuit would look like this:

    Pin (PAK or Stamp) --- 1K resistor
    Base of 2N2222

    Emitter of 2N2222 --- ground

    Collector of 2N2222
    "side A" of motor (either side)

    +3V
    "side B" of motor (other side)

    Side B of motor ---- striped end of diode
    Side A of motor


    The PAK-V outputs 0 to 5V. You don't want to average it for motor control
    (although you might for other reasons). You need something to make 5V switch
    3V on and off. In this case we switch the ground which is just as good.

    Al Williams
    AWC
    *NEW: PAK-IX floating point A/D: http://www.al-williams.com/awce/pak9.htm
    (Last day at this price)



    >
    Original Message
    > From: mcmgamer@n... [noparse]/noparse]mailto:[url=http://forums.parallaxinc.com/group/basicstamps/post?postID=K39kYTRR0jwDV76qSWwSGL9eiSaO_dhWRaBncy9_wsChF9uF9Kv3dAjama8F3V6-NcmlFUbtHcNXtdP6njfSqg]mcmgamer@n...[/url
    > Sent: Tuesday, April 10, 2001 1:50 PM
    > To: basicstamps@yahoogroups.com
    > Subject: [noparse][[/noparse]basicstamps] Re: Pak V w/motor
    >
    >
    > The motor turns the way I want when I hook up two AA batteries
    > directly to it (3 volts). So I know the motor works. I was hoping
    > that all I would need to do was, via Pak-V, send 3 volts from the Pak
    > to the motor. But that did not turn the motor. I have the command
    > programmed correctly because I am measuring 3 volts with a multimeter
    > off of the Pak-V connection to the motor.
    >
    > Given this information, do I just need to add a transistor to my
    > circuit or is it more complicated than that? I have no spare parts
    > (ie. transistors) to experiment.
    >
    >
    > Al Williams - Do you still suggest the steps you posted below? If
    > so, where can I purchase the transistor and I am not exactly sure
    > where that 1k resistor goes ("base to ground"??). Thank you.
    >
    >
    > Thank You Everyone for your input.
    > Mike
    >
    > --- In basicstamps@y..., "Al Williams" <alw@a...> wrote:
    > > I'm not sure what you mean by "voltage". You don't want to use an
    > RC with a
    > > motor.
    > >
    > > Here's some steps you might want to consider:
    > >
    > > 1-Connect all grounds together.
    > >
    > > 2-Hook one end of motor to +V (whatever 3V, 9V, etc.)
    > >
    > > 3-Ground the other end of the motor and observe it spinning.
    > >
    > > 4- Disconnect the ground end of the motor. Put a suitable
    > transistor (2N2222
    > > for a 100mA or less) with the collector on the ground end of the
    > motor, the
    > > emitter to ground. Put a small resistor (say 1K) from base to
    > ground. Power
    > > up. No spin. Move the resistor from ground to +5. Motor should spin
    > again.
    > >
    > > 5-Remove the +5 end of the resistor and connect it to the output of
    > the
    > > PAK-V.
    > >
    > > 6-With the PAK-V software make sure that the baud rate constant is
    > correct
    > > (remember, the BS2 does not use the same baudrate numbers as BS2SX,
    > BS2P).
    > >
    > > At each stage, make sure you have it working. For example, if you
    > can't get
    > > step 3 to spin the motor, you don't have enough battery power or
    > something.
    > > At step 4, you should be able to turn the motor on and off. If not,
    > you are
    > > not saturating the transistor, or some other transistor problem.
    > >
    > > Let me know if any of that helps.
    > >
    > > Al Williams
    > > AWC
    > > *NEW: PAK-IX floating point A/D: http://www.al-
    > williams.com/awce/pak9.htm
    > >
    > >
    > >
    > > >
    Original Message
    > > > From: mcmgamer@n... [noparse][[/noparse]mailto:mcmgamer@n...]
    > > > Sent: Monday, April 09, 2001 9:02 PM
    > > > To: basicstamps@y...
    > > > Subject: [noparse][[/noparse]basicstamps] Pak V w/motor
    > > >
    > > >
    > > > Please help,
    > > >
    > > > I am a beginner. I just bought the Pak-V for pwm so that I
    > could
    > > > run a motor while my Stamp was doing something else. But I am not
    > > > sure what I need to do to get the motor turning. I finally
    > > > determined the command to run the Pak-V on my Basic Stamp 2sx. I
    > can
    > > > now get the desired voltage but the motor will not turn. It is
    > only
    > > > a little Radio Shack motor. It is rated for 9 volts but I only
    > need
    > > > to use 2-3 volts. Also, it only needs to run in one direction.
    > Is
    > > > there anything easy I can do to get this motor turning? I am
    > really
    > > > not sure exactly what I am doing.
    > > >
    > > > Thank You for your input. Please be as detailed as possible.
    > > >
    > > > Mike
    > > >
    > > >
    > > >
    > > >
    > > > Your use of Yahoo! Groups is subject to
    > http://docs.yahoo.com/info/terms/
    > > >
    >
    >
    >
    >
    > Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/
    >
  • ArchiverArchiver Posts: 46,084
    edited 2001-04-10 22:08
    Thank You very much Al Williams. You have been a big help. I just
    had to add a few things.

    The motor I am using is Radio Shack model number 273-255 (12VDC High
    Speed Motor). I looked at the specsheet and it mentions pretty high
    currents. Does this mean I need a different transistor? Also, the 3
    volt supply in your circuit diagram, could I just have that directly
    be the Stamp's Power supply? Then the Pak-V could effectively reduce
    that down to 3 volts or so to the motor. I'm not sure if that is how
    it works though. I just don't want to use a second power supply. I
    also would like to run the motor at a couple different speeds. I was
    hoping to accomplish this with the Pak-V.

    In the circuit you posted, would I be able to vary the speed of the
    motor by effectively varying the motor's voltage between 0-3 volts
    using the Pak-V?

    I'm sorry for all the questions.

    Mike


    --- In basicstamps@y..., "Al Williams" <alw@a...> wrote:
    > Hi Mike,
    >
    > You should not drive the motor directly from any logic IC output
    including
    > the Stamp or the PAK-V. If you are measuring 3VDC with a meter
    directly at
    > the output of the PAK-V then the meter is probably averaging the
    PWM for you
    > (an analog meter perhaps?).
    >
    > You can find 2N2222s just about anywhere including Radio Shack, but
    be sure
    > your motor doesn't draw over, say 100mA. If the motor has
    significant
    > inductance you may also need a diode (for example a 1N914 or
    1N4148 -- also
    > at Radio Shack) across the motor "backwards" (that is, the stripe
    of the
    > diode points to the + supply). This will absorb high voltage spikes
    the
    > motor may produce when you start or stop it. Maybe $2 in parts.
    >
    >
    > The final circuit would look like this:
    >
    > Pin (PAK or Stamp) --- 1K resistor
    Base of 2N2222
    >
    > Emitter of 2N2222 --- ground
    >
    > Collector of 2N2222
    "side A" of motor (either side)
    >
    > +3V
    "side B" of motor (other side)
    >
    > Side B of motor ---- striped end of diode
    Side A of motor
    >
    >
    > The PAK-V outputs 0 to 5V. You don't want to average it for motor
    control
    > (although you might for other reasons). You need something to make
    5V switch
    > 3V on and off. In this case we switch the ground which is just as
    good.
    >
    > Al Williams
    > AWC
    > *NEW: PAK-IX floating point A/D: http://www.al-
    williams.com/awce/pak9.htm
    > (Last day at this price)
    >
    >
    >
    > >
    Original Message
    > > From: mcmgamer@n... [noparse][[/noparse]mailto:mcmgamer@n...]
    > > Sent: Tuesday, April 10, 2001 1:50 PM
    > > To: basicstamps@y...
    > > Subject: [noparse][[/noparse]basicstamps] Re: Pak V w/motor
    > >
    > >
    > > The motor turns the way I want when I hook up two AA batteries
    > > directly to it (3 volts). So I know the motor works. I was
    hoping
    > > that all I would need to do was, via Pak-V, send 3 volts from the
    Pak
    > > to the motor. But that did not turn the motor. I have the
    command
    > > programmed correctly because I am measuring 3 volts with a
    multimeter
    > > off of the Pak-V connection to the motor.
    > >
    > > Given this information, do I just need to add a transistor to my
    > > circuit or is it more complicated than that? I have no spare
    parts
    > > (ie. transistors) to experiment.
    > >
    > >
    > > Al Williams - Do you still suggest the steps you posted below? If
    > > so, where can I purchase the transistor and I am not exactly sure
    > > where that 1k resistor goes ("base to ground"??). Thank you.
    > >
    > >
    > > Thank You Everyone for your input.
    > > Mike
    > >
    > > --- In basicstamps@y..., "Al Williams" <alw@a...> wrote:
    > > > I'm not sure what you mean by "voltage". You don't want to use
    an
    > > RC with a
    > > > motor.
    > > >
    > > > Here's some steps you might want to consider:
    > > >
    > > > 1-Connect all grounds together.
    > > >
    > > > 2-Hook one end of motor to +V (whatever 3V, 9V, etc.)
    > > >
    > > > 3-Ground the other end of the motor and observe it spinning.
    > > >
    > > > 4- Disconnect the ground end of the motor. Put a suitable
    > > transistor (2N2222
    > > > for a 100mA or less) with the collector on the ground end of the
    > > motor, the
    > > > emitter to ground. Put a small resistor (say 1K) from base to
    > > ground. Power
    > > > up. No spin. Move the resistor from ground to +5. Motor should
    spin
    > > again.
    > > >
    > > > 5-Remove the +5 end of the resistor and connect it to the
    output of
    > > the
    > > > PAK-V.
    > > >
    > > > 6-With the PAK-V software make sure that the baud rate constant
    is
    > > correct
    > > > (remember, the BS2 does not use the same baudrate numbers as
    BS2SX,
    > > BS2P).
    > > >
    > > > At each stage, make sure you have it working. For example, if
    you
    > > can't get
    > > > step 3 to spin the motor, you don't have enough battery power or
    > > something.
    > > > At step 4, you should be able to turn the motor on and off. If
    not,
    > > you are
    > > > not saturating the transistor, or some other transistor problem.
    > > >
    > > > Let me know if any of that helps.
    > > >
    > > > Al Williams
    > > > AWC
    > > > *NEW: PAK-IX floating point A/D: http://www.al-
    > > williams.com/awce/pak9.htm
    > > >
    > > >
    > > >
    > > > >
    Original Message
    > > > > From: mcmgamer@n... [noparse][[/noparse]mailto:mcmgamer@n...]
    > > > > Sent: Monday, April 09, 2001 9:02 PM
    > > > > To: basicstamps@y...
    > > > > Subject: [noparse][[/noparse]basicstamps] Pak V w/motor
    > > > >
    > > > >
    > > > > Please help,
    > > > >
    > > > > I am a beginner. I just bought the Pak-V for pwm so that I
    > > could
    > > > > run a motor while my Stamp was doing something else. But I
    am not
    > > > > sure what I need to do to get the motor turning. I finally
    > > > > determined the command to run the Pak-V on my Basic Stamp
    2sx. I
    > > can
    > > > > now get the desired voltage but the motor will not turn. It
    is
    > > only
    > > > > a little Radio Shack motor. It is rated for 9 volts but I
    only
    > > need
    > > > > to use 2-3 volts. Also, it only needs to run in one
    direction.
    > > Is
    > > > > there anything easy I can do to get this motor turning? I am
    > > really
    > > > > not sure exactly what I am doing.
    > > > >
    > > > > Thank You for your input. Please be as detailed as
    possible.
    > > > >
    > > > > Mike
    > > > >
    > > > >
    > > > >
    > > > >
    > > > > Your use of Yahoo! Groups is subject to
    > > http://docs.yahoo.com/info/terms/
    > > > >
    > >
    > >
    > >
    > >
    > > Your use of Yahoo! Groups is subject to
    http://docs.yahoo.com/info/terms/
    > >
  • ArchiverArchiver Posts: 46,084
    edited 2001-04-10 23:02
    I'm not familiar with that motor. Radio Shack sells an IRF510 (I think
    that's right) power FET which should be good to about 2A if you heat sink
    it. This is a FET so the hook up is a little different. Treat the FET's
    source as the emitter and the drain as the collector. You can connect the
    gate directly to the PAK-V or Stamp, but put a 1M resistor from the gate to
    ground to keep from collecting static when power is off.

    The Stamp will not run on 3V. The PAK-V has some power supply leeway, but
    mixing supplies is not wise unless you know how to do it and even then
    requires special techniques.

    When you use PWM to control a motor speed you are NOT changing the voltage
    to the motor. What you should do is switch to a 12V supply, run the Stamp
    and the motor from it, and use PWM to control how fast the motor goes.

    Consider this. A motor is made to operate at a particular voltage. When you
    reduce that voltage the motor may slow down, but it also develops less
    torque which is not desirable. Also, reducing voltage is typically not
    efficient. Think about a motor with a variable resistor feeding it a lower
    voltage. If you are absorbing 6V in the resistor and delivering 6V into the
    motor, you are burning off a lot of power in the resistor, right?

    That's what PWM is for. With PWM you slam the motor full on for a time, and
    then turn it off for a time. You make sure the average on time is a certain
    percentage. Now when the motor is spinning it is spinning under full power
    and will develop its design torque. When the PWM is off, there is no power
    wasted as heat, so your efficiency is good.

    This is similar to AC motor speed control where you use a Triac to send less
    than 360 degrees of the AC power to the motor. Switching power supplies also
    use a similar scheme -- full on for awhile and then full off.

    So don't think of using a voltage to control the motor speed. Think of using
    a duty cycle of pulses and you'll be happier.

    Does that make sense?

    Al Williams
    AWC
    *Last day for special pricing on the NEW PAK-IX:
    http://www.al-williams.com/awce/pak9.htm




    >
    Original Message
    > From: mcmgamer@n... [noparse]/noparse]mailto:[url=http://forums.parallaxinc.com/group/basicstamps/post?postID=zgvvdOGQIC7zWRHw3pNQWP7y6uBRhOv00GbqyDmqt8CpNs3-kidxcGMWn96bWRl8yxCZF8FnLVQ6c4ZzTw6JJg]mcmgamer@n...[/url
    > Sent: Tuesday, April 10, 2001 4:08 PM
    > To: basicstamps@yahoogroups.com
    > Subject: [noparse][[/noparse]basicstamps] Re: Pak V w/motor
    >
    >
    > Thank You very much Al Williams. You have been a big help. I just
    > had to add a few things.
    >
    > The motor I am using is Radio Shack model number 273-255 (12VDC High
    > Speed Motor). I looked at the specsheet and it mentions pretty high
    > currents. Does this mean I need a different transistor? Also, the 3
    > volt supply in your circuit diagram, could I just have that directly
    > be the Stamp's Power supply? Then the Pak-V could effectively reduce
    > that down to 3 volts or so to the motor. I'm not sure if that is how
    > it works though. I just don't want to use a second power supply. I
    > also would like to run the motor at a couple different speeds. I was
    > hoping to accomplish this with the Pak-V.
    >
    > In the circuit you posted, would I be able to vary the speed of the
    > motor by effectively varying the motor's voltage between 0-3 volts
    > using the Pak-V?
    >
    > I'm sorry for all the questions.
    >
    > Mike
    >
    >
    > --- In basicstamps@y..., "Al Williams" <alw@a...> wrote:
    > > Hi Mike,
    > >
    > > You should not drive the motor directly from any logic IC output
    > including
    > > the Stamp or the PAK-V. If you are measuring 3VDC with a meter
    > directly at
    > > the output of the PAK-V then the meter is probably averaging the
    > PWM for you
    > > (an analog meter perhaps?).
    > >
    > > You can find 2N2222s just about anywhere including Radio Shack, but
    > be sure
    > > your motor doesn't draw over, say 100mA. If the motor has
    > significant
    > > inductance you may also need a diode (for example a 1N914 or
    > 1N4148 -- also
    > > at Radio Shack) across the motor "backwards" (that is, the stripe
    > of the
    > > diode points to the + supply). This will absorb high voltage spikes
    > the
    > > motor may produce when you start or stop it. Maybe $2 in parts.
    > >
    > >
    > > The final circuit would look like this:
    > >
    > > Pin (PAK or Stamp) --- 1K resistor
    Base of 2N2222
    > >
    > > Emitter of 2N2222 --- ground
    > >
    > > Collector of 2N2222
    "side A" of motor (either side)
    > >
    > > +3V
    "side B" of motor (other side)
    > >
    > > Side B of motor ---- striped end of diode
    Side A of motor
    > >
    > >
    > > The PAK-V outputs 0 to 5V. You don't want to average it for motor
    > control
    > > (although you might for other reasons). You need something to make
    > 5V switch
    > > 3V on and off. In this case we switch the ground which is just as
    > good.
    > >
    > > Al Williams
    > > AWC
    > > *NEW: PAK-IX floating point A/D: http://www.al-
    > williams.com/awce/pak9.htm
    > > (Last day at this price)
    > >
    > >
    > >
    > > >
    Original Message
    > > > From: mcmgamer@n... [noparse][[/noparse]mailto:mcmgamer@n...]
    > > > Sent: Tuesday, April 10, 2001 1:50 PM
    > > > To: basicstamps@y...
    > > > Subject: [noparse][[/noparse]basicstamps] Re: Pak V w/motor
    > > >
    > > >
    > > > The motor turns the way I want when I hook up two AA batteries
    > > > directly to it (3 volts). So I know the motor works. I was
    > hoping
    > > > that all I would need to do was, via Pak-V, send 3 volts from the
    > Pak
    > > > to the motor. But that did not turn the motor. I have the
    > command
    > > > programmed correctly because I am measuring 3 volts with a
    > multimeter
    > > > off of the Pak-V connection to the motor.
    > > >
    > > > Given this information, do I just need to add a transistor to my
    > > > circuit or is it more complicated than that? I have no spare
    > parts
    > > > (ie. transistors) to experiment.
    > > >
    > > >
    > > > Al Williams - Do you still suggest the steps you posted below? If
    > > > so, where can I purchase the transistor and I am not exactly sure
    > > > where that 1k resistor goes ("base to ground"??). Thank you.
    > > >
    > > >
    > > > Thank You Everyone for your input.
    > > > Mike
    > > >
    > > > --- In basicstamps@y..., "Al Williams" <alw@a...> wrote:
    > > > > I'm not sure what you mean by "voltage". You don't want to use
    > an
    > > > RC with a
    > > > > motor.
    > > > >
    > > > > Here's some steps you might want to consider:
    > > > >
    > > > > 1-Connect all grounds together.
    > > > >
    > > > > 2-Hook one end of motor to +V (whatever 3V, 9V, etc.)
    > > > >
    > > > > 3-Ground the other end of the motor and observe it spinning.
    > > > >
    > > > > 4- Disconnect the ground end of the motor. Put a suitable
    > > > transistor (2N2222
    > > > > for a 100mA or less) with the collector on the ground end of the
    > > > motor, the
    > > > > emitter to ground. Put a small resistor (say 1K) from base to
    > > > ground. Power
    > > > > up. No spin. Move the resistor from ground to +5. Motor should
    > spin
    > > > again.
    > > > >
    > > > > 5-Remove the +5 end of the resistor and connect it to the
    > output of
    > > > the
    > > > > PAK-V.
    > > > >
    > > > > 6-With the PAK-V software make sure that the baud rate constant
    > is
    > > > correct
    > > > > (remember, the BS2 does not use the same baudrate numbers as
    > BS2SX,
    > > > BS2P).
    > > > >
    > > > > At each stage, make sure you have it working. For example, if
    > you
    > > > can't get
    > > > > step 3 to spin the motor, you don't have enough battery power or
    > > > something.
    > > > > At step 4, you should be able to turn the motor on and off. If
    > not,
    > > > you are
    > > > > not saturating the transistor, or some other transistor problem.
    > > > >
    > > > > Let me know if any of that helps.
    > > > >
    > > > > Al Williams
    > > > > AWC
    > > > > *NEW: PAK-IX floating point A/D: http://www.al-
    > > > williams.com/awce/pak9.htm
    > > > >
    > > > >
    > > > >
    > > > > >
    Original Message
    > > > > > From: mcmgamer@n... [noparse][[/noparse]mailto:mcmgamer@n...]
    > > > > > Sent: Monday, April 09, 2001 9:02 PM
    > > > > > To: basicstamps@y...
    > > > > > Subject: [noparse][[/noparse]basicstamps] Pak V w/motor
    > > > > >
    > > > > >
    > > > > > Please help,
    > > > > >
    > > > > > I am a beginner. I just bought the Pak-V for pwm so that I
    > > > could
    > > > > > run a motor while my Stamp was doing something else. But I
    > am not
    > > > > > sure what I need to do to get the motor turning. I finally
    > > > > > determined the command to run the Pak-V on my Basic Stamp
    > 2sx. I
    > > > can
    > > > > > now get the desired voltage but the motor will not turn. It
    > is
    > > > only
    > > > > > a little Radio Shack motor. It is rated for 9 volts but I
    > only
    > > > need
    > > > > > to use 2-3 volts. Also, it only needs to run in one
    > direction.
    > > > Is
    > > > > > there anything easy I can do to get this motor turning? I am
    > > > really
    > > > > > not sure exactly what I am doing.
    > > > > >
    > > > > > Thank You for your input. Please be as detailed as
    > possible.
    > > > > >
    > > > > > Mike
    > > > > >
    > > > > >
    > > > > >
    > > > > >
    > > > > > Your use of Yahoo! Groups is subject to
    > > > http://docs.yahoo.com/info/terms/
    > > > > >
    > > >
    > > >
    > > >
    > > >
    > > > Your use of Yahoo! Groups is subject to
    > http://docs.yahoo.com/info/terms/
    > > >
    >
    >
    >
    >
    > Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/
    >
  • ArchiverArchiver Posts: 46,084
    edited 2001-04-10 23:41
    Al Williams is amazing. He is a wealth of information.

    I am going to buy the IRF510 and try that route. But, I have no
    experience with heat sinks. Any suggestions? I would like to stick
    with Radio Shack parts, if possible, since they are just down the
    street.

    The 3 volt question I had was actually NOT whether I could power the
    Stamp with 3 volts, but rather if I could use the 5 volts from the
    Stamp's Board of Education instead of the 3 volts in your circuit
    diagram.

    Al - Thank you for the detailed description of pwm. That made a lot
    of sense.

    Mike

    --- In basicstamps@y..., "Al Williams" <alw@a...> wrote:
    > I'm not familiar with that motor. Radio Shack sells an IRF510 (I
    think
    > that's right) power FET which should be good to about 2A if you
    heat sink
    > it. This is a FET so the hook up is a little different. Treat the
    FET's
    > source as the emitter and the drain as the collector. You can
    connect the
    > gate directly to the PAK-V or Stamp, but put a 1M resistor from the
    gate to
    > ground to keep from collecting static when power is off.
    >
    > The Stamp will not run on 3V. The PAK-V has some power supply
    leeway, but
    > mixing supplies is not wise unless you know how to do it and even
    then
    > requires special techniques.
    >
    > When you use PWM to control a motor speed you are NOT changing the
    voltage
    > to the motor. What you should do is switch to a 12V supply, run the
    Stamp
    > and the motor from it, and use PWM to control how fast the motor
    goes.
    >
    > Consider this. A motor is made to operate at a particular voltage.
    When you
    > reduce that voltage the motor may slow down, but it also develops
    less
    > torque which is not desirable. Also, reducing voltage is typically
    not
    > efficient. Think about a motor with a variable resistor feeding it
    a lower
    > voltage. If you are absorbing 6V in the resistor and delivering 6V
    into the
    > motor, you are burning off a lot of power in the resistor, right?
    >
    > That's what PWM is for. With PWM you slam the motor full on for a
    time, and
    > then turn it off for a time. You make sure the average on time is a
    certain
    > percentage. Now when the motor is spinning it is spinning under
    full power
    > and will develop its design torque. When the PWM is off, there is
    no power
    > wasted as heat, so your efficiency is good.
    >
    > This is similar to AC motor speed control where you use a Triac to
    send less
    > than 360 degrees of the AC power to the motor. Switching power
    supplies also
    > use a similar scheme -- full on for awhile and then full off.
    >
    > So don't think of using a voltage to control the motor speed. Think
    of using
    > a duty cycle of pulses and you'll be happier.
    >
    > Does that make sense?
    >
    > Al Williams
    > AWC
    > *Last day for special pricing on the NEW PAK-IX:
    > http://www.al-williams.com/awce/pak9.htm
    >
    >
    >
    >
    > >
    Original Message
    > > From: mcmgamer@n... [noparse][[/noparse]mailto:mcmgamer@n...]
    > > Sent: Tuesday, April 10, 2001 4:08 PM
    > > To: basicstamps@y...
    > > Subject: [noparse][[/noparse]basicstamps] Re: Pak V w/motor
    > >
    > >
    > > Thank You very much Al Williams. You have been a big help. I
    just
    > > had to add a few things.
    > >
    > > The motor I am using is Radio Shack model number 273-255 (12VDC
    High
    > > Speed Motor). I looked at the specsheet and it mentions pretty
    high
    > > currents. Does this mean I need a different transistor? Also,
    the 3
    > > volt supply in your circuit diagram, could I just have that
    directly
    > > be the Stamp's Power supply? Then the Pak-V could effectively
    reduce
    > > that down to 3 volts or so to the motor. I'm not sure if that is
    how
    > > it works though. I just don't want to use a second power
    supply. I
    > > also would like to run the motor at a couple different speeds. I
    was
    > > hoping to accomplish this with the Pak-V.
    > >
    > > In the circuit you posted, would I be able to vary the speed of
    the
    > > motor by effectively varying the motor's voltage between 0-3 volts
    > > using the Pak-V?
    > >
    > > I'm sorry for all the questions.
    > >
    > > Mike
    > >
    > >
    > > --- In basicstamps@y..., "Al Williams" <alw@a...> wrote:
    > > > Hi Mike,
    > > >
    > > > You should not drive the motor directly from any logic IC output
    > > including
    > > > the Stamp or the PAK-V. If you are measuring 3VDC with a meter
    > > directly at
    > > > the output of the PAK-V then the meter is probably averaging the
    > > PWM for you
    > > > (an analog meter perhaps?).
    > > >
    > > > You can find 2N2222s just about anywhere including Radio Shack,
    but
    > > be sure
    > > > your motor doesn't draw over, say 100mA. If the motor has
    > > significant
    > > > inductance you may also need a diode (for example a 1N914 or
    > > 1N4148 -- also
    > > > at Radio Shack) across the motor "backwards" (that is, the
    stripe
    > > of the
    > > > diode points to the + supply). This will absorb high voltage
    spikes
    > > the
    > > > motor may produce when you start or stop it. Maybe $2 in parts.
    > > >
    > > >
    > > > The final circuit would look like this:
    > > >
    > > > Pin (PAK or Stamp) --- 1K resistor
    Base of 2N2222
    > > >
    > > > Emitter of 2N2222 --- ground
    > > >
    > > > Collector of 2N2222
    "side A" of motor (either side)
    > > >
    > > > +3V
    "side B" of motor (other side)
    > > >
    > > > Side B of motor ---- striped end of diode
    Side A of motor
    > > >
    > > >
    > > > The PAK-V outputs 0 to 5V. You don't want to average it for
    motor
    > > control
    > > > (although you might for other reasons). You need something to
    make
    > > 5V switch
    > > > 3V on and off. In this case we switch the ground which is just
    as
    > > good.
    > > >
    > > > Al Williams
    > > > AWC
    > > > *NEW: PAK-IX floating point A/D: http://www.al-
    > > williams.com/awce/pak9.htm
    > > > (Last day at this price)
    > > >
    > > >
    > > >
    > > > >
    Original Message
    > > > > From: mcmgamer@n... [noparse][[/noparse]mailto:mcmgamer@n...]
    > > > > Sent: Tuesday, April 10, 2001 1:50 PM
    > > > > To: basicstamps@y...
    > > > > Subject: [noparse][[/noparse]basicstamps] Re: Pak V w/motor
    > > > >
    > > > >
    > > > > The motor turns the way I want when I hook up two AA batteries
    > > > > directly to it (3 volts). So I know the motor works. I was
    > > hoping
    > > > > that all I would need to do was, via Pak-V, send 3 volts from
    the
    > > Pak
    > > > > to the motor. But that did not turn the motor. I have the
    > > command
    > > > > programmed correctly because I am measuring 3 volts with a
    > > multimeter
    > > > > off of the Pak-V connection to the motor.
    > > > >
    > > > > Given this information, do I just need to add a transistor to
    my
    > > > > circuit or is it more complicated than that? I have no spare
    > > parts
    > > > > (ie. transistors) to experiment.
    > > > >
    > > > >
    > > > > Al Williams - Do you still suggest the steps you posted
    below? If
    > > > > so, where can I purchase the transistor and I am not exactly
    sure
    > > > > where that 1k resistor goes ("base to ground"??). Thank you.
    > > > >
    > > > >
    > > > > Thank You Everyone for your input.
    > > > > Mike
    > > > >
    > > > > --- In basicstamps@y..., "Al Williams" <alw@a...> wrote:
    > > > > > I'm not sure what you mean by "voltage". You don't want to
    use
    > > an
    > > > > RC with a
    > > > > > motor.
    > > > > >
    > > > > > Here's some steps you might want to consider:
    > > > > >
    > > > > > 1-Connect all grounds together.
    > > > > >
    > > > > > 2-Hook one end of motor to +V (whatever 3V, 9V, etc.)
    > > > > >
    > > > > > 3-Ground the other end of the motor and observe it spinning.
    > > > > >
    > > > > > 4- Disconnect the ground end of the motor. Put a suitable
    > > > > transistor (2N2222
    > > > > > for a 100mA or less) with the collector on the ground end
    of the
    > > > > motor, the
    > > > > > emitter to ground. Put a small resistor (say 1K) from base
    to
    > > > > ground. Power
    > > > > > up. No spin. Move the resistor from ground to +5. Motor
    should
    > > spin
    > > > > again.
    > > > > >
    > > > > > 5-Remove the +5 end of the resistor and connect it to the
    > > output of
    > > > > the
    > > > > > PAK-V.
    > > > > >
    > > > > > 6-With the PAK-V software make sure that the baud rate
    constant
    > > is
    > > > > correct
    > > > > > (remember, the BS2 does not use the same baudrate numbers as
    > > BS2SX,
    > > > > BS2P).
    > > > > >
    > > > > > At each stage, make sure you have it working. For example,
    if
    > > you
    > > > > can't get
    > > > > > step 3 to spin the motor, you don't have enough battery
    power or
    > > > > something.
    > > > > > At step 4, you should be able to turn the motor on and off.
    If
    > > not,
    > > > > you are
    > > > > > not saturating the transistor, or some other transistor
    problem.
    > > > > >
    > > > > > Let me know if any of that helps.
    > > > > >
    > > > > > Al Williams
    > > > > > AWC
    > > > > > *NEW: PAK-IX floating point A/D: http://www.al-
    > > > > williams.com/awce/pak9.htm
    > > > > >
    > > > > >
    > > > > >
    > > > > > >
    Original Message
    > > > > > > From: mcmgamer@n... [noparse][[/noparse]mailto:mcmgamer@n...]
    > > > > > > Sent: Monday, April 09, 2001 9:02 PM
    > > > > > > To: basicstamps@y...
    > > > > > > Subject: [noparse][[/noparse]basicstamps] Pak V w/motor
    > > > > > >
    > > > > > >
    > > > > > > Please help,
    > > > > > >
    > > > > > > I am a beginner. I just bought the Pak-V for pwm so
    that I
    > > > > could
    > > > > > > run a motor while my Stamp was doing something else. But
    I
    > > am not
    > > > > > > sure what I need to do to get the motor turning. I
    finally
    > > > > > > determined the command to run the Pak-V on my Basic Stamp
    > > 2sx. I
    > > > > can
    > > > > > > now get the desired voltage but the motor will not turn.
    It
    > > is
    > > > > only
    > > > > > > a little Radio Shack motor. It is rated for 9 volts but I
    > > only
    > > > > need
    > > > > > > to use 2-3 volts. Also, it only needs to run in one
    > > direction.
    > > > > Is
    > > > > > > there anything easy I can do to get this motor turning?
    I am
    > > > > really
    > > > > > > not sure exactly what I am doing.
    > > > > > >
    > > > > > > Thank You for your input. Please be as detailed as
    > > possible.
    > > > > > >
    > > > > > > Mike
    > > > > > >
    > > > > > >
    > > > > > >
    > > > > > >
    > > > > > > Your use of Yahoo! Groups is subject to
    > > > > http://docs.yahoo.com/info/terms/
    > > > > > >
    > > > >
    > > > >
    > > > >
    > > > >
    > > > > Your use of Yahoo! Groups is subject to
    > > http://docs.yahoo.com/info/terms/
    > > > >
    > >
    > >
    > >
    > >
    > > Your use of Yahoo! Groups is subject to
    http://docs.yahoo.com/info/terms/
    > >
  • ArchiverArchiver Posts: 46,084
    edited 2001-04-10 23:41
    A TIP120 transistor will work on larger motors.

    Motor + to the power source.

    Motor - to the collector of the transistor.

    Emitter of the transistor to ground.

    Connect one end of a 10k resistor to your stamp pin and the other to the
    base of the transistor.

    When the stamp pin is high, the motor will run. You can use PULSOUT to vary
    the speed of the motor somewhat.

    Original Message

    > You should not drive the motor directly from any logic IC output including
    > the Stamp or the PAK-V. If you are measuring 3VDC with a meter directly at
    > the output of the PAK-V then the meter is probably averaging the PWM for
    you
    > (an analog meter perhaps?).
    >
    > You can find 2N2222s just about anywhere including Radio Shack, but be
    sure
    > your motor doesn't draw over, say 100mA.
  • ArchiverArchiver Posts: 46,084
    edited 2001-04-10 23:50
    According to the BOE schematic, it has an LM2940 voltage regulator, which is
    good for about 1 amp with a heat sink. If your chip, sensors and motor don't
    add up to more than about 600-750 ma, it should work. This would be the
    terminals marked vdd on the breadboard area.

    Original Message

    > I am going to buy the IRF510 and try that route. But, I have no
    > experience with heat sinks. Any suggestions? I would like to stick
    > with Radio Shack parts, if possible, since they are just down the
    > street.
    >
    > The 3 volt question I had was actually NOT whether I could power the
    > Stamp with 3 volts, but rather if I could use the 5 volts from the
    > Stamp's Board of Education instead of the 3 volts in your circuit
    > diagram.
  • ArchiverArchiver Posts: 46,084
    edited 2001-04-11 21:22
    Thank You Al for the advice.

    I now can get the motor turn at different speeds. I only have one
    complaint. The motor is making a high pitch buzz when it runs. It
    doesn't seem to matter what speed it is turning at either.

    The motor is Radio Shack model number 273-255 (12VDC High Speed
    Motor). I am using the 5 Volts from the Stamp's Board of Education
    as the source. Can anyone tell me why the motor could be making this
    buzz. It is very annoying.

    Thank you

    Mike

    --- In basicstamps@y..., "Al Williams" <alw@a...> wrote:
    > I'm not familiar with that motor. Radio Shack sells an IRF510 (I
    think
    > that's right) power FET which should be good to about 2A if you
    heat sink
    > it. This is a FET so the hook up is a little different. Treat the
    FET's
    > source as the emitter and the drain as the collector. You can
    connect the
    > gate directly to the PAK-V or Stamp, but put a 1M resistor from the
    gate to
    > ground to keep from collecting static when power is off.
  • ArchiverArchiver Posts: 46,084
    edited 2001-04-11 21:31
    Buzzing is normal with a PWM controller -- you are hearing the clock that
    times the pulses. Ever heard the noise a variable speed cordless drill makes
    when you barely pull the trigger? Same thing.


    Original Message

    > Thank You Al for the advice.
    >
    > I now can get the motor turn at different speeds. I only have one
    > complaint. The motor is making a high pitch buzz when it runs. It
    > doesn't seem to matter what speed it is turning at either.
  • ArchiverArchiver Posts: 46,084
    edited 2001-04-12 00:57
    From: david cousins <cuz_hsv@y...>
    To: basicstamps@yahoogroups.com
    Date: Tue, 10 Apr 2001 08:17:35 -0700 (PDT)

    >My second bit of experience is that the Radio Shack motor was of very low
    >quality. The motor gave of a tremendous amount of EMI (electrical
    >interference). I have other servos on my machine, and when I turned on the

    You should use bypass capacitors on this sort of motor, a 0.1mF from each
    terminal to the metal case of the motor with as short a connection as
    possible would be a great help.

    --
    Regards,

    Derryck Croker
Sign In or Register to comment.