Something I was hoping would be cured after rebuilding was the bug where the Arduino would appear to crash and lose all its target values causing the system to drain. Unfortunately the problem is still there but since everything is more robust and better thought out I will hopefully be able to figure out the cause.
So far I have found that it doesn’t happen when power isn’t being supplied to the pumps and valves and it looks like the pumps are the main culprit which is odd as it should be isolated on the relay array. A separate power supply for the pressure sensors also doesn’t help. Right now the only thing I can think of is that the pressure sensors are right next to the pump motors so they could be picking up EMF and tripping the Arduino.
I could do with an oscilloscope.
After wiring and plumbing everything the next stage was to put it back in its housing, attaching the pressure sensors and wiring everything together. This time more of the power circuitry is inside the unit so only the 12V supply, single 5V supply, 6 control wires for the pumps and valves and the 3 pressure sensor data wires are external. After testing all the connections and relays I could then start the attaching the lid and tubes.
After putting a little water in each of the tubes I was happy to find that everything appeared to be working. The self priming pumps took a little while to start moving water but when they did, they moved it nice and quickly. The pressure sensors needed a bit of calibrating because they were not positioned the same way as before.
Not finding any leaks I made the pumps fill the tubes as far as they could with the water already in the system and then filled it the rest of the way, the theory being that there physically isn’t enough water in each tube’s reservoir to overfill the tube, even if everything goes horribly wrong with the control system.
One of the biggest challenges of the original project was the routing of pipes so that they didn’t kink and cut off flow. With the extra space, shorter tubes and better planning I was able to work out a way to fit it all together.
It’s taken a while but I’ve finally gotten around to doing the wiring for the relay array. This involved striping and tinning wires to stop them fraying in the screw terminals. The wires I am using are much higher gauge than they really need to be for the 12V 2A maximum going through them.
The original pumps I used had spade connectors but unfortunately the self priming ones I have don’t so I’ll be getting some when I get the chance, I want to make it easy to swap out parts and avoid having anything soldered when it doesn’t need to be. I’ve also connected a pair long wires to the main power terminal to take it to the external power supply.
The valves appear to do what I want and have been attached to the pumps, I’ve placed them before the intake so that water remains in the pump and means it doesn’t have to self prime but can when it’s first turned on.
I checked my solenoid valves and found that they still had water in them after a year and that the hose fittings had corroded slightly and stained the tubes. I drained them and thankfully they still worked. I’ll have to make sure I remove all the water from it when it is not in use.
After getting and fitting the spade connectors my next concern is with the plumbing and how to make the most of the space provided by getting rid of the hand primer pumps and how to wire the three pressure sensors. I’ll probably also have a look if there is now a better way to send control signals to the Arduino from the net.