Eng-Tips is the largest engineering community on the Internet

Intelligent Work Forums for Engineering Professionals

  • Congratulations waross on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Liquid Level Sensor

Status
Not open for further replies.

abernut

Computer
Oct 8, 2007
4
0
0
US
Hello everyone.
I am trying to figure out a way to monitor the level of liquid in a large fixed container and output that information (via serial, USB, Cat5, etc.) to a program on a windows machine to display the current levels.

I have been looking at different "off the shelves fuel lever sensors" that will probably work to measure the level of fluid, but I am unsure how to take that signal and convert it to something that is readable on a users PC.

Any suggestions would be greatly appreciated.
 
Replies continue below

Recommended for you

Tons of COTS units will take care of all of that for you... just search on data acquisition units. A few hundred clams should be enough to buy something simple, a few hundred more for a high-quality sensor (depending upon your material).

Dan - Owner
Footwell%20Animation%20Tiny.gif
 
I was looking for something very simple that will fit in the tank itself. Couldn't I built a simple circuit using some sort of processor or BASIC Stamp to interpret the signal from the fuel level sensor and output it through a serial cable.
 
Yes, but I assumed you wanted something that would work right away. If you have to ask "Can I...", I can only assume you don't yet have the necessary knowledge to make such a circuit. If your job requires it to work flawlessly and you don't feel comfortable putting something like that together, you may want to rethink purchasing a pre-built solution.

Dan - Owner
Footwell%20Animation%20Tiny.gif
 
You need to give some serious consideration to your level instrumentation for a "fuel" sensor. Instruments that are rated for presence in a fuel tank are industrial instruments rated for what is likely a hazardous area.

Are there other characteristics of the fuel, besides flammability, that need to be considered? Corrosive, erosive, nasty, sticky, gooey, a fume generator or foamy?

And you should be aware that the selection of level instrumentaion is governed in large part by available access to the tank. Access from the top? from the side? from the bottom? There are serious considerations to poking holes and welding fittings into tanks and vessels, particularly fuel tanks.

Another consideration is how close the tank is to where you want the data. Industrial level sensors typically use a 4-20mA analog signal that can travel a mile through copper wire, but RS-232 has what, a 50'-60' limitation?

There are converter modules that will convert anaalog 4-20mA to serial or any of several industrial protocols, like Modbus,which is a serial protocol that runs on RS-232, RS-485, and nowadays, I suppose Modbus TCP on ethernet. Google: "converters 4-20ma to serial" for numerous options.

Dan
 
The unit will not hold fuel. I was just thinking of using a pre-assembled fuel sensor that I can purchase for under $20. These units already have the floats, rheostats, etc. That would save me the time of constructing my own. The barrel is made of plastic and will mainly contain different non corrosive solutions. The sensor will be mounted inside the top of the barrel. The top 1.5 feet of the barrel is not used. I believe that the output of the fuel sensor is in amps. The distance from the meter to the workstation will vary, but typically be more than 100ft.
I have software engineers that can design the program I need, I just need to get the data to them.
 
Detecting level is easy. Communicating that into a PC is easy, IF, as macgyvers2000 said, you have the necessary skills. If not, you need to fork over $$ to buy something canned for you to do that. A level transducer with a serial output port is the ticket, but they are not cheap by any means. A level transducer with a 4-20ma output can be found inexpensively, but then you need an input device for your PC that can read it as a digitized signal, then some software to intepret that signal.
 
Hiya-

You can google bubbler "level sensor" type level sensors, and see if they will point you in the right direction. Downsides, they need a source of air (not usually a problem in industrial settings.) Wikipedia has a write up on it.

Continuing on the downside, the signal output is based upon the specific gravity of the fluid measured. Downside again, if you want to build your own, you will need to interface to a pressure transducer and you are back to where you started from. Doing the level conversion, a/d and the associated work can be done. There are lines of a/d pressure transducers that are inexpensive that do the conversion for you, then it's a "simple" matter to use the stamp to read the a/d, do whatever
conversions you deem necessary and send it to a pc via your serial interface.

On the upside, bubblers are pneumatically coupled to the tank so that you might find that they work quite well in "hazardous" conditions, inherently have the sensor divorced from the fluid in question and can have a "bypass cleaning" air circuit to clear the tube from deposits or solids caught in the tube while not in operation.

The pc can track the levels looking for alarm limits or store the information on the levels in some sort of a data base or flat file. Display can be via whatever. For this application, I would look at the free "RRD" at:


but that's me personally. RRD will allow one to display via
a web interface graphs assoicated with the level, rate of change of the level, limits or whatever is of interest as long as it's configured correctly.

Watch the filtering of the a/d of choice and of course building the sending unit in a robust enclosure. You can scale the levels (although in this application, a barrel is not too deep, to a variety of measured depths, by proper choice of pressure transducers). A small needle valve is usually sufficient for setting the air pressure which should be enough to "bubble" air through the bottom of the sensing tube with the liquid of choice at it's highest level.

I hope that this helps in your efforts in solving the problem at hand.

Cheers,

Rich S.
 
abernut - if you are talking about using an automotive/vehicle/boat fuel sensor (rheostat or thick-film resistive type) note that these work fine when used in hydrocarbon fluids (gas, diesel, etc) but are not designed to work with water-based solutions. The DC current and water will corrode the resistive element in a very short time (hours). Also, these type of sensors frequently require a few tens of milliamps to operate properly (to avoid dry-contact phenomena)-current normally supplied via the gauge. Additionally, since these sensors have a dragging contact, they have contact bounce - something you don't see in a car because of the dampening fluid inside the gauge.
 
I do not believe you can find any solution for less than US$ 20, with digital data interface. The price will be ten-fold than your expectation. But yoy'll get very reliable, industrial grade sensors for the higher price.

You can try the following ultrasonic-based level sensors. They are all expensive, starts from $250 or so. Their usual output is 4-20mA current loop. However, all of them offer digital data links (RS232, RS485) with very small added price. Check them. By the way, you can forget about USB.

Select model TS-15S-SR232 or TS-15S-485

Select model Sonix-40 and request for RS232 output

Their accutrac product line has default RS485 port.

I have not used their product, but ask them if they have serial output sensors.

Regards
YR
 
I measure liquid level at both the fresh water and waste water plant three different ways. Differential pressure, bubbler and ultra sonic. If there is a lot of movment in the storage tank, use a bubbler. If there is not, ultra sonic. If you have been in a coma for ten years, use differential pressure. If you can't get an analog or a digital value to a computer screen, hire somone who can. I have ultrasonic level indicators measuring sodium hypocloride. I havent't touched them in 8 years.
 
Almost in agreement with RajeevCell

You *MIGHT* be able to do it for about $20.00. But just barely. If you are not doing 100s of these, then you shouldn't.

Wandering through the Jameco catalog I ran across this sensor:

Pn 218827CC pro nu mpx 10gs $8.99 each Motorola 0 - 1.45 PS

Assume that you can find a wall wart type transformer surplus for about $3.00, and you will need a 3 terminal +5V regulator. Depending upon the op amp of choice you might do as I did and have +12V for the op amp for level overhead on the device.

Now you will also need some amplification, say a quad op amp with suitable filtration, about a dozen 1% resistors and about 3 to 5 caps (some of them zero term. stable). I've done a 3 amp design using the old LM357s and can get away with about $5.00 of parts. This is where the +12V came into play.

A PIC 12F675 will do for the A/D converter and converting to an RS232C type interface. A Maxim RS232 converter for another $3.00 or so. Oh, the PIC is about $3.00.

So, that's a grand total of about $24.00. IF you are willing to perf board the project I would assume 0.00 for the board.

Now, comes the hard part.

Design. When I did my design, I looked at hundreds of hours of design investment. Added to this, the development system for the PIC runs $150.00 for an ICD2 or knock off, and another $35.00 or so for the "header" board for the development system to interconnect in place of the PIC. You *COULD* debug without the ICD2, but expect to spend another 100 hrs or so for the additional time spent without it.

My purpose was to come up with a working design using the LM357 op amps and to have an off the shelf "insturmentation" amplifier.

I also hand fabbed my own circuit board.

I figure that I have about 200 hrs of effort into it. This is including the "bit bang" RS232 interface which was leveraged from another project.

So, for example, if you found an utrasonic interface for $250.00 (I couldn't find a price list on the above mentioned web pages) vs. the intention of building your own, that works out to:


$250.00(per unit)/200(hrs. development time) works out to $1.25/hr.

I sure hope that you make more than that!

My criteria is different. For me it's both an advocation (hobby) and a vocation. It was an interesting case study, and a valuable set of tools (some of which were built from other designs). It has NO CERTIFICATION, IS NOT UL NOR FCC approved, and although "safe" in design with the low voltage, isolated supply, would have all sorts of inspectors waving all sorts of red flags if not properly done.

This might be a fun little project to include in a hobby magazine and might show up in a future issue. *BUT* don't think that the proceeds would add materially to your finances. It doesn't!

So, although you might be able to do it for $20.00 or so, the time invested, would most likely preclude you from going this path.

If, OTOH, this is something that you desire to learn more about and wish to persue the DIY (do it yourself) route, these tips might help you along your path.

Cheers,

Rich S.
 
I've seen this done quick and dirty using a "home-made capacitance probe". It'll work as long as your liquid isn't a perfect insulator (which it probably isn't): Dangle two wires into the liquid, and use them for the capacitor, or as part of the capacitor on a 555 timer. Route the output to a digital counter. As the liquid level changes, so will the capacitance, and so will the frequency output of the 555. You could connect the timer to a parallel port on the PC (if it's old enough to have one), to read the count and reset the counter.

So, if you read the count and reset the counter every second, for example, you should be able to see the count go up and down with the liquid level. This solution is about as simple as it gets. You might be able to get your rate up to $2 or $3 per hour!

Jason
 
As has been said, there are two aspects: (1) sensor and (2) computer interface. I won't get into the sensor except to say, as has been said, that sensors are always trickier than they seem.

Regarding the computer interface I do want to mention the Velleman K8055 USB interface board which is very simple to use and very cheap. I have used it and works fine.

Code:
Specifications
5 digital inputs (0= ground, 1= open) (on board test buttons provided)
2 analogue inputs with attenuation and amplification option (internal test +5V provided)
8 digital open collector output switches (max. 50V/100mA) (on board LED indication)
2 analogue outputs: 
0 to 5V, output resistance 1K5
PWM 0 to 100% open collector outputs max 100mA / 40V (on board LED indication)
general conversion time: 20ms per command
power supply through USB: approx. 70mA
diagnostic software with DLL included
dimensions: 145 x 88 x 20mm (5.7" x 3." x 0.8")
 
Status
Not open for further replies.
Back
Top