Is this water level sensor correct?

Is my circuit correct? The circuit is used to detect the level of water using the principle water conductivity. I have based it on the circuits on the link and I am not really sure if my circuit is correct based on the two. The output will be using an SMS module. I just want to verify if the inputs are correct. Sorry for the bad diagram or for asking, not really familiar with arduino but my teachers required me to develop an SMS system.

Arduino 11, 12, and 13 go to the collectors.

The base resistor values are too low, experiment with 1k etc.

Collector resistors can be omitted if you turn on the internal pull-ups.

All in all the transitors aren´t needed to detect the water level.

If I remove the transistors, it won't short the arduino right?

You have to configure the inputs with INPUT_PULLUP.
Make a simple test.
Have a nice day and enjoy coding in C++.

aside from changing the resistor value? the connection to arduino is correct, right? What's confusing me is the gnd and the pin connection

so I will use INPUT_PULLUP instead of just INPUT so we can omit the transistors? as I've read somewhere that connecting pins such as 7 and 8 can short the microcontroller and I fear that they will both get connected in the water

Looks like you have the Arduino pins connected directly to GND... so you will never get anything other then a LOW reading on those pins.

any changes to be done?

oh I see, I should move the pins to collectors instead of connecting it to the gnd/emitter, and we're good?

You should lay back and think about the hardware configuration. Your water level detection hardware is a button handler w/o buttons.
Have a nice day and enjoy coding in C++.

Yes, the Arduino input goes to the transistor collector.

It might be best to keep the transistors as it gives a layer of protection to the Arduino inputs. Connecting GND to the water and using PNPs is better.

As for a test, connect a 1k between the level electrode and the Arduino input; connect the same input to GND via a 47k resistor. Look for a HIGH for water detection. Connecting 5v to the water is a bad idea as you might short something to 5v by accident.
Instead of connecting +5v to the water, connect GND to the water; connect a 1k between the level electrode to the Arduino input. Turn on the internal pull-up resistors. Look for a LOW on the input for water detection. This is better than connecting 5v to the water.

Set your inputs pins to INPUT_PULLUP.

Then the transistor "switch" can be used to provide a connection to GND and pull them low.

Your pins need to be connected to the other side (collector) of the transistors.

we replace the led(circle with red) with a wire connecting to the 12, 13, 11? did I get it right? Assuming that the battery is the 5v and gnd?


11, 12 and 13 would connect to the transistor collectors.

isn't it that the bc 547, top collector, middle base, below(with arrow) emitter?

The other side of the resistor.

like this?

Something like this, ignore the resistor values:

R2 can be omitted if you turn on the input pull resistor.