Shop OBEX P1 Docs P2 Docs Learn Events
controlling a DC motor AND a servo with 4 wires? — Parallax Forums

controlling a DC motor AND a servo with 4 wires?

ArchiverArchiver Posts: 46,084
edited 2004-01-02 18:05 in General Discussion
I want to use my Stamp to control a small model car, tethered to the
stamp with a phone cord. I am limited to using a phone cord, because
I am using a telephone detangler as a slip-ring to compensate for the
cord twisting up. Therefore, I have four wires to work with.

Wires #1 and #2 will drive the DC motor in the rear wheels, both
forwards and backwards, using an H-Bridge. The steering will be
accomplished with a micro servo hooked to the front wheels. Wire #3
will provide the servo with a dedicated 5V, and wire #4 will provide
the servo signal. My problem is how to connect the servo to ground.

Since the polarity on the motor wires will reverse depending on the
direction of travel, ground could be either wire #1 or #2. I had
considered hooking on to wires #1 and #2, running each through
diodes, and running them BOTH to the ground terminal of the servo,
which would ensure that the current to the DC motor will never flow
into the ground terminal of the servo.

Can anyone see a problem with this, or does it sound like it will
work? Any better ideas would be welcomed!

Thanks in advance,
--alex

Comments

  • ArchiverArchiver Posts: 46,084
    edited 2004-01-02 17:51
    Alex,

    I did almost exactly what you are speaking of (not wired, but limited by
    the number of channels on a rc setup) and it worked just fine. YMMV

    -John


    Original Message
    From: robot_geek1138 [noparse]/noparse]mailto:[url=http://forums.parallaxinc.com/group/basicstamps/post?postID=N5Iws2XwrpOfKiY1Z4elfLMA3LZnwLZ5oavmacZxQLZVmSAwM-fku8yjHZnw32h3Sa8Y6OBQLxWN3xZCpQk]robot_geek1138@y...[/url
    Sent: Friday, January 02, 2004 9:43 AM
    To: basicstamps@yahoogroups.com
    Subject: [noparse][[/noparse]basicstamps] controlling a DC motor AND a servo with 4 wires?

    I want to use my Stamp to control a small model car, tethered to the
    stamp with a phone cord. I am limited to using a phone cord, because
    I am using a telephone detangler as a slip-ring to compensate for the
    cord twisting up. Therefore, I have four wires to work with.

    Wires #1 and #2 will drive the DC motor in the rear wheels, both
    forwards and backwards, using an H-Bridge. The steering will be
    accomplished with a micro servo hooked to the front wheels. Wire #3
    will provide the servo with a dedicated 5V, and wire #4 will provide
    the servo signal. My problem is how to connect the servo to ground.

    Since the polarity on the motor wires will reverse depending on the
    direction of travel, ground could be either wire #1 or #2. I had
    considered hooking on to wires #1 and #2, running each through
    diodes, and running them BOTH to the ground terminal of the servo,
    which would ensure that the current to the DC motor will never flow
    into the ground terminal of the servo.

    Can anyone see a problem with this, or does it sound like it will
    work? Any better ideas would be welcomed!

    Thanks in advance,
    --alex




    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.


    Yahoo! Groups Links

    To visit your group on the web, go to:
    http://groups.yahoo.com/group/basicstamps/

    To unsubscribe from this group, send an email to:
    basicstamps-unsubscribe@yahoogroups.com

    Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/
  • ArchiverArchiver Posts: 46,084
    edited 2004-01-02 18:05
    One way to do it would be to move your H-Bridge to the car via a Pololu
    mini motor controller; then you get this:

    1 - Power
    2 - Ground
    3 - Serial Signal to MMC
    4 - Servo pulse


    -- Jon Williams
    -- Parallax


    Original Message
    From: robot_geek1138 [noparse]/noparse]mailto:[url=http://forums.parallaxinc.com/group/basicstamps/post?postID=rFPf1qYNoXFravDx4B2X7V9Ul6Sm32Fqq1JVO-SadQW-g24pI1MEROl6viPCNdMErMhWo1l9jzTnoUbn19L13gnS-Q]robot_geek1138@y...[/url
    Sent: Friday, January 02, 2004 9:43 AM
    To: basicstamps@yahoogroups.com
    Subject: [noparse][[/noparse]basicstamps] controlling a DC motor AND a servo with 4 wires?


    I want to use my Stamp to control a small model car, tethered to the
    stamp with a phone cord. I am limited to using a phone cord, because
    I am using a telephone detangler as a slip-ring to compensate for the
    cord twisting up. Therefore, I have four wires to work with.

    Wires #1 and #2 will drive the DC motor in the rear wheels, both
    forwards and backwards, using an H-Bridge. The steering will be
    accomplished with a micro servo hooked to the front wheels. Wire #3
    will provide the servo with a dedicated 5V, and wire #4 will provide
    the servo signal. My problem is how to connect the servo to ground.

    Since the polarity on the motor wires will reverse depending on the
    direction of travel, ground could be either wire #1 or #2. I had
    considered hooking on to wires #1 and #2, running each through
    diodes, and running them BOTH to the ground terminal of the servo,
    which would ensure that the current to the DC motor will never flow
    into the ground terminal of the servo.

    Can anyone see a problem with this, or does it sound like it will
    work? Any better ideas would be welcomed!

    Thanks in advance,
    --alex




    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.


    Yahoo! Groups Links

    To visit your group on the web, go to:
    http://groups.yahoo.com/group/basicstamps/

    To unsubscribe from this group, send an email to:
    basicstamps-unsubscribe@yahoogroups.com

    Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/




    This message has been scanned by WebShield. Please report SPAM to
    abuse@p....
Sign In or Register to comment.