Level Sensing

Peter M

Senior Member
If you are going to use a pressue transducer you can partially fill the conecting tube with silicon oil to block any vapours, ie ethanol from getting to your sensor, as they usually have a silicon grease or oil inside them to help protct the sensing element
 

KMoffett

Senior Member
Last question (maybe). Whats a coupling capactitor do?
The output coupling capacitor "converts" the 0-to-5v pulsating DC to AC. This makes the electrodes alternately positive and negative, so they don't polarize (collect deposits or erode). The input coupling capacitor transfers the AC signal from the electrode to the voltage-doubler circuit, and isolates the electrode from the DC created there.

Ken
 

gdenehy

Member
How does it make it go negative? Surely on = 5v, and off = 0v?
So the cap basically smooths it is this correct?
Wouldnt a digital output being switched rapidly still be called AC, just a square wave?

Please feel free to point me to links to understand this if it is easier.
 

BeanieBots

Moderator
No matter how hard you try, an "AC" (alternating current) signal will always have a small amount of DC (direct current) in it. By putting a capacitor in series, the DC component is not allowed to pass.

How does it make it go negative? Surely on = 5v, and off = 0v?
.
ALL voltages are measured with respect to some reference. "Normally", the reference is defined by you (even if you don't know you're doing it) as the 0v of the power supply. If the probes are "DC isolated" by a capacitor, they can be at any voltage with respect to your 0v power supply.

Think of two batteries. They both have a 0v. Connect them in series and you have twice the voltage but only with respect to one 0v. It is +V and -V with respect to the other 0v. More importantly, there is voltage between the two 0v pins. 0v is only what YOU define it to be.
 
Last edited:

Michael V

Senior Member
Level sensing

Hi guys,
In my game - Hydrocarbon Applications, level sensing is pretty important.

Depending on how stable the density of your fluid is, pressure is an easy way to do it - however, if you have pressure in your head space it will blow the level measurement out. Sounds like if the fluid is at 95C then it will be under pressure. Pressure still works, but you need a differential pressure sensor, or measure both pressures.

Then, if your fluid becomes more dense due to less alcohol, then your level sensor will tell you that you have more fluid than you have.

It seems your tube is clear, i.e glass or plastic. My suggestion is to use a capacitive level sensor. There is probably a capacitive level sensot in the fuel tank of your car, and you don't know about it.

Basically two parallel "probes" go from top to bottom in the fluid. There is a capacitance between the two probes, and this capacitance changes with the fluid level. Commercial versions that go in fuel and oil tanks cost thousands of dollars.

You could make the two probes from two parallel wires attached to tour tube. You can make a circuit with op amps that converts capacitace to voltage for input to the picaxe. Or, you can let soemone else do all the brainwork. You can buy a chip that converts capacitance to I2C, which you can read from a Picaxe 18X or 28X. You can get the breakout borad from Sparkfun http://www.sparkfun.com/commerce/product_info.php?products_id=7918

If you don't want actual level, just that it gets to a level, you can use this sensor with the circular probe it comes with, attached at the strategic point to the side of your plastic tube.
 
Last edited:

Wrenow

Senior Member
Why not simply replace your current probes with gold plated or gold ones. These are pretty common for battery packs and in electrical connectors (easily had for D and Sub-D and servo type pins)?

We use gold plated battery pack bus connectors for the pump sensors in automatic pump circuits in R/C Model Warship Combat due to similar corrosion issues.

Cheers,

Wreno
 
Last edited:

boriz

Senior Member
Gold would reduce corrosion, but after a while, gunk would build up on the –ve electrode. Both if using AC. And that would effect the readings.

Note about the capacitative method: Make sure the wires are completely insulated from the liquid. Some special coating may be required.
 

Michael V

Senior Member
Probes

Sorry, wasn't clear about the capacitive method. Capacitive sensors are great because can be used externally, i.e as long as the tube is reasonably thin and not metal you should be able to put your sensor on the outside of the tube. No corosion issues, no gunk build up, the liquid can be any colour you like. Works for plastic water tanks as well.

If it is just level, no level, you can find the change in capacitance while the thing is in opreration by moving the sensor up and down past the level in the tube. then you set the code in your picaxe to detect the change. SPa baths have capacitive level switches for level control, you can't see from the inside of the spa, they are stuck to the wall on the outside.

If you want the actual level you still run your wires on the outside of the tube, but you have to calibrate.
 

leftyretro

New Member
Sorry, wasn't clear about the capacitive method. Capacitive sensors are great because can be used externally, i.e as long as the tube is reasonably thin and not metal you should be able to put your sensor on the outside of the tube. No corosion issues, no gunk build up, the liquid can be any colour you like. Works for plastic water tanks as well.

If it is just level, no level, you can find the change in capacitance while the thing is in opreration by moving the sensor up and down past the level in the tube. then you set the code in your picaxe to detect the change. SPa baths have capacitive level switches for level control, you can't see from the inside of the spa, they are stuck to the wall on the outside.

If you want the actual level you still run your wires on the outside of the tube, but you have to calibrate.

While retired recently, I too worked in the process control industy (oil refinery) many years and worked a lot with level measurements. They can be quite problematic as there are many methods that each have certain advantages and disadvantages. Over the last 5-10 years we spent a lot of time learning and utilizing microwave level transmitters. They have come a long way with that method and it helped us solve a lot of difficult level measurements. Of course that is way beyond the hobbyist scope in price, so sorry to go off topic.

LEfty
 

Michael V

Senior Member
Radar level gauges

Hi retro,
Certainly radar level gauges, above the fluid and not in contact with it, no moving parts are increasing in popularity. They are also suited to very large tanks eg 18 - 27 m high, and the high cost becomes very small compared with the inventory. They have also become popular in road tankers, eliminating the need for a physical dip stick and for a guy to get on top of the truck and potentially fall of.

Also, gdenehy and others, more sensor ideas can be borrowed from the oil industry. http://www.liquip.com/?p=46480-Retained-Product-Sensors-FOB100-

The Retained product sensor, which goes in the bottom of the tank, is a tuning fork sensor, or can be a capacitive sensor. This checks if liquid is there or not, and colour does not matter. Handy if you suspect somone not deliveing the full load of fuel, it can happen.. Of course you can log all this data.

Also, the overfill protection probe. These exist so that you can't accidentally overfill a truck, or tank. In other posts someone wrote about coupling a led with a photo diode, and when immersed the light transmitted or reflected would change. That's exactly what these sensors do, and give a switched output.

All this hardware is really expensive if you are not in the fuel business, but why not borrow the concepts?
 

gdenehy

Member
I ended up using the MPX2010 pressure sensor from Jaycar.
Since I was actually trying to measure pressure rather than the level specifically, this has worked out much better. (Seems obvious....)
I though that just measuring a few levels in the tube connected to it would be just as good, but was a lot more complex than I thought!
Thanks heaps for all the ideas - I have some actual level sensing to do to, so that is great.

One more question tho - I am using a dual-opamp circuit to amplify and reference the sensor outputs to ground. When I turn on my CB radio near it, the readings go haywire. This also happens with any electrical interference. The sensor is connected via approx 2m of plain wire, so I assume this is almost acting like an aerial? The range I am measuring is only about 4mV, so that is a lot of amplification.
What is the best way to reduce the interference? capacitors on the op-amp (i dont know where or how to do this) or sheilded cable?
What do they use for these types of sensors in cars?
 

westaust55

Moderator
In the industrial area, the first step is to always use a screened/shielded twisted pair cable for analogue instrument signals. The screen should only be earthed at one end otherwise you risk getting earth loop currents flowing through the screen causing interference to the signal.

If it is a relatively short distance try using some screened audio cable.

Another possibility is to install the op amp near the transducer.
 

moxhamj

New Member
I have used cat5 cable - it is twisted pair so interference cancels out, and it is one of the cheapest cables around (even if you only use one of the 4 pairs) If you do use screened cable, it would need to be screened stereo cable, and even then the RF could get into the screen so the earth isn't really an earth.

The other option is to do the amplifying right at the sensor, and send an amplified signal. Or even amplify and use a picaxe right at the source and send something even more robust, such as RS232.

And if all that doesn't work, it is time for metal boxes and ferrites on the wires going into the boxes.

When it comes to RF, every bit of metal is an antenna. But RF still behaves in predictable ways, and you can filter it with low pass filters using resistors/capacitors/inductors. The ferrite 'bump' on your monitor cable is one simple example of an RF filter.
 

gdenehy

Member
So would cat 5 be better than audio cable for a 2m run then?
Would I be able to put all 4 sensors in a single cat5 cable, or would this create interference?
 

westaust55

Moderator
Cables for instrument purposes

Cat-5 cable is unshielded wire containing four pairs of 24-gauge twisted copper pairs. The twisting of the pairs will help but that lack of a shield will not keep RF noise out.
Proper instrument cables comes in two forms:
1. A number of twisted pairs in a cable with an overall screen around the entire group of pairs. I tend to use this more for digital signals into PLC’s and DCS’s.
2. A number of twisted pairs each with its own screen and then an overall screen around the entire cable.

Screens for instrument cables provide 100% coverage and are usually aluminum foil (or occasionally copper foil). The foil is earthed at one end only.

Even audio and coaxial type cables usually only have a braided screen which does not give 100% coverage thus RFI can easily penetrate, and the screen is typically used as the earth/common return so not going to prevent earth loop current which will also generate noise into the signal wires.
sure there are wave guide coax, etc as well with soild outer "shields" but that is outside the league of the general hobby market.

For the application you have mentioned where there is a CB nearby and only 2 metres length I would try stereo schielded cable first id that and Cat 5 is what you have at hand. Use the two cores as the signal wires and use the braid only as a shield AND only earth it an one end.

Ferrous materials like steel wires and steel conduit will only help keep low frequency (like 50Hz or 60Hz) mains noise out of a cable. You need copper or aluminium for high frequency (RFI) and antistatic protection. And as mentioned you need 100% screen coverage for best results.
 
Last edited:

gdenehy

Member
How do I plug the signal wires in?
I currently have all my sensors going into a 25pin printer style plug and socket, using IDC cable to run to the picaxe. I presume that this is not suitable for the sheilded cable?
It would be impractical to run all the sheilded wires directly into the box and straight to the picaxe...
 

hippy

Technical Support
Staff member
Some Cat5 and Cat5e drum cable I have has foil shield with 'earth wire', some is foil shielded but no earth wire, a lot is unshielded (UTP) particularly patch cables. The cable I have which is recommended for USITT DMX-512 is also two twisted pair, foild shielded plus earth wire. I guess it's a case of searching for something suitable. Good cable should have an identification code giving a detailed electrical specification.

The ( non-expert ) approach I've taken to avoid intereference is to get the voltage up high enough so interference is minimised, eg, put amplification at the sensor end, make sure power is well regulated at that end if sent via cable and use shielded twisted pair.
 

BeanieBots

Moderator
The ( non-expert ) approach I've taken to avoid intereference is to get the voltage up high enough so interference is minimised, eg, put amplification at the sensor end, make sure power is well regulated at that end if sent via cable and use shielded twisted pair.
Hippy, that IS the EXPERT approach.
 

gdenehy

Member
How do I plug the signal wires in?
I currently have all my sensors going into a 25pin printer style plug and socket, using IDC cable to run to the picaxe. I presume that this is not suitable for the sheilded cable?
It would be impractical to run all the sheilded wires directly into the box and straight to the picaxe...
BUMP......
 

BeanieBots

Moderator
You can get solder bucket versions of that type of connector.
With care, it is even possible to solder wires to an IDC type.
 

gdenehy

Member
But then the wires run as unsheilded, untwisted ribbon cable for about 20cm into the opamps. Isnt that going to make a big difference?
 

moxhamj

New Member
The longer the wires are unshielded the more RF they will pick up. Even the legs on an op amp will be picking up RF - they are little antennas - every bit of metal is. There are some great suggestions re shielding here - you can try any/all of them.

Another approach is to shield everything. Get a small aluminium box. Feed fluid in one end - ie a little pipe either plastic or metal. Inside your box is the pressure sensor, an amplifier, a 5V regulator and a picaxe. Measure the pressure, amplify it, send it to a picaxe and then have the picaxe output a signal eg a Serout. Fluid in. Robust signal out. This worked for me when I needed to measure the level in a tank and the tank happens to be under some high tension power lines. Just make sure the connection to the pressure transducer is really waterproof.
 

BeanieBots

Moderator
You can also get screened ribbon cable. You could also use coax cable on both sides of the connector. Many options. How far you need to take things depends on the severity of the problem. Start with the most practical solutions first.
 

gdenehy

Member
OK! Thanks a million for all your help guys.
I REALLY apreciate it.
Nice to have so many people willing to help you out - and so quickly.

Thanks again.
 
Top