Need Help: 7 Segment Display with Log Input

Discussion in 'The Projects Forum' started by paw, Jan 11, 2012.

  1. paw

    Thread Starter New Member

    Jan 11, 2012
    18
    0
    Hi All,

    Thanks for the welcome to the Forum!

    I am having some difficulty with a problem which I am trying to solve:

    I have a sensor which outputs a voltage either between 0-5V or 0-12V on a logarithmic basis. I now want to display a value corresponding to the voltages on a 3 digit seven segment display which will show the percentage of gas the sensor picked up.

    I have seen that the LM3915 can interpret this logarithmic signal, but am not sure if it can actually drive 7 segment displays?

    I have also looked at the ICL7106 and TC7106A ICs but they do not seem to be able to deal with logarithmic input signals.


    Thanking you all in advance!

    Kind Regards,

    P.
     
  2. bwack

    Active Member

    Nov 15, 2011
    113
    10
    Hi. Can I ask what sensor it is and if you know a datasheet for it ?
     
  3. paw

    Thread Starter New Member

    Jan 11, 2012
    18
    0
    Hi,

    It's a Hanwei MQ-3 alcohol sensor. The data sheet can be found here: http://english.hwsensor.com/ewebeditor/uploadfile/en/MQ-3.pdf

    As you can see as per the output characteristics, the relationship between the sensing resistance and alcohol concentration is not linear, but is shown as a straight line on the log graph.

    I've been reading that a PIC with lookup table may be a solution but I was hoping for something more simpler.

    I have managed to obtain an approximate equation which relates the alcohol concentration with the output resistance so I guess I could use this as a very crude way to approximate the values assuming I can build some circuitry which will raise 10 to the power of some values.

    Thanks in advance,

    P.
     
  4. thatoneguy

    AAC Fanatic!

    Feb 19, 2009
    6,357
    722
    I'd use a PIC w/LCD, trying to take the output of a 3915 and making a 7 segment display from it would require a lot of logic ICs
     
  5. paw

    Thread Starter New Member

    Jan 11, 2012
    18
    0
    Any ideas without using a PIC?

    I had the idea of using a LM3915 then feeding it to a decoder but that wouldn't work out properly due to the fact that the characteristic graph is logarithmic on both the x and y axis...

    Thanks,
    P.
     
  6. thatoneguy

    AAC Fanatic!

    Feb 19, 2009
    6,357
    722
    You could use dot mode on the 3915, then have it drive transistors to light up the appropriate segments to make a single digit from 0-9.

    Unsure how to get more digits out, since you can't be more accurate than 0-9, or the number of outputs.

    I suppose you could cascade 10 of them for logarithmic output to give 2 digits (and a lot of logic ICs), but trying to measure more accurately than that would be insanely difficult.

    On the other hand, ADC on a PICAXE (VERY Easy to program with a serial cable, using BASIC for programming language) could give you accuracy to 3 digits, 1024 steps from 0V-5V vs. 10 steps with the 3915, then display on 3 digit LED (lots of wires and transistors/ICs for driving) or LCD (easiest).
     
  7. paw

    Thread Starter New Member

    Jan 11, 2012
    18
    0
    Ok so after a bit of playing around I have discovered that the relationship between the conductance and the concentration level is almost linear!

    Therefore, if I can somehow find the reciprocal of my voltage/resistance, then the logarithmic problems would be eliminated!

    What is usually the best practice to obtain the reciprocal?

    Thanks,
    P.
     
  8. paw

    Thread Starter New Member

    Jan 11, 2012
    18
    0
    Bump to the top
     
  9. thatoneguy

    AAC Fanatic!

    Feb 19, 2009
    6,357
    722
    I'm lost on how to do it, with 3 digit accuracy, without a microcontroller.

    PICAXE is available, cheap, and programmed in BASIC language. We have several members who could help you there if you know any programming at all.
     
Loading...