Shop OBEX P1 Docs P2 Docs Learn Events
Servo to PWM Conversion via BS — Parallax Forums

Servo to PWM Conversion via BS

ArchiverArchiver Posts: 46,084
edited 2003-07-01 13:32 in General Discussion
Hi,

I'm trying to us an R/C transmitter to control a small robot, but instead of
servos, I'm using dc brush-motors. My problem is motor control.

I have an R/C receiver, and an H-Bridge driver, but I need a servo-to-pwm
interface. I'd like to use a stamp, but would feel better following an
existing example. If anyone can point me in the right direction, I would
appreciate it.

Thanks,

Joe

Comments

  • ArchiverArchiver Posts: 46,084
    edited 2003-07-01 13:32
    Hi Joe,

    If I understand you correctly your program would need to read a pulse
    input and generate a PWM output. Without extra hardware you can't do
    both of these at the same time. This might be OK depending on your
    application. So the idea would be to do the following:

    Top:
    PULSIN... ' read RC input
    ' convert input to a range from 0 to 255 (0 to 100%)
    PWM... ' output PWM
    Goto top

    You could use a PAK-VII (http://www.al-williams.com/pak7.htm) to read
    the R/C continuously. However, it would probably be a better idea to use
    a PAK-V (http://www.al-williams.com/pak5.htm) to generate PWM all the
    time and let the Stamp read the pulses. This way the PWM doesn't "droop"
    while you are reading the input. Parallax just came out a with a
    hardware PWM device that is -- as far as I can tell -- somewhat similar
    so there are other options, as well.

    Hope that gives you some direction.

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

    >
    Original Message
    > From: Joe McCartin [noparse]/noparse]mailto:[url=http://forums.parallaxinc.com/group/basicstamps/post?postID=8KyqtTwtUwTLBK_wx8gBjvc9BgOfgPkk4NN_FsiSQIAaOFkGgHfkGloyy5xpFNk0LTQY3xwut76oHQ]joe@j...[/url
    > Sent: Monday, June 30, 2003 8:35 PM
    > To: basicstamps@yahoogroups.com
    > Subject: [noparse][[/noparse]basicstamps] Servo to PWM Conversion via BS
    >
    >
    > Hi,
    >
    > I'm trying to us an R/C transmitter to control a small robot,
    > but instead of servos, I'm using dc brush-motors. My problem
    > is motor control.
    >
    > I have an R/C receiver, and an H-Bridge driver, but I need a
    > servo-to-pwm interface. I'd like to use a stamp, but would
    > feel better following an existing example. If anyone can
    > point me in the right direction, I would appreciate it.
    >
    > Thanks,
    >
    > Joe
    >
    >
    > 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.