Re: [Dorset] A New Wimborne Model Town Project Query - Sensing Water Levels and Flow

2017-05-05 Thread Terry Coles
On Friday, 5 May 2017 15:47:33 BST Ralph Corderoy wrote:
> Again looking at it back to front, the simulation could help determine
> the limits of the real-world that can be handled.

Since the Pi has a clock speed of 700 MHz +, depending on the model and 
everything else is analogue, I think it's unlikely that the control system 
will be unable to handle the limits of the real world.  We are looking at 
response times of 10 minutes or more.

Of course if the real world signals turn out to be too small or too large, 
then there will be issues, but we'd need the real world to determine that.

> That sounds very complex compared to sloshing a bit of water in by
> opening the valve for a short while, then refusing to do so again in the
> face of demand until N seconds have passed to allow it to work its way
> around and maybe flip some level switches.  This copes with the system
> changing over time due to parts being replaced, pipe bores reducing with
> debris, etc.

Well we could do that, or we could calculate the rate of change of flow and the 
rate of change of levels and then ramp up or ramp down the pumps accordingly.  
That is *much* more complex and *much* more fun.

I see no reason why we shouldn't be able to do that though unless the sensors 
let us down.

> Anyway, it sounds like it will be fun however you tackle it.
> Another Pi-magazine article?  :-)

I'm still waiting for Rob Zwetsloot to visit to look at the Bells.  He 
promised he would about a month ago.

To be fair, anyone who has bought the latest copy of MagPi can probably guess 
why.  Preparing for this month's freebie must have taken up quite a lot of his 
time.


-- 



Terry Coles

-- 
Next meeting:  Bournemouth, Tuesday, 2017-06-06 20:00
Meets, Mailing list, IRC, LinkedIn, ...  http://dorset.lug.org.uk/
New thread:  mailto:dorset@mailman.lug.org.uk / CHECK IF YOU'RE REPLYING
Reporting bugs well:  http://goo.gl/4Xue / TO THE LIST OR THE AUTHOR


Re: [Dorset] A New Wimborne Model Town Project Query - Sensing Water Levels and Flow

2017-05-05 Thread Ralph Corderoy
Hi Terry,

> The biggest problem that we encountered was simulating the real world
> parameters in a realistic way.

Again looking at it back to front, the simulation could help determine
the limits of the real-world that can be handled.

> For example.  Our river system is likely to have a maximum head of
> water in the 5 water butts totalling about 1000 litres at a height of
> around 1-2 metres above the sump.  As the water drops in the river
> system, then we want to turn on this supply at the right rate to
> top-up the river without overdoing it.  In order to simulate that, we
> need to know how long it will take until the sump is full when we
> shift (say) 100 litres of water from the butts.  That will depend on
> the size of the pipes, the smoothness of the internal bores, the
> slope, the depth of water in the butts,  the pump capacity and the
> kinks in the pipework.

That sounds very complex compared to sloshing a bit of water in by
opening the valve for a short while, then refusing to do so again in the
face of demand until N seconds have passed to allow it to work its way
around and maybe flip some level switches.  This copes with the system
changing over time due to parts being replaced, pipe bores reducing with
debris, etc.

Anyway, it sounds like it will be fun however you tackle it.
Another Pi-magazine article?  :-)

Cheers, Ralph.

-- 
Next meeting:  Bournemouth, Tuesday, 2017-06-06 20:00
Meets, Mailing list, IRC, LinkedIn, ...  http://dorset.lug.org.uk/
New thread:  mailto:dorset@mailman.lug.org.uk / CHECK IF YOU'RE REPLYING
Reporting bugs well:  http://goo.gl/4Xue / TO THE LIST OR THE AUTHOR


Re: [Dorset] A New Wimborne Model Town Project Query - Sensing Water Levels and Flow

2017-05-05 Thread Terry Coles
On Friday, 5 May 2017 13:55:03 BST James Blake wrote:
> When I've seen similar things done in industrial control networks you
> typically create a software sandbox similar to that described in order to
> define the programmable logic controller commands.

I have experience of using similar systems (as a systems engineer rather than 
as a software engineer).  The biggest problem that we encountered was 
simulating the real world parameters in a realistic way.

For example.  Our river system is likely to have a maximum head of water in 
the 5 water butts totalling about 1000 litres at a height of around 1-2 metres 
above the sump.  As the water drops in the river system, then we want to turn 
on this supply at the right rate to top-up the river without overdoing it.  In 
order to simulate that, we need to know how long it will take until the sump 
is full when we shift (say) 100 litres of water from the butts.  That will 
depend on the size of the pipes, the smoothness of the internal bores, the 
slope, the depth of water in the butts,  the pump capacity and the kinks in 
the pipework.  We can estimate this, but in the end it will only make sense in 
our model when we have some real figures to plug in.

Simulation is an excellent tool for developing control systems but in the real 
world you need an injection of reality (literally) to actually do more than 
reinforce your preconceptions.

Generally, engineers developing control systems have previous system 
parameters to use as a starter for 10.  None of us on this team are control 
engineers, hydro engineers, environmental engineers or have any experience of 
river systems other than falling into them when small.  What we have is me (a 
retired systems engineer), a retired engineering manager with a background in 
electronics and an IT student.  We are going to take this slowly.

-- 



Terry Coles

-- 
Next meeting:  Bournemouth, Tuesday, 2017-06-06 20:00
Meets, Mailing list, IRC, LinkedIn, ...  http://dorset.lug.org.uk/
New thread:  mailto:dorset@mailman.lug.org.uk / CHECK IF YOU'RE REPLYING
Reporting bugs well:  http://goo.gl/4Xue / TO THE LIST OR THE AUTHOR


Re: [Dorset] A New Wimborne Model Town Project Query - Sensing Water Levels and Flow

2017-05-05 Thread Terry Coles
On Friday, 5 May 2017 13:37:02 BST Ralph Corderoy wrote:
> > Thanks.  I'll look into that, although I doubt that we'll be writing
> > software for some time.  We need to get the system design nailed down
> > first and we can't do that until we've built and tested some sensors.
> 
> That seems quite a strict order to progress.  Build and test some
> sensors;  levels, flow, ..?  Repeat until they work.  Design a theory of
> how they can be used.  Make enough sensors and put them in planned
> positions.  Have Pi gather data.  Implement logic.  Work out how far to
> backtrack and re-do based on problems found.

The thing is that we're not short of time; the project is a phased one with the 
automation 
being tackled in Phase 4.  Phase 1 is now complete and Phase 2, (the bog 
garden) is well 
on the way.  Phase 3 has been started; that is putting in the water butts and 
it really makes 
little sense to rush into Phase 4 until we have something to control other than 
the sump 
pump!

The last Phase (No 6) may not even be started for a year or two.

The labour for this job is free, but a bit scarce because a key resource is 
extremely tied up 
with his OU course at the moment.  What is not free is the cost of the 
materials, so we 
want to have some confidence that we are buying the right kit before we spend 
WMT 
funds on more than a few parts.

The big Risk is environmental as far as we can see, so the first thing to 
tackle is confirming 
that we can overcome that problem.  Then we can look at how we can best use the 
selected sensors in a system that includes software.

> Or, model system to see what minimal simplest sensor allows the desired
> result, e.g. binary "water at my level" switch, no flow.  Logic is
> continually varying the pump PWM as it responds to these flipping
> switches in a "plate spinning" up-a-bit, down-a-bit, scramble to keep
> feet dry and attain equilibrium.  Some "emergency off" or "all hands to
> the pump" switches could override the river-level ones.  The river flow
> might undulate a bit, though that could make it more interesting to see.

We believe that the biggest risk to the Project is the sensors.  I don't think 
we see the 
control side of the system as a major show-stopper.  Yes it could take us a 
while to work 
out the right algorithm and we may have hiccups along the way, but we don't 
anticipate 
that we won't get it to work - eventually.

The thing is that the control system will have a very long loop time constant.  
We will be 
monitoring water levels at intervals of minutes rather than milli-seconds and 
ramping up 
the pumps very slowly to compensate for leakage or flooding. 

> No idea if that could work, but software simulation seems an easier way
> to experiment, or a system could even be "run" on paper or a spreadsheet
> with rows being time-passing "ticks".

I'm sure you are right and I expect that we will do something like that.  I 
would like to 
know what the inputs and outputs of the system are going to be before we try to 
simulate 
it, that's all  :-)

> Playing around in the water with sensor design could be in parallel, if
> only there was enough volunteer time.  :-)

Exactly.

-- 



Terry Coles
-- 
Next meeting:  Bournemouth, Tuesday, 2017-06-06 20:00
Meets, Mailing list, IRC, LinkedIn, ...  http://dorset.lug.org.uk/
New thread:  mailto:dorset@mailman.lug.org.uk / CHECK IF YOU'RE REPLYING
Reporting bugs well:  http://goo.gl/4Xue / TO THE LIST OR THE AUTHOR


Re: [Dorset] A New Wimborne Model Town Project Query - Sensing Water Levels and Flow

2017-05-05 Thread James Blake
When I've seen similar things done in industrial control networks you typically 
create a software sandbox similar to that described in order to define the 
programmable logic controller commands.  

These typically take the form of UI controls that simulate:

Sensors (a check box for binary on/off, a increment/decrement button for 
integers or a slider between a defined floating point upper and lower limit).

Outputs, which are also typically binary switching something on/off, a integer 
to set something on an ordinal scale a float to set some value via a digital 
potentiometer.

You also need to consider what you want to provide in way of instrumentation.  
Usually you limit this to information to that is needed to support a human 
decision making or diagnostics.

The first stage is to typically model all the closed loop systems, including 
the sensor inputs and outputs that can be controlled.  Then you model the 
different states that the sensors illustrate and the responses needed.  The you 
code this is the simulator, create a testing plan to model the states/responses 
and then adjust the UI elements to make sure it acts as expected.

At this point the logic is developed and tested and the only thing left to do 
is replace the UI interface to the variables with real sensor data.

James



> On May 5, 2017, at 1:37 PM, Ralph Corderoy  wrote:
> 
> Hi Terry,
> 
>>> If the control logic looks like being at all complex you'll probably
>>> want to simulate the system all in software;  your control logic
>>> versus random events/you acting as the gods.
> ...
>> Thanks.  I'll look into that, although I doubt that we'll be writing
>> software for some time.  We need to get the system design nailed down
>> first and we can't do that until we've built and tested some sensors.
> 
> That seems quite a strict order to progress.  Build and test some
> sensors;  levels, flow, ..?  Repeat until they work.  Design a theory of
> how they can be used.  Make enough sensors and put them in planned
> positions.  Have Pi gather data.  Implement logic.  Work out how far to
> backtrack and re-do based on problems found.
> 
> Or, model system to see what minimal simplest sensor allows the desired
> result, e.g. binary "water at my level" switch, no flow.  Logic is
> continually varying the pump PWM as it responds to these flipping
> switches in a "plate spinning" up-a-bit, down-a-bit, scramble to keep
> feet dry and attain equilibrium.  Some "emergency off" or "all hands to
> the pump" switches could override the river-level ones.  The river flow
> might undulate a bit, though that could make it more interesting to see.
> 
> No idea if that could work, but software simulation seems an easier way
> to experiment, or a system could even be "run" on paper or a spreadsheet
> with rows being time-passing "ticks".
> 
> Playing around in the water with sensor design could be in parallel, if
> only there was enough volunteer time.  :-)
> 
> Cheers, Ralph.
> 
> -- 
> Next meeting:  Bournemouth, Tuesday, 2017-06-06 20:00
> Meets, Mailing list, IRC, LinkedIn, ...  http://dorset.lug.org.uk/
> New thread:  mailto:dorset@mailman.lug.org.uk / CHECK IF YOU'RE REPLYING
> Reporting bugs well:  http://goo.gl/4Xue / TO THE LIST OR THE AUTHOR

-- 
Next meeting:  Bournemouth, Tuesday, 2017-06-06 20:00
Meets, Mailing list, IRC, LinkedIn, ...  http://dorset.lug.org.uk/
New thread:  mailto:dorset@mailman.lug.org.uk / CHECK IF YOU'RE REPLYING
Reporting bugs well:  http://goo.gl/4Xue / TO THE LIST OR THE AUTHOR


Re: [Dorset] A New Wimborne Model Town Project Query - Sensing Water Levels and Flow

2017-05-05 Thread Ralph Corderoy
Hi Terry,

> > If the control logic looks like being at all complex you'll probably
> > want to simulate the system all in software;  your control logic
> > versus random events/you acting as the gods.
...
> Thanks.  I'll look into that, although I doubt that we'll be writing
> software for some time.  We need to get the system design nailed down
> first and we can't do that until we've built and tested some sensors.

That seems quite a strict order to progress.  Build and test some
sensors;  levels, flow, ..?  Repeat until they work.  Design a theory of
how they can be used.  Make enough sensors and put them in planned
positions.  Have Pi gather data.  Implement logic.  Work out how far to
backtrack and re-do based on problems found.

Or, model system to see what minimal simplest sensor allows the desired
result, e.g. binary "water at my level" switch, no flow.  Logic is
continually varying the pump PWM as it responds to these flipping
switches in a "plate spinning" up-a-bit, down-a-bit, scramble to keep
feet dry and attain equilibrium.  Some "emergency off" or "all hands to
the pump" switches could override the river-level ones.  The river flow
might undulate a bit, though that could make it more interesting to see.

No idea if that could work, but software simulation seems an easier way
to experiment, or a system could even be "run" on paper or a spreadsheet
with rows being time-passing "ticks".

Playing around in the water with sensor design could be in parallel, if
only there was enough volunteer time.  :-)

Cheers, Ralph.

-- 
Next meeting:  Bournemouth, Tuesday, 2017-06-06 20:00
Meets, Mailing list, IRC, LinkedIn, ...  http://dorset.lug.org.uk/
New thread:  mailto:dorset@mailman.lug.org.uk / CHECK IF YOU'RE REPLYING
Reporting bugs well:  http://goo.gl/4Xue / TO THE LIST OR THE AUTHOR


Re: [Dorset] A New Wimborne Model Town Project Query - Sensing Water Levels and Flow

2017-05-04 Thread Terry Coles
On Thursday, 4 May 2017 17:26:41 BST Ralph Corderoy wrote:
> If the control logic looks like being at all complex you'll probably
> want to simulate the system all in software;  your control logic versus
> random events/you acting as the gods.  When I was writing Python, I used
> its TkInter GUI library to do something similar.  That provided all the
> controls to control the simulation, display readouts, etc., but best of
> all was its Canvas widget to draw a schematic.  This lets you plonk down
> bits of drawing and text, give them "tags", and then change all things
> with a given tag, e.g. colour, and it takes care of the redrawing.  In
> my case, it was all the lines representing one logical wire, etc.
> 
> https://wiki.python.org/moin/TkInter

Thanks.  I'll look into that, although I doubt that we'll be writing software 
for some time.  We need to get the system design nailed down first and we can't 
do that until we've built and tested some sensors.

-- 



Terry Coles

-- 
Next meeting:  Bournemouth, Tuesday, 2017-06-06 20:00
Meets, Mailing list, IRC, LinkedIn, ...  http://dorset.lug.org.uk/
New thread:  mailto:dorset@mailman.lug.org.uk / CHECK IF YOU'RE REPLYING
Reporting bugs well:  http://goo.gl/4Xue / TO THE LIST OR THE AUTHOR


Re: [Dorset] A New Wimborne Model Town Project Query - Sensing Water Levels and Flow

2017-05-04 Thread Ralph Corderoy
Hi Terry,

> Part of the control system will include varying the amount of water
> pumped from the sump to the bog garden
...
> we need to know the level of water and the flow at various points
> around the system.

If the control logic looks like being at all complex you'll probably
want to simulate the system all in software;  your control logic versus
random events/you acting as the gods.  When I was writing Python, I used
its TkInter GUI library to do something similar.  That provided all the
controls to control the simulation, display readouts, etc., but best of
all was its Canvas widget to draw a schematic.  This lets you plonk down
bits of drawing and text, give them "tags", and then change all things
with a given tag, e.g. colour, and it takes care of the redrawing.  In
my case, it was all the lines representing one logical wire, etc.

https://wiki.python.org/moin/TkInter

Cheers, Ralph.

-- 
Next meeting:  Bournemouth, Tuesday, 2017-06-06 20:00
Meets, Mailing list, IRC, LinkedIn, ...  http://dorset.lug.org.uk/
New thread:  mailto:dorset@mailman.lug.org.uk / CHECK IF YOU'RE REPLYING
Reporting bugs well:  http://goo.gl/4Xue / TO THE LIST OR THE AUTHOR


Re: [Dorset] A New Wimborne Model Town Project Query - Sensing Water Levels and Flow

2017-05-04 Thread Terry Coles
On Thursday, 4 May 2017 16:52:49 BST Ralph Corderoy wrote:
> Does the sump at the bottom of the river have the capacity to cope with
> no power for the pump that takes the water back uphill?  Perhaps it
> overflows into a drain?  If not, I guess the pump runs continously or
> the river flow is shut off at the top with the bog garden able to absorb
> a lot more if it's not a sudden increase?  Would seem a lot simpler if
> it was a closed system, not open to the rain.  :-)

Err.  That would be a bit difficult since the attraction is completely in the 
open air.  (Yes I did see the smiley.)

The sump would flood if too much water got into the river.  Historically the 
old system was shut off overnight or in the off season, but otherwise consumed 
a lot of water from the mains due to leaks.  To save money and the 
environment, the leaks have been largely stopped reducing the water loss, but 
also increasing the risk of flooding.

During dry periods however, a top-up will still be needed and the goal is to 
supply that water from the butts, with any excess being made available for 
watering the gardens.  If the excess exceeds the demand then we will have to 
dump the water somehow.  Of course during a real drought, we would then have 
to fall back on the mains.

Part of the control system will include varying the amount of water pumped 
from the sump to the bog garden by using a PWM drive signal to the pump motor.  
In order to do that automatically, we need to know the level of water and the 
flow at various points around the system.

-- 



Terry Coles

-- 
Next meeting:  Bournemouth, Tuesday, 2017-06-06 20:00
Meets, Mailing list, IRC, LinkedIn, ...  http://dorset.lug.org.uk/
New thread:  mailto:dorset@mailman.lug.org.uk / CHECK IF YOU'RE REPLYING
Reporting bugs well:  http://goo.gl/4Xue / TO THE LIST OR THE AUTHOR


Re: [Dorset] A New Wimborne Model Town Project Query - Sensing Water Levels and Flow

2017-05-04 Thread Ralph Corderoy
Hi Terry,

> However, once the rainwater collection scheme is in place with five or
> more water butts to store the water, then the risk of floods will be
> increased after periods of heavy rainfall.  In the end, the monitoring
> and control is more about that scenario than the present one.

Does the sump at the bottom of the river have the capacity to cope with
no power for the pump that takes the water back uphill?  Perhaps it
overflows into a drain?  If not, I guess the pump runs continously or
the river flow is shut off at the top with the bog garden able to absorb
a lot more if it's not a sudden increase?  Would seem a lot simpler if
it was a closed system, not open to the rain.  :-)

Cheers, Ralph.

-- 
Next meeting:  Bournemouth, Tuesday, 2017-06-06 20:00
Meets, Mailing list, IRC, LinkedIn, ...  http://dorset.lug.org.uk/
New thread:  mailto:dorset@mailman.lug.org.uk / CHECK IF YOU'RE REPLYING
Reporting bugs well:  http://goo.gl/4Xue / TO THE LIST OR THE AUTHOR


Re: [Dorset] A New Wimborne Model Town Project Query - Sensing Water Levels and Flow

2017-05-04 Thread Terry Coles
On Thursday, 4 May 2017 16:20:48 BST Patrick Wigmore wrote:
> I must admit, it surprises me that the river system is so
> sensitive to the weather conditions. I would have expected there
> to exist a constant pumping rate that would maintain the river
> between sensible high and low levels except in very extreme
> weather.

Well, before this year, when the bog garden was added, this is exactly what 
happened, except the volunteers or staff had to top-up the system to 
compensate for leakage and evaporation.  Floods were quite rare, because the 
catchment area was very small.
 
> But then I have assumed an 'ideal' river and sponge-like bog,
> both with no leaks into the ground, and a sump tank that can
> easily hold the entire volume of water when the pump is switched
> off and the system drains down. It sounds like the reality is
> more complex.

This is the first year that the catchment has increased due to the addition of 
the bog garden, but even that won't make a lot of difference I suspect.

However, once the rainwater collection scheme is in place with five or more 
water butts to store the water, then the risk of floods will be increased after 
periods of heavy rainfall.  In the end, the monitoring and control is more 
about that scenario than the present one.

-- 



Terry Coles

-- 
Next meeting:  Bournemouth, Tuesday, 2017-06-06 20:00
Meets, Mailing list, IRC, LinkedIn, ...  http://dorset.lug.org.uk/
New thread:  mailto:dorset@mailman.lug.org.uk / CHECK IF YOU'RE REPLYING
Reporting bugs well:  http://goo.gl/4Xue / TO THE LIST OR THE AUTHOR


Re: [Dorset] A New Wimborne Model Town Project Query - Sensing Water Levels and Flow

2017-05-04 Thread Patrick Wigmore
On Thursday, 4 May 2017, at 11:29:27 BST, Terry Coles wrote:
> Since the system will be running largely unattended 24/7, we
> want to be able to predict the onset of a flood or drought in
> the river.  To do that we need to measure the actual depth so
> we can determine the rate of change.

I must admit, it surprises me that the river system is so 
sensitive to the weather conditions. I would have expected there 
to exist a constant pumping rate that would maintain the river 
between sensible high and low levels except in very extreme 
weather.

But then I have assumed an 'ideal' river and sponge-like bog, 
both with no leaks into the ground, and a sump tank that can 
easily hold the entire volume of water when the pump is switched 
off and the system drains down. It sounds like the reality is 
more complex.

-- 
Next meeting:  Bournemouth, Tuesday, 2017-06-06 20:00
Meets, Mailing list, IRC, LinkedIn, ...  http://dorset.lug.org.uk/
New thread:  mailto:dorset@mailman.lug.org.uk / CHECK IF YOU'RE REPLYING
Reporting bugs well:  http://goo.gl/4Xue / TO THE LIST OR THE AUTHOR


Re: [Dorset] A New Wimborne Model Town Project Query - Sensing Water Levels and Flow

2017-05-04 Thread Terry Coles
On Wednesday, 3 May 2017 18:15:34 BST Andrew wrote:
> In case you didn't already know, 'digital' versions of these are
> available quite easily and probably cheap, or free. They are used in
> most if not all washing machines and dish washers. The one I've looked
> at recently has a screw for pressure adjustment. You could get hold of
> at least two of them (one for "too high" and one for "too low") and
> connect them to GPIO pins if exact water height doesn't matter.

Since the system will be running largely unattended 24/7, we want to be able 
to predict the onset of a flood or drought in the river.  To do that we need to 
measure the actual depth so we can determine the rate of change.  We can do 
that a number of ways; an air pressure sensor for depth; a load-cell for 
weight or an ultrasound detector for distance to the surface are all under 
consideration.  They will all will give a linear output between empty and 
full.

We have considered a cluster of probes to signal when various levels are 
reached, but we currently prefer the pressure, weight or ultrasound approach 
to give a continuous reading.  (This will also be better for the educational 
side of the project, since the Visitor's display will show the actual levels 
and flow around the system.)

> If the problem is making sure the water is pumped from the lower tank to
> the header tank, but the pump is turned off when the header tank is full
> or the lower tank is empty then there's some quite simple ways to do
> that. But they don't require a computer so aren't perhaps technical
> enough for this list. :)

It is more complicated than that.  Not only do we want to control the pumping 
of water to the header tank (the bog garden), we also want to control the flow 
of water in and out of the butts.

> Also, I wrote my last e-mail before I had looked at the Wimbourne Model
> Village web site. I imagined it would be indoors and a lot smaller than
> it is!

Yes.  The Model Minster is too tall for me to work on the Quarter Jack without 
a ladder!

-- 



Terry Coles

-- 
Next meeting:  Bournemouth, Tuesday, 2017-06-06 20:00
Meets, Mailing list, IRC, LinkedIn, ...  http://dorset.lug.org.uk/
New thread:  mailto:dorset@mailman.lug.org.uk / CHECK IF YOU'RE REPLYING
Reporting bugs well:  http://goo.gl/4Xue / TO THE LIST OR THE AUTHOR


Re: [Dorset] A New Wimborne Model Town Project Query - Sensing Water Levels and Flow

2017-05-03 Thread Andrew

On 03/05/17 11:05, Terry Coles wrote:

As I mentioned at last night's meeting, we are currently considering a solution 
based on
measuring the air pressure in a pipe that is connected to the bottom of the 
butt.
In case you didn't already know, 'digital' versions of these are 
available quite easily and probably cheap, or free. They are used in 
most if not all washing machines and dish washers. The one I've looked 
at recently has a screw for pressure adjustment. You could get hold of 
at least two of them (one for "too high" and one for "too low") and 
connect them to GPIO pins if exact water height doesn't matter.


If the problem is making sure the water is pumped from the lower tank to 
the header tank, but the pump is turned off when the header tank is full 
or the lower tank is empty then there's some quite simple ways to do 
that. But they don't require a computer so aren't perhaps technical 
enough for this list. :)


Also, I wrote my last e-mail before I had looked at the Wimbourne Model 
Village web site. I imagined it would be indoors and a lot smaller than 
it is!


--

Andrew.



--
Next meeting:  Bournemouth, Tuesday, 2017-06-06 20:00
Meets, Mailing list, IRC, LinkedIn, ...  http://dorset.lug.org.uk/
New thread:  mailto:dorset@mailman.lug.org.uk / CHECK IF YOU'RE REPLYING
Reporting bugs well:  http://goo.gl/4Xue / TO THE LIST OR THE AUTHOR


Re: [Dorset] A New Wimborne Model Town Project Query - Sensing Water Levels and Flow

2017-05-03 Thread Terry Coles
On Monday, 1 May 2017 12:26:09 BST Terry Coles wrote: 
> Has anyone ever done anything like this?  Ideally, for level, an ultrasonic
> sensor with a good level of water resistance would be ideal (it won't be
> immersed, but it will be exposed to rain, mist etc).  The capacitive sensor
> requires RF, which brings it's own issues and the other types may provide
> readings that are too coarse to monitor rate of change of level.
> 
> I haven't found anything much yet that will give us flow measurement in a
> 'river'.  The commercial types tend to be fairly cheap but designed to go
> into pipes.  However, we should be able to come up with something using
> hall effect sensors, so I'm more interested in level at the moment.
> 
> Any ideas, links to projects that have done this?

A quick update on this:

As I mentioned at last night's meeting, we are currently considering a solution 
based on 
measuring the air pressure in a pipe that is connected to the bottom of the 
butt. Obviously 
when the tank is empty the sensor will measure 0 kPa (as compared to the 
atmosphere) 
and when it is full it will measure the pressure due to the height of the water 
column, 
which I calculate to be up to 15 kPa in a 200 litre butt.

Also, someone on the Raspberry Pi Forums has suggested using a load cell to 
weigh the 
butts.  I'm still looking at that.

Both solutions are based on the 'strain gauge' type of sensor, so the output 
voltage tends 
to be rather low (typically less than 30 mV).  This would require us to design 
some low 
noise circuits to amplify the signal to the level where it can be converted to 
digital for the 
Pi to process.

-- 



Terry Coles
-- 
Next meeting:  Bournemouth, Tuesday, 2017-06-06 20:00
Meets, Mailing list, IRC, LinkedIn, ...  http://dorset.lug.org.uk/
New thread:  mailto:dorset@mailman.lug.org.uk / CHECK IF YOU'RE REPLYING
Reporting bugs well:  http://goo.gl/4Xue / TO THE LIST OR THE AUTHOR


Re: [Dorset] A New Wimborne Model Town Project Query - Sensing Water Levels and Flow

2017-05-03 Thread Terry Coles
On Wednesday, 3 May 2017 10:55:36 BST Ralph Corderoy wrote:
> > If you go to http://explorer.geowessex.com/ and enter the WMT's
> > postcode (BH21 1DY), the map will show the Model Town.  Then go to the
> > Layers control, turn on Flooding; Floodzones 3
> 
> There's a `Share' icon in the right-hand side.

I've been using this tool for years and never noticed that ;-)

-- 



Terry Coles

-- 
Next meeting:  Bournemouth, Tuesday, 2017-06-06 20:00
Meets, Mailing list, IRC, LinkedIn, ...  http://dorset.lug.org.uk/
New thread:  mailto:dorset@mailman.lug.org.uk / CHECK IF YOU'RE REPLYING
Reporting bugs well:  http://goo.gl/4Xue / TO THE LIST OR THE AUTHOR


Re: [Dorset] A New Wimborne Model Town Project Query - Sensing Water Levels and Flow

2017-05-03 Thread Ralph Corderoy
Hi Terry,

> If you go to http://explorer.geowessex.com/ and enter the WMT's
> postcode (BH21 1DY), the map will show the Model Town.  Then go to the
> Layers control, turn on Flooding; Floodzones 3

There's a `Share' icon in the right-hand side.


http://explorer.geowessex.com/?search=BH21%201DY=9865,41=27=400782.43=99823.41=27700=15

Cheers, Ralph.

-- 
Next meeting:  Bournemouth, Tuesday, 2017-06-06 20:00
Meets, Mailing list, IRC, LinkedIn, ...  http://dorset.lug.org.uk/
New thread:  mailto:dorset@mailman.lug.org.uk / CHECK IF YOU'RE REPLYING
Reporting bugs well:  http://goo.gl/4Xue / TO THE LIST OR THE AUTHOR


Re: [Dorset] A New Wimborne Model Town Project Query - Sensing Water Levels and Flow

2017-05-03 Thread Terry Coles
On Wednesday, 3 May 2017 08:08:37 BST PeterMerchant via dorset wrote:
> On 02/05/17 22:18, Tim wrote:
> > Could be interesting if the Rivers ever flooded Wimborne having to get
> > the model village replicate the situation, sorry a bit OT there, just
> > my warped humour coming out.

> I think that it would automatically happen. The Model Village is
> virtually on the flood plain by Wimborne.

Actually it's not.  If you go to http://explorer.geowessex.com/ and enter the 
WMT's postcode (BH21 1DY), the map will show the Model Town.  Then go to the 
Layers control, turn on Flooding; Floodzones 3 and you will see that the flood 
plain goes round the Model Town.  Even the 1 in 1000 year layer doesn't really 
touch it.

The main floodzone follows the River Stour with much smaller floodzones around 
the River Allen.

The model town only includes the two branches of the River Allen within its 
boundaries.

-- 



Terry Coles

-- 
Next meeting:  Bournemouth, Tuesday, 2017-06-06 20:00
Meets, Mailing list, IRC, LinkedIn, ...  http://dorset.lug.org.uk/
New thread:  mailto:dorset@mailman.lug.org.uk / CHECK IF YOU'RE REPLYING
Reporting bugs well:  http://goo.gl/4Xue / TO THE LIST OR THE AUTHOR


Re: [Dorset] A New Wimborne Model Town Project Query - Sensing Water Levels and Flow

2017-05-03 Thread Terry Coles
On Tuesday, 2 May 2017 21:45:46 BST Andrew wrote:
> It looks like the real rivers are being monitored in at least two places:
> 
> https://www.riverlevels.uk/river-stour-oakley-wimborne
> https://www.riverlevels.uk/river-allen-colehill-walford-mill
> 
> As a model town I would be tempted to find out how they are doing that
> level monitoring and then make a miniature version in the correct places
> on the model.

Unfortunately, neither of those places are within the are encompassed by the  
model town.

Also, I suspect that the Environment Agency or whoever does the monitoring on 
the real rivers can afford to spend just a little bit more on their sensors 
than we can.

> Is the monitoring just to control the river flow? Does it need to be
> more complicated than a header tank and a valve for each river entry
> point to control the flow rate?

The monitoring has two functions.  Fundamentally it is to control the level of 
water in the in the 'river' (and therefore the flow).  In the past, the river 
has 'flooded' when there has been a lot of rain or when an over enthusiastic 
volunteer forgot to turn the tap off.

The main goal though is water sustainability.  We want to catch rainwater in 
the butts and then pump it in and out of the river automatically, hence the 
need for extensive monitoring.

It has been pointed out that this project is a bit 'over-the-top' for a few 
tens of metres of water channel.  However, when finished, the workings of the 
control system will be made available for visitors to view on a monitor; the 
idea being to enhance the education value of the attraction.

> Once you collect the water at the end of the river it can then be pumped
> up to the header tank until it is full.

That is effectively what we have at the moment, except that there is a sump at 
the bottom of the river system and a bog garden at the top.  Water is pumped 
manually from the sump to the bog garden and the whole thing topped up from 
time to time when water is lost due to leaks and evaporation.

They have no way to combat flooding at present.

> For extra complexity, get the water level of the real rivers from
> wherever the above web site gets its data and adjust the levels of the
> model rivers accordingly...

Now you're pulling my leg :-)

-- 



Terry Coles

-- 
Next meeting:  Bournemouth, Tuesday, 2017-06-06 20:00
Meets, Mailing list, IRC, LinkedIn, ...  http://dorset.lug.org.uk/
New thread:  mailto:dorset@mailman.lug.org.uk / CHECK IF YOU'RE REPLYING
Reporting bugs well:  http://goo.gl/4Xue / TO THE LIST OR THE AUTHOR


Re: [Dorset] A New Wimborne Model Town Project Query - Sensing Water Levels and Flow

2017-05-03 Thread PeterMerchant via dorset

On 02/05/17 22:18, Tim wrote:

On 02/05/17 21:45, Andrew wrote:

Hi Terry,

It looks like the real rivers are being monitored in at least two 
places:


https://www.riverlevels.uk/river-stour-oakley-wimborne
https://www.riverlevels.uk/river-allen-colehill-walford-mill

As a model town I would be tempted to find out how they are doing 
that level monitoring and then make a miniature version in the 
correct places on the model.


Is the monitoring just to control the river flow? Does it need to be 
more complicated than a header tank and a valve for each river entry 
point to control the flow rate?


Once you collect the water at the end of the river it can then be 
pumped up to the header tank until it is full.


For extra complexity, get the water level of the real rivers from 
wherever the above web site gets its data and adjust the levels of 
the model rivers accordingly...


Could be interesting if the Rivers ever flooded Wimborne having to get 
the model village replicate the situation, sorry a bit OT there, just 
my warped humour coming out.



Tim


I think that it would automatically happen. The Model Village is 
virtually on the flood plain by Wimborne.

Peter

--
Next meeting:  Bournemouth, Tuesday, 2017-05-02 20:00
Meets, Mailing list, IRC, LinkedIn, ...  http://dorset.lug.org.uk/
New thread:  mailto:dorset@mailman.lug.org.uk / CHECK IF YOU'RE REPLYING
Reporting bugs well:  http://goo.gl/4Xue / TO THE LIST OR THE AUTHOR


Re: [Dorset] A New Wimborne Model Town Project Query - Sensing Water Levels and Flow

2017-05-02 Thread Tim

On 02/05/17 21:45, Andrew wrote:

Hi Terry,

It looks like the real rivers are being monitored in at least two places:

https://www.riverlevels.uk/river-stour-oakley-wimborne
https://www.riverlevels.uk/river-allen-colehill-walford-mill

As a model town I would be tempted to find out how they are doing that 
level monitoring and then make a miniature version in the correct 
places on the model.


Is the monitoring just to control the river flow? Does it need to be 
more complicated than a header tank and a valve for each river entry 
point to control the flow rate?


Once you collect the water at the end of the river it can then be 
pumped up to the header tank until it is full.


For extra complexity, get the water level of the real rivers from 
wherever the above web site gets its data and adjust the levels of the 
model rivers accordingly...


Could be interesting if the Rivers ever flooded Wimborne having to get 
the model village replicate the situation, sorry a bit OT there, just my 
warped humour coming out.



Tim


--
Next meeting:  Bournemouth, Tuesday, 2017-05-02 20:00
Meets, Mailing list, IRC, LinkedIn, ...  http://dorset.lug.org.uk/
New thread:  mailto:dorset@mailman.lug.org.uk / CHECK IF YOU'RE REPLYING
Reporting bugs well:  http://goo.gl/4Xue / TO THE LIST OR THE AUTHOR


Re: [Dorset] A New Wimborne Model Town Project Query - Sensing Water Levels and Flow

2017-05-02 Thread PeterMerchant via dorset

On 02/05/17 21:45, Andrew wrote:

Hi Terry,

It looks like the real rivers are being monitored in at least two places:

https://www.riverlevels.uk/river-stour-oakley-wimborne
https://www.riverlevels.uk/river-allen-colehill-walford-mill

As a model town I would be tempted to find out how they are doing that 
level monitoring and then make a miniature version in the correct 
places on the model.


Is the monitoring just to control the river flow? Does it need to be 
more complicated than a header tank and a valve for each river entry 
point to control the flow rate?


Once you collect the water at the end of the river it can then be 
pumped up to the header tank until it is full.


For extra complexity, get the water level of the real rivers from 
wherever the above web site gets its data and adjust the levels of the 
model rivers accordingly...


I remember reading or hearing once that they have mobile phones built 
into them to transmit the data periodically to 'somewhere'.



PM.



--
Next meeting:  Bournemouth, Tuesday, 2017-05-02 20:00
Meets, Mailing list, IRC, LinkedIn, ...  http://dorset.lug.org.uk/
New thread:  mailto:dorset@mailman.lug.org.uk / CHECK IF YOU'RE REPLYING
Reporting bugs well:  http://goo.gl/4Xue / TO THE LIST OR THE AUTHOR


Re: [Dorset] A New Wimborne Model Town Project Query - Sensing Water Levels and Flow

2017-05-02 Thread Andrew

Hi Terry,

It looks like the real rivers are being monitored in at least two places:

https://www.riverlevels.uk/river-stour-oakley-wimborne
https://www.riverlevels.uk/river-allen-colehill-walford-mill

As a model town I would be tempted to find out how they are doing that 
level monitoring and then make a miniature version in the correct places 
on the model.


Is the monitoring just to control the river flow? Does it need to be 
more complicated than a header tank and a valve for each river entry 
point to control the flow rate?


Once you collect the water at the end of the river it can then be pumped 
up to the header tank until it is full.


For extra complexity, get the water level of the real rivers from 
wherever the above web site gets its data and adjust the levels of the 
model rivers accordingly...


--

Andrew.


--
Next meeting:  Bournemouth, Tuesday, 2017-05-02 20:00
Meets, Mailing list, IRC, LinkedIn, ...  http://dorset.lug.org.uk/
New thread:  mailto:dorset@mailman.lug.org.uk / CHECK IF YOU'RE REPLYING
Reporting bugs well:  http://goo.gl/4Xue / TO THE LIST OR THE AUTHOR


Re: [Dorset] A New Wimborne Model Town Project Query - Sensing Water Levels and Flow

2017-05-02 Thread PeterMerchant via dorset

On 01/05/17 13:27, PeterMerchant via dorset wrote:

On 01/05/17 12:26, Terry Coles wrote:

Hi,

I appreciate that many on this list are software oriented, but do we 
have any

people with experience of measuring fluid parameters?

The WMT has an ongoing Project to improve the sustainability of water 
in the
'Model' River Allen.  This follows the route of the real River 
through the
Model Town and has, until now, been managed and maintained by 
volunteers and

staff turning the mains water tap on and off.

We have mapped out some requirements to do it automatically and a bit 
more
sustainably by catching rainwater and pumping it in and out of the 
sump at the
bottom of the river system.  The current stage of development is that 
a bog
garden has been established at the 'source' of the river to clean the 
water,

but otherwise the rest is ongoing.

(The Linux dimension will be fulfilled by the use of Raspberry Pi's for
processing and control and for the web-based GUI.)

We have plenty of ideas, but not a lot of practical experience at the 
moment.
Our main problem is how to monitor the level of water in a number of 
places in
the river system, eg in the water barrels that are storing the 
rainwater and
(probably) in the sump.  We would also like to measure flow through 
the river

system at one or more places.

Obviously we can use electro-mechanical means to do this (float 
sensors, paddle

wheels attached to a pickup, etc), but we have been looking at various
electronic methods, such as:

https://www.efxkits.co.uk/liquid-level-sensor-and-types-of-level-sensors/ 



but commercial sensors tend to be expensive and although I reckon we 
could do
the electronics for at least some of those, we have to keep 
everything dry.


Has anyone ever done anything like this?  Ideally, for level, an 
ultrasonic

sensor with a good level of water resistance would be ideal (it won't be
immersed, but it will be exposed to rain, mist etc).  The capacitive 
sensor
requires RF, which brings it's own issues and the other types may 
provide

readings that are too coarse to monitor rate of change of level.

I haven't found anything much yet that will give us flow measurement 
in a
'river'.  The commercial types tend to be fairly cheap but designed 
to go into
pipes.  However, we should be able to come up with something using 
hall effect

sensors, so I'm more interested in level at the moment.

Any ideas, links to projects that have done this?

1. Many years ago, when my father  put a furnace under our house in a 
concrete box that was below the lake level, a light bulb on a string 
suspended from a microswitch controlled the sump pump. When the water 
rose, the bulb floated and switched on the pump. That was simple, and 
didn't require a microprocessor, even if they had been invented then.


A dowel, vertically mounted, with a float at the bottom and guides to 
keep it in place(eyebolts?). Have a tab on the side that ticks one 
Microswitch at top height, and one when it falls to a low. . That's just 
straight input to two GPIO on a R-Pi if you insist on being computer 
controlled. Otherwise one turns pump on and the other turns it off.  KISS.


Peter

--
Next meeting:  Bournemouth, Tuesday, 2017-05-02 20:00
Meets, Mailing list, IRC, LinkedIn, ...  http://dorset.lug.org.uk/
New thread:  mailto:dorset@mailman.lug.org.uk / CHECK IF YOU'RE REPLYING
Reporting bugs well:  http://goo.gl/4Xue / TO THE LIST OR THE AUTHOR