Non-contact Capacitive liquid level Sensor

Hey guys,
Purchased a non-contact capacitive liquid level sensor last month and upon testing it during last week and this week it did not seem to work correctly or very accurately.
The sensor was seen to constantly change the output between 0 and 1 even though water was not present. I have followed all wiring diagrams and used the sample code and still the same thing occurs. the Wiki for the product said to adjust the sensitivity of the sensor which i did and this had no affect on it

Kind regards,

Hey Daniel,

We’re sorry to hear that one isn’t working as expected! Are you able to confirm what sort of dev board you are using this with? (e.g. Raspberry Pi, Arduino, etc.) as well as what position you have the DIP Switch on the 4-Pin adapter set to? I have included a photo of the switch below!


If possible, a photo of the whole setup you currently have would definitely help to troubleshoot this one!

We’ll try and find you a resolution for this one ASAP!

The DIP switch is set to 5V, using it with an arduino microcontroller.
Cant really show the the set up but its the exact same as the website says and is mounted onto a cylindrical container .

Hey Daniel,

Thanks for confirming. Just to double-check as well what material do you have the capacitive contact mounted to? (e.g. glass, plastic, etc.)

It is mounted onto a plastic container.

Hey Daniel,

How interesting, also, what’s the thickness of the container?

If you’re using this with an Arduino we should be able to throw together a simple input filter to be able to reduce the noise that it’s producing within your code. This is quite common for sensors such as these to have some noise, although sometimes it can be difficult to tell whether it’s due to faults with the part, the validity of the setup, or whether there’s just noise created from the design of the part which needs to be filtered out.

Thickness is thin, around 1mm.

Ok could try an input filter to see how that goes.

Sounds like a plan,

Try hitting ctrl+shift+L if you’re outputting just 1/0 to serial to determine how noisy the signal is, if you can also put your code up here that’d be great for helping us troubleshoot the issues.

This is the output when the container is full of water. it constantly switches from 0-1 even though the water level has not changed or the sensor has moved

Hi Daniel,

Try giving this script I’ve written for you a go, to see whether the performance is improved. You can alter the constant SENSITIVITY to adjust how responsive the sensor will be to input. It’s a very basic filter which just determines whether there were more high or more low readings after comparing a full 1000 ten times per second

#define SENSITIVITY 1000
#define MODEPIN 5
#define INPIN 4

int currentReading;

void setup() {
  pinMode(INPIN, INPUT);
  digitalWrite(MODEPIN, HIGH);

void loop() {
  int numberOfHighReadings = 0;
  for (int i = 0; i < SENSITIVITY; i++) {
    if (digitalRead(INPIN)) numberOfHighReadings++;
  (numberOfHighReadings > (SENSITIVITY/2)) ? currentReading = 1 : currentReading = 0;

Hi Bryce,

Tried the code and still did not work. I also noted that the Red LED on the sensor is not turning on.
I also noted that the Cable provided has the blue and green cables arranged differently compared to the one provided on the product description for the IO1 and IO2 pins. I tried Swapping the pins around and still the same issue.

Hey Daniel,

Thanks for following up with us.

If possible, shoot through a reply to the confirmation email you received when you placed the order, or shoot through an email to support@coreelectronics from the account you placed the order with and we will look into the refunds/replacements process ASAP!