Steam production boiler level sensor

I would like to build a steam-producing boiler. I need to be able to detect the high and low water levels inside the metal tank that contains both water and steam. The objective is:

If the water level is high: trigger an alarm and stop the pump

If the water level is low: trigger an alarm, start the pump, and shut down the heating element

I was told that conductivity probes can be used to detect and display the water level. I hope you can help me. Thank you.

What material is the tank? I assume metal like, steel or aluminum ?

The easiest way is to use a float, there are many

Google “float switches for water tanks” and look for one which can handle the temperature and pressure range (steam can be very hot)

These floats act as a switch ON/OFF which can be read by the controller.

Do not forget to add a temperature and pressure sensor to give alarm when overheating.

A not tested sketch to get started.

//    FILE: tank_control.ino
//  AUTHOR: Rob Tillaart
// VERSION: 0.1.0
//    DATE: 2025-10-29
// PURPOSE: demo
//     URL: https://forum.arduino.cc/t/steam-production-boiler-level-sensor/1411030

//  adjust pins to your hardware setup
const int UPPERFLOAT = 8;
const int LOWERFLOAT = 9;
const int ALARM = 10;
const int HEATER = 11;
const int PUMP = 12;

bool heaterOn = false;


void setup()
{
  Serial.begin(115200);
  Serial.println();
  Serial.println(__FILE__);
  Serial.println();
  
  pinMode(UPPERFLOAT, INPUT_PULLUP);
  pinMode(LOWERFLOAT, INPUT_PULLUP);
  pinMode(ALARM, OUTPUT);
  pinMode(HEATER, OUTPUT);
  pinMode(PUMP, OUTPUT);

  //  assume LOW is OFF
  digitalWrite(HEATER, LOW);
  digitalWrite(PUMP, LOW);


  //  test alarm
  digitalWrite(ALARM, HIGH);
  delay(1000);
  digitalWrite(ALARM, LOW);
  
  //  initialize temp sensor + pressure sensor here
  //  todo
}

void loop()
{
  int upper = digitalRead(UPPERFLOAT);
  int lower = digitalRead(LOWERFLOAT);
  
  if (lower == LOW)
  {
    heaterOn = false;
    digitalWrite(HEATER, LOW);
    digitalWrite(PUMP, HIGH);
    digitalWrite(ALARM, HIGH);
  }
  
  if (upper == LOW)
  {
    heaterOn = false;
    digitalWrite(HEATER, LOW);
    digitalWrite(PUMP, LOW);
    digitalWrite(ALARM, HIGH);
  }
  
  //  if both are OK the heater may switch on.
  if ((upper == HIGH) && (lower == HIGH))
  {
    heaterOn = true;
    digitalWrite(ALARM, LOW);
  }
  
  //  temperature / pressure handler (TODO)
  //  if (temperature or pressure is too high)
  //  {
  //    heaterOn = false;
  //  }

  //
  if (heaterOn)
  {
    digitalWrite(HEATER, HIGH);
  }
}

// -- END OF FILE --

Conductivity.

Not advisable if you have a mixture of water and steam in the tank.

You could easily get false readings. Conductivity varies with whatever your feed water is made up from. Tap water can be around 300-uS/cm and is easy to detect.

In theory, distilled water or steam condensate should be very low, in single figures, but in practice it will pick up contaminants and my condensing gas boiler condensate is around 140-uS/cm and clean rainwater slightly less.

You might be able to get around the problem of having a conductive path around bare electrodes by insulating the probes so that just the tips are exposed.

Given that it's steam production and water level is critical, I would go with something simpler like a float switch, as mentioned. You can get them in stainless steel and most will screw into some supporting tube. A sight glass might be a good idea too.

If you use a float, bear in mind it might bounce.

Hi, @rayanmrds

What pressure is the steam?
Does the vessel have a sight glass like in a steam locomotive?

What is the material of the tank?

Thanks.. Tom.... :smiley: :+1: :coffee: :australia:

The sight glass is the only way to do the measurement. Boiling water and steam will be so hot that it will destroy any othere type of sensor.

(really) expensive floats can handle well above 100°C .

@rayanmrds
Can you tell us what temperatures (pressure) to expect water / steam in your project?

So I want to thank you for the time you have dedicated to me.
I plan to use a vacuum pump, so the maximum temperature in the tank will be around 120°C and the pressure will be at most 2 bar.
It is only a fault-simulation test bench, so it’s not really a boiler with extreme pressure and temperature.
The reservoir will be made of steel (stainless steel if I can get some).
I was thinking of installing a visual level indicator, but I don’t yet know if it will fit into my budget.

You can get all the plumbing parts needed at your local hardware store!

Have you considered using a pressure cooker from your favorite kitchen equipment store?

This thread caused me to loose a lot of sleep last night. EVERY state and every country has laws relating to steam boilers. They are bombs just waiting to go off. The OP seems to have no knowledge of those laws. So please do not continue with this project!

So I apologize if I caused you any trouble, but I want to point out that we intend to follow all the necessary safety measures (safety valve, etc.), and we will be supervised by our professor. I just wanted to ask for your help regarding the appropriate sensors. Thank you.

Steam boilers have been made for hundreds of years before Arduino. What exactly are you and the professor building that includes sensors and Arduino?

I’m unable to provide an answer on that topic due to legal and liability considerations. However, if you have any other questions or need help with a different matter, please feel free to ask!

Just to give you some context, I’m studying at a maritime school, and for a research project, we decided to restore a steam production simulation bench used on ships. The bench itself is designed to test and simulate all the safety systems in case of a malfunction — for example, if there’s a low water level, the pump will start, the heating element will stop, and an alarm will be triggered, etc. So don’t worry, this isn’t a dangerous project. We even plan to use a vacuum pump to lower the boiling temperature of the water for added safety. Thank you for your responses.

Here we are at post #15. if you had told us all this up front, the thread would be so much shorter!

I’m sorry, I didn’t expect you to be so kind. I apologize for wasting your time.
It’s my first time on this forum, please understand.

The forum is similar to calling 911 or the police. Just the facts, please, or something like that.

Thanks for the extra context. That makes more sense now. For 120°C and stainless steel, I'd go with float switches like others mentioned; we've had good results with them in similar setups, they're simple and reliable, and they won't give false readings like conductivity probes might with steam in the tank. The sketch Robtillaart posted is a solid starting point for your pump/heater logic, and I found this resource the other day with some useful background on level sensing approaches related to water heater services that might help with your research. What kind of budget are you working with?