Go to Post Pushing match, what pushing match? If they can't catch you they can't push you around. - IndySam [more]
Home
Go Back   Chief Delphi > Technical > Programming > NI LabVIEW
CD-Media   CD-Spy  
portal register members calendar search Today's Posts Mark Forums Read FAQ rules

 
Reply
Thread Tools Rate Thread Display Modes
  #1   Spotlight this post!  
Unread 03-02-2011, 16:44
cilginbilgin cilginbilgin is offline
Registered User
FRC #2905
 
Join Date: Jan 2010
Location: Istanbul,Turkey
Posts: 188
cilginbilgin is a jewel in the roughcilginbilgin is a jewel in the roughcilginbilgin is a jewel in the roughcilginbilgin is a jewel in the rough
Potentiometer code

If I want CIM motor to be locked (I mean I dont want it to move even if someone tries to move it) what can I do in my code.

I dont think I can do something like that but my friends insist.

Last edited by cilginbilgin : 04-02-2011 at 14:48.
Reply With Quote
  #2   Spotlight this post!  
Unread 03-02-2011, 19:11
bladetech932's Avatar
bladetech932 bladetech932 is offline
Programmer of awesome
AKA: Jon
FRC #0932 (Circuit Chargers)
Team Role: College Student
 
Join Date: May 2009
Rookie Year: 2009
Location: Tulsa
Posts: 242
bladetech932 is on a distinguished road
Re: Potentiometer code

A motor not moving is a quality of the gears not the program. you cant do anything without burning up the motor
__________________
Expect the best, Prepare for the worst
Reply With Quote
  #3   Spotlight this post!  
Unread 04-02-2011, 11:07
JamesBrown JamesBrown is offline
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: Potentiometer code

Quote:
Originally Posted by bladetech932 View Post
A motor not moving is a quality of the gears not the program. you cant do anything without burning up the motor
This is just not true.


Quote:
Originally Posted by cilginbilgin View Post
If I dont want CIM motor to be locked (I mean I dont want it to move even if someone tries to move it) what can I do in my code.

I dont think I can do something like that but my friends insist.
There are a couple of solutions to this.

First to be sure I am understanding what you guys want to do: When the robot is stopped you want the robot to resist being pushed, correct?

The first and simplest step is to move the jumper on the speed controllers from coast to break. When you spin an electric motor it becomes a generator, this jumper configures the speed controller so that when you spin the motor (by pushing the robot) the motor leads are shorted and the motor resists being pushed. This will prevent the robot from rolling, however if you push it hard enough it will still move (if you can overcome the friction).

The other solutions are more complicated. You can uses the Accelerometer and Gyro to detect changes in position that occur when they shouldn't. If the robot is not receiving commands to move then have it monitor the gyro and accelerometers. If the Gyro or Accelerometers show that the robot is moving then have the bot try to oppose that motion by driving or turning towards the force (in the opposite direction of the motion).

This will get you some of the results you want, but I warn you, it wont be perfect, and in my experience it is more trouble than it is worth.


Edit: This combined with your other thread that I just repiled to makes me think that you are trying to do this with a motor on an arm, not with the drive motors. If this is the case your PID control (that you are working on in the other thread you created should handle this pretty well, if it is in one position it should stay there even if you try to move it.
__________________
I'm Back


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

Last edited by JamesBrown : 04-02-2011 at 11:13.
Reply With Quote
  #4   Spotlight this post!  
Unread 04-02-2011, 12:06
bladetech932's Avatar
bladetech932 bladetech932 is offline
Programmer of awesome
AKA: Jon
FRC #0932 (Circuit Chargers)
Team Role: College Student
 
Join Date: May 2009
Rookie Year: 2009
Location: Tulsa
Posts: 242
bladetech932 is on a distinguished road
Re: Potentiometer code

Quote:
This is just not true.
Actually he asked about code that would essentially turn the motor to brake mode, and you can't (short of adding an accelerometer) do it in the code.

but yes the jumper will work for stoping that motor from moving.
__________________
Expect the best, Prepare for the worst
Reply With Quote
  #5   Spotlight this post!  
Unread 04-02-2011, 13:05
cilginbilgin cilginbilgin is offline
Registered User
FRC #2905
 
Join Date: Jan 2010
Location: Istanbul,Turkey
Posts: 188
cilginbilgin is a jewel in the roughcilginbilgin is a jewel in the roughcilginbilgin is a jewel in the roughcilginbilgin is a jewel in the rough
Re: Potentiometer code

Quote:
Originally Posted by JamesBrown View Post
The first and simplest step is to move the jumper on the speed controllers from coast to break.

Edit: This combined with your other thread that I just repiled to makes me think that you are trying to do this with a motor on an arm, not with the drive motors. If this is the case your PID control (that you are working on in the other thread you created should handle this pretty well, if it is in one position it should stay there even if you try to move it.
I asked the electronical guy about that jumper thing but he seems he doesnt know about it. I assume I am not going to do this jumper thing in my code but in the electronical circuit of the robot.

If you can tell me how to move the jumper I would be very pleased.

Thanks for your help!
Reply With Quote
  #6   Spotlight this post!  
Unread 04-02-2011, 13:25
JamesBrown JamesBrown is offline
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: Potentiometer code

Quote:
Originally Posted by cilginbilgin View Post
I asked the electronical guy about that jumper thing but he seems he doesnt know about it. I assume I am not going to do this jumper thing in my code but in the electronical circuit of the robot.

If you can tell me how to move the jumper I would be very pleased.

Thanks for your help!
If you are using CAN you can actually turn on/off the braking in software with no hardware changes, ignoring the jumper position.


If you are using PWM to control the motors:

Looking at the Jaguar motor controller, to the right of where you plug in the PWM cable there are three pins with a jumper. if you put the jumber on the two pins to the right (these should be signal and low) the controller is in brake mode. I do not have a controller in front of me to see the specific labelling but if my directions are not clear enough go to the Jaguar site http://www.luminarymicro.com/jaguar and you can look at there instructions in the geting started file.
__________________
I'm Back


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

Last edited by JamesBrown : 04-02-2011 at 13:34.
Reply With Quote
  #7   Spotlight this post!  
Unread 04-02-2011, 13:33
JamesBrown JamesBrown is offline
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: Potentiometer code

Quote:
Originally Posted by bladetech932 View Post
Actually he asked about code that would essentially turn the motor to brake mode, and you can't (short of adding an accelerometer) do it in the code.

but yes the jumper will work for stoping that motor from moving.
What he is really looking for is closed loop control which is not only possible but is a huge part of control systems engineering. It is pretty common in control and automation to build a system so it resists positional changes due to the environment.

Also it is worth noting that you can infact break a motor using software. If you use CAN there is a function to switch between break and coast. If you use PWM then you can connect the signal wire from a digital out to the center pin on the Brake/Coast jumper and control braking that way.
__________________
I'm Back


5279 (2015-Present)
3594 (2011)
3280 (2010)
1665 (2009)
1350 (2008-2009)
1493 (2007-2008)
1568 (2005-2007)
Reply With Quote
  #8   Spotlight this post!  
Unread 04-02-2011, 13:34
cilginbilgin cilginbilgin is offline
Registered User
FRC #2905
 
Join Date: Jan 2010
Location: Istanbul,Turkey
Posts: 188
cilginbilgin is a jewel in the roughcilginbilgin is a jewel in the roughcilginbilgin is a jewel in the roughcilginbilgin is a jewel in the rough
Thumbs up Re: Potentiometer code

Thank you James! I got it!
Reply With Quote
Reply


Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -5. The time now is 21:13.

The Chief Delphi Forums are sponsored by Innovation First International, Inc.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi