Shop OBEX P1 Docs P2 Docs Learn Events
RC control interface — Parallax Forums

RC control interface

Bill PlanoBill Plano Posts: 14
edited 2006-01-30 17:42 in Robotics
I have a mondo-tronics Dual 2 H-Bridge and a serial motor interface that I am trying to interface with both a BS2 and a Futaba T6SXA radio control.· The Mondo-Tronics wesbite is no help.· I am beginning to think I wasted my money on these electronics and should have gone with the Solutions cubed motor-mind B or C.· I guess this is what happens when you get old and forget most of what you learned in school.· Any help and comments will be appreciated.· Any links to websites will also be welcomed.· I have been playing with the BS2 for about 2-years and recently learned about this forum, which I feel is really great.
Thanks, Bill

Comments

  • Bruce BatesBruce Bates Posts: 3,045
    edited 2006-01-28 04:14
    Bill -

    You neglected to mention what kind of motors you were trying to control? You also failed to mention the overall goal of this project?

    We'll also need to know a bit more about the "serial motor interface" you're speaking about.

    In general, the output of the R/C receiver can be "read" with the PULSIN command. Synchronous serial output is done with the SHIFTOUT command, and asynchronous serial output is done with the SEROUT command.

    More detail will beget better answers.

    Regards,

    Bruce Bates
  • Bill PlanoBill Plano Posts: 14
    edited 2006-01-28 04:40
    Bruce:
    What I want to do is expand my boe-bot and use 2 dc motors from 12 volt electric drill I got a Harbor Freight. I want the dc motors to drive the "new" boe-bot and the BS2 to still conrol the robotic arm I constructed. I am using the PWM pal from parallax to control the arm, but I need to move the robot with the RC controller to any position I need.
    I hope I am not being too vague about these requirents. I am retired Bio-Medical Technician and have lost a lot of my electronics education. I like to play with the BS2 and turn LED's on and off and control my sprinkler system and run my model railroad with it. I just am having a problem with DC motor control using the H-Bridge.

    Bill
  • Bruce BatesBruce Bates Posts: 3,045
    edited 2006-01-28 06:43
    Bill -

    It sounds like your attempting to do two different things with two different sets of equipment, so I'll answer your questions based on that presumption until I hear differently from you.

    I've never used a Mondotronics H-Bridge, but I'll presume it operates as most do. Generally, they requires two inputs. One input determines DIRECTION (forward, reverse) and the other determines the SPEED. The DIRECTION input MAY determine ON/OFF as well. Usually there are two physical connections for the DIRECTION control, and one for SPEED.

    The truth table for the DIRECTION control usually looks something like that below, but CHECK your specific controller documentation, for the exact truth table for that particular H-Bridge. If there is a 2 motor capability, you usually just "double" width the truth table, adding two more lines (line 3 and line 4):

    /code
    ········· Motor No. One
    ········· OFF FWD REV
    Line 1 - 0···· 1···· 1

    Line 2 - 0·····0··· ·1

    You can control the lines above using the Stamp HIGH and LOW commands. This is just an example:

    {$STAMP PBASIC 2.5}

    Line1 PIN 0 'Arbitrarily assign Pin port 0 to control line 1
    Line2 PIN 1 'Arbitrarily assign Pin port 1 to control line 2

    ···· OUTPUT Line1 'Set Lines 1 and 2
    ···· OUTPUT Line2 ' to output mode

    'Set to neutral (OFF) before starting anything
    ···· LOW Line1
    ···· LOW Line2

    'Set control lines for forward motion:
    ···· HIGH Line1
    ···· LOW Line2
    ···· GOSUB Move_Some

    'Set to neutral (OFF) before going into REVERSE
    ···· LOW Line1
    ···· LOW Line2
    ···· GOSUB Move_Some

    'Set control lines for reverse motion:
    ···· HIGH Line1
    ···· HIGH Line2
    ···· GOSUB Move_Some

    code/

    You drive the SPEED pin with PWM. The higher the frequency, the faster it runs. That's about it, in a nut shell. The PWM can be provided by the Stamp PWM command, or by an offboard controller, such as the PWM Pal.

    That's about all there is to that part·I'd think.

    As far as the other requirement is concerned - the robot arm, I'm not quite sure what you mean by the following:

    "I am using the PWM pal from parallax to control the arm, but I need to move the robot with the RC controller to any position I need."

    In what way are you using the "RC controller", and what is it? Did you mean to say R/C transmitter or R/C receiver, or possibly electronic speed control (ESC)?

    Regards,

    Bruce Bates

    Post Edited (Bruce Bates) : 1/28/2006 6:50:10 AM GMT
  • kelvin jameskelvin james Posts: 531
    edited 2006-01-30 05:31
    I took a look at the docs, which i am adding to this, and like Bruce suggested using pulsin to decode the rc signal should work. From there you just program the stamp to output the signals required by the hbridge, pin direction and pulsed input. The serial interface just takes simple serial commands from the stamp to control the motors, may not be necessary, but does have an encoder counter and limit switches, which might be useful. I doubt you would be able to move the robot and use the arm at the same time, stamp speed will be a problem, possibly the serial interface may help there. Too bad the rc output could not be connected directly to the hbridge. That's a nice rc unit you have there too.

    kelvin
  • Bill PlanoBill Plano Posts: 14
    edited 2006-01-30 17:42
    Went away for the weekend and had no computer.

    Thank you Bruce for the help with the programming.

    Thank you Kelvin for the info pointing out the fact that the Serial Interface may not be required.· Like I said, the documentation is not reallly clear to me.·

    You're right, I don't want to move the robot and the arm at the same time. I want to move the robot with the RC transmitter and receiver and use to the basic stamp to control the arm in a preprogrammed way or via the remote.

    I will now make this thing work.

    Thanks again, Bill
Sign In or Register to comment.