From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.
We appreciate your patience as we improve our online experience.
From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.
We appreciate your patience as we improve our online experience.
08-22-2019 10:05 AM
Good afternoon,
I'm working on a personal project to make a Stewart Platform with a touch screen for tracking a ball position. Its also worth prefacing this with I'm a mechanical engineer at heart, with not much electrical background at all. I'm working hard to brush up my electronics skills (which frankly this project is also about!).
I've got the platform movement etc all sorted, and am now working on the touch screen IO. I'm using a 5 wire touch screen, and am reading back position, however, I'm getting a 'bouncing' issue when the ball moves across the screen (blue = x, red = y, results are un-calibrated, and are based on scale of max voltage to min voltage, which accounts for any voltage reductions as the servos hit my power supply current limit):
If I press on the ball, then any of the bouncing goes away, if I use a lighter ball, the problem gets worse (I don't have a heavier ball, or else that would be a super obvious solution!). The ball position will be used in the control loop to move the ball, so these abrupt changes will results in some big output errors from the controller.
Things I've tried so far (all failures / lessons):
I've done some googling about 5 wire touch screen signal bouncing, but don't get much success.
Ultimately, my goal is going to be something like this:
Note: I've attached the experimental data (logging freq = 1kHz), and can provide the FPGA code if useful, but here are some screenshots of the relevant bits:
#
So, anyone had any experience with this sort of problem, and how they went about solving it? I'm at a bit of a loss at this point!
Thanks,
Peter
08-22-2019 11:00 AM
A Lowpass filter should be able to get rid of most of that. I know you said you tried it, but it's worth looking at again. Your noise spikes have super high dx/dt values, like you said, but you don't have to manually monitor the derivative. Try using a Lowpass recursive filter and play with your cutoff frequency.
Since the noise is fairly one directional (it looks like spikes always go down from the correct signal, not up) you could use some logic to check for downward spikes only, not just upward ones.
Yet another way to do it would be to use an Alpha beta filter on the data. This type of filter basically takes the previously known position and speed of your ball, then predicts where it's going to be at the next timestep using the previously known speed. The next measured value is then combined with the previously predicted value. The ratio of how much you "trust" the new value versus the old is variable, so you can play around with that as well.
08-23-2019 02:16 AM
Hi Bert,
Thank you for your message, appreciate you taking the time to reply.
I've had a play with some different cutoff frequency values on the recorded data, but the problem is it starts to lose the true values:
I wonder if I should be differentiating the signal, filtering that and integrating again?
#
I'll have a read into the Alpha Beta filters, see what I can find. Thanks!
Cheers,
Peter