Is shutting down cogs OK when 8 is not enough?
lardom
Posts: 1,659
in Propeller 1
My project uses seven cogs. I am using one cog to control four servos. I want to use four DC motors instead of four servos to control a robotic arm. By attaching a pot to a motor I can control it like a servo but I can only control one motor per cog. The problem I have with multiple dc motors is controlling overshoot.
One solution would be to experiment with PASM. The second idea is to control two motors with two cogs at a time. I'm tying up both counters to control motor speed so I'd have to reinitialize the counters each time I switched motors. Is this advisable?
My goal is to scale this thing up so I can make it do useful work.
One solution would be to experiment with PASM. The second idea is to control two motors with two cogs at a time. I'm tying up both counters to control motor speed so I'd have to reinitialize the counters each time I switched motors. Is this advisable?
My goal is to scale this thing up so I can make it do useful work.
Comments
There are a variety of PASM PWM drivers for use with multiple motors.
I'm pretty sure I have a PWM driver which produces four signals from a single cog (I have one which also reads four quadrature encoders with the same cog).
If you describe your requirements in more detail, I bet we could help you find an appropriate driver.
This is what it looks like: When I tried testing two motors I could see that this approach didn't work.
If needed it could even be modified to decelerate as the motors approach the desired position.
I'm just about ready to tackle my first pasm project. The newest thing for me is "flags". I'll start off with small test code.
Based on the above statements, if budget will allow it, I would suggest closing the servo-loops with incremental encoders (like real robots). With only one cog available, you might want to consider motion control co-processors via RS485, such as:
http://www.jrkerr.com/icproducts.html