![]() |
Voltage vs. PercentVbus
Can someone confirm/explain the difference between driving Jaguars via kPercentVbus which is a plain -1 to +1 PWM duty cycle (ie: 0.5 means 50% ON in the forward direction), and kVoltage (ie: 5 means +5V).
I assume the latter means the Jag will output an average of +5V during its PWM cycle irrespective of battery voltage (assuming it is > some minimum above 5V) (what is that minimum delta? maybe 1V?). For the examples above that means, if the Battery is 12V, a kPercentVbus will provide an average V of 6V whereas in the second it will be 5V. This can then be an effective way (easier than PID) to provide a known power input to the motor irrespective of the varying state of the battery. So for example driving the shooter power via kVoltage would be quite predictable after calibration. May even be more predictable than fidling with a PID. Now onto some confusing documentaion: From: http://javadoc.waltonrobotics.org/ed...ControllerRate Quote:
Also: configMaxOutputVoltage Quote:
This implies the output votage from the Jag is analogue not just ON/OFF??? If so then getOutputVoltage() will NOT return the average V of a PWM cycle. |
Re: Voltage vs. PercentVbus
Quote:
The electronics in them do not permit analogue variation. |
Re: Voltage vs. PercentVbus
Like Ether said, the output is always a PWM. However you are correct about the differences between the modes.
Percent VBus drives the output at some percentage of the input voltage. This is the most straightforward of the the various modes. Voltage mode AKA Voltage Compensation mode will try and output a set voltage regardless of the battery voltage. It accomplishes this by varying the output PWM based on what the measured voltage on the input voltage is. For example, if you're telling the Jaguar to output 5 volts, and the battery is at 12V, the output duty cycle of the Jaguar will be ~42%. If the battery droops to 7 volts, the Jaguar will adjust the output duty cycle to ~71% to maintain an average of 5V. -David |
Re: Voltage vs. PercentVbus
Quote:
|
Re: Voltage vs. PercentVbus
Just to make sure we're all seeing things the same way:
When we say output 6 in kVoltage, there will be NO 6V measurable on the output at any point in time. I think we all agree that the output can only be in two possible states, a full ON or full OFF of the H-bridge (Full battery voltage (less MOSfet drop) or 0V). The output will look identical to a 0.5 in kPercentVbus with a battery voltage of 12V. There is no need to ADC the output, just the input Bus Voltage so that the Jag processor can compute the % duty cycle on the output. So it is awfully missleading to read the following method description: configMaxOutputVoltage Quote: public void configMaxOutputVoltage(double voltage)Configure the maximum voltage that the Jaguar will ever output. This can be used to limit the maximum output voltage in all modes so that motors which cannot withstand full bus voltage can be used safely. Parameters: voltage - The maximum voltage output by the Jaguar. -------------------------------------------------------------------------------- |
Re: Voltage vs. PercentVbus
Quote:
If it's connected to a stalled motor with a high inductance and you measure it using the DC setting of a meter which responds to average voltage, you will read 6V. |
Re: Voltage vs. PercentVbus
The PWM cycle is (I believe) 50KHz so a DC meter will read the average and indeed show 6V. But that is not reality. If you use a scope, in "normal" operation, you will see a 50KHz squarewave (ignoring inductance distortion for clarity) with a 50% on/off duty cycle, and the the squarewave will be between 0V and 12V. In a stalled case, depending on fuses, inductances, etc, for a CIM, you will likely see whatever the CIM windings R is over a 12V battery before the fuse blows or the Jag shuts down thermally.
|
Re: Voltage vs. PercentVbus
Quote:
Quote:
Quote:
|
Re: Voltage vs. PercentVbus
Quote:
|
Re: Voltage vs. PercentVbus
OK Ether, you are going to make me work here - last time I did this was 20+yrs ago. But it is all for a great cause!
So on the DC meters - yes there are many types out there, all will generally give some approximation of average voltage. As a rule though a DC meter is not the best tools for time variable signals. An oscilloscope is generally the best tool for analogue time variable signals. All electrical/electronics engineers will use them so they are a great investment to learn to use. They are the eyes into electric circuits. I agree the inductance is huge on a CIM and cannot be ignored. I will try and model it. I couldn't find any charts of stalled CIMs on here... But I will get the kids to play with that in the off-season it will be a great exercise! The main Q I was after is finding out exactly what the Jag APIs do - there are ample horror stories on CD from poor people spending time figuring out their problems and a lot of those can be overcome with proper documentation - which is lacking IMHO. We should be spending time on the robot/game and not on reverse engineering the APIs and tools we use. Specifically if anyone has the full specs on kVoltage, kPercentVbus, getOutputVoltage, configMaxOutputVoltage, and setVoltageRampRate, please post a link. |
Re: Voltage vs. PercentVbus
I am really mostly a mechanical guy so forgive me if this makes no sense.
The output of an unconnected jag would be a PWM square wave. Connect a motor to it, you are essentially throwing a big inductor with a little resistor in the loop? You would then have to look at it as system? Would resistance in the battery become an issue? Do have to admit the whole concept of DC & output of the jag is more of a metaphor that you are using to avoid confusing mechanical types that try to relate electricity to plumbing? After all the rate equations are the same. |
Re: Voltage vs. PercentVbus
Quote:
|
Re: Voltage vs. PercentVbus
Our robot was stripping the timing belt we wanted to use for the drivetrain and at midnight last night we decided to switch to chains... So excuse the lack of progress on the PWM vs analog Voltage. But I did do a quick model in SpiceIV and was surprised how little effect the inductor had (or how determined the battery was!). Today I threw a rig together and put a scope on it - and it too showed very little deviation from a true PWM, even after braking the CIM with my glove to a near stall.
I will do some pics etc and figure out how to post them (after we get the robot working!) The good news is: use kVoltage - you can see (on the scope) the Jag modifying the PWM ratio as you apply load on the motor. The bad news is that the documentation is quite missleading. Especially the decription of the configMaxOutputVoltage method. (see quote in this thread.) If you set kVoltage = 6V there is only Battery voltage or 0V to be seen anywhere - and the square wave is pretty square accross loads - see the pics and further detail I will post soon. Dean |
Re: Voltage vs. PercentVbus
BTW - the kids were excited to see the High duration of the PWM stretch as you apply load to the motor. It was a great oportunity to teach them something - most of them have never played with an oscilosope and see what really is happening in the wires. Just seing the excitement in their eyes makes it all worth while!
|
Re: Voltage vs. PercentVbus
To answer RuffleRidge's Q above:
There is nothing really wrong with the method names - it is the description that needs to reflect reality. Its all pretty simple - The Jag can only output ON or OFF - I even looked at their cirsuit diagram and you can see that the MOSFETS in the H-Bridge are driven by a separate chip and follwing that datasheet it can ONLY drive the H-Bridge with ON/OFF signals. |
| All times are GMT -5. The time now is 00:51. |
Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi