This is going to take some thinking!
Wednesday, 16 October 2013
Tuesday, 15 October 2013
Plumbing
The flow meter is specced at 3/8" push on fitting so that's a good place to start because the pumps have no specification given.
Having looked it it, it might make sense to think about some clips but lets not spend cash needlessly for now, wait for normal cables ties to fail.
The flow meter also says that it should have a pre-filter for 80 microns, that is 0.08mm. "Mesh 200" is 0.075mm so this size is the most appropriate.
I have found some mesh on ebay which is £2.99 per 15cm x 15cm sheet but there are also various inline ones, a fuel filter for instance but that's £17.99
Monday, 14 October 2013
Direct Pump Control Circuits
My going with dumb pump design it means more pins being used on the NXP. However we still have plenty to play with. P5-P30 on the LPC1768 and P5-P36 on the LPC11U24. The LPC1768 has three UART serial connections so I shall reserve two of those for the sensors. So to keep it to common PINS for some reason, P17-20 used for the flow restricted pumps and P5-P7 for the peristaltic pumps.


I made a start on the code at http://mbed.org/
For a quick test, I used this code
#include "mbed.h" DigitalOut myled(LED1); DigitalOut a1(p5); int main() { while(1) { myled = 1; a1 = 1; wait(0.5); myled = 0; a1 = 0; wait(0.5); } }to strobe the motor.
The results were satisfying
Sunday, 13 October 2013
Peristaltic Pumps
This is a quick knock up circuit I did on http://circuits.io/

The AT-Tiny uses three wires RX, TX & GND to communicate with the controller. The protocol will say which pump 1-4 and how many mL and the At-Tiny will take care of the rest. Just keep the Enable lines up, no need to for anything else as we're not changing direction or anything. I've left off the possible 4th pump as I haven't got one.
Regular pumps with flow meter
Because of varying head heights of the water storage, return from recycling, etc. issues I have chosen to use a flow meter to regulate water input. The idea being that all water input pumps can be pumping together and shut off once the required amount has been delivered. The flow meter introduces an additional complexity because the flow meter instructions say that the water speed should rise gradually and that air should be prevented from enterting the system. My pumps will be submersed so I'm not sure that will be an issue. For this discussuion that's not really an issue because that is a software problem likely to be quite simple by just modualting the control line.
The flow meter produces 1120 pulses per litre and takes a TTL supply voltage.

This circuit activates either pump, watches the flow pulses and then kills all pumps when the required flow is complete.
Smacked in the KISSer
The smart pump idea, although good, is draining time trying to solve a problem I added to the project. As it eating into the schedule I am going to drop that part and just use the one microcontroller. The rest of the design is the same and the control methods are the same. Bringing back the smart pump idea can be done later and swapped in piecemeal.
Specifically I am finding getting the communication between the controllers more difficult than it should be. Debugging two sets of code at once is hard. Especailly without any on chip debugging. It's just "Did that work? No. Next idea" which is not good methodology. Made worse by working in the simulator! I have a new serial port PCI card coming which I need so I can run the newest version of the simulator, although I'm not sure that will solve the immediate problem. At least I will only be typing on one PC!.
Friday, 11 October 2013
Deadline is longer than previously thought
haha the 4 week deadline was just for the planning, not the project in total. That's actulkly due on 6th December! That gives me plenty of time to debug the active pump controls.
However, for now I shall continue on the dumb pump mission so at least I will have a working set of pumps and can reduce the pin requirement later.
Last night I managed to kill the £45 LPC11U24 :( so as a backup in case I kill the LPC1768 I ordered the FreeScale KL25Z, which was only £17.20 thus making it an attractive controller