Radio control reviever pwm to step/dir
Meistro
Posts: 12
Hi everyone, I need some advice. I'm trying to use my bs2 to convert the pulsin pwm train from my RC reciever to step/dir signals my stepper board will understand. Also looking to ramp up, ramp down those steps too. Any help in pionting me in the right direction would be much appriciated.
thanks!!
thanks!!
Comments
The details of how to do this depend on what kind of step rate you would need to produce equivalent movement to a servo motor and you haven't described that. Do you need 50 steps per second to get full speed or 5000 or more? The higher the step rate needed, the more likely you'll need some kind of external circuitry to provide it with the Stamp controlling the rate.
Edit: Okay, the official parallax documentation uses the ULN2803 driver chip, and the chip that I was referencing before (see the N&V article "Stepping Out With Spin") is the L293D.
Post Edited (SRLM) : 11/26/2008 4:39:36 PM GMT
So basically, to provide more info on what I'm looking to do:
If I use 1/2 stepping, I will need 2000 steps per sec.
If I use 1/4 stepping, I will need 4000 steps per sec.
I have no clue what the BS2 is capable of producing. Or if it can process that fast.
So, I need to:
constantly read the PULSIN from the radio receiver
based on the varied input, produce steps, and a high or low pin output(DIR signal)
use constants to make adjustment variables easier
The steps output needs to vary along with the value of the input pwm. meaning for an example, if I have a rc car radio controller, and I apply throttle forward slowly, the step out pulses ramp up to speed gradually. Full throttle will mean 4000 steps per sec. Half throttle would be 2000. Same concept in reverse, with the exception of only requiring 3000 steps per sec.
Oh, and I'm trying to control 2 steppers with channel mixing from another receiver channel. One direction on the other channel slows down the step rate of one of the steppers.
Channel 1 travel in either direction (without input from channel 2)will run the steppers syncronized. Introduce channel 2 and depending on how far away from center, will reduce the amount of steps to either stepper depending on which direction off center chan. 2 is moved.
I'm sorry about my explaining, not to good at it. Actually as I stare at SRLM's avatar, its controlling a tank drive with steppers instead of the standard H-Bridge DC motors. lol
The BS2e Motherboard (www.parallax.com/tabid/528/Default.aspx) has a BS2e Stamp with two peripheral processors. The standard firmware for these processors doesn't have a convenient function for controlling a stepper motor, but it does handle PWM and that routine could be modified to produce a specified number of step pulses at a particular rate, then stop.
I was afraid you were gonna say something like that [noparse]:)[/noparse] I will probobly splurge for this... http://via-itx.com/via-artigo-builder-kit.html And use embeded Linux. That should more than handle what I need to do [noparse]:)[/noparse] I can still use my stamp to collect data so it won't go to waste.
Thanks for all your help
Probobly a better question would be, what type of platform would you concider if you were doing a project similar to mine? I have some PIC16F84A chips that I can use.
I am having a very hard time finding circuit or code info about driving stepper motors by control of a RC model receiver. I might just have to wipe that idea and go with dual DC motors and dual H-bridge pwm driven. I like the stepper idea since I already have lots of stepper hardware and some 305oz unipolar steppers that have unbelievable torque.
2) I'd use a Propeller. You've got several tasks here (timing R/C pulse widths, generating stepper control information, and interfacing the two) and the Propeller is naturally suited for multiple tasks in a straightforward manner. It can provide real-time debugging information via a TV video output that you can disconnect, but otherwise leave in place, running, with no significant overhead other than one cog (processor) and some I/O pins. You could even dispense with the stepper controller and substitute just the coil drivers if you want. There's already contributed code for controlling 3 steppers (for X,Y,Z for CNC), see: http://forums.parallax.com/showthread.php?p=609066
You could certainly use some PIC16F84A chips, but a Propeller would be easier.