Shop OBEX P1 Docs P2 Docs Learn Events
Single pin motor control — Parallax Forums

Single pin motor control

ArchiverArchiver Posts: 46,084
edited 2002-04-26 02:39 in General Discussion
At 11:56 AM 4/25/02 -0300, you wrote:
>Does anyone have a tristate circuit to control a motor and direction
>from a single pin ?
>ex: pin as input = motor stop
>pin high = motor forward
>pin low = motor reverse
>
>Thanks for any help
>ACJacques

Use a DUAL opto-isolator or two single opto-isolators with a 3-resistor
voltage divider. Take the transistor outputs of the opto-isolator(s) to
drive a conventional H-BRIDGE.


LED2 R3
o--|<--o--/\/\
> +5V
| |
STAMP I/O >
o o
o
| LED1 R2 |
o-->|--o--/\/\--o
| R1
o--/\/\
> GND

R1=R2=R3=220 Ohm


Stamp I/O LED1 LED2
Input OFF OFF
LOW OFF ON
HIGH ON OFF

Beau Schwabe Mask Designer IV - ATL
National Semiconductor Enterprise Networking Business Unit
500 Pinnacle Court, Suite 525 Wired Communications Division
Mail Stop GA1 Norcross, GA 30071

Comments

  • ArchiverArchiver Posts: 46,084
    edited 2002-04-25 15:56
    Does anyone have a tristate circuit to control a motor and direction
    from a single pin ?
    ex: pin as input = motor stop
    pin high = motor forward
    pin low = motor reverse

    Thanks for any help
    ACJacques
  • ArchiverArchiver Posts: 46,084
    edited 2002-04-25 23:03
    When I read this I said to myself, this is impossible. Wish I were a
    genius. Good work Beau!!

    Leroy

    Beau Schwabe wrote:
    >
    > At 11:56 AM 4/25/02 -0300, you wrote:
    > >Does anyone have a tristate circuit to control a motor and direction
    > >from a single pin ?
    > >ex: pin as input = motor stop
    > >pin high = motor forward
    > >pin low = motor reverse
    > >
    > >Thanks for any help
    > >ACJacques
    >
    > Use a DUAL opto-isolator or two single opto-isolators with a 3-resistor
    > voltage divider. Take the transistor outputs of the opto-isolator(s) to
    > drive a conventional H-BRIDGE.
    >
    > LED2 R3
    > o--|<--o--/\/\
    > +5V
    > | |
    > STAMP I/O >
    o o
    o
    > | LED1 R2 |
    > o-->|--o--/\/\--o
    > | R1
    > o--/\/\
    > GND
    >
    > R1=R2=R3=220 Ohm
    >
    > Stamp I/O LED1 LED2
    > Input OFF OFF
    > LOW OFF ON
    > HIGH ON OFF
    >
    >
    > Beau Schwabe Mask Designer IV - ATL
    > National Semiconductor Enterprise Networking Business Unit
    > 500 Pinnacle Court, Suite 525 Wired Communications Division
    > Mail Stop GA1 Norcross, GA 30071
    >
    >
    > 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 2002-04-26 02:39
    PWM to a servo controller, like they use on the RC hobby motors works.
    No pulse (high or low doesn't matter), motor stops. 1.5ms pulse at about
    20ms intervals is nuetral, 1.0ms pulse servo rotates one way, 2.0ms pulse
    the servo rotates in the reverse direction. To use you need to hack the
    servo so it rotates continuously.
    Another method is to use a serial motor controller, with serial data in
    telling the controller what motor or servo to run on one of several or more
    channels.
    A third method is to use RC hobby Electronic Speed controls (ESC's), you use
    the same 1ms - 1.5ms - 2.0ms pulses to control it as well.


    Original Message
    From: ACJacques [noparse]/noparse]mailto:[url=http://forums.parallaxinc.com/group/basicstamps/post?postID=Hweqie9XQsGO2-zzjyjx_2c23qKA5220AQ168bXRCa5Q8DTlxnD78HNJ-syXABD8rIwGqc7ONRwbkMmxfifcKA]acjacques@i...[/url
    Sent: Thursday, April 25, 2002 9:57 AM
    To: basicstamps@yahoogroups.com
    Subject: [noparse][[/noparse]basicstamps] Single pin motor control


    Does anyone have a tristate circuit to control a motor and direction
    from a single pin ?
    ex: pin as input = motor stop
    pin high = motor forward
    pin low = motor reverse

    Thanks for any help
    ACJacques


    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.