Automating water pump

Hi Robert
Thank you for all your effort and time appreciated. I will order the items you have listed and then set it up on a trial system i have available. It will be a couple of weeks before i will be able to set anything up as I’m traveling at the moment.
Once i can set it up i will let you know how it went. Thanks again.

Hi Robert,
Just so i don’t muck this up based on what you have sent i need to order:
4 x SEN0368 sensors
2 x POLOLU-2485 Dual relay boards
? X 1K resistor (what type would be the best for this setup and how many?)
Is there anything I’ve missed, what guage wire and do i wire up as per both wire diagrams you sent?

Hi Brian
All the bits at once. Thank you for the confidence, although at the price you might just as well do that or you are up for a wait time and extra postage

Yes

Yes.

1 for each relay “EN” (4). just the regular 1/4 (0.25)W or similar. Tolerance not critical.

Yes, just as I have drawn. Don’t forget the switches on the main diagram become the relay contacts for that particular sensor. It is important to wire the contacts according to the particular sensors just as drawn or the latching or for that matter nothing will work properly.

Main Relay. I just searched Core for “relay” and nothing suitable comes up. You say your pump is only about 2A so Jaycar have one Cat no SY4065 with a suitable base SY4064, if there is a retaining clip for this base get that too as they do sometimes shake out with vibration. If there is no retainer there is a gap underneath the base so you can slip a small cable tie underneath to retain the relay. Just a bit of insurance. They will also have the 1k resistors too RR0572. You also need 2 diodes. Any of 1N4004 or 1N4007 will do this job.

Wire: I would suggest a general purpose size like 22 or 20 AWG should be able to handle everything and is not too big or cumbersome. I am not sure if the terminal blocks on the relay boards have wire protectors or not but any time you have to fasten stranded wire under a screw I am a big fan of bootlace ferrules, particularly if you have 2 wires or 1 stranded and 1 solid (like component leads). Good insurance and less heartache with connections coming loose. One free tip. DO NOT tin stranded wire with solder and clamp under a screw connection. It will not be a case of IF it will come loose but a case of WHEN. As it WILL come loose.
Good luck and keep us posted.
Cheers Bob

2 Likes

Thanks Robert,
Will get all the bits together and let you know, once i have the opportunity to set it all up, will let you know how i went with the setup. Thanks again for all your help.
Cheers

Hi Brian
One last thing. when you get it all working I think it would be a good idea to install a master switch to remove power completely from this set up when not in use. When powered it will have some battery drain which could be embarrassing to say the least if you are caught unawares.
Cheers Bob

1 Like

Hi Robert
Yes already thought of that. The set up i have currently has a master switch in the circuit so will be able to utilize this. When we get our new caravan i hope i will be able to control it f rye om the display screen I’m looking at installing. Again thanks for all your help and will keep you posted.

1 Like

Just goes to show that microcontrollers / computers are not always necessary… After, relay control systems existed before the electronics caught up.

Speaking as one who built a relay/switch/lights multiposition revolve controller for theatre (way back in the late 70’s).
Then later I learned about Programmable Logic controllers (PLCs) which were the next step to replacing racks … and racks and racks … of relays in factory automation on production lines.

Nice work @Robert93820 :star_struck:

1 Like

Hi Murray
Yeah i can’t wait to get all the components together and set up a trial system to see how it all works. Robert has made it simple and looks to me very effective. Will post the outcome in coming weeks.

Hi Murray
Yes this is the sort of thing that is crying out for a little PLC. I personally would look at a small Mitsubishi Alpha series (or NHP) marketed as “intelligent relays”. A tried and proven very robust controller. I know of some which have been operating for 15 years or more and still going strong. To program you actually draw a logic circuit with access to all the logic blocks, timers, pulse generators, delays etc. I have used these for various factory automation tasks, high bay lamp dimming control etc.

But to use these you need access to the programming software and connecting cable. I actually have an old version, so old it connects with a serial port and connector. Would have to have changed over the years even if just a USB version. I have not kept up with developments here.

Will have to stick to relays for this application as we don’t want to over complicate things.
Cheers Bob

1 Like

Hi Robert,
Exactly - I learnt and use Allen-Bradley PLCs - learnt at RMIT, and used in show controller systems for Fox Studios - combined with specialized theatre specific lighting, video and audio equipment. The PLCs did the heavy lifting w.r.t. motion bases, and safety interlocks etc, while glitz and glam theatre magic came from the other gear.

A little OMRON ‘smart relay’ might also do the trick too for this pump application.

As you mentioned - PLC’s - not being general computers - are very reliable and long lived.
And yes - must have the programming software and accessories … sigh $$$

Cheers
Murray

1 Like

Hi Robert
I have finally got all the items for my auto water management setup. Went back through our correspondence to look over the schematics you sent. I went over both, and maybe it’s me, but they aren’t making sense as to how it all comes together. I’ve worked out 50% of the schematics just not able to put the last of it together.

Thanks

Brian M

Hi Brian
Thought you had most of it sorted. What bits are you having trouble with.
Cheers Bob

Hi Robert
When i laid everything thing out i reslise i have no way to connect to the POLOLU-2485 with power, Adafruit ADA757, the diodes and the resistors (whether i solder to bread board or solder the wires direct) and the latching switch i assume only 1, 3 and 5 are used or 2, 4 and 6 as well? So i need some connection blocks and pins to suit so i can power everything but not sure which ones i needfor the 2485 and the 757. Also, would it be better to solder the 757, diodes and resistors to a bread board?

Hi Brian
Looks like you are having trouble with all of it.
What the hell are you going to do with the ADA757. This is the first I have heard of this.

Just what do you mean by this? Are you talking about the DPDT (double pole double throw if you are wondering) relay and if so where did you get those numbers from.
This is the connections for the LY2 12V Omron relay. Other manufacturers may or may not be the same. This shows the connections for the versions without and with a diode. The one with a diode is polarity conscious re the coil.
image
This is the base that it plugs into showing the connection points
image
And this is a drawing of the actual relay.
image

Your remarks are a bit of a worry. I was under the impression you had the expertise to build this thing. Doing it remotely is a challenge and I feel you might need some face to face help here.

The circuit is about as simple as I can make it but if you can’t follow it you have a big problem. I really thought you could and didn’t have a problem with this.

One thing which might make it a bit easier to understand:
Consider the small circuit with the sensor and Pololu relay board. There are 4 such identical circuits with 2 dual relay boards. I have only shown 1 circuit as they will be all the same.
When you go to marry these into the main circuit consider each of these to be S1, S2, S3, and S4. The relay contacts on the boards are the switches drawn on the circuit.

I don’t know how much more help I can be but will try.
Cheers Bob
PS: What are you like at this sort of soldering.

1 Like

Hi Robert
I was going back over our conversations regarding the automation of my water tanks on our caravan and noted you mentioned the following:

“Wire everything up as per the circuit using the caravan 12V but I have indicated 5V in the attached circuit showing sensor and relay board connections as the quality and actual voltage in the van are unknown I am suggesting a step down converter to 5V to try and make sure of the quality of this supply.”

Was there a particular step down converter you had in mind or will the components you suggested be adequate. I’m testing with a 12v 7 amp battery at the moment.

I’ve set up the components and trial tested it on a small scale and so far all works except I’m having a few issues getting the solenoids to switch polarity (reverse direction) so working through this at the moment. Outside of that all looks good just need to test with the pump inline to see how it all comes together.
Once i sort the solenoid issue out will do a full test on a larger scale with the pump.

Hi Brian
Those relay boards ARE POLOLU-2485 are they not. They should be 5V relays. I hope you are not testing this part with 12V. If so you could do some damage. Relays are pretty robust but 12V is a bit much.

The 5V is to power the 2 dual relay boards and sensors.I suggested this to keep this part of the circuit stable. The rest is pretty forgiving and the battery will be fine. The 12V 7Ahr battery should be fine for testing but keep it charged. I hope the van battery is a bit bigger.
12V to 5V step down units. There are a couple of Pololu devices that would do, DFR 0831 and DFR 0571. They will deliver 4A and 3A respectively which should be plenty and leave you with plenty of head room.

The solenoids should return when power is removed. Please don’t tell me at this stage they are of the type that needs a voltage reversal to switch back the other direction. That is a completely different ball game and require a complete re think of the solenoid switching.
Cheers Bob

Hi Brian
Refer my last post.

If this is the case it is fairly easily doable but will require 2 more DPDT relays. Please advise of the situation and I will sketch up a circuit of the changes.
Cheers Bob

Hi Robert

Yes, i am using the POLOLU-2485 and the level sensor kit comes with a DFROBOT 4 pin sensor adaptor which can switch from 12v to 3v output so powering the relay with this, not sure how robust these would be long term.
Yes, the solenoid valves require voltage reversal and i figured this out this morning that i would need a couple of extra DPDT relays.

Just something else i missed, with the level sensor for the main 95 litre tanks there is only one fitted to each tank, so if i mount the sensor at say 75% capacity once the tank drops to this level the valve opens and begins to fill, will only fill to this level or will it fill the tank?

Thanks

Brian M

Hi Brian.
What are you doing.

Just how are you “powering” the relay. Did I include that adaptor in my circuit??? I think not. I stipulated 5V for a very good reason. THEY (whoever THEY are) say this relay board will work at 3.3V. True, some may but 3.3V is well outside the relay manufacturer specifications (from memory 3.7V)not to mention the transistor drop which means the relay sees about 3.1V. So in the interests of reliability I always suggest min 5V operation. As usual there is nil information about this “adaptor” but as it is driving an Arduino output in the example which is high impedance I assume this 3.3V is probably via a 10kΩ resistor and as such will provide very little current. Would turn on the Mosfet on the board but falls into the same situation as the relay. It is a “logic level” (5V) device so better to operate with that level.

I researched the sensor previously and found it is good for a current output of about 100mA , I don’t think you need the “adaptor”.

Use a DC-DC buck converter for your 5V. The ones suggested should be OK and should leave you a bit of current head room for safety reasons. I personally like something like 100% overkill or fudge factor.

Wire the sensor and relay board circuit just as I have shown THEN tell me if it does not work for some reason. DO NOT forget the 1kΩ resistor in series with the “EN” board terminal as I have circled on the circuit. If you want to go off and do your own thing be my guest but you did ask for advice…!!

Nice to find out now and you WILL need 2 more DPDT relays. What is now shown on the main circuit as solenoid coils will become the relay coils. I will sketch up a circuit and post it soon. It will be an add on sort of supplement to the main circuit.

It will fill to this level only unless you are implementing your request to empty the supply tank (presumably to prevent stale stagnant water growing bugs) in which case the last tank to fill will overflow until the supply tank is empty. Wiring mod provided previously. Get the basic system working first before worrying about the frills. The sensor needs to be at the full mark and no pumping can occur until the water in the supply tank is up to the top sensor so neither tank will fill unless there is enough water in the supply tank. If the level in the supply tank falls to the bottom sensor pumping will cease and neither tank will fill.
Cheers Bob
EDIT: There is a data sheet for the sensor itself (no adaptor) here

Will order the DC - DC buck converter for the 5v power as suggested. Will continue wiring up as per your original schematic and add the converter in once i have it.

Will also order 2 x DPDT relays for the solenoids as well.

Will be in touch if, when i put the converter in, it does not work.

Thank you for your time and assistance once again.

Thanks

Brian M