Stepper controlled by RC receiver
mordraid
Posts: 5
I realize I am new and this has probably been beat to death, but even after searching feverishly I still have found only one project that relates to what I am trying to accomplish.
My RC truck has a steering system which is turned by a lead screw. I cannot use a servo to turn it because they are far too slow. The stepper can rotate much more quickly and I would like it to move proportionally just as an RC servo. Of course, I have not been able to make this work yet. Here is a link to a video I found in which an Arduino was used to interface the receiver to the stepper:
http://www.youtube.com/watch?v=8FNHrC7CIak
This is the type of motion I need, and once it works I can simply modify the code of my Stamp to move the motor many more steps with regard to the input so it turns faster. I have worked with experiment #26 and 27 in the StampWorks manual but instead of turning a pot to move the stepper I would like to connect to the stepper controller directly from the Stamp (I need a controller because the stepper is fairly powerful and the Stamp will not sink that much current).
So, if anyone can point me in some direction I would greatly appreciate it. I am a total amateur when it comes to code but willing to learn. I basically have the stamp, stepper and controller, but no know-how to make the two speak to one another. I have been trying to work this out for a long time.
Thanks.
My RC truck has a steering system which is turned by a lead screw. I cannot use a servo to turn it because they are far too slow. The stepper can rotate much more quickly and I would like it to move proportionally just as an RC servo. Of course, I have not been able to make this work yet. Here is a link to a video I found in which an Arduino was used to interface the receiver to the stepper:
http://www.youtube.com/watch?v=8FNHrC7CIak
This is the type of motion I need, and once it works I can simply modify the code of my Stamp to move the motor many more steps with regard to the input so it turns faster. I have worked with experiment #26 and 27 in the StampWorks manual but instead of turning a pot to move the stepper I would like to connect to the stepper controller directly from the Stamp (I need a controller because the stepper is fairly powerful and the Stamp will not sink that much current).
So, if anyone can point me in some direction I would greatly appreciate it. I am a total amateur when it comes to code but willing to learn. I basically have the stamp, stepper and controller, but no know-how to make the two speak to one another. I have been trying to work this out for a long time.
Thanks.
Comments
To be honest, I need the code. As much as I have attempted to make it work, so far nada. And I'm quite certain this is the last thing anyone wants to hear... 'I need the code'.
Sorry to be such a dimwit ;-)
http://www.obsidianwraith.com/L298N.pdf
I cannot find a datasheet on the board itself, but I purchased it from here:
http://www.futurlec.com/StepperMotorController.shtml
Four inputs, four coil outputs.
R/C receivers produce a control pulse about 50 times a second with the width of the pulse specifying the servo position (typically 1ms to 2ms). The Stamp's PULSIN statement would be used to measure this. Essentially, you'd have a loop with a PULSIN that has to repeat more often than once every 20ms. You'd then have about 15ms to compare the position of the stepper (based on the number of steps or half-steps moved) with what's expected, then issue some number of steps (whatever would be possible in the time left), then repeat. Frankly, I don't think you'll be able to get a lot of steps done in the time available. You may be very disappointed in the speed.
You may be happier with a Propeller. There's existing code (objects) for reading R/C receiver output and for controlling steppers. The Propeller is much faster than a Stamp and can do several things at once (like read the R/C receiver output and control a stepper).
I have searched for more documentation on the controller board but can't find anything. I will look into the Propeller and see what I can learn.
You might consider using a continuous rotation servo to drive your leadscrew. No electronics mod necessary to do this, and you can get any size servo you need to provide sufficient torque. But in either case, (this or the stepper) you'll need to add some feedback to know where you are, either a rotary or linear encoder.
PS: PJ, I love your hand-drawn sketches. For real. Don't ever stop.