Programming our Arm

As I said before, I’m still learning (even after being on the team for two, and this being my third). The first year, I was the guy doing the chasis, and things lie that, last year I was a little programming, but still mostly the worker. This year, I’m programming fully but stil learing quite alot. I may have said a few things wrong. all in all, I believe that it’ll all work out in the end. But, at the same time, I understand what your saying, and thank you for the help.:smiley: I’ll check it out and see if there really is something wrong. But i’m still confused on the programming thing alot…:confused: :frowning:

You’ll probably get better replies in the AutoCAD / Inventor forum. And its not nice to hijack threads.

What we did is move the break jumper on the PWM and made a curve. Also, we applied a small backwards voltage to keep our arm in place

We have it on a lazy suzan type metal plate, so we can turn it and pick up the tube any where around our robot. Also, we Have the arm made of three seperate piece’s, attaching them with motors, so the whole thing together is like a snake, and can have more mobility. we also tried to have an omni drive so the robot could go any direction from one spot without havingto turn, but we made a few flaws in the beginning that made it unable to do it that way. But the way the drive is set up now will still give us fair mobility.

for ours, we use a rope wrapped around a spool to raise and lower the arm. it’s great because one revolution of the motor moves the arm about 5 inches. with a low RPM, it controls amazingly

So your saying it’s like a crane? Hmm, that could be good and bad. Are you using suction or claw? With suction I wouldn’t think it’s as bad, but if you have a claw or other type of grabber, you have to be percise. But, if your bumped it may swing and be hard to use. With suction though, it could still touch it, and with enough suction it would just latch on. Well Atleast, that’s my opinion.

How do you "Tweak the “LP_PARAM_N” parameter (the numerator of the filter constant) between 1 and 999 as you need. " I am a rookie using easycpro, and your solution works great yet I would like to slow my motor dowm a little. Could you show an example of what the code looks like at both ends of the spectrum?
"between 1 and 999 ".

You guys have made some good points about controlling the arm. Now I am an electronics guy not a coder, but I can still do some programming if needed. Our programmer is lazy and never gets things done, so I was wondering if you guys had some ideas of how we could use an encoder (connected to a cim motor to control our arm) to give our arm a smooth and controllable movement. How can we control the speed of the motor based on encoder feedback.
We are planning to use the Y-axis of the joystick to control the direction of the arm.
We are using the Banebots encoders, and are ready to use the divider kits if necessary.

Some example code would be appreciated, because then I could understand the solution better.
Thanks in advance to all the helpers.

We have successfully used optical encoders with a PID loop for setting arm position. There’s some good code to get you going at Also for a qick fix you can use the following calculation to reduce the joystick to pwm output values:

// defined at top of header file for ease of use…
#define BOOM_PWM pwm04


  • this code fragment is contained in a function elsewere in your code…
  • it divides your input in half. We used this to limit our voltage to
  • the motors to 6 volts (1/2 of the 12V max)
    BOOM_PWM = 127 + ((p1_y - 127) / 2);

You could also try something like

pwm_ARMMOTOR = 127 + ((p1_y - 127)/2);

This will effectively limit the control to half speed, though you’ll have trouble if you need extra power. Maybe a turbo button for direct drive?