Arudino Nano: flexiforce & dc-dc charge pump for inverting amp = noisy analog

Hey folks,

I'm trying to measure pressure from a flexiforce sensor. I'm trying to replicate the suggested circuit from http://www.tekscan.com/sites/default/files/flexiforce-circuit.jpg.

Let me say, I'm no analog expert, so there may be something basic that I need to fix.

i need this to run this whole setup off the USB, and when plugged in to the port my multimeter shows 4.67V on the nano's 5V pin, which feeds the rest of the circuit. I'm running a TC962 to generate a -4.67V signal. I feed the -4.67V to the flexiforce (as Vt in the linked schematic) and am also using an MCP6004 amp as the schematic also suggests.

The op amp output is fed to an analog pin on my Nano, but here's the problem: my multimeter is showing the voltages I expect, rail to rail 0 to + 4.67V from the output of the op amp as I exert force on the pressure sensor. I get a good stable voltage reading from my multimeter.

However, the nano is reading a very noisy analog value, and when sampling analogRead at about 4 millisecond intervals, I get values that are average +/- 200 (i.e. if I'm reading a sensor voltage output from the amp of 2.3V, the analog int value should be about 510, but will jump around anywhere from 300 to 700, or worse).

the analog input rail on the arduino is not fried on the chip, I know this because i get good stable analog readings if I tie a resistor from the analog input pin to the positive or negative rails (or split VD/2 with resistors between both GND and VD and the analog input). The op amp isn't fried, because I can rail split the VD to a virtualGND=2.3V and inverting input Vt = GND and positive rail = +4.67V.

So, I suspect there's something with the dc dc charge pump output, or frequency of its operation that's causing noise in the analogRead function.

I have the TC962 wired with the bare minimum:
10uf cap pin 2 to pin 4
10uf cap pin 5 to GND
pin3 to GND
pin 8 to Vd

What's up with the noisy analog to digital conversion on the nano? Do I need a lowpass filter of sorts? I need to get good responsiveness at 4ms intervals, so I don't want a filter to incur a substantial time delay more than a millisecond at absolute most.

Any help would be much appreciated.

I think you will want to Low-Pass filter after the first stage. You may be picking up noise or actual vibrations. I don't think for as crude as that circuit is you need a special op amp, but life is easier if you purchase an op amp with rail-rail outputs and inputs. That way, you're using the max range of the A/D which is usually scaled to 5V. You will want to set that "V-1" pin to VCC/2 to get the best range but that's easily done with a voltage divider and follower op-amp. Use a quad op-amp. http://www.ti.com/lit/ds/symlink/lm6134.pdf

The next stage should be a Low-Pass non-inverting Filter set about 20Hz 3Db frequency. Download and use TI's "Filter Pro". It's free and an invaluable tool.

Rob-

Thanks for the feedback, Rob.

In the mean time before reading your reply, I implemented a low pass RC filter, that has a suitable tr constant. Appreciate your reply for learning some more theory though. The RC filter on my op amp's output seems to keep up a reasonable balance between smoothing and responsiveness.

Silly enough, I only thought of filtering the amplified output, not the negative voltage source. However, since the TC962 output has an impedance of 28 ohms, and the output pin is itself tied to ground by a 10uf cap, this should be inherently low pass filtered to 1E-5 Hz. So, I find it confusing that there's still noise coming from it... maybe there's not and there's ringing/ripple from another interaction in the circuit, not sure... I'd need an oscilliscope to check that and I don't have one.

I believe the op amp I'm using is a rail-rail input/output as you suggested, simliar to the lm6134. Again, I'm not all that familiar with analog electronics... when you say "V-1" pin, I'm not sure what you mean. Can I trouble you to link to a schematic or describe with a bit more detail what would be a suitable way to use a rail-rail op amp with a monopolar power supply, and a voltage divider to get full 5V range from the amped pressure sensor output?... I've tried a few configurations with the MCP6004 that I have, but couldn't get it working as I had expected. Despite its datasheet showing it as rail rail input/output, maybe there's some other specs about it that make it less suitable than the lm6134.

Thanks,
Brian

Hopefully you are using shielded cable between the flexiforce and the op amp. I suggested the LM6134 without looking at the MC6004. It appears it has rail-rail specs also.

With your 10uF cap on the output you have in fact created a lowpass but only ONE POLE. That combination can still let through ripple because it isn't a sharp enough cutoff. I think you need to be biased at VCC/2 because the flexing of the resistor will both ADD and SUBTRACT from nominal giving you a bidirectional signal. You have to handle it with a single supply, that's why you bias the flexiforce at Vcc/2.

The nicest way to make Vcc/2 is a voltage divider followed by a follower (unity gain) op amp. The minus input connects to the output, the + input to the center of the divider. Bypass the low-side resistor with a 10uF tantalum cap.

To test your "noise floor", connect a 100K resistor in place of the flexiforce and see if you get reasonable numbers with that. Your A/D should read 512 counts. If you have noise even with that configuration, you won't do better once you connect the flexiforce.

Lastly, if you need more filtering "poles", you can easily use FilterPro to make more stages out of the op-amp sections you have left.

brNeuro:
Silly enough, I only thought of filtering the amplified output, not the negative voltage source. However, since the TC962 output has an impedance of 28 ohms, and the output pin is itself tied to ground by a 10uf cap, this should be inherently low pass filtered to 1E-5 Hz. So, I find it confusing that there's still noise coming from it..

No, the filter cutoff frequency is 1 / (2 pi R C) or about 570Hz
The time constant Tc is R C, the frequency corresponding to that is 1 / (2 pi Tc)

Thanks, Mark. What this means is you really have the "3db" point set at 570Hz and I would think you want it lower. Also remember what "3db" means: The voltage will be 0.707 of initial for each octave. So if you have 1V of noise on your readings, the best you can do with the simple RC filter is to reduce it to 70% of that. So if you have a 400Hz carrier of 1V, that carrier will still pass through. Not very good. The good news is, you can "cascade" lowpass stages and get almost any cutoff characteristic you want.

The active filter implementations in the TI FilterPro Software are graphically displayed. I choose a 2-pole active filter and find it's usually adequate for 10-bit resolution. If I had a DUE, I would use a 4-pole since it is 12-bit. The more bits of resolution your A2D has, the "steeper" (and the more poles) your filter will need to be.

On the circuit diagram provided, the most sensitive connection for noise is the "-" of the MCP6004. Note that the sensor resistance connected to this is >5M OHM at no load. I strongly believe that adding a bypass capacitor here to GND will be very beneficial.

Try 0.1µF as a test ... if it works but response is too slow, you could replace lower value to suit your needs.

Note that a multimeter may show stable readings, but its actually averaging and has a slow response / dampens out fast signals. An oscilosope (with x10 probe) is one of the best ways to get a true picture and reading.

Have you considered simply connecting the force sensor directly to the Arduino analog input with the bias resistor to Vcc? No negative supply.

Have you considered simply connecting the force sensor directly to the Arduino analog input with the bias resistor to Vcc? No negative supply.

I don't think that is the best solution. Most any A/D wants a low impedance source driving it. It may give you an output, but as I recall, the OP was trying to get a less noisy output.

You certainly could let the 100K feedback resistor and a capacitor be a filter. A 0.1uF ceramic should get you in the ballpark and have a 16Hz cutoff (means the 3db down point). Place the capacitor directly across the 100K.

rmetzner49:

Have you considered simply connecting the force sensor directly to the Arduino analog input with the bias resistor to Vcc? No negative supply.

I don't think that is the best solution. Most any A/D wants a low impedance source driving it. It may give you an output, but as I recall, the OP was trying to get a less noisy output.

Actually, the analog input to the Arduino is quite high impedance, and predominantly capacitive (intrinsically filtering noise). It is most likely that the working value of the flexiforce sensor (as defined by Rf - critical information missing as usual from the OP) is of the order of 10k and therefore that direct connection will be perfect and completely remove the noise problem.

It is most likely that the working value of the flexiforce sensor (as defined by Rf - critical information missing as usual from the OP) is of the order of 10k and therefore that direct connection will be perfect and completely remove the noise problem.

Kindly refer to the JPG in the OP's original post, wherein it states the no-load resistance of the sensor is around 500K. Please also refer to the linked Flexiforce Manual which confirms this spec. The manufacturer's manual suggests a circuit exactly like the OP's, perhaps for a reason.

http://www.tekscan.com/pdf/FLX-FlexiForce-Sensors-Manual.pdf

The picture the OP provided came from the A201 model. For max VOUT the gain of the op-amp would be x5. That means whatever signal (including noise) at the op-amp's "-" would get amplified 5 times at maximum load. This is why I think a small capacitance here of say 0.1µF would be beneficial.

Connecting directly to the Arduino may work, but the ability to pre-scale to the OP's required load range (whatever that may be) and use the full analog range of the Arduino would be lost.

rmetzner49:
Kindly refer to the JPG in the OP’s original post, wherein it states the no-load resistance of the sensor is around 500K.

Which is clearly irrelevant, since that will be out of range for any working value of Vf. If you connect the sensor directly to the Arduino ADC, it is Vf which defines the maximum input impedance.

rmetzner49:
Please also refer to the linked Flexiforce Manual which confirms this spec. The manufacturer’s manual suggests a circuit exactly like the OP’s, perhaps for a reason.

Indeed it does. In fact, that is from where the OP took the diagram.

There are many ways to integrate the FlexiForce sensor into an application. One way is to incorporate it into a force-to-voltage circuit.

An example circuit is shown below.

The specific and only purpose of the circuit, is to “linearise” the (hyperbolic) relationship between resistance and pressure. It has little or nothing to do with buffering, though indeed it does act as such.

The question then is, how much does the OP value linear measurement? If it is critical, then by all means plug away at more complex circuitry. If on the other hand, it is a matter of thresholds and/ or categorisation, then the “linearising” circuit is entirely superfluous.

The picture the OP provided came from the A201 model. For max VOUT the gain of the op-amp would be x5.

You have that backwards. The gain of the circuit is Rf/Rin, where Rin =500K and Rf=100K. So it isn't a gain, it's an attenuator.

You have that backwards. The gain of the circuit is Rf/Rin, where Rin =500K and Rf=100K. So it isn't a gain, it's an attenuator.

True, when Rin = 500K. The manual shows that Rin goes below 100K at full load ... if it lowers to 20K, then the output will be -5V for a gain of 5.