Not sure if I need

First off let me apologize I am not very good at this and only just started and really I am trying to accomplish one goal.

I am currently using 2 float switchs to send a signal to a relay to turn it on sorry about my poor illustration.

What I would like to do is replace the float switchs with water level sensors xkc-y26-v
I would like to keep the same setup if possible just wiring if possible.

If it's not possible please let me know

How it currently works is if the water level on one switch is low the switch is on(overflow protection) and the other switch when the water level is high the switch is on(run dry protection)

With the sensors I would like to have one on until the sensor senses water than off and the other the opposite on until no water is sensed.

I was thinking I could pass power from the one switch to the other as long as water is sensed and change the NO to NC (if possible) and pass the signal to the relay making them behave in the same way but very unsure how to wire this if it's even possible?

If everything is working correctly one sensor will always see water and the other will not turning on the relay

There are two kinds of float switches, NO and NC.

It is not a good idea to power a relay using a USB port on a computer, as that could damage the computer.

It might be OK to use a phone charger USB output, if that charger can provide more current than the relay requires.

Is this a septic system, if so stay with the float switches, the environment is too harsh for electronics.

Yes it may be possible if your relay does not need more than 200mA to turn on.

It does not how would I wire it sorry for being needed

It's for a fish tank

It's being powered by a USB block

Have you already bought the sensors?
Do you specifications for the relay?

I don't recommend relays for this kind of scenario. A relay failure could result in a flood. A simple mosfet switch would be much better. And could be powered by a small UPS ( I just ordered 10 of those)
I don't know how reliable the water level sensors are, I do know float switches are very reliable.
If this is beyond your skills, put a post in the paid help section so someone can build it for you.

This is the relay. No I have not purchased the sensors yet these are the sensors I was going to use

https://a.aliexpress.com/_mNgzYO3

The float switchs have to be in the water it's ugly and if algae grows on them the switchs don't work very well the relay is in a different location. So I would like to move the sensors on the outside of the tank if that makes sense

I don't have any first hand experience with water switches other than float switches. If you go the route you are talking about, should you not have a backup fail safe float switch? They don't have to be in the water, you can use a setup like a toilet tank. The part in the water can just be a chunk of foam and replace it every so often.

I think the foolproof way to do this is to buy the NPN version of the switch and connect them to a NAND gate (74AC00) which will control the relay. You will also need two 4.7K resistors.

1 Like

That sounds good how would I wire it up ? I will purchase a little breadboard and everything to getting working and test it

Can you follow this?

Yes I think so! Thank you so much I will order the stuff and try it my only question is when I Google the (74AC00) it shows different versions I can see to find one with out a e at the end of a different letter are they still the same or should I look harder for only (74AC00)

And on this I should also add the 5v to the vcc pin as well on the relay?

The letter on the end is not important as long as it look like this (14 PIN DIP):

Yes.

This is the pin numbers for a 14 PIN DIP