We have a system where the motor takes a long time to spin up. Is it legal to wire something to the analog in to check the voltage? If so, what’s the wire size?
I checked the rules… it seems like it implicitly disallowed it, but it also didn’t say you can’t …as it’s not really a load…
Well, the rules say a low impedance current measuring or high impedance voltage measuring modification in-between the wires driving the motor controller (or motor, I forget which, but I’d rather look at the non-PWM signal) are allowed. The analog module should count as a high-impedance device, right?
You might get some interesting results if the motor is being powered by a Jag or a Vic. They output PWM, not DC (unless of course the command is 100%).
Alright ill try it… but what’s the proper wire gauge? I don’t want the gauge to be too small and nnot be able to handle the current or too big to not be able to connect to analog out
Feeding the output of a motor controller back to the analog inputs will require lots of filtering (read as a big delay) and some careful wiring to pass inspection and not to let any smoke out. I would suspect that you may have a ramp rate enabled in software or the motor driver module. Run with no load to verify.
Would it be possible for you to use the serial-CAN interface with one jaguar and read the current draw from the CAN interface to achieve a similar effect?
As Ether said, you are likely going to run into problems with the fact that the output is PWM. This will present the additional problem that the cRIO is only rated for +/- 10V not the ~12V that you will be coming out of the speed controller.
Question: What would you do with the information? If the speed controller is putting out the max voltage then there isn’t anything you can do to speed it up.
Why not just bench test with a volt meter and see where you stand? The PWM can be a problem with low duty cycles but you should be ok at max speed output where the output is nearly DC. There are switching spikes still but you can low pass those to ground by putting some bypass capacitors across the meter.
Have you tried connecting a battery directly to the motor and seeing what the spin up time is? If it is too long, then you probably need to lower the inertia of your load, add more motors or change the gearing.
I would not connect the output of a Victor (or Jaguar) directly to the analog module. The motor controllers use a bridge circuit for switching the voltage in both directions. It has the effect of the motor seeing either +12V or -12V, but that’s not reference to ground (battery return). The analog module is a single-side measuring circuit, reference to ground. You would need a translation circuit in between to make the measurement work safely.
There is the possibility of a custom circuit that looks at the absolute value of the average voltage supplied to the motor. As mentioned above, the output of the speed controllers change reference (with respect to battery) with direction. However, if you want really accurate results, nothing satisfies this better that an encoder connected to the driven device or some form of tachometer. We find that opto-couplers work great for this application.
This is not entirely true, while the analog module range is limited to 10V, it is limited to 10V in both positive and negative directions. That is to say they’re good for +/- 10V. Now, you’d still need to divide the voltage down (this is how the system measures the battery voltage) to make it compatible. For a good example of how to do this, reference the analog breakout schematic here: http://www.usfirst.org/uploadedFiles/Analog%20Breakout%20Schematic%20v3.pdf
Page 2 of that PDF, upper right corner shows the voltage divider used to measure the battery voltage, which is a 680 ohm and 1k ohm resistor. These values allow about a +/- 16.8V maximum input. This is more than sufficient for your purposes.
As far as the PWM problem goes, the simplest solution is a low pass filter with a tight corner frequency, that is sufficiently above the bandwidth you’ll need for your control application, while being as far under the PWM frequency of the Jaguar as possible. This will result in an average voltage at your input proportional to the duty cycle of the PWM output by the Jaguar. Supposedly, the Analog Breakout has a 1600Hz single pole filter on each input, which should be quite sufficient (if memory serves, the Jags switch in several 100s of kHz region) but I can’t confirm that.
Either way, adding your own 1600Hz or so filter to the signal is easy with a few basic components and some perfboard, and will only assist any existing internal filter, giving you the information you are seeking.
That said, I couldn’t tell you a thing about it’s legality, and I wonder about its effectiveness compared to more traditional tachometry approaches. It is a fun and interesting design challenge though!
That schematic is for the old analog breakout with the switching power supply. The document is for the new analog breakout. I’m not sure where to find the schematic for the new analog breakout.
Aha, see kids, this is why you also link to a document and a page when you’re referencing it, so someone can tell you accurately and quickly why you’re wrong Thanks for the heads up Joe.
Still, the general point of my post remains, a divider such as the one shown in the (old) schematic should be valid for your application, as is the point about the low pass filter… and the fact that you should use an encoder instead