Download PDF
      SAMOVAR                                  
×
Menu

Reflux Level Sensor

Samovar 7.00: the sensor enabling and polarity are set on the "Sensors" («Датчики») tab of the configurator and are saved to user_config_override.h.
 
The XKC-Y25-V contactless liquid level sensor is built around a capacitive sensing element that responds to changes in dielectric permittivity. This property allows the level detector to sense liquid through various non-metallic barriers: plastic, glass, ceramic, etc. The liquid sensor will even register the touch of your hand. The maximum wall thickness of the barrier, and therefore the sensing distance of the sensor, is 12 mm. The sensor will not work with metal barriers.
 
 
In fact, Samovar can work with any sensor (laser, inductive, contact  etc.) that can run on  3.3 volts (or 5 volts, provided a logic level converter is used) and output, when triggered, a logic one or a logic zero.
The choice of which sensor to use can be made in the Samovar_ini.h file
 
Use a reflux level sensor that outputs a logic one when triggered.
#define USE_HEAD_LEVEL_SENSOR                //использовать датчик уровня флегмы в голове (датчик P-N-P).
 
Use a reflux level sensor that outputs a logic zero when triggered
#define WHLS_HIGH_PULL                       //использовать датчик уровня жидкости N-P-N
 
(Below, all examples are based on using the XKC-Y25-V P-N-P sensor)
 
Choosing the output signal mode.
 
Some sensor models have 4 pins and have a built-in output signal inversion circuit, which is controlled by the state of the MODE pin.
 
Normal mode
The MODE pin is connected to the positive supply or not connected at all: the OUT signal is not inverted.
 
Inverted mode
The MODE pin is connected to ground: the OUT signal is inverted.
 
Where to place it and how to mount it,
 
The sensor is placed on the sight glass, because it does not work through metal. 
 
Stage 1 - temporary-permanent.
You will need:
 
 
Take the card, fasten it with a clip to the sight glass posts (the photo is not very good), and mark where the second post is. 
Cut it  and drill a hole with the step drill, slightly smaller than needed. Trim it with the knife so that the sensor fits tightly.
 
     
 
 
Draw + (plus) and - (minus),  this is the sensitivity adjustment, remove the cover from the sensor, insert it into the hole and fasten it to the sight glass with the two clips.
 
 
 
Done! Don't put the cover back - you will have to  turn the trimmer to catch the trigger point.
 
 
Permanent.

Take a piece of rigid plastic and make a hole in it in the same way, but now the clips are drilled  and fastened with M3 countersunk screws.
 
   
 
 
Remove one spring and  mount it on the sight glass in the same way.
 
 
 
What this gives. First, the rigidity of the structure. Second  - the ability to mount it as low as possible  and even at an angle.
 
The sensor is capacitive. Adjust it with a screwdriver with a long insulated handle,  preferably one that is entirely plastic or mostly plastic.
 
Connect the sensor to the LEVEL connector on the printed circuit board. The check is simple - connect it, bring your hand close, and the LED lights up.
Samovar counts a reflux level sensor trigger as a period of 3 seconds during which the sensor LED is on continuously.  If the LED blinks at an interval shorter than 3 seconds, this is not counted as a trigger.
If Samovar determines that the sensor has triggered, the regulator is commanded to lower the voltage: by 1 V for KVIC, by 2 V for RMVK, by 3% of the current power for SEM_AVR. The next reduction is possible no sooner than 40 seconds later - the process is slow to respond. During the "Pre-flooding" («Предзахлёб») program, the sensor triggering is a normal event and no flooding message is sent.
 
After heating up, when the column reaches stabilization mode and the sight glass has warmed up, you need to set the trigger threshold.
First, reduce the sensor sensitivity, bring the column to its working mode, and start taking off heads. Use a screwdriver to turn the trimmer screw  until the sensor triggers, and then turn it back a little.
While taking off heads, you can flood the column by raising the power, to make sure the sensor triggers correctly  and to fine-tune it. This episode will not affect the quality of the final product.
 
The finer the adjustment, the earlier the sensor reacts to reflux appearing in the sight glass, but false triggers are then possible.
If the sensor was removed or the column stood idle for a long time, the adjustment must be repeated.

Possible problems.
 
When setting up the sketch, you can clear the "Use reflux level sensor" («Использовать датчик уровня флегмы») checkbox on the "Sensors" («Датчики») tab of the configurator, or comment out the line in the Samovar_ini.h file:
//#define USE_HEAD_LEVEL_SENSOR                //использовать датчик уровня флегмы в голове (датчик P-N-P)
 
Or another way:
In the Samovar_ini.h file, comment out the line
//#define IGNORE_HEAD_LEVEL_SENSOR_SETTING //Если датчик флегмы используется, то игнорировать команду на отключение датчика в WEB-интерфейсе.
Then, in the interface, a checkbox will appear on the Settings («Настройки») tab with which you can enable or disable the use of the reflux sensor.
 
When using the sensor, the R1-10k resistor (located next to the LEVEL connector)  must be installed.
 
If the sensor outputs a logic one when triggered, the level input must be pulled to GND: GPIO27 on ESP32 DevKit or GPIO19 on ESP32-S3. On the standard DevKit printed circuit board this pull is already provided.
 
If the sensor outputs a logic zero when triggered, the level input must be pulled to +3.3 V: GPIO27 on ESP32 DevKit or GPIO19 on ESP32-S3.