Shop OBEX P1 Docs P2 Docs Learn Events
RC Skid Steer — Parallax Forums

RC Skid Steer

SkidSkid Posts: 3
edited 2009-01-11 22:46 in BASIC Stamp
I am looking to make a radio controlled skid steer vehicle. I have some big 12v dc motors. I know that I will need a speed controller for the motors so that I don't burn up my BS2. Does anyone have program examples for RC control for a two wheeled 'bot?

Comments

  • Mike GreenMike Green Posts: 23,101
    edited 2008-12-06 19:15
    So you want to use an RC receiver connected to a Stamp to control a vehicle with some DC motors?

    You will indeed need a speed controller. Consider Parallax's HB-25 which looks like a servo motor to the Stamp. Any program that controls a servo motor should work with the HB-25.

    To receive RC control pulses from an RC receiver, you would use the PULSIN statement to measure the width of the received pulse. If you want to use a multichannel receiver, you may or may not be able to handle more than one channel. The Stamp can't measure two pulses at the same time. If the receiver puts out the pulses for the different channels in order, the Stamp can measure each in turn, then turn around and do something with the information (like send pulses to a pair of HB-25s).

    Download and read the Basic Stamp Syntax and Reference Manual if you haven't already, particularly the part on the PULSIN statement. Download and read the "Robotics with the BoeBot" tutorial. A BoeBot is not very different from any other skid steer vehicle with two DC motors controlled by HB-25s. Much of the sample code and exercises is directly applicable.
  • 'Botty'Botty Posts: 1
    edited 2008-12-06 20:34
    You will find that multiple RC style motor controllers are difficult to drive with a BS2. Most motor controllers require a PWM (Pulse Width Modulation) signal from the driving circuit. The BS2 does not have a true PWM output. The Freqout command that is used with the little bots is a simulation of a PWM but cannot be maintained to drive a conventional motor controller. Parallax makes a module that you can place under the BS2 to make a real PWM signal. The PWMPAL will let you drive up to four PWM motor controllers.

    The combination of the PWMPAL and a couple of motor controllers will allow you to make a nice skid steer bot.

    There is a good article on motor controllers and H-bridges on the Parallax site:
    http://www.parallax.com/dl/docs/cols/nv/vol2/col/nv52.pdf

    Parallax has several motor controllers. Others can be found at:
    http://www.hobbyengineering.com/H2338.html
    One
    that works well for smaller DC motors is:
    http://info.hobbyengineering.com/specs/SOLARBOTICS-KCMD-L298_Compact_motor_driver.pdf

    A standard RC radio can be read with a BS2 with the pulse in command. Connect the white wire from an RC receiver to a BS2 input pin and you will be able to see the radio input. I have attached a sample program that reads two channels from an RC radio and outputs the results to a PWMPAL. The output can be used to drive most motor controllers. You will find that motor controllers use many methods to set motor direction. The attached example sets a single pin either high or low for direction. If your controller needs more pins or needs and enable pin, you will need to add lines to drive these pins.

    The attached program allows for control of two motors for skid steer and also includes a routine to allow for spin.

    Enjoy
  • SkidSkid Posts: 3
    edited 2008-12-06 23:20
    Thank you!

    I have some studying to do now
  • Tom CTom C Posts: 461
    edited 2008-12-08 00:06
    "Botty,

    Why use the PWMPAL ($29.95) when you can easily use the SERVOPAL ($19.95) to control·a two RC input motor controller such as the Dimension Engineering Sabertooth 2X5, get a free timer, and save $10.

    Just a thought.

    Regards,

    TCIII

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    If you are going to send·a Robot·to save the world, you·better make sure it likes it the way it is!
  • MeistroMeistro Posts: 12
    edited 2008-12-09 12:25
    You might want to check the amp draw of those motors under load and make sure your motor drive you get will handle it.
  • SkidSkid Posts: 3
    edited 2009-01-11 22:46
    I had a bit of trouble with the code for changing the direction. I figured out the the direction pins on the stamp were not set for output pins.

    Add a couple of lines near the beginning of the program.

    Output 6
    Output 7

    This will set the pins for use as output.
    Now I forward and revearse!
Sign In or Register to comment.