Go to Post the bang for the buck is unparalled. Where else can $6000 change an entire group of student's lives forever? - Cory [more]
Home
Go Back   Chief Delphi > Technical > Electrical > CAN
CD-Media   CD-Spy  
portal register members calendar search Today's Posts Mark Forums Read FAQ rules

 
Reply
Thread Tools Rating: Thread Rating: 7 votes, 5.00 average. Display Modes
  #1   Spotlight this post!  
Unread 23-01-2010, 15:51
biojae's Avatar
biojae biojae is offline
Likes Omni drives :)
AKA: Justin Stocking
FTC #5011 (BOT SQUAD) && FTC#72(Garage bots)&& FRC#0399 (Eagle Robotics)
Team Role: College Student
 
Join Date: Oct 2008
Rookie Year: 2008
Location: Lancaster
Posts: 276
biojae is a jewel in the roughbiojae is a jewel in the roughbiojae is a jewel in the rough
Position Control using potentiometer?

In BDC-COMM, I can set the control mode of the jaguar to position using a potentiometer.
The little text box that displays the position updates as I move the shaft, but when I try to move the shaft to a set-point, the shaft always turns away from it.
So, when I tried reversing the sign on the PID constants to make it go the other direction, it would turn past the point and never try to come back to the set point.

Also, I tried using the soft-limit feature on the Jag, but the jag happily goes past the limit without stopping.
__________________
FTC Team 72 - No site
FRC Team 399 - http://www.team399.org
2010 Rockwell Collins Innovation in Control Award - (Use of the CAN bus, among other reasons) Phoenix, Arizona!
Reply With Quote
  #2   Spotlight this post!  
Unread 25-01-2010, 00:19
biojae's Avatar
biojae biojae is offline
Likes Omni drives :)
AKA: Justin Stocking
FTC #5011 (BOT SQUAD) && FTC#72(Garage bots)&& FRC#0399 (Eagle Robotics)
Team Role: College Student
 
Join Date: Oct 2008
Rookie Year: 2008
Location: Lancaster
Posts: 276
biojae is a jewel in the roughbiojae is a jewel in the roughbiojae is a jewel in the rough
Re: Position Control using potentiometer?

I did some more research, and in the document named
MDL-BDC24-COMM-UM-00 on this page:
http://www.luminarymicro.com/products/mdl-bdc24.html

I found this quote:
Quote:

Position Mode Reference
Sets the reference used for measuring the current speed of the motor. Currently, the only
supported speed reference is an encoder.
Format:
# pos ref <val>
Where <val> is a 8-bit unsigned number
Is this merely a typo, or does that mean that the jaguars cant use a potentiometer for position control?

Has anyone gotten position control working with a potentiometer in either BDC-COMM, or C++/Java?
__________________
FTC Team 72 - No site
FRC Team 399 - http://www.team399.org
2010 Rockwell Collins Innovation in Control Award - (Use of the CAN bus, among other reasons) Phoenix, Arizona!
Reply With Quote
  #3   Spotlight this post!  
Unread 25-01-2010, 15:04
dyanoshak dyanoshak is offline
Registered User
AKA: David Yanoshak
FRC #2158 (ausTIN CANs)
Team Role: Mentor
 
Join Date: Dec 2007
Rookie Year: 2007
Location: Austin, TX
Posts: 191
dyanoshak has a reputation beyond reputedyanoshak has a reputation beyond reputedyanoshak has a reputation beyond reputedyanoshak has a reputation beyond reputedyanoshak has a reputation beyond reputedyanoshak has a reputation beyond reputedyanoshak has a reputation beyond reputedyanoshak has a reputation beyond reputedyanoshak has a reputation beyond reputedyanoshak has a reputation beyond reputedyanoshak has a reputation beyond repute
Re: Position Control using potentiometer?

Quote:
Originally Posted by biojae View Post
Is this merely a typo, or does that mean that the jaguars cant use a potentiometer for position control?
BDC-COMM, or C++/Java?
Yes, that looks like a typo. Position mode can operate with either an encoder or a potentiometer.

With regards to you position control problem, first try and download the latest version of BDC-COMM and the Jaguar firmware from http://www.luminarymicro.com/jaguar. The most recent version is 87.

Some things to look at and/or try:

How do you have your potentiometer wired to the Jaguar? The Jaguar's analog port is designed with an internal 1K resistor in series with the '+' connection so that when using an external 10K potentiometer, the voltage range is between 0V and 3.0V instead of 0V and 3.3V. Check out the wiring diagram on page 22 of the Getting Started Guide (linked to on the Jaguar site).

Are you setting the number of turns correctly in the Configuration tab?
The possible set positions range from 0 to <POT Turns>

Are you setting the desired position at a position that is actually obtainable? Move the potentiometer by hand and see what values are read by the Jaguar. You might be trying to hold a position that will never happen.

If none of that helps, upload some photos of your setup and/or some screen shots.

Hope this helps,
David
Reply With Quote
  #4   Spotlight this post!  
Unread 25-01-2010, 20:55
biojae's Avatar
biojae biojae is offline
Likes Omni drives :)
AKA: Justin Stocking
FTC #5011 (BOT SQUAD) && FTC#72(Garage bots)&& FRC#0399 (Eagle Robotics)
Team Role: College Student
 
Join Date: Oct 2008
Rookie Year: 2008
Location: Lancaster
Posts: 276
biojae is a jewel in the roughbiojae is a jewel in the roughbiojae is a jewel in the rough
Re: Position Control using potentiometer?

Quote:
Originally Posted by dyanoshak View Post
With regards to you position control problem, first try and download the latest version of BDC-COMM and the Jaguar firmware from http://www.luminarymicro.com/jaguar. The most recent version is 87.
It seems that the V87 update has bricked one of our jaguars, is there any info on how to upload a previous firmware, or a reset to factory software?

The jaguar does not blink any lights, and does not respond to either PWM, or CAN enumerate.
__________________
FTC Team 72 - No site
FRC Team 399 - http://www.team399.org
2010 Rockwell Collins Innovation in Control Award - (Use of the CAN bus, among other reasons) Phoenix, Arizona!
Reply With Quote
  #5   Spotlight this post!  
Unread 25-01-2010, 21:42
dyanoshak dyanoshak is offline
Registered User
AKA: David Yanoshak
FRC #2158 (ausTIN CANs)
Team Role: Mentor
 
Join Date: Dec 2007
Rookie Year: 2007
Location: Austin, TX
Posts: 191
dyanoshak has a reputation beyond reputedyanoshak has a reputation beyond reputedyanoshak has a reputation beyond reputedyanoshak has a reputation beyond reputedyanoshak has a reputation beyond reputedyanoshak has a reputation beyond reputedyanoshak has a reputation beyond reputedyanoshak has a reputation beyond reputedyanoshak has a reputation beyond reputedyanoshak has a reputation beyond reputedyanoshak has a reputation beyond repute
Re: Position Control using potentiometer?

Quote:
Originally Posted by biojae View Post
It seems that the V87 update has bricked one of our jaguars, is there any info on how to upload a previous firmware, or a reset to factory software?

The jaguar does not blink any lights, and does not respond to either PWM, or CAN enumerate.
This can happen if you loaded (Gray) Jaguar code on a Black Jaguar and vice versa.

Firmware for Black Jaguar is "BlackJaguar-87.bin" and the firmware for (Gray) Jaguar is "Jaguar-87.bin".

There is a way to recover by using BDC-COMM in the command line.

Open up a command line terminal and navigate to the folder where you have bdc-comm.exe. To make it easy you can put it in your 'c' drive. I also recommend putting the firmware files in the same folder as bdc-comm.exe so that you do not have to type in a file path.

In the command line run the following:

1)
C:>bdc-comm.exe -c N

- replace the 'N' with the COM port number you are using

2)
# id X

- replace 'X' with the ID you had previously set for that Jaguar (factory default is 1)

3)
# update BlackJaguar-87.bin

- if the firmware is in the same folder as bdc-comm.exe, this will work. Be sure to change the file name for Gray Jaguar firmware.

The update should happen, showing progress as a percentage. Hopefully if everything went OK your Jaguar should be blinking again.


-David
Reply With Quote
  #6   Spotlight this post!  
Unread 25-01-2010, 22:12
biojae's Avatar
biojae biojae is offline
Likes Omni drives :)
AKA: Justin Stocking
FTC #5011 (BOT SQUAD) && FTC#72(Garage bots)&& FRC#0399 (Eagle Robotics)
Team Role: College Student
 
Join Date: Oct 2008
Rookie Year: 2008
Location: Lancaster
Posts: 276
biojae is a jewel in the roughbiojae is a jewel in the roughbiojae is a jewel in the rough
Re: Position Control using potentiometer?

Quote:
Originally Posted by dyanoshak View Post
This can happen if you loaded (Gray) Jaguar code on a Black Jaguar and vice versa.

Firmware for Black Jaguar is "BlackJaguar-87.bin" and the firmware for (Gray) Jaguar is "Jaguar-87.bin".

There is a way to recover by using BDC-COMM in the command line.

Open up a command line terminal and navigate to the folder where you have bdc-comm.exe. To make it easy you can put it in your 'c' drive. I also recommend putting the firmware files in the same folder as bdc-comm.exe so that you do not have to type in a file path.

In the command line run the following:

1)
C:>bdc-comm.exe -c N

- replace the 'N' with the COM port number you are using

2)
# id X

- replace 'X' with the ID you had previously set for that Jaguar (factory default is 1)

3)
# update BlackJaguar-87.bin

- if the firmware is in the same folder as bdc-comm.exe, this will work. Be sure to change the file name for Gray Jaguar firmware.

The update should happen, showing progress as a percentage. Hopefully if everything went OK your Jaguar should be blinking again.


-David
The files seem to be miss named, the BlackJaguar-87.bin file worked on a grey Jaguar, but the Jaguar-87.bin file caused it to crash.
Thank you for the help, I will try the position control again tomorrow.
__________________
FTC Team 72 - No site
FRC Team 399 - http://www.team399.org
2010 Rockwell Collins Innovation in Control Award - (Use of the CAN bus, among other reasons) Phoenix, Arizona!
Reply With Quote
  #7   Spotlight this post!  
Unread 25-01-2010, 22:54
dyanoshak dyanoshak is offline
Registered User
AKA: David Yanoshak
FRC #2158 (ausTIN CANs)
Team Role: Mentor
 
Join Date: Dec 2007
Rookie Year: 2007
Location: Austin, TX
Posts: 191
dyanoshak has a reputation beyond reputedyanoshak has a reputation beyond reputedyanoshak has a reputation beyond reputedyanoshak has a reputation beyond reputedyanoshak has a reputation beyond reputedyanoshak has a reputation beyond reputedyanoshak has a reputation beyond reputedyanoshak has a reputation beyond reputedyanoshak has a reputation beyond reputedyanoshak has a reputation beyond reputedyanoshak has a reputation beyond repute
Re: Position Control using potentiometer?

Quote:
Originally Posted by biojae View Post
The files seem to be miss named, the BlackJaguar-87.bin file worked on a grey Jaguar, but the Jaguar-87.bin file caused it to crash.
Thank you for the help, I will try the position control again tomorrow.
Doh! I'll let you know when this is fixed!
Reply With Quote
  #8   Spotlight this post!  
Unread 26-01-2010, 10:53
dyanoshak dyanoshak is offline
Registered User
AKA: David Yanoshak
FRC #2158 (ausTIN CANs)
Team Role: Mentor
 
Join Date: Dec 2007
Rookie Year: 2007
Location: Austin, TX
Posts: 191
dyanoshak has a reputation beyond reputedyanoshak has a reputation beyond reputedyanoshak has a reputation beyond reputedyanoshak has a reputation beyond reputedyanoshak has a reputation beyond reputedyanoshak has a reputation beyond reputedyanoshak has a reputation beyond reputedyanoshak has a reputation beyond reputedyanoshak has a reputation beyond reputedyanoshak has a reputation beyond reputedyanoshak has a reputation beyond repute
Re: Position Control using potentiometer?

The files are correct now:

BlackJaguar-87.bin -> Black Jaguar MDL-BDC24 firmware
Jaguar-87.bin -> (Gray) Jaguar MDL_BDC firmware
Reply With Quote
  #9   Spotlight this post!  
Unread 26-01-2010, 23:56
biojae's Avatar
biojae biojae is offline
Likes Omni drives :)
AKA: Justin Stocking
FTC #5011 (BOT SQUAD) && FTC#72(Garage bots)&& FRC#0399 (Eagle Robotics)
Team Role: College Student
 
Join Date: Oct 2008
Rookie Year: 2008
Location: Lancaster
Posts: 276
biojae is a jewel in the roughbiojae is a jewel in the roughbiojae is a jewel in the rough
Re: Position Control using potentiometer?

Quote:
Originally Posted by dyanoshak View Post

Some things to look at and/or try:

How do you have your potentiometer wired to the Jaguar? The Jaguar's analog port is designed with an internal 1K resistor in series with the '+' connection so that when using an external 10K potentiometer, the voltage range is between 0V and 3.0V instead of 0V and 3.3V. Check out the wiring diagram on page 22 of the Getting Started Guide (linked to on the Jaguar site).

Are you setting the number of turns correctly in the Configuration tab?
The possible set positions range from 0 to <POT Turns>

Are you setting the desired position at a position that is actually obtainable? Move the potentiometer by hand and see what values are read by the Jaguar. You might be trying to hold a position that will never happen.
Ok, here is the current set up. I have a potentiometer hooked up to the output shaft of a toughbox.
It is a 1 turn potentiometer, but the output shaft only turns ~200 degrees before hitting hard physical stops.

When the shaft is at the reverse physical stop, the position reported is 0.
When the shaft is at the forward physical stop, the position reported is ~1.

when i try a setpoint of 0.5, directly in the middle of rotation, from the forward limit, the shaft turns further towards the forward limit until it activates the limit switch.

So, I try negating the pid constants, it turns way past the setpoint (0.5) until it hits the reverse limit.

What should the PID values approximately be to get the jag to slowly apply power to turn the shaft?
__________________
FTC Team 72 - No site
FRC Team 399 - http://www.team399.org
2010 Rockwell Collins Innovation in Control Award - (Use of the CAN bus, among other reasons) Phoenix, Arizona!
Reply With Quote
  #10   Spotlight this post!  
Unread 27-01-2010, 00:23
dyanoshak dyanoshak is offline
Registered User
AKA: David Yanoshak
FRC #2158 (ausTIN CANs)
Team Role: Mentor
 
Join Date: Dec 2007
Rookie Year: 2007
Location: Austin, TX
Posts: 191
dyanoshak has a reputation beyond reputedyanoshak has a reputation beyond reputedyanoshak has a reputation beyond reputedyanoshak has a reputation beyond reputedyanoshak has a reputation beyond reputedyanoshak has a reputation beyond reputedyanoshak has a reputation beyond reputedyanoshak has a reputation beyond reputedyanoshak has a reputation beyond reputedyanoshak has a reputation beyond reputedyanoshak has a reputation beyond repute
Re: Position Control using potentiometer?

What do you have your PID constants set to now?

I would just start with P to begin with. With my setup, a pot on a window motor , my P is at about 500. This moves the shaft pretty quick to the setpoint. I would try stepping up from 50, until you get a good feeling for how much P causes the motor to turn.

The PID constants will be unique to the system.
Reply With Quote
  #11   Spotlight this post!  
Unread 27-01-2010, 00:33
biojae's Avatar
biojae biojae is offline
Likes Omni drives :)
AKA: Justin Stocking
FTC #5011 (BOT SQUAD) && FTC#72(Garage bots)&& FRC#0399 (Eagle Robotics)
Team Role: College Student
 
Join Date: Oct 2008
Rookie Year: 2008
Location: Lancaster
Posts: 276
biojae is a jewel in the roughbiojae is a jewel in the roughbiojae is a jewel in the rough
Re: Position Control using potentiometer?

Quote:
Originally Posted by dyanoshak View Post
What do you have your PID constants set to now?

I would just start with P to begin with. With my setup, a pot on a window motor , my P is at about 500. This moves the shaft pretty quick to the setpoint. I would try stepping up from 50, until you get a good feeling for how much P causes the motor to turn.

The PID constants will be unique to the system.
My P was 158,
with an I of 0.001

I was unsure of how high the values could go, so I tried something pretty high in my opinion (So used to numbers from -1 to 1 ). When it wasn't quite working, the next thing i jumped to was I control.

What is the range for the PID constants? 10bits + sign (-1024 to 1023)?
__________________
FTC Team 72 - No site
FRC Team 399 - http://www.team399.org
2010 Rockwell Collins Innovation in Control Award - (Use of the CAN bus, among other reasons) Phoenix, Arizona!
Reply With Quote
  #12   Spotlight this post!  
Unread 27-01-2010, 10:02
dyanoshak dyanoshak is offline
Registered User
AKA: David Yanoshak
FRC #2158 (ausTIN CANs)
Team Role: Mentor
 
Join Date: Dec 2007
Rookie Year: 2007
Location: Austin, TX
Posts: 191
dyanoshak has a reputation beyond reputedyanoshak has a reputation beyond reputedyanoshak has a reputation beyond reputedyanoshak has a reputation beyond reputedyanoshak has a reputation beyond reputedyanoshak has a reputation beyond reputedyanoshak has a reputation beyond reputedyanoshak has a reputation beyond reputedyanoshak has a reputation beyond reputedyanoshak has a reputation beyond reputedyanoshak has a reputation beyond repute
Re: Position Control using potentiometer?

Quote:
Originally Posted by biojae View Post
What is the range for the PID constants? 10bits + sign (-1024 to 1023)?
P I and D constants are 16.16 signed fixed point numbers. So 16 bits of precision in the integer part, 16 bits of precision in the fractional part. Approximately -32K to 32K.

This info can be found the the BDC-COMM User Manual, found on www.luminarymicro.com/jaguar.

-David
Reply With Quote
  #13   Spotlight this post!  
Unread 03-02-2010, 15:44
erichahn525 erichahn525 is offline
Registered User
FRC #0619
 
Join Date: Jan 2010
Location: The universe
Posts: 6
erichahn525 is an unknown quantity at this point
Our black jaguar has stopped working as well... We think that we must have uploaded the wrong firmware to it, but whenever we try to fix the bricked Jaguar it never works. We get a progress bar and the "Firmware update" Takes about an hour, but never fixes the Jaguar. Does ANYBODY know how to fix this problem.
Reply With Quote
  #14   Spotlight this post!  
Unread 03-02-2010, 20:12
dyanoshak dyanoshak is offline
Registered User
AKA: David Yanoshak
FRC #2158 (ausTIN CANs)
Team Role: Mentor
 
Join Date: Dec 2007
Rookie Year: 2007
Location: Austin, TX
Posts: 191
dyanoshak has a reputation beyond reputedyanoshak has a reputation beyond reputedyanoshak has a reputation beyond reputedyanoshak has a reputation beyond reputedyanoshak has a reputation beyond reputedyanoshak has a reputation beyond reputedyanoshak has a reputation beyond reputedyanoshak has a reputation beyond reputedyanoshak has a reputation beyond reputedyanoshak has a reputation beyond reputedyanoshak has a reputation beyond repute
Re: Position Control using potentiometer?

Quote:
Originally Posted by erichahn525 View Post
Our black jaguar has stopped working as well... We think that we must have uploaded the wrong firmware to it, but whenever we try to fix the bricked Jaguar it never works. We get a progress bar and the "Firmware update" Takes about an hour, but never fixes the Jaguar. Does ANYBODY know how to fix this problem.
There is a new version of BDC-COMM that will help you out: See this thread for instructions.

-David
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

Similar Threads
Thread Thread Starter Forum Replies Last Post
Using the cRIO to control custom lights hal_2498 FRC Control System 14 10-04-2009 07:55
Using a pot to control speed SL8 NI LabVIEW 13 18-02-2009 17:02
Potentiometer arm control Hazmatt Programming 15 01-04-2008 21:27
Using a computer to control the pic mikesown Programming 6 13-09-2005 19:13
Using a switch to control a PWM Max Lobovsky Programming 11 25-02-2004 17:20


All times are GMT -5. The time now is 10:46.

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