View Single Post
  #3   Spotlight this post!  
Unread 08-02-2011, 08:35
JamesBrown JamesBrown is online now
Back after 4 years off
FRC #5279
Team Role: Engineer
 
Join Date: Nov 2004
Rookie Year: 2005
Location: Lynchburg VA
Posts: 1,280
JamesBrown has a reputation beyond reputeJamesBrown has a reputation beyond reputeJamesBrown has a reputation beyond reputeJamesBrown has a reputation beyond reputeJamesBrown has a reputation beyond reputeJamesBrown has a reputation beyond reputeJamesBrown has a reputation beyond reputeJamesBrown has a reputation beyond reputeJamesBrown has a reputation beyond reputeJamesBrown has a reputation beyond reputeJamesBrown has a reputation beyond repute
Re: Programming Motors for Arm

Quote:
Originally Posted by dmitch View Post
I am going to be using Jaguars to control the arm motors. And by encoders do you mean I need to attach the US digital encoders to the motor axles?

If so, how do I wire these?(I'll look at the sensor manual but I'm hopeless with technical diagrams)

You will need some kind of sensor to get position feedback. You could use the US digital encoders, but that may not be the easiest way. I recommend using a potentiometer for any joint that does not rotate more than 360 degrees. There are also absolute position magnetic encoders that you could use if you want the joint angle but the arm rotates more than 360 degrees. There is information for wiring all of these in their data sheets. For a pot you are going to connect one side to power, the other to ground, and the wiper to signal. If you can't figure out how to wire the sensors I recommend asking a mentor. It is better for him to teach you how to read a data sheet than it is for us to tell you how to wire a specific component.


Quote:
Originally Posted by dmitch View Post

Is there not a way to have a case structure that holds a set motor vi and I can set the motor to run EITHER at x speed for y seconds OR for x degrees??
It seems to me that this would be quite a bit easier.

I'm going to look over your code tonight and try to make sense of what everything does. I'll probably be able to post tomorrow to ask questions and clarify some stuff. Thank You!
Quote:
Originally Posted by dShad View Post
Yes you could use a timer to run the motor for X number of seconds. It's a quick and easy way of doing some preset height work.
You can do this but it will not work well. As battery voltage changes the distance travelled in that time will vary greatly. Also errors will compound, if you travel too far in one direction, then not far enough while returning then try to travel back in the original direction and go too far again you could be off by a significant amount. Repeat for an entire match and you could have the motors trying to overrun the physical capabilities of the joints.

In general you don't want to use timers. It is not difficult to add a potentiometer to a joint and the benefits of having closed loop control on your arm far outweigh the effort.
__________________
I'm Back


5279 (2015-Present)
3594 (2011)
3280 (2010)
1665 (2009)
1350 (2008-2009)
1493 (2007-2008)
1568 (2005-2007)
Reply With Quote