ie Both systems will cater for four ``ordinary'' circuits. In addition, both systems have one ``special'' circuit each. The front yard system must cater for the fish-pond filling; and the back system must cater for the Garden Frame, aka the GreenHouse-in-minature.
We live on the Kensington Ridge, hence most of our plants are effectively pot-plants! Most of the tree holes I have dug have been carved out of solid slate. In the parts of the garden without the slate, we have the standard ``Witwatersrand Complex'' Quartz and sandstone conglomerate. In either case, there are few parts to the garden that have more than 6 inches of soil. In one particular patch at the back, we're talking about 2 inches-the grass dies off if it isn't watered at least weekly.
All this means that instead of having the MicroMists come on for an hour every week, they need 15 minutes at most, but they need it every day! There is no need for deep watering here!
Last point: The target system is a 16C84, hence re-programming watering times etc is very simple and convenient, just plug it out, program, plug it in, and the user interface is then kept very simple indeed, with no need for the usual ``water computer'' type of interface :-)
Couple of Pics of the setup:
To get a little bit more fancy, if the user holds the push-button down for more than 3 seconds, the LED will go off. If the user lets go now, only Circuit 1 will be watered. If the user keeps pressing for a further 3 seconds, the LED will flash again indicating that Circuit 2 is now scheduled. A further 3 second wait will flash the LED again signalling a Circuit 3 schedule etc. Only that circuit will operate.
Another push of the push-button will annul the previous entry and begin a new one. If you want to cancel the watering, switch it off :-)
In all cases the initial watering will be delayed by a minute, so that you get out of the watering area :-).
Naturally, 24 hours later, the same cycle kicks in. Note that the systems do not need a synchronized real-time clock with this scheme. An RTC is a marvellous idea, but it drifts, and the interface to enable its setting is expensive (in cost and IO reqd). The automatic mode will need to keep reasonable time for two or three weeks at most, and anyway its not a severe train smash if it does drift a couple of minutes a day.
As a result of this scheme, however, you may need to switch the system to automatic a day before in order to get the garden watered at the time you want it watered.
The watering cycle will be ommitted if it has rained sufficiently, by the simple expedient of a little 5mm deep tray with two bits of copper. There will be a conduction path until the 5mm of rain has evaporated.
As a first stab, this needs a 1 minute watering every 2 hours during the day. This can be synchronized to daytime by the simple scheme of cutting the top off a BC108! It makes a marvellous light sensor.
Thus, we need a level sensor (two bits of copper making a conductive sensor) at the desired pond height. When the level drops, turn on solenoid valve to fill pond.
If after x minutes, the level is not restored, turn off pump and solenoid-there is a major leak.
When solenoid is switched on, start a timer, and record the number of minutes of `on-time'. Clear the register every hour. If the register exceeds y minutes in an hour, turn off pump and solenoid-there is a slow leak!
Under shutdown conditions, turn on pump for 5 minutes every 2 hours to ensure that the aviary still gets fresh enough water in its little paddling pool. Also turn on the solenoid for z time to cater for the losses.
Hence yet another valve.
|I||Auto/Man sw.||I||Auto/Man sw.|
|I||Push button||I||Push button|
|O||Cct 1 (Main)||O||Cct 1 (Veg)|
|O||Cct 2 (Rose)||O||Cct 2 (Herb)|
|O||Cct 3 (Pond)||O||Cct 3 (Lawn1)|
|O||Cct 4 (Lawn)||O||Cct 4 (Lawn2)|
The outputs will drive TIP41 BJT's via 1k to pull in the 24V AC solenoids available from Vetsak (R111.48), although I drive them perfectly well with a 12V DC Supply! I may have to reverse the supply every now and then to get rid of residual magnetism in the solenoid. The actual solenoid is dinky, and controls air access to the top of the diaphragm, using the water pressure to open and close the valve-a very clever little device.
I already have a tap dedicated to the watering system in the front and back, so I will supply the solenoids from them so that I can regulate the flowrate if necessary. The taps have 20mm (3/4'') outlets, and the valves have 25mm (1'') inlets.
I thus use 20mm T pieces and nipples (galv) and 20mm(m)to 25mm(m) plastic reducers to get to the valves. From the valves I use a 25mm(m)to 15mm(f) reducer, followed by a 15mm hose coupling, which accepts my standard 12mm PVC pipe after a fair amount of hot water, with a jubilee clamp!
The instruction cycle thus runs at 451 550/4 = 112 887.5 Hz! meaning that an instruction takes 8.86mSec. Using the full 1:256 Prescalar, we get to an RTCC rollover of 2.27mSec. To get a half-second timer, we need this time to elapse 220.48 times. Murphy. Use a simple scheme to do 220, followed by 221 counts, and we get a second at 1.000075296 real seconds.
As there are 86400 seconds in a day, 24hrs in the system will take 86406.5 seconds. I can live with 6 seconds drift a day due to the division ratio. The drift due to temp, humidity and the price of Tea in China is likely to be a lot more than that!!! (Over 3 weeks, the Division Ration Drift will be 136.6 seconds = 2 minutes and 16 seconds!
(Without adding the ``leap'' count, and rounding to 220 counts results in the RTC losing 3977 seconds in 3 weeks = 1 hour and 6 mins!)
Thus in terms of the system scaling granularity, the RTCC rollover occurs at 2.27mSec, and the smallest (logical) time interval avaliable is a half second, which is perfectly adequate for this simple project. It thus makes sense to issue a processing cycle every half-second, as that can be used as a ``comfortable'' debounce and LED toggling rate. Since an instruction cycle takes 8.86 muSec, a processing cycle contains 56 433 instruction cycles!!!! Way Overkill, But I have the crystals! (Dear Sir, please supply me with two 10Hz crystals please :-)
My standard RTOS requires 1 label to be defined-UserProgram, and requires a goto Wait at the end of the task list. In this way, I prevent the unnecessary use of a stack level, and since I designed the RTOS originally for the 16C54, with only 2 stacks...
The online version is "http://ytdp.ee.wits.ac.za/picproj/water.html" and the tar-gzipped archive at"ftp://YingTongDiddleiPo/pub/picproj/water.tgz".
Back to Home Page Webaliser Stats