Shop OBEX P1 Docs P2 Docs Learn Events
motor controlled via pot/bs — Parallax Forums

motor controlled via pot/bs

Let's Go!Let's Go! Posts: 124
edited 2008-08-03 12:25 in BASIC Stamp
can a dc motor be controlled by the pot command the same as a servo as illustrated in the manual? thanks

any thoughts on how to do it would be appreciated...roll.gif

Comments

  • allanlane5allanlane5 Posts: 3,815
    edited 2008-08-02 17:26
    No.

    The nice thing about a servo is that it has on-board comparator electronics, which makes it very simple to control it with only a single output pin using "PULSOUT". Another nice thing is that they only cost $20 or so for a cheap one.

    In general, DC motors require a "Pulse-Width Modulation" or "PWM" scheme to control speed. And you need to reverse the voltage on the motor to change direction. There's off the shelf stuff to do this, but it's more expensive than a servo.
  • Let's Go!Let's Go! Posts: 124
    edited 2008-08-02 18:06
    can the voltage be reversed with software command, and/or using
    ·the hb25 motor controller offered by parallax. thanks, jim
  • allanlane5allanlane5 Posts: 3,815
    edited 2008-08-02 18:41
    Yes, I believe the HB25's purpose in life is to provide a servo-type interface to the BS2 (easy to control) while providing an H-bridge interface to a DC motor on the other side.
  • Let's Go!Let's Go! Posts: 124
    edited 2008-08-02 18:47
    thanks again for your help.jim
  • Let's Go!Let's Go! Posts: 124
    edited 2008-08-03 11:46
    so would the hb 25 would drive a larger servo (i.e. larger than the servos sold by parallax), with the pot command using the bs2?hop.gif··
  • Mike GreenMike Green Posts: 23,101
    edited 2008-08-03 12:25
    Not exactly. The POT statement is not what you used to control the HB-25. You normally use a PULSOUT statement.

    The HB-25 (plus a DC motor) is made to be substituted for a continuous motion servo. Any program (like the one in the manual) intended to control a servo should work the same way with the HB-25. The HB-25 has some additional features, like it only requires a single control pulse to set its speed and direction where a servo requires that the control pulse be repeated every 20ms or so. The HB-25 also has a feature where you can connect two of them to a single I/O pin.
Sign In or Register to comment.