My team and I have been discussing novel ways to measure the right amount to pull our shooter back. One of the things that was brought up as a neat possibility is a strain gage. We can get a strain gage that is temperature compensated for aluminum, and the wheatstone bridge we have can be powered by the 5 volts, however the return voltage from a strain gage is very small - in the millivolt range.
I’m concerned that: #1 The Crio won’t be able to accurately measure values that small repeatably #2 The strain gage will be affected by the jostling and slamming around that will result when we put it on our shooter.
Can someone chime in on the Crio resolution and accuracy? (Perhaps Eric?)
Aargh! I was so close to going to sleep after a long day of packing my life into my tiny car! Any insanity in this post is directly attributable to the ratio between my enormous pile of life and my tiny 2 door honda.
Before I get all grumpy with numbers, let me start by saying that that is a really cool idea. I hope to see it at competition.
The analog input module (9201) has 12 bits across -10 to +10V. This is just under 5mV per count ( (10 - -10)/2^12 ). With the right conditions, I’d wager that you could get another 2 (3??) bits of resolution with oversampling. I’d stick it at 4bit oversampling and assume the last bit is garbage. This would put you into the mV per count range.
Considering most strain gauge outputs, I’d give up here and slap a pre-amp on it.
If you were watching me closely, you noticed that I swept a huge pink elephant under the rug about halfway through the last paragraph - what does “with the right conditions” mean? Well, it means a two things:
No irregular noise like spikes or pops from your motors.
Enough small noise to let over-sampling work.
A good understanding of exactly how your sensor behaves.
I’ll let someone else chime in on one and three, but I’ll rant about two for a moment. Oversampling assumes an additive noise signal that pushes the perceived value around the threshold. I like to imagine it thusly: I have a ruler that is only capable of measuring something to the nearest inch, but I need it to the nearest quarter inch. If I measure it a bunch of times, I’ll still only get it to the nearest inch. However, I repeatedly randomly offset the ruler by some amount and average all the measurements. As long as my random offsets average out to zero their impact averages out to zero. BUT, they did allow me to get better resolution, because they “unstuck” my ruler.
PS: Joe Hershberger is way more of an expert on this than I am.
PPS: Don’t even try this with a 2009 Analog Breakout. The 2010 Analog Breakout is much cleaner, and stands a chance of getting you what you need.
PPPS: You should be sure to graph your measured value in known steady state while driving. That will tell you everything you need to know about feasibility.
The 9201 is ± ten volts and 12 bits, meaning that it is 20 volts range over 4096 intervals, or about 5 millivolts for each interval. Noise in the power supply or wiring will likely reduce this by a bit or two. The next thing to do is to measure a fixed signal to see how much noise is picked up.
If you know what your minimum needs are that may help, also if the noise you pick up is random, you can average to quieten it and gain some effective resolution back.
I did some cursory investigation of strain gauges a week ago for exactly this application. I decided overcoming the mechanical and electrical challenges weren’t worth the potential niftiness of making it work. However, I’ve come to almost expect that everything we considered and discarded as unworkable will be done by some team or another each year.
While I think this is a great idea, the 9201 is simply not designed for this kind of measurement directly. We make the 9237 for this application. Without a preamp / external signal conditioning, I don’t believe you’ll be satisfied with the results.
Are you using a winch to pull your shooter back? If so, may I suggest using the magnetic encoders supplied in this year’s kit - the non-contact characteristic makes it perfect for something that must unwind as quickly and with as little drag as possible.
Tom: I’ve spent a bit of time in the data acquisition/measurements world and recommend that you not go directly from the strain gauge bridge to the 9201. You probably could make it work on the bench, but I’m pretty sure the signal will be too noisy to be of use in the real world of competition. Main sources will be mechanical vibrations and motor noise, as well as impact spikes caused by contact with other robots, etc.
If I were to try this I would go with a preamp with some low-pass filtering. I’d probably try ~ 200Hz as a corner frequency to start with to remove some of the common vibrations and then see what the signal looks like.
Manoel: your approach sounds workable, but doesn’t provide accurate force feedback which is the key benefit of Tom’s concept.
Looks interesting. You can implement the same thing they did on the robot using the cRIO’s I/O. You still need the instrumentation amp. They used 2 digital outputs for the excitation voltage and 1 analog input for the measurement. You can use the outputs on the 9403 and the analog inputs on the 9201. Then use a similar algorithm in your robot code. You don’t need the nerdkits micro, though that should be possible as well.