Chief Delphi

Chief Delphi (http://www.chiefdelphi.com/forums/index.php)
-   Electrical (http://www.chiefdelphi.com/forums/forumdisplay.php?f=53)
-   -   Odd PWM problem (Can't get full green) (http://www.chiefdelphi.com/forums/showthread.php?t=107445)

AllenGregoryIV 23-07-2012 16:56

Odd PWM problem (Can't get full green)
 
We are having an odd problem that we have been troubleshooting for the past two days.

We can't seem to get any of our Jaguars to output a full forward voltage. They output full negative just fine when we program them to -1 but an output of 1 is about half a volt short of the battery voltage.

The jaguars aren't showing a full green LED. We have calibrated them and it's still not working.

Things we have checked
- Ran a basic program that only did PWM outputs directly
- Changed PWM ports on the Sidecar
- Changed PWM Cables
- Changed Digital Sidecar
- Changed Digital Module
- Calibrated Jaguars

We don't have any Victors to test with. I need to remember to keep one around for times like this.

We also tested with a VEX cortex but its full forward nor reverse signals were giving full battery voltage or getting the lights to stay on.

Any suggestions on what could be the problem? We are going to bring in an oscope tomorrow but we're trying to get the problem fixed today.

EricVanWyk 23-07-2012 17:17

Re: Odd PWM problem (Can't get full green)
 
I'd check that the DSC is powered, and that you are using a Jaguar reference.

A mispowered DSC can 'give up' when over drawn, though I have not seen that present in this manner.

Using a Victor reference instead of a Jaguar will send a shorter pulse width for 1.0, which would be interpretted as less than 1. However, it would affect the reverse direction similarly.

The factory calibration for Jaguars should be good enough, I usually don't bother to recalibrate. Maybe you calibrated against something odd?

BigJ 23-07-2012 17:18

Re: Odd PWM problem (Can't get full green)
 
Judging from the reach of things you've tried I'm assuming you've done these, but just in case you haven't: try switching batteries, and a quick cRIO reimage couldn't hurt. Are you noticing any weird behaviors on the dashboard (perhaps the Robot Code light flashing red for a split second sometimes? This happened to us once this season (after having the cRIO on for a few minutes) and would make the robot do strange things, but a reimage cleared it up.

AllenGregoryIV 23-07-2012 17:28

Re: Odd PWM problem (Can't get full green)
 
Quote:

Originally Posted by EricVanWyk (Post 1178891)
I'd check that the DSC is powered, and that you are using a Jaguar reference.

A mispowered DSC can 'give up' when over drawn, though I have not seen that present in this manner.

Using a Victor reference instead of a Jaguar will send a shorter pulse width for 1.0, which would be interpretted as less than 1. However, it would affect the reverse direction similarly.

The factory calibration for Jaguars should be good enough, I usually don't bother to recalibrate. Maybe you calibrated against something odd?

Thanks Eric,
We are getting normal voltage to the sidecar and to all three power rails on the sidecar.

We definitely have a Jaguar object in our program.

I know we don't normally need to recalibrate but we have done it a few times properly and it still won't give us full forward voltage.

Quote:

Originally Posted by BigJ (Post 1178892)
Judging from the reach of things you've tried I'm assuming you've done these, but just in case you haven't: try switching batteries, and a quick cRIO reimage couldn't hurt. Are you noticing any weird behaviors on the dashboard (perhaps the Robot Code light flashing red for a split second sometimes? This happened to us once this season (after having the cRIO on for a few minutes) and would make the robot do strange things, but a reimage cleared it up.

Thanks Josh,
We have used several batteries during our troubleshooting (going on 3-4 hours now).

Reimaging the cRIO is something we haven't tried, I have my team doing it now. Thanks for the advice.

AllenGregoryIV 23-07-2012 17:39

Re: Odd PWM problem (Can't get full green)
 
Just did the reimage and didn't solve anything. We're hooking up CAN right now and seeing if we can at least make the Jaguars give out full forward voltage in some way.

Al Skierkiewicz 23-07-2012 18:16

Re: Odd PWM problem (Can't get full green)
 
Allen,
In both controllers, the calibrate feature conforms the travel of the joysticks to the controller. The only reason that you would not receive a green following a calibrate is that the joystick is not returning to the same value at which it was calibrated. Are you using a calibrate routine in software or the full travel of the joystick when calibrating?
Now, there is always the possibility that the green LED driver is defective. Do you ever see the LED come on green? It should flash Green/RED when the calibrate mode is active. It should flash Green/Yellow when the calibrate has been successful. Remember that the Jags have a 15kHz output switching frequency and many meters will not measure accurately at that frequency. In addition, Jags generate a reverse pulse to charge the bootstrap cap when at full throttle, this will also generate some error.

Ether 23-07-2012 19:12

Re: Odd PWM problem (Can't get full green)
 
Quote:

Originally Posted by AllenGregoryIV (Post 1178899)
We're hooking up CAN right now and seeing if we can at least make the Jaguars give out full forward voltage in some way.

If you haven't ripped out the PWM cables yet, try putting a scope on them so you can see exactly what you are actually sending to the Jags.



AllenGregoryIV 23-07-2012 19:40

Re: Odd PWM problem (Can't get full green)
 
Quote:

Originally Posted by Al Skierkiewicz (Post 1178905)
Allen,
In both controllers, the calibrate feature conforms the travel of the joysticks to the controller. The only reason that you would not receive a green following a calibrate is that the joystick is not returning to the same value at which it was calibrated. Are you using a calibrate routine in software or the full travel of the joystick when calibrating?
Now, there is always the possibility that the green LED driver is defective. Do you ever see the LED come on green? It should flash Green/RED when the calibrate mode is active. It should flash Green/Yellow when the calibrate has been successful. Remember that the Jags have a 15kHz output switching frequency and many meters will not measure accurately at that frequency. In addition, Jags generate a reverse pulse to charge the bootstrap cap when at full throttle, this will also generate some error.

Al thanks for the insights,
I would have expected the calibration to work as well, but we retried it a couple times with the same result. We know the calibration joystick is outputting -1 through 1 to the jaguars because we are watching the print statements. Even if calibration worked, it still doesn't explain how we started getting bad PWM values outputting from our control system. They used to work and we hadn't recalibrated them before this.

The lights on all 9 jaguars are blinking green for forward but none of them will give a full forward voltage even after calibration (or go solid green to indicate they are getting full forward). We didn't calibrate to the VEX controller but we may try that.

We moved our drive train back to CAN (used it previously in the year but stopped for various reasons) and we can get full forward voltage with CAN.

This problem is really baffling. I'm thinking the PWM output isn't symmetric (I'm assuming, we'll check tomorrow with an oscope). This would mean the calibration routine doesn't correct only one side to have a smaller range.

If that is true, I’m still not sure of the source of the issue. The only thing we haven't changed is the cRIO itself. (We don't have a spare).

AllenGregoryIV 23-07-2012 19:54

Re: Odd PWM problem (Can't get full green)
 
Quote:

Originally Posted by Ether (Post 1178912)
If you haven't ripped out the PWM cables yet, try putting a scope on them so you can see exactly what you are actually sending to the Jags.



We're going to do this tomorrow, since it's still happening to our collector and shooter motors (though we are just using reverse on the shooter motors so they are fine).

Ether 23-07-2012 20:05

Re: Odd PWM problem (Can't get full green)
 
Quote:

Originally Posted by AllenGregoryIV (Post 1178920)
We're going to do this tomorrow

Put a small resistor (1 to 10 ohms) in series and scope the voltage drop across it. You want to see the current waveform.



Alan Anderson 24-07-2012 00:07

Re: Odd PWM problem (Can't get full green)
 
I saw this behavior on all four of the drive motor controllers on a robot at IRI. A borrowed Jaguar that was temporarily swapped in for one of them also did the same thing. Full reverse gave solid red on the LED, but full forward was still blinking green. The code was correctly calling out Jaguars for the RobotDrive object. The Jaguars were very likely using factory calibration. The robot was off the floor when I watched it, with no load to speak of on the wheels, but I thought I could see and hear a slight but distinct speed difference between full forward and full reverse (Jaguar forward was actually robot reverse on one side of the drivebase, of course).

When I noticed the odd Jaguar blinks, the team was in the process of trying to figure out a different mysterious problem, almost certainly a mechanical one. They didn't feel it was necessary at the time to try to track down what was going on with the speed control.

Gdeaver 24-07-2012 07:07

Re: Odd PWM problem (Can't get full green)
 
Only thing not on the swap list is the crio to side car cable.

Al Skierkiewicz 24-07-2012 07:10

Re: Odd PWM problem (Can't get full green)
 
Allen,
Since more than one Jag is showing the problem and since you perform a calibrate and get the confirmation that calibrate is complete, the only other thing that could cause this is a bad supply feeding the joysticks. Are you using wireless joysticks or a USB type? It is possible that during the calibrate procedure the joystick power is at full level but when driving more than one function, the voltage drops below the calibrated value.

AllenGregoryIV 24-07-2012 11:34

Re: Odd PWM problem (Can't get full green)
 
Alan, I'm sorry you're having the same problem but I'm glad we're not the only ones now. Your issue sounds identical.

Gdeaver, good catch. I left that off the list but we did change it with a known good cable.

Al, we are watching the PWM outputs on the print lines and getting identical results. We are using USB joysticks and we don't have the problem when we move to CAN. I find it hard to believe that it's the joysticks or the program. We calibrate it the same way we test it. Thanks for the ideas though.

This afternoon we'll have a scope and I can post more results. I'm also going to try to configure them as Victor objects in the code and calibrate to that. If more than one team is having this issues I wonder if it's a problem with the cRIO image itself or somewhere in the Jaguar definition in WPILIB.

Joe Ross 24-07-2012 12:29

Re: Odd PWM problem (Can't get full green)
 
Quote:

Originally Posted by AllenGregoryIV (Post 1178996)
This afternoon we'll have a scope and I can post more results. I'm also going to try to configure them as Victor objects in the code and calibrate to that. If more than one team is having this issues I wonder if it's a problem with the cRIO image itself or somewhere in the Jaguar definition in WPILIB.

You could try the PWM class with the setRaw method, sending values of 0 (full reverse) and 255 (full forward). The jaguar class limits the minimum value to 4 and the maximum value to 251. It may be that your jaguars are slightly out of tolerance and don't calibrate the difference away.


All times are GMT -5. The time now is 11:07.

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