Quote:
Originally Posted by dcbrown
For the gyro, due to DA not working entirely in the analog domain, the digitization quanta can hide/diminish/interfere with measuring small amounts of rotation. To compenstate, many gyros have adjustable analog amplification that amplifies the analog voltage via an operational amplifier. Think of it a voltmeter autorange feature, but under program control. You need to do this at the analog level before A/D conversion.
|
There is currently no gain available on the analog frontend, but there shouldn't be anything that stops you from putting an op amp in line, perhaps controlled by some bus like I2C or SPI.
While there isn't analog gain, you can oversample the signal which has the same effect of increasing resolution of the measurement. The benefit of oversampling compared with analog gain, is that you don't have to sacrifice range for resolution. What it does require is an A/D and frontend that samples faster.
Quote:
Originally Posted by dcbrown
The drift compensation is different - it compensates for drift of the gyro h/w output.
|
How does this drift compensation work?
Quote:
Originally Posted by dcbrown
The tail rotor gyro referenced splices directly into the tail pwm signal and by adjusting the gain and setting the mode to heading lock, you can get the helicoptor to fly straight without having to constantly compenstate.
|
I'm guessing people would want more control over this for their robots than putting it inline with the PWM signal, but thanks for explaining how it's done for helicopters.
Quote:
Originally Posted by dcbrown
For the back-emf, this isn't typically implemented in the H-bridge. Usually its implemented at the source where the PWM signal is generated. When you idle the speed controller and don't output any drive voltage, the motors free spin and act as a generator. A measurement of the back-emf voltage is in direct correlation to the motor speed. Doing an analog pre-charge capture at this point in time allows you to measure the back-emf and thus speed of the motor. Often the motor voltage is higher than the A/D capture range and so a resistor divider is used. Due to digitization quanta, analog amplification is used to auto-range so you have better measurement of low speeds (voltages). You can do some of this programmatically, but you have to set the PWM to idle, wait some small but finite amount of time for the signal to propogate out, sample the back-emf voltage, and then restore the PWM value. The measured back-emf is often used in PID feedback loops for motor control. Its especially useful for smaller motors where quad encoders would be overkill. Also, its real easy to detect motor stall as the back-emf voltage drops to zero during stalls. This also means its relatively easy to quesstimate the amount of current being drawn by using both the value of pwm and the measured back-emf.
|
I see what you're getting at here. There are a few requirements that I'm not sure will be clean, but I'd bet it can be done to some extent.
First requirement is obviously that the speed controller be set to coast (which most drivetrains are) so you don't short the back emf.
I'm not sure about a clean mechanism for synchronizing the PWM and the analog measurement. Also, the back emf will be an AC signal (top 1/3 of a sine wave as the brushes commutate, so you'd need to measure some portion of that singal to find the maximum (or minimum depending on direction), not just take a single sample.
The other issue I see is with the isolation of the analog measurement. The NI-9201 analog input module is isolated, but only on a per module basis. The frontend is also single-ended only (no differential) so you would have to connect the reference of the module to one of the speed controller output terminals. This would preclude you from using that module for much of anything else.
It's a good idea, but I suspect it is too complicated given the current module selection. That being said, there's nothing stopping you from trying and it certainly could get easier in the future if the modules change (i.e.
NI-9205 which has programmable gain and differential measurements).
Thanks for the info,
-Joe