Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

Automatic Water Level Controller for "Dr Fluffy Bottoms Quack House"

ThomsCircuit

Active Member
Hello friends.
Ive been busy on this project and i am in need of advice for a feature.
I got my daughter this cute little Peking duck and together we built him/her (cant tell) a duck house. We had a great deal of fun working together on this. Its not a kit we designed it from photos and fabricated what we needed in my workshop. We are just about finished as it needs just a fence and bench so she can watch him play in the pond.
20221030_183157.jpg

What i want to make is a watering feature.
I found this schematic posted elsewhere and want you guys help me figure out if this circuit will work as is or does it need modifications.
Im not triggering a water pump but a 24DC volt valve solenoid. That does not affect the circuits function but the existing circuit is driven by 12v but I would like to power the circuit with the same 24v power source as the solenoid so i need to know what the resistor values need to be changed to if necessary.
Thank you in advance for your help.
T.B.
water-level cir.jpg
 

Diver300

Well-Known Member
Most Helpful Member
I would suggest having the water in the tank at earth voltage. That could be positive or negative, but your circuit should be made so that if the water is a dead short, nothing bad will happen.

You've also made it that the first transistor would overheat if it turned on fully. You should have a collector resistor for that transistor.

Any leakage from the first transistor will be amplified by the second one, so you should have a resistor between the base and the emitter.

You can just by circuits that will do what you want:- https://www.ebay.co.uk/itm/154651643788
 

ThomsCircuit

Active Member
I would suggest having the water in the tank at earth voltage. That could be positive or negative, but your circuit should be made so that if the water is a dead short, nothing bad will happen.
Could you tell me how to do that?
You've also made it that the first transistor would overheat if it turned on fully. You should have a collector resistor for that transistor.

Any leakage from the first transistor will be amplified by the second one, so you should have a resistor between the base and the emitter.
Thank you.
I added the resistors. if you could tell me what the values would be.
WATER LEVEL CIR02.png
 

Diver300

Well-Known Member
Most Helpful Member
I meant to put a resistor between the base and emitter of Q2. It would suggest 10 kOhms.

For R5, something like 1 kOhm would be fine.

I think that you have missed a connection between the top of R5 and the +ve supply.
 

ThomsCircuit

Active Member
I meant to put a resistor between the base and emitter of Q2. It would suggest 10 kOhms.

For R5, something like 1 kOhm would be fine.

I think that you have missed a connection between the top of R5 and the +ve supply.
I sure did miss that. Thank you for the resistor values. So aside of the tank being earth grounded this circuit is good?
I should mention the tank is plastic.
WATER LEVEL CIR03.png
 

Pommie

Well-Known Member
Most Helpful Member
A float switch or a float valve (as used in toilets) would make things much simpler.

BTW, great job on the house.

Mike.
 

Diver300

Well-Known Member
Most Helpful Member
water.PNG


Here is a possible circuit. I've not tested it but the idea of using a relay to connect the lower electrode has been used for decades. The ground electrode can be the tank if it's metal.

I've guessed at resistor values. A resistance in the water of around 100 kOhms will reduce the base voltage on Q2 and it will turn off, allowing the current in R3 to turn on Q1.

There is a possibility that Q1 will turn on and off very slowly, which could make it heat up, and it could be bad for the contacts of the coil. A more elaborate circuit would add some hysteresis. A high value resistor, maybe 1 MOhm, between the collector of Q1 and the base of Q2 might be needed.

If the water is very pure, it's possible that it won't conduct electricity well enough for this circuit to work.

Important:-
There is one possible danger in using this circuit. The relay will have mains on one set of contacts and the electrodes will be connected to the other set of contacts. If there is a short between the two sets of contacts, like a loose wire, then the electrodes would become live with mains voltage. Take care wiring it up.

Additional safety measures would include:-
Having all mains power supplied from an ELCB / RCD / GFCI which you probably should do anyhow.
Earthing all metalwork like pumps and pipes, which you should do anyhow.
Using two relays to keep the contacts separate
Earthing the -ve of the 12 V systems.
Connecting a zenner diode between the electrodes and ground
 

rjenkinsgb

Well-Known Member
Most Helpful Member
+1 for float switches.

ANY DC electrode setup in water will cause electrolysis, which will both degrade the electrode and taint the water.

All commercial electrode-based water level sensing systems - or from reputable manufacturers at least - use AC sensing and a capacitor coupled electrode, to prevent any electrolysis or contamination.
 

Nigel Goodwin

Super Moderator
Most Helpful Member
A float switch or a float valve (as used in toilets) would make things much simpler.

BTW, great job on the house.

Mike.
I would agree - if you want electronics, then use two float switches - one for low, and one for full.

Or just use a normal water tank/cistern mechanical valve.

Or train the duck to operate a 'bill operated' water tap - which was how they used to provide water for cow sheds decades ago - and you had to train the cows to push the operating lever with their tongues. I saw them in operation many times, but I never saw how they trained the cows to do it. In more recent decades they were replaced by float operated valves.
 

ThomsCircuit

Active Member
I take the groups recommendations seriously. I did not like the idea of wires in water but the compact design fit my situation.
The toilet tank filler idea just takes up too much room.
1-The solenoid valve is not AC but DC 24v. If that makes it any safer.
2-Everything is on a GFCI
3-The vessel that holds the wires is not what they drink from directly. That vessel is connected to a larger 3 gallon container with a tube. Meaning the small vessel is just used to monitor the level of the larger tank.
4-The water is drained and replaced daily.
5-Everything (all tanks) are plastic.

Do any of these help reduce the problem?
 

ThomsCircuit

Active Member
The details for the setup are as follows:
Relay coil 12V
Solenoid Valve 24V
My research is showing that i could design a latching relay circuit to turn the selenoid on and keep it on until the upper switch is tripped. Problem is I have two voltages.
 

rjenkinsgb

Well-Known Member
Most Helpful Member
You don't need any electronics as such.
Put the "stop" float switch, a relay normally open contact and the relay coil in series from power to 0V.
Make sure there is a flywheel diode across the relay coil.

Connect the "start" float switch across that normally open contact.

Use another contact to control whatever device.

The switches should be arranged to break on increasing level, if you are using them to fill a tank or container, with stop above start.

Vice-versa to release when a level is met.

ps. Adding a low value resistor in series, as close to each switch as practical, will greatly extend the contact life.
Ten ohms should be suitable.
 

Diver300

Well-Known Member
Most Helpful Member
water2.PNG

This is the circuit you want. The diode is needed as many of those float switches are reed switches which don't like the inductive load of the relay. The diode will remove the spike that can happen when the switch opens.

The second contact on the relay can be used to run a 24 V solenoid or pump. There is no safety issue with 24 V systems, as well as the fact that there are no exposed wires like there have to be with electrode systems.

The "normally open" and "normally closed" designation can be a bit confusing for anything other than a pushbutton or a relay. On the float switches, both switches need to open (off) when the water level goes above them, so they both need to be mounted the same way up, but the opposite of the picture you showed.

When the water is low, both switches will be on, so the relay will energised. When the water covers the bottom switch, that will turn off, but the current for the relay coil can still flow through the relay contacts so the relay remains energised.

When the water reaches the top switch, that will turn off, so the relay turns off. When the water then drops a bit and the top switch turns back on, neither the bottom switch nor the relay are closed, so the relay stays de-energised.

Eventually the water reaches the bottom switch the whole cycle starts again.
 

ThomsCircuit

Active Member
You don't need any electronics as such
Thank you for your help. I have designed this as best i can. Im not completely sure I got it right and i do not know what to do with the Start (Minimum) switch. The Solenoid is 24 volts so this circuit has 2 voltages with a shared ground.
WATER LEVEL CIR04.png
 

ThomsCircuit

Active Member
This is the circuit you want. The diode is needed as many of those float switches are reed switches which don't like the inductive load of the relay. The diode will remove the spike that can happen when the switch opens.
Thank you. I see 3 relays here. I can assume the third (RLYb) can be eliminated.
I have a 12V coil relay with DPDT switches. Can I use this and eliminate the second relay?
 

ThomsCircuit

Active Member
The "normally open" and "normally closed" designation can be a bit confusing for anything other than a pushbutton or a relay. On the float switches, both switches need to open (off) when the water level goes above them, so they both need to be mounted the same way up, but the opposite of the picture you showed.

When the water is low, both switches will be on, so the relay will energised. When the water covers the bottom switch, that will turn off, but the current for the relay coil can still flow through the relay contacts so the relay remains energised.

When the water reaches the top switch, that will turn off, so the relay turns off. When the water then drops a bit and the top switch turns back on, neither the bottom switch nor the relay are closed, so the relay stays de-energised.

Eventually the water reaches the bottom switch the whole cycle starts again.
GENIUS!
I understand it! The question is did I interpret it correctly here?
WATER LEVEL CIR05.png
 

Latest threads

New Articles From Microcontroller Tips

Top