IR tank level measurement

Discussion in 'The Projects Forum' started by vortexmc, Aug 29, 2010.

  1. vortexmc

    Thread Starter New Member

    Sep 24, 2008
    3
    0
    hey there, i am doing a design project the involves distance sensing and measurement in in tank with water mixed with a colour dye. I have established that measurement using time of flight would be quiet difficult as it is stated that i must use a PIC microcontroller for the detection. I have decided on using the intensity of light approach. The Tx and Rx circuit i have chosen is attached. My question is, using an IR receiver module in the diagram, how would i gain an analogue output so as to use an ADC?Any suggestions would be useful.

    If u guys have better suggestions as to a different approach, i would love any kind of input in this regard.
    Thank you.
     
  2. beenthere

    Retired Moderator

    Apr 20, 2004
    15,815
    282
    As long as you have a circuit, you can put it together and try it out. You do not say how the IR intensity will be affected by the liquid level, so that is hard to understand.
     
  3. Bernard

    AAC Fanatic!

    Aug 7, 2008
    4,170
    395
    The Tsop1838 is not going to work for an amplitude application as it has automatic gain control built in. Maybe a photo transistor & amplifier feeding a peak detector which can then go to a ADC. Transmitted signal would be a pulse train, 1ms+-, with rep rate 10 PPS +-. Try as simple of a set-up as possible to start with as proof of concept.
     
  4. jpanhalt

    AAC Fanatic!

    Jan 18, 2008
    5,677
    900
    This is the third of 4th project of this type on these forums in the past year. Have you considered the dimensions of your container and what it will take to get a reasonable amount of reflection from the surface? Where will the first reflection go? Where will your detector be? What about secondary reflections? What effect will ripples have? How does having a dye in the water help, if in fact it helps? You have a lot of simple geometry and physics to consider before getting into the electronic design.

    John
     
  5. marshallf3

    Well-Known Member

    Jul 26, 2010
    2,358
    201
    If it were only so simple I'd have a gas gauge on my motorcycle. In addition it's an irregular tank design so the best I could do would be to send an audio level pulse into it and try to determine how much empty space exists by the natural resonance it returned.
     
  6. someonesdad

    Senior Member

    Jul 7, 2009
    1,585
    141
    My first reaction was that you intend to measure the depth of water by how much the IR photons are attenuated by the water depth. This is how absorption meters work in the chemistry lab, so you can do some research on that topic to see if you can figure out if it's a good approach.

    It's a good idea to write down as many physical processes you can think of that could be used to turn the tank's water quantity into an electrical signal. There are many. This is typically called the "blue sky" part of development, as the idea is to come up with as many different ideas as possible, no matter how screwball they may sound. For example, you write things down like putting a neutron source at the bottom of the tank and measuring the neutron energy spectrum and flux, which will depend on how much water is there. Of course this is likely to be beyond your means, but you write it down -- because it may cause you or someone else to think of another hare-brained idea that could in fact have the germ to a clever, creative solution. I've always found this part of designing something one of the most fun parts of designing a solution, especially when I get to interact with colleagues that are as screwy as I am.

    So start throwing out all kinds of ideas. Think of things like capacitance (e.g., how could a capacitor be made that would change its capacitance value with the amount of water in the tank?), inductance, resistance, continuity, conductivity, radiation absorption, acoustics, optical, particle flow (e.g., like the neutron idea), mechanical (e.g., how long it takes a bubble to rise or an object to sink, float sensor, etc.), etc., etc. Also do web research to find out what existing methods are being used. Consult a book on measurement and transducers to learn of the broadly available categories. Omega Engineering puts out a number of different type of transducers, so consult their website. The list goes on and on...
     
  7. jpanhalt

    AAC Fanatic!

    Jan 18, 2008
    5,677
    900
    Integrate the fuel flow over time. All you need is a reasonably accurate flowmeter.

    John
     
  8. marshallf3

    Well-Known Member

    Jul 26, 2010
    2,358
    201
    Far too expensive and inaccurate on a 50 mpg bike.

    I'm going to toy around with the "dead airspace" theory this weekend which in itself may not be practical due to resonances inside an oddly shaped tank.
     
  9. someonesdad

    Senior Member

    Jul 7, 2009
    1,585
    141
    I also like the idea of integrating the flow, but I agree it's probably too hard to find a decent sensor at low cost.

    I sold my last bike 25 years ago, but I still remember the annoyance of not knowing exactly how much fuel you had left. I too wanted a simple gauge.

    The dead airspace idea doesn't resonate with me (no pun) -- I'm kinda pessimistic that you'll be able to get it to work.

    Another idea is to measure the pressure in the fuel line where it exits the tank. Cheap low pressure sensors are available. Of course, the tank fill level vs. pressure will be nonlinear, but that's not hard to deal with with a small microprocessor. To make it work though, you'd need to average out the variations (leaning the bike, vibrations, etc.), so this implies a low pass filter -- perhaps in the 0.1 to 0.01 Hz range. The only time it would be accurate would be after a certain amount of time of riding and while the bike was essentially vertical. It would be simple to calibrate and I like the fact that only a tee and pressure sensor need to be added to the fuel system.

    To not be accused of hijacking the OP's thread, this of course is also an idea for his solution... :p
     
  10. John P

    AAC Fanatic!

    Oct 14, 2008
    1,632
    224
    Now wait a minute here--as you say, add two crazy contributions together and you might get something that has a chance of working.

    What if there were a microcontroller generating a sweep of frequencies sent to a speaker? At some point, or most likely multiple points, the frequency would be right to create resonance in the tank. The resonance would affect the operation of the speaker, causing a peak (or a valley?) in a graph of power input versus frequency, and you could make a translation from that frequency to the actual fluid level. It would most likely have to be calibrated for some number of points using known amounts of liquid if the tank is irregular, but it seems workable to this ignorant person.

    Of course, people would ask why all those weird sounds are coming out of the tank. You don't have to tell them the truth.

    Pressure sensor, huh, might work. But it's less fun.

    How about Archimedes' method (sorta)? Dip a rod in the fluid and measure its apparent weight.

    And I believe capacitive level sensors do exist. There are two rods in insulating sleeves dipped in the liquid, and the capacitance between them varies according to the depth of immersion. Obviously you have to know the dielectric properties of the fluid.
     
  11. marshallf3

    Well-Known Member

    Jul 26, 2010
    2,358
    201
    Another idea is to measure the pressure in the fuel line where it exits the tank.

    Remember your physics, all you'd get it the height of the column. It would also take a rather sensitive sensor that could put up with gasoline and it would be far more sensitive to variations as the fuel moved around.

    I've got some spare tanks, always worth some experimentation if I ever get caught up on the 10 things I'm currently working on. :)

    For now most of us just go by the trip odometer or worst case when you have to switch over to reserve.
     
Loading...