Level Sensing

gdenehy

Member
Hi,
I want to detect the level of liquid in a tube.
It is only about 8mm diameter, and contains 95degree C liquid. It is about 5% ethanol in water.
I used simple soldered barfe wires, but found that they corrode very quickly. I then made the electrodes from silver solder, but found they formed a compound between them very quickly.
First question is can I reduce the current enough so that there is not so many electolytic actions and still measure the sensors? If not, I will do it another way. Would stainless steel probes solve the problem?

My other question is, if you CAN use the above method, what is the simple circuit for providing different ADC values for 2 different probes, plus the condition of having no liquid covering either of them?

I made a voltage divider and added another series resisitor to one of the sets of probes, but could not get very good differentiation in values. Can you give me an idea of the circuit and values that should be used?
 

InvaderZim

Senior Member
Are you trying to quantify the level of the fluid? Or just detect when the fluid reaches a certain level or two (like a float switch)?

What range of levels do you need to identify? And at what resolution?

Stainless should not have any problems at all in water/alcohol.
 

moxhamj

New Member
Have a look at pressure transducers. Only about $20, don't corrode and I've had some working now for 6 years with no problems.

Most metals corrode. Exceptions include pure gold or pure platinum.

Hmm, a hot liquid with about 5% ethanol in water. Is that a euphamism for warm beer?
 

westaust55

Moderator
Staiinless Steel probes

If you do consider the use of stainless steel, ensure that it is 316 as opposed to 304 or 306 in view of the warmer temperatures and inclusion of organic solvents.

Ethanol is an organic solvent which can activate enzymes at elevated temperatures. Organic solvents does result in pitting corosion of stainles steel. Even starches or salt water can cause corrosion of "lower" grades of stainless steel.

I have seen 10mm diameter SS bolts that were immersed in very holt transformer oil corroded completely through within a matter of 2 to 3 months.

Certainly consider the use of pressure transducers as sugegsted by Dr_A.
 

BeanieBots

Moderator
Or you could use an optical sensor. Can't remember the part numer any more but one I used a few years back had a hemi-spherical top. This gave high internal reflection. When immersed in water or alchohol, the optics changed and reduced the internal reflections thus 'tripping' the sensor. Basically it's a contact-less float switch required in the app for safety reasons.

If you want to continue with your continuity method, use AC very low current drive signal and stainless probes. The AC will almost eliminate electrolytic effects.
 

papaof2

Senior Member
If the tube is glass, you may be able to use a light source and a sensor (LDR or photo-transistor, depending on speed of detection needed).

This would give digital signals (on/off) at selected points in the liquid level, but there is nothing to corrode.

John
 

KMoffett

Senior Member
If you don't want to start from scratch...here is a kit for sensing water levels: http://www.vellemanusa.com/us/enu/product/view/?id=350507

It can use three probes (common, lower, and upper) to detect three levels: below-lower-probe, between-lower-and-upper-probe, and above-lower-and-upper probe. The drive signal is AC, so it prevents polarization of the electrodes. The three Output indicators are LEDs, so could be used to optocouple to PICAXE inputs.

Ken
 

kevrus

New Member
how about an IR photo-transistor and IR led on the outside of the tube and a solid object inside the tube acting as a float which would then break the IR beam..no contact between circuit and fluid then.
 

alband

Senior Member
How about a sound or light detector above and below, or a mirror at the bottom then have emitter and receiver at the top (longer distance = more accurate).
It depends on how long this tube is. It would take light 1.0006922855944561487267301434248e-9 seconds (answer on computer calculator if I got it right) to travel through 30cm or air and water would be slightly less.
This is x10-9 though so is about 0.000000001 seconds = 1 nanosecond. This wouldn't be measurable.

But it would take sound 8.8160098739310588027858591201622e-4 to travel through 30cm or air.
x10-4 this time so 0.00088000 seconds = 880 micro seconds to travel 30cm or air and would be faster in water = 200 micro seconds for again 30cm.

I think micro seconds would be do-able and after testing the results at known levels you could make a formula.

However, I take no responsibility for my calculations :eek: (well some, I did do them).
 

westaust55

Moderator
I think a few a forgetting that the tube in which the sensor must go is only 8mm in diameter (internal or external? :confused: )
so unless gdenehy is going to start completely anew the sensors must work with that constraint.

gdenehy,
- how long is the tube?
- is 8mm internal or external diameter?
- what is the range in liquid level varaition?
- can you start anew?
 

Jeremy Leach

Senior Member
Servo solution - motor, threaded rod controlling 'dipper', when dipper touches surface of liquid it makes a circuit through liquid (bit of an assumption that this is possible !! ). Picaxe controls motor and regularly does a 'dip' and sees how many rotations of rod (shaft encoder - optical solution) before dipper makes contact with fluid. Ok, might be a bit OTT ! Might be accurate though.

Another ...
Float on top of liquid. Vertical rod attached to float with notches in. Notches read optically. Could be nice and simple actually, although has to start from known position (as does dipper solution). If level variation is small then could amplify the variation using simple lever.


We need some feedback on all these suggestions I think ;)
 
Last edited:

InvaderZim

Senior Member
Sounds like we're working up a good brainstorm now!

We could weigh the container!
We could freeze the solution, and measure the amount of heat removed to determine the mass!
We could measure the neutrino absorbtion of the vessel!
We could interface with a cell phone connection to call a small child into the room to read the level off a graduated cylinder! (kids love phones!)

I think with the right equipment, a picaxe could do any of those : )

Sorry, it's late here and I'm a bit punchy :p
 

boriz

Senior Member
Ok. Here’s one….

A cheap LASER pointer directed straight down the tube from above, so that the beam does not hit the side of the tube. Where it hits the fluid, the fluid will ‘light up’. The level can be detected by phototransistor(s) placed outside the tube. Completely non-contact!

If there is an ambient light problem. Use two phototransistors, one above the other, and trigger when the bottom one reads significantly greater light than the other.

This might even work just with an LED.
 

westaust55

Moderator
If the tube is or can be non-magnetic, another option could be a magnetostrictive transducer. These are often used in industry for linear position measurement.

For this application a magnet inside a float inside the tube. Obviously the float material must be good for the environment (ie 95degC and ethanol present).
The actual magnetostrictive sensor is mounted along the outside of the tube.

As the level rises and falls so does the magnet. The sensor part changes resistance depending on where the magnet is relative to the length of the sensor.
 
Last edited:

gdenehy

Member
The tube is just a level meter on the side of a pot.
It is 8mm ID (approx)
I am measuring a range of approx 100mm

I am really only using it to measure the pressure in the pot, so I am just going to try a pressure transducer and see how long it lasts.
 

SD2100

New Member
It's changed from level to pressure, are they the same thing:confused:and after that frenzy of suggestions too:rolleyes:
Maybe the interrogation question sheet should have been filled in first..:D
 

westaust55

Moderator
It's changed from level to pressure, are they the same thing:confused:and after that frenzy of suggestions too:rolleyes:
Maybe the interrogation question sheet should have been filled in first..:D
The pressure at the bottom of a container (or tube) containing liquid will be proportional to the level on the container.

This method is often used in industry to measure the level of liquids in a vessel/tank.
 

SD2100

New Member
This method is often used in industry to measure the level of liquids in a vessel/tank.
Yeh, should get a bubbler then or ultrasonic from the top of the tank, if it's a small tank then sit it on some load cells.

The tube is just a level meter on the side of a pot.
it's a pot, load cell it !!!, hack some old bathroom scales:)
 
Last edited:

gdenehy

Member
Actually, it IS a moonshine still of sorts. I build them professionally and this is my test rig I am automating.

Surely sensing the change in level of a small tube connected to the bottom of the pot is directly equivalent to measuring the change in pressure in the pot?

I thought it might be easier than connecting a pressure sensor due to the corrosive hot liquid.
I was going to connect a pressure sensor ABOVE the level of the liquid on my liquid level tube, so the sensor is only connected to air (mostly), but I thought any small leaks will over time make it become innacurate. Is there an easy way to connect the pressure sensor to the bottom of the pot, yet still have it isolated from the liquid?

And yes, thanks to everyone for all the great ideas, and apologies for not saying so in my last post. There have certainly been some imaginative ones!

Excuse my ignorance, but if I connected one side of my sensor probes (bare wires) to a picaxe pin cycling between 0 and 5v every second, and the other side to the ADC pin, would this class as AC current, or does the polarity actually need to reverse. I never did quite get the hang of what AC is properly...
 

gdenehy

Member
Also, for my reference (and anyone reading this),
What values of resistor do I use to use with a continuity probe if I want 3 sets of probes and my picaxe is running at 5v?
Do I set it up as a voltage divider like I tried?

I had a 1k connected to +ve and the picaxe ADCpin, and then one set of probes from the ADC pin to -ve
The other set of probes (I only used two in my trial), I put a 100k resistor in series with one of the leads and connected to the same ADC pin and the other lead to -ve.
There was not enough difference tho to accurately read the change between no liquid, liquid covering the first set of probes, and liquid covering both sets of probes.
 
Last edited:

Jeremy Leach

Senior Member
If you are wanting just a rough level meter, with a range of 10cm, I personally think the float/stick/optical solution could perhaps be best: Have two slotted or reflective type sensors, read by two picaxe(08M) digital inputs. Have gray-coded markings on strip, perhaps just one block of 4 ...

00
01
11
10

Simple code to translate inputs to level. Could extend resolution if required by using more markings, but then would have to start from known level at powerup. No worries about probes.
 

inglewoodpete

Senior Member
I can't see any reference to resolution in previous postings. My suggestion is similar to WA55's: isolation.

Would a floating magnet (sealed in plastic or similar) within a tube and a number of relay reeds on the outside connected to a resistor tree and an ADC input.

Alternatively a floating ferrite, excited by an external oscillator/coil. ....starts to get a bit complicated, though.
 

Jeremy Leach

Senior Member
So in summary, 14 suggestions should give you some options (plus a couple I just didn't get ;)) ..
probes
pressure transducer
contact-less, optical float switch
break-beam light source and a sensor on side of tube
Sound reflections
Servo controlled dipper
float/rod/optical reader
weight
laser
magnetostrictive transducer
resonance of open tube
ferrite and reed
ferrite and coil
freezing !

:)
 
Last edited:

SD2100

New Member
How does a load cell help to measure the pressure in the vessel???
It dosn't it will measure the water level.

You can fit a pressure transducer to the bottom of the container, if the liquid
is likey to attack the transducer you can fit an isolating diaphragm between the container and the transducer.
 

KMoffett

Senior Member
Also, for my reference (and anyone reading this),
What values of resistor do I use to use with a continuity probe if I want 3 sets of probes and my picaxe is running at 5v?
Do I set it up as a voltage divider like I tried?

I had a 1k connected to +ve and the picaxe ADCpin, and then one set of probes from the ADC pin to -ve
The other set of probes (I only used two in my trial), I put a 100k resistor in series with one of the leads and connected to the same ADC pin and the other lead to -ve.
There was not enough difference tho to accurately read the change between no liquid, liquid covering the first set of probes, and liquid covering both sets of probes.
Take a look at the schematic on the Velleman water level detector circuit I posted earlier: http://www.vellemanusa.com/downloads/0/illustrated/illustrated_assembly_manual_k2639_rev1.pdf
As a possibility: Use a PICAXE 50% PWM output to drive an AC coupling capacitor to the common electrode, capacitor couple the output signals from the two level detector electrodes into two voltage-doubler rectifiers as shown, and use the rectified/filtered outputs as inputs to two PICAXE ADC inputs. Just a possibility...I haven't tried it. :)

Ken
 

boriz

Senior Member
A red LED placed anywhere around the bottom of the tube should cause the fluid to glow red. Easy to detect with phototransistors where the fluid ends and the air begins. All outside the tube.
 

gdenehy

Member
Take a look at the schematic on the Velleman water level detector circuit I posted earlier: http://www.vellemanusa.com/downloads/0/illustrated/illustrated_assembly_manual_k2639_rev1.pdf
As a possibility: Use a PICAXE 50% PWM output to drive an AC coupling capacitor to the common electrode, capacitor couple the output signals from the two level detector electrodes into two voltage-doubler rectifiers as shown, and use the rectified/filtered outputs as inputs to two PICAXE ADC inputs. Just a possibility...I haven't tried it. :)

Ken
Thats an awfully complicated circuit to connect to a picaxe! Cant you just do it using the ADC pin and a few resistors to give different values?
I have looked at the R-2R ladders, but cant work out what to do when the probes have quite a high resistance themselves
 
Last edited:

westaust55

Moderator
Actually, it IS a moonshine still of sorts. I build them professionally and this is my test rig I am automating.

Surely sensing the change in level of a small tube connected to the bottom of the pot is directly equivalent to measuring the change in pressure in the pot?

.
Please read post 20 again
 

KMoffett

Senior Member
Thats an awfully complicated circuit to connect to a picaxe! Cant you just do it using the ADC pin and a few resistors to give different values?
I have looked at the R-2R ladders, but cant work out what to do when the probes have quite a high resistance themselves
This is the concept I was thinking about in adapting the Velleman sensor circuit to a Picaxe. What I don't know is...will the outputs of the voltage-doublers be high enough to be detected reliably by the ADC inputs...or will they be high enough to be detected by logic inputs? I'm not setup to try it, so this is just stuff in my head for now.

Ken
 

Attachments

Last edited:

KMoffett

Senior Member
I bench tested the Velleman detector circuit.
AC source was a 5V TTL function generator @ 10KHz.
Liquid was tap water.
DC out of the voltage-doubler circuit:
with no contact = 0.0V
with contact = 1.2V
I think this would work with a PICAXE ADC.

Ken
 
Last edited:

gdenehy

Member
What are the values of the diodes in the voltage doublers? They are zeners right?
By pulsing the output, is that what you call AC?
 

westaust55

Moderator
Voltage doublers use "normal" diodes not zeners - at least in circuits I have previously built.

Something like 1N4002 should do.
 

KMoffett

Senior Member
The 50% duty cycle 5v TTL output , like PWM output from a PICAXE, through a coupling capacitor is AC.

The diodes I used (and in the schematic) are low Vf Schottky diodes, not Zener or "normal" silicon diodes. I was using 1N5817's because I had them, but BAT-85's would work.

Ken
 
Last edited:
Top