Non-linear voltage adder?

Discussion in 'The Projects Forum' started by relativity, Dec 12, 2006.

  1. relativity

    Thread Starter New Member

    Dec 12, 2006
    4
    0
    First of all, I'm new to this sort of thing but I have a project in mind that I'd like to try to create and I need help.

    I have a non-linear sensor with a 0-5v output that I'm trying to combine with a second, identical sensor's output to measure a combined total. The sensors may have significantly different values at times, so I can't average their voltages. I need to add them using a lookup table.

    For example, the sensor's output voltage is the square root of the measured quantity (lbf for example). So a measurement of 4 lbs yields a sensor output of 2 volts. 9 lbs = 3 volts, 16 lbs = 4 volts, etc.

    So if sensor A reads 2 volts (4 lbs), and sensor B reads 3 volts (9 lbs), the combined voltage output would be 3.6 volts (13 lbs).

    Logic:
    1. Compare sensor A's voltage to the lookup table (2v = 4)
    2. Compare sensor B's voltage to the lookup table (3v = 9)
    3. Add the table values (4 + 9) and, using the table, determine the combined voltage (13 = 3.6v)
    The actual circuit is not a convenient equation, so it would need to interpolate between adjacent values (linear interpolation is fine).

    How would you recommend creating such an adder? If you can at least point me in the right direction, I'm willing to do the legwork. I'm hoping you can at least save me from going down the wrong path(s) and wasting time. Thanks!

    Rel.
     
  2. kubeek

    AAC Fanatic!

    Sep 20, 2005
    4,587
    774
    what about using opamp logarithmical converter for each signal, amplify it by 2,
    then use exponential converter. This will make the signals powered by two.

    then you add them, and use the same method to make a square root if you want (use gain 0.5).

    hint: 2*log(x) = log(x^2)
     
  3. relativity

    Thread Starter New Member

    Dec 12, 2006
    4
    0
    Thanks for the reply! It turns out the actual table isn't a convenient X^2, I just used that as an example. However I found a way to simplify this. I can represent this whole operation as a single equation as follows:

    Vout = 0.8054*(VA^3.2 + VB^3.2)^0.3125

    For example, let's say Sensor A is 2 volts (VA) and Sensor B is 3 volts (VB). Using the equation above my combined Vout = 2.61 volts.

    This is an approximation of the actual table, but it's accurate to within 10%. How do I create a circuit which replicates the equation above?

    To clarify, there are two input voltages (VA and VB) and one combined output voltage (VOUT) with a ground reference of course.
     
  4. beenthere

    Retired Moderator

    Apr 20, 2004
    15,815
    282
    Hi,

    Look up a data sheet for a four-quadrant multiplier ic. As long as you're dealing with constants, then it should be possible to crank out a function. The four-quadrant device will act as a mixer for your two sensor signals, and may also be able to tailor the response of each to fit the function.
     
  5. kubeek

    AAC Fanatic!

    Sep 20, 2005
    4,587
    774
    And what about using A/D converter and a PIC to count the equation? It might be easier than creating this quite complex equation discretely.
     
  6. relativity

    Thread Starter New Member

    Dec 12, 2006
    4
    0
    If I'm following correctly, you're suggesting a selection of these arranged in order to reproduce the equation?

    Analog Multipliers/Dividers

    AD538 looks like it will perform the exponential and scalar calculations, but I'm not sure about the addition.

    I like easy, this sounds interesting?
     
  7. beenthere

    Retired Moderator

    Apr 20, 2004
    15,815
    282
    Hi,

    The addition can be done in an op amp inverter. The inputs each put current through resistors feeding the inverting input, which will add them together.
     
  8. kubeek

    AAC Fanatic!

    Sep 20, 2005
    4,587
    774
    Yes it sounds easy, but you probably have to find someone who can do it. I never programmed a microcontroler, I just know that this is possible.

    BTW how fast are the changes of the signals?
     
  9. relativity

    Thread Starter New Member

    Dec 12, 2006
    4
    0
    I'm trying to verify, but I think the sampling rate is about 200 Hz.
     
Loading...