RC Skid Steer
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
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.
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
I have some studying to do now
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!
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!