My cab has been at VP9.9.0. I have just finished connecting my LVDT based plunger which puts out a 0-3.3V signal to the Freescale board and have been trying it out in 9.9.0. There is still a small amount of noise on the plunger. Checking this with the oscilloscope shows the LVDT puts out a steady signal until plugged into the Freescale input. Once plugged in (even after connecting the Freescale's I/O GND pin to GND, there is still a small amount of noise.
I'll try throwing a cap on between the 3.3V I/O pin and the GND I/O pin. I am only using the Freescale board to read the plunger and for the accelerometer's nudge. I am NOT using any LEDWiz function nor joystick button inputs.
I don't know much about LVDTs, so I'm only guessing, but given that you only get the noise when it's connected to the KL25Z, the noise is probably coming from the KL25Z. Could be the on-board clock signal or USB - there are lots of high-frequency signals running around on that board. Filtering with a cap seems like the right solution. You should probably try a small cap (100 nf or 1 uF, maybe) first and see if it makes any difference, and try something bigger if that doesn't make any difference or doesn't make a big enough difference. You have a scope so you should be able to see incremental effects. The tradeoff with a cap is that it should smooth out noise but also increase the charging time for the real signal, since the voltage level you're reading from the device will be tied to the voltage level on the cap. Another thing to experiment with is putting the cap physically close (in terms of wire run distance) to the KL25Z vs putting it on the sensor side of the wiring. The wires have non-zero resistance, which interacts with the capacitance to affect the charge/discharge time, so placement does make some difference.
Have you done any Web research on LVDTs and ADCs in general? The whole arrangement seems tricky to me at an EE level, although my EE knowledge is very basic. I'm wondering if the inductive element has some interaction with the capacitive element in the ADC, and there's some fine tuning you have to do to get the coupling right. I notice that there's such a thing as an LVDT signal conditioning chip (e.g., http://www.ti.com/li...946/spra946.pdf).
Your 9.9.1 problem is *probably* a direct result of the noise you're seeing. If you can fix that the 9.9.1 problem will probably vanish. I'm guessing that it's an interaction between the launch motion detection in 9.9.1 and the high-frequency jitter - the jitter is probably tricking the 9.9.1 plunger code into thinking you're pulling back and releasing rapidly.
If you can't get rid of the noise at the electrical level, it might be possible to characterize the noise and do some filtering in the firmware on the KL25Z. But that sort of solution always creates compromises, so definitely don't give up too easily on solving it on the hardware side.
Nudge gain setting: in 9.9, about 1000 seems about right for most people. In Physmod and VP 10, I think it's more like 10.
Edited by mjr, 29 May 2015 - 05:15 PM.




Top







are all trademarks of VPFORUMS.