SparkFun Forums 

Where electronics enthusiasts find answers.

Have questions about a SparkFun product or board? This is the place to be.
By kevinlongisland
#157274
The output will be connected to an arduino. I need to accurately measure force in the 10 to 100 pound range. I'm really new to this so I'm not sure if I need a buffer or not. What is the purpose of the buffer?

Thanks for your help.
By MichaelN
#157276
Mee_n_Mac wrote:The circuit you've linked to makes no sense to me. It's an inverting op-amp which means, with a 5v unipolar supply, the input voltage needs to be negative to work.
Note the -1V supply connected to the flex sensor - that's what allows this to work. If a negative supply voltage isn't available, there are other arrangements that could be used. For example, you could create a "virtual ground" on the op-amp [EDIT] POSITIVE input using a resistor divider. This would allow the negative side of the sensor to connect to ground instead of requiring a negative supply.
Last edited by MichaelN on Thu Mar 21, 2013 8:07 pm, edited 2 times in total.
By Mee_n_Mac
#157277
The buffer amp is often needed because the flex sensor, in combo with a fixed resistor to make a voltage divider, will have a high and variable output resistance. This will affect the voltage when connected to something with about the same input resistance. The buffer has a very high input resistance and so isn't affected and has a low output resistance so the device it's connected to can have pretty much any input resistance.

In your case if you're plugging this into an Arduino analog pin you can probably skip the buffer. It's not that the resistances above won't matter, it's that if you want any accurate measurement you'll have to calibrate. That calibration will account for any lack of buffering. You can use a simple voltage divider. 5V into one end of the flex sensor. The other end tied to the analog pin and a fixed resistor (perhaps 10-20 kohms). The other end of the resistor to ground. If you want to use a pot instead of a fixed resistor so you can "tune" the range of voltage you get vs the amount of flex ... that's good too.
By Mee_n_Mac
#157278
MichaelN wrote: For example, you could create a "virtual ground" on the op-amp negative input using a resistor divider. This would allow the negative side of the sensor to connect to ground instead of requiring a negative supply.
And my thought was that the Vt (in the Vt-1v) might be some "threshold voltage" and that Vt would be applied, as above, to the op-amp + input. But they show it connected to ground. If there was a bipolar supply available, then why not run the op-amp off of it ?
By MichaelN
#157279
Mee_n_Mac wrote:And my thought was that the Vt (in the Vt-1v) might be some "threshold voltage" and that Vt would be applied, as above, to the op-amp + input. But they show it connected to ground. If there was a bipolar supply available, then why not run the op-amp off of it ?
I agree it is odd, but the circuit as drawn would work.
By kevinlongisland
#157525
Thanks for the help guys. I went ahead and used +5-5 and ground and the op amp and force sensor now works so I appreciate your feedback. Its helped me get the circuit working so thanks again.
By kevinlongisland
#157743
Thanks for the links. Now I have a new issue. I got the op amp and force sensor working properly to give me a zero to five volt output. I used a power supply -5, ground, and +5.

Next, I hooked everything up, sent the op amp outputs to the arduino analog pins A0 and A2. I want to read data on my computer via serial.print. I made only ground common to the op amp and arduino. If I have just the serial cable plugged in the arduino powers up, and I can upload sketches to the arduino. But once I provide power from the power supply to the op amp section I don't get any more serial data from the serial monitor, and if I try to upload it says port com not found. I've had a similar problem before with a project that had seperate power for other segments of the circuit and then a connection between my computer and the arduino.

I think there is something going on between the power supply and the supply voltage from the computer over the programming cable.
By Mee_n_Mac
#157745
Can you post some diagram showing the wiring of the grounds ? Is the -5V supply output ground connected to the Arduino. Does the PS plugged into the 60Hz mains with a grounded plug ?