Tag Archives: Simple

Water level measurements

Measuring liquid level is quite a common task.

There are numerous ways of doing this.

Probably the most known of them is the fuel level measurement in cars.
This post is about a tank water level gauges incorporating different types of sensors.
In principle the water level can be determined by measuring the water pressure at the bottom of the tank. The higher the pressure, the higher the water level.

Measuring water level with water pressure sensor can cause errors.

Unfortunately this method has some oversimplification. The environmental air barometric pressure hasn`t taken into account.

As weather continuously changes, so does the ambient air pressure. There is an average variation of 3 kPa, which corresponds to roughly 300 mmH2O measurement (even if the actual water level in the tank is unchanged).

This calls for measuring the barometric pressure. Instead of measurung the ambient air pressure, an alternative measurement method is used.

The ambient air pressure can be continuously taken into accout if a differential pressure sensor is used. One port of the gauge goes to the bottom of the water tank, while the other port stays open. This way the open port “monitors” every change in the ambient air pressure.
This is useful for measuring rainwater storage tanks.


Measuring water level using differential pressure sensor

Due to the fact that integrated differential pressure sensors have some long term drift, optionally the measurement system can be completed with water level switches. One at the bottom and one at the top of the tank. These two switches create a so called auto tune option: they provide zero and full range levels, the differential pressure’s output value can be adjusted if either switch operates (changes state).


More accurate measurement using level switches

An alternative method is the floating ball water level measurement. Basically the angle of the floating ball’s stick is directly related to the water level. The angle can be measured with a potentiometer, but the casing must be watertight, which is difficult to achieve because of the moving elements.


Floating ball water level measurement with potentiometer

Another solution is to use an acceleration sensor. The sensor has to be mounted to the moving rod, so the angle of the rod can be calculated. Having the angle information the water level can be determined.

There can be additional level switches in the system to provide more accurate measurements, or to serve “underdraining” or “overfilling” signals.


Floating ball water level measurement with acceleration sensor

These techniques don’t provide highly accurate measurements, but are accurate enough for rainwater of greywater tanks level measurements.

Programmable, 2 wire, relay controller

Although the previous posts described the two wire, 4-20 mA transmitters’ internal workings, sometimes a simpler action is adequate.

The first and pretty obvious example is the temperature switch (which is actually a bimetal). It doesn’t need any power supply, it makes (or breaks) a contact if the temperature reaches a certain threshold.

Another example is the float switch used in water tanks. it also makes (or breaks) a contact if the water level reaches the given level.

If the power they can deliver is insufficent, then these “sensing devices” usually operate a relay, and the relay’s contact switches on the higher power mechanism.

For example a reed switch based float switch (used in a water tank) can only switch a maximum of 0.5 A, but the water pump (operated by this float switch) needs multiple amps for its operation. In this case the float switch operates a relay, and the pump’s multiple amps flow through the relay’s contacts.

On the other hand there are more complex issues to be solved, as simple as can be.

Let’s see the following situation: There is a garden with an automatic sprinkler system. This system has a rainwater storage tank, a water pump, sprinklers and a soil humidity sensor. If the soil moisture falls below a certain level then the sprinklers begin to operate, and if the moisture rises to an other certain level the water pump stops.

It is a simple hystheresis function with adjustable low (turn on) and high (turn off) threshold.

Continue reading Programmable, 2 wire, relay controller

Industrial, 4-20 mA current loop, measuring circuits basics III.

Continued from the previous post

There’s a major problem with the circuits shown earlier. They all have a capacitor between their output pins (marked C3 in the following picture).

4_20ma_2wire_transmitter_capacitorThe capacitor shown in the red circle

This capacitor is needed by the voltage regulator (LDO) and provides other features like filtering and stability, so it cannot be omitted.

Let’s see the following situation:

2-wire-transmitter_simple2 wire transmitter elements in the measuring loop at startup

We have a 24V power supply with a maximum of 2A output current, a 2 wire transmitter and a 4-20 mA analogue PLC input (with measureing resistance of 50 ohms).

The power supply is switched off, so the transmitter is de-energised (not working because the lack of power). At the time we switch on the power supply, the transmitter’s internal (output, C3) capacitor is beginning to charge and actually it is functioning like a short circuit. For a little time, the power supply’s output 24V falls across the transmitter’s output resistor (10 ohms) and the PLC’s input 50 ohms, which means 400 mA current.

Continue reading Industrial, 4-20 mA current loop, measuring circuits basics III.

Industrial, 4-20 mA current loop, measuring circuits basics II.

Continued from the previous post.

The same priciple is true for the followings, temperature to current transmitter. In this case the input voltage is propotional to the measured temperature, not the rotation.

4_20ma_2wire_transmitter_tempTemperature input, full analog, 2 wire, 4-20 mA loop powered transmitter

U3 is a low cost, NTC based, integrated temperature sensor.

The next schematic is a differential pressure to current transmitter.

4_20ma_2wire_transmitter_pressureDifferential pressure input, full analog, 2 wire, 4-20 mA loop powered transmitter

This circuit needs a little explanation.

Continue reading Industrial, 4-20 mA current loop, measuring circuits basics II.

Industrial, 4-20 mA current loop, measuring circuits basics I.


Let me begin with an example, which is well known by everyone. It is the public lighing. Its scheme is show below.

At sunset, when it is becoming dark, the public lighting turns on, and when the sun is rising, it turns off.

The sunshine is sensed by a light sensor, which serves an electrical signal propotional to the ambient light intensity. When this electrical signal falls below a certain point, the measuring unit decides to turn on the lights.


Public lighting scheme

In this article I will focus on the sensor’s inside, how it works, and what if we want to measure other types of physical properties, eg. pressure, temperature or rotation.

Continue reading Industrial, 4-20 mA current loop, measuring circuits basics I.

Thermocouple Measurement Clarification

This is just a brief overview of how to do thermocouple measurements correctly and simply.
The principles of measuring with thermocouples are described by a lot of web pages. However, one can easily misinterpret the informations obtained form the internet.
The first confusion usually comes from the use of “ice bath” as cold junction compensation, the other is when someone tries to use the thermocouples’ mV – temperature tables.

Continue reading Thermocouple Measurement Clarification

Simple Overvoltage Protection

In industrial environment sometimes it is essential to deal with unplanned harsh electrical conditions.
For example: if the power infeed is a standard 230 V type, then the designer usually cannot believe that the power input is around 230 V most of the time, and is always in the 10% limits.
There are always voltage spikes and other nasty things that put some unwanted overstress to the sensitive electronics, mainly to the switch mode power supplies.

The other case is when the requirements include a high degree of isolation. If for eg. 8 kV of isolation is needed between the mains input and the internal 24 V electronics then it is very hard to find an appropriate power supply off-the-self at an affordable price.

Continue reading Simple Overvoltage Protection