![]() |
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. |
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? |
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.
|
Re: Odd PWM problem (Can't get full green)
Quote:
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:
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. |
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.
|
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. |
Re: Odd PWM problem (Can't get full green)
Quote:
|
Re: Odd PWM problem (Can't get full green)
Quote:
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). |
Re: Odd PWM problem (Can't get full green)
Quote:
|
Re: Odd PWM problem (Can't get full green)
Quote:
|
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. |
Re: Odd PWM problem (Can't get full green)
Only thing not on the swap list is the crio to side car cable.
|
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. |
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. |
Re: Odd PWM problem (Can't get full green)
Quote:
|
Re: Odd PWM problem (Can't get full green)
Well it looks like it's a problem with the factory calibration and today we were able to calibrate it to give full forward voltage. I'm not sure why it worked today and the past two days it didn't but whatever.
Here are the oscope outputs Neutral Jaguar ![]() Full FWD Jaguar ![]() Full REV Jaguar ![]() |
Re: Odd PWM problem (Can't get full green)
Victor PWM outputs in case anyone is interested.
Neutral Victor ![]() Full FWD Victor ![]() Full REV Victor ![]() Thanks to everyone that helped diagnose this problem, still not sure why the factory calibration was ever messed up. |
Re: Odd PWM problem (Can't get full green)
Quote:
Can someone please confirm that this is correct operation? |
Re: Odd PWM problem (Can't get full green)
Quote:
|
Re: Odd PWM problem (Can't get full green)
Quote:
|
Re: Odd PWM problem (Can't get full green)
It should work with fine with longer pulse windows. The frequency is unimportant, so long as it is quick enough to not trip the watchdog, and slow enough to still be legible. The width is the important factor.
|
Re: Odd PWM problem (Can't get full green)
Quote:
I forgot to ask: what period does the cRIO use for the Vic PWM signal? |
Re: Odd PWM problem (Can't get full green)
Quote:
The comment says jaguar is actually 5.05ms, but I can't view the scope plots to confirm. |
Re: Odd PWM problem (Can't get full green)
Quote:
I've updated the app, if anyone's interested. Available here. BTW, an earlier version of this was used in June on an old Compaq DeskPro 2000 running FreeDOS 0.84 to run a Vic driving a CIM on a dynamometer. Oscilloscope traces of the waveform showed the pulse width generated by the app was accurate to within +/-0.001 milliseconds of the operator setting. |
| All times are GMT -5. The time now is 05:50. |
Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi