Monday, 8 December 2014

Manure, Sprouts, Oca and Cape Gooseberries

Manure, Sprouts, Oca and Cape Gooseberries 

Today was a fantastic winters day to be preparing beds for next spring. Because of the clay soil that we have I spread manure 12 inch deep across several beds so it will act as a weed suppressant and can have time to break down. The beds had 18 inch to 2ft of manure added earlier in the year and bit by bit the soil, although still clumps of clay are everywhere, is becoming far more workable. Large amounts of dark humus / compost are now evident throughout the beds.

Fresh Manure
I gave the beds a quick dig over before piling on 60 wheel barrow loads of manure on top and can see that although full of worms the manure didn't get mixed in with the clay by worms, insects and plant roots. Maybe over time the organic material will find it's way into the clay but over the shorter time scales digging is certainly needed to mix the clay with organic material.

Just pile it high!
The first layer of manure added earlier in the year hasn't composted as well as the layer above because it got water logged where the water sat on top of the clay, again another reason to continue digging as opposed to a no-dig method. Digging the clay, no matter how deep leaves a plough pan which water can't easily penetrate and although I have dug fairly deep it is clear that from now on I must raise the level of the soil to avoid the plant roots sitting in water. This water caused problems with the potatoes this year and meant I had to lift them a month or so too early. The crop was small and wouldn't store.

I must have had 30 tonnes of manure delivered since late spring and apart from a decent compost heap most of the manure has just disappeared into the beds without raising the ground level by much and I have agreed to continue taking 3 or 4 tonnes a month for the next year. I'm sure this will all be of great benefit in the coming years.

Areas that I have dug over and not applied manure just compact again under the soils own weight and become water logged so I'll be digging more areas and applying manure this winter even if those areas will ultimately end up as lawn.

Sprouts
Not many but enough
The 3 sprout plants that survived slugs and pigeons have been attacked by rabbits last night so I have harvested what ever I could. The plants had a huge number of sprouts on them, sadly though half were nibbled and one plant was cut in half. Since sprouts are a favourite of mine I'm going to put a lot more effort into them next year although this year we will have plenty for Christmas dinner, shame they couldn't be left for a couple more weeks as now we have to process them and freeze them for a fortnight rather than deal with them fresh.

Oca
Oca
The main bed that I manured today contained 6 Oca plants that had withered due to frost. The tubers are rather small and many are a bit green. I'll need to read up now to see what I do with them. The other 6 plants are in another bed and I'll lift them later in the week. Had they grown a bit better there would have been a good number of tubers. I was given the seed tubers by Anni Kelsey (https://annisveggies.wordpress.com/) and I'll be putting more effort into Oca next year should these taste OK.

Cape Gooseberries
Almost ripe Cape Gooseberries
I sowed Cape Gooseberries last spring and planted them out into a bed, rather late, and was worried that they weren't going to ripen. In November I tried one and it was still green and extremely tart / bitter but today I noticed that some have ripened. The couple I ate were fantastic and if I can leave them another week or so the rest should ripen since they are all almost ready. These are supposed to need a lot of sun and should really be in a green house but despite this year not having much sun, (August was particularly bad), they are going to be a success. Next year I'll be planting many many more and will have one or 2 in the green house. It's the first time I have ever tried them, tasted or grown, and have been extremely surprised how nice they are and can't think why I have never tried them before. They could easily become my favourite fruit and taste like a very very sweet tomato and are the size of a large cherry and orange in colour. The taste has changed so much in a few weeks, last time I tried a green one it made my tongue curl and my eyes roll and I had totally given up thinking about them until today. That's the best surprise I have had out of our food growing attempts!

The Cape Gooseberries alone have now made me long for spring when I can sow some more. It'll be a long wait I think :)

Today's Sun Graph
How sunny today was in Watts per Metre Squared - how much power was in the sun:

Infrared and Visible light readings
The above graphs show patchy sun in the morning but no clouds in the afternoon. A perfect day would look like a semi-circle.








Thursday, 16 October 2014

Game of Life

Game of Life

While watching an episode of the Human Universe on BBC iplayer (http://www.bbc.co.uk/iplayer/episodes/p0276p50) the other day, Brian Cox was explaining how life and the universe is built around rules, from rivers to how Leopards get their spots, everything has simple rules. Life and indeed almost everything appears to be very complicated but he was demonstrating how a set of simple rules over time can produce very complex things.

This reminded me of one of the very first computer programs I wrote, or to be more accurate copied from a magazine, back in 1980 or 1981 which was called "Life" and devised by a British Mathematician called John Conway.

Put simply, Conway created a computer model which had a few very simple rules. Left to run for a while it would repeatedly apply these simple rules over and over again. Starting with a few random "cells" each cell would have 4 rules applied to it and over time what started with a random arrangement of cells could, and often did, arrange themselves into both simple and complex patterns. It was fascinating!

We hear a lot now about climate change, nature and our environment, and how scientists can run computer models to predict, or at least try to, the future of our actions. The game of life can be seen as a computer model running rules many times to see how the future may turn out.

The idea of applying rules over and over again is nothing new but with the Game of Life automation we can see how nature can produce complex patterns without the need for design. To me this is an important demonstration that most complex things can possibly or probably be reduced down to some basic rules. How plants grow and why they grow into the shapes they do can be seen as simply following a simple set of rules, does a cell have enough nutrients to reproduce etc. The shape it follows, a stem with a few off shoots and those off shoots split and split seems quite simple really. 

Recently I rewrote my version of "Life" and made a simple video that shows it. The cells are represented by the letter 'O' and to start Life going the program arranges a few random cells on the screen. The following rules are then applied:-

1) Any live cell with fewer than two live neighbours dies, as if caused by under-population.
2) Any live cell with two or three live neighbours lives on to the next generation.
3) Any live cell with more than three live neighbours dies, as if by overcrowding.
4) Any dead cell with exactly three live neighbours becomes a live cell, as if by reproduction.
5) Any cell over 40 generations old will die.

The 5th rule I added which is in addition to Conway's original set of rules. The colours are white (no cell or dead cell), black for a young cell, blue for a mature cell, and red for an old cell.

You'll need to view on full screen, and apologies for the video quality as I haven't managed to make them look that good :)






Apart from drawing a random number of cells to begin with the cells and patterns are simply generated from the basic rules mentioned above.



In the videos you can clearly see order coming from chaos and many patterns repeating. Often a symmetrical pattern of cells collides with another cell and chaos ensues. Some patterns can keep going for many generations while other groups of cells die out almost immediately. Some groups of cells walk across the screen as if they have developed legs. During the video I restart Life on many occasions and you can tell when this happens. The program also restarts automatically after 500 generations or when the cell count drops to only a few cells.

John Conway Videos





By starting the game with a different pattern, not random but one pre-chosen and by having a lot more cells  some amazing patterns can be seen. Some of them are absolutely stunning as in the following video...




Thursday, 2 October 2014

Comparing the past: October

Comparing the past: October



October 2014

October 2013

Click to enlarge pictures

Lots of changes between this year and last. Firstly, the bonfire eyesore has gone as well as the old chicken shed on the right. New vegetable beds in front of the bonfire have been created and many more fruit trees although a bit small unless you enlarge the pictures.

One of the most notable things for me is the size of the long grass. This year the grass was so much taller and thicker, so thick that it smothered the buttercups and clover. In last years photo you can clearly see the drainage channels in front of the pond but this year they are completely covered.

Another big difference is the runner beans, in front of the bonfire. Last year there were loads whereas this year the slugs got them despite repeated plantings.

This year, while cutting the paths in the long grass many many more frogs and toads have been seen which suggests that the young tadpoles have survived and are flourishing within the pond and grass. Although frogs are supposed to eat slugs the number of slugs multiplied despite the frogs and I have decided that frogs and toads are not the answer to beating slugs. The increase in good habitat for slugs and frogs, more damp hiding places, benefited slugs more than frogs. 

The new hedgehog friendly habitat created by laying down many many dead branches from and old hedge, logs and large stones, placed under the hedge on the right where the old chicken shed was hasn't produced any hedgehogs yet but it's early days I guess. I'm hoping that a family of hedgehogs may deal with some of the slugs as well as add to the diversity of life within the field.

Newts bred in the pond this year, dozens of baby newts were seen upto a month ago although the pond is now covered in duck weed and Canadian pond weed so I can't see if they are still there but the fact that tadpoles and newts were living and thriving in the same pond is good and shows that there is plenty of food for both as well as protection for tadpoles. I've only seen the Common newt this year but hopefully I'll attract some great crested newts as they are far bigger and may eat slugs.

One of things I was hoping for was that the algae would be controlled by the Canadian pond weed taking up all the nutrients but what I have seen is that regardless of the nutrient take up of the very very fast growing Canadian pond weed algae is hard to stop when there is a lot of sun hitting the water. By far the best way of dealing with algae is to reduce the sunlight as is shown by the lack of it around the Lilly pads. The flowers and plants that were supposed to provide shade around the pond simple don't help in this regard because the sun gets too high in the sky and the shading is only effective early morning as late evening. Looks like algae is here to stay since the sun hitting the water attracts many many dragonflies and damson flies and I don't want to stop that. 

Wednesday, 3 September 2014

Manure Heap Temperature

Manure Heap Temperature

Bit by bit I'm slowly measuring and understanding things better. Although the information is already available, see and doing for yourself seems to make it easier to learn.

Obviously a manure heap gets warm and people have been using this to make hot boxes for centuries to raise the temperature for small plants and lengthen the growing season but just how much heat is there.

This morning at about 7:30am the outside air temp was 14.1 Deg C, the ground was 17 to 19 Deg C in various places around the garden and the outside of the manure heap varied from 24 to 32 Deg C. It is a large manure heap, 12ft by 8ft by 3 or 4ft tall. Inside the the heap, where there is fresh manure, 1ft down and about 3ft from the edge the temperature was 50 Deg C. The heap was steaming rather well.

I'm wondering about making a smaller heap next to the greenhouse, putting a large container of water and covering with manure with a water pump and running a hose pipe through the green house. The pump could be powered by Solar PV panel.

I'll need to monitor the manure heap temp for some while to see how long, days or weeks, the temperature stays high and what the effect of piling more manure on top is. I'll need to know whether this temperature is just for fresh manure and also what effect the outside air temperature has upon it.

Sunday, 31 August 2014

Home made Pyranometer or Irradiance/Insolation Meter

Home made Pyranometer or Irradiance/Insolation Meter


The idea behind making a Pyranometer is to add another measurement to my weather station. It is basically a light meter but it can also tell me what the cloud cover was on any given day. I'm hoping to combine this data with temperature and rainfall readings to see if I can find correlations between plant growth and fruit yields. Just something to do really!

Today was the first day my prototype was put into action, see previous post, and I recorded, automatically, a reading of how much power from the sun was reaching the earth every minute. Technically if using a PV Solar Panel I should have put it into short circuit but I haven't done this since I have no way of calibrating my device. By loading the panel to the maximum power point, which is close to the short circuit point, I at least have the manufacturers Standard Test Condition ratings to calibrate my readings with.

To cut a long story short the results were graphed from 8:30am to just past 6:30pm and are below. What the readings can tell me is what the cloud cover was and whether the clouds were thick and low or high cirrus clouds. Today was a good day for the trial run...


Click image for larger version
  The Y axis is Watts per Metre Squared and the X access is minutes since 8:30am.

The dip just after the 100 minute mark is when the telegraph pole cast a shadow onto the solar panel and 10 minutes later the jagged points rising were the shadows of the power lines. The rest are clouds.

The panel is on a 66 degree roof (I couldn't find a horizontal place to mount the panel near a power point) and is a few degrees off of south. The results are reasonably accurate, perfect for what I need. You can clearly see that first thing there were very few clouds, as is the case around 4pm and from 5pm onwards. The highest peaks are full sun. Today was one that you would class as not a bad summers day, a few too many clouds perhaps but a standard late summers day.

Had there been no clouds the graph would have looked similar to this image I nicked from http://www.mpoweruk.com/solar_power.htm


Anyone interested in the C++ program I knocked up it is here (not brilliant but functional and the formatting has gone wrong when I pasted it here):



// The Raspberry Pi is connected to an MCP3004 Analogue
// to Digital Converter. That is connected to a Solar
// Panel with a load to produce max power. The Voltage
// is divided down to max of 3.3 and then read.
// Calculations are made to work out power being generated
// and Insolation (irradiance) falling onto the panel
// It is calibrated by the manufacturers STC values on
// the panel, ie, 5 Watts at 17.9 volts, .280A when
// Irradiance is 1000 W/m2

/////////////
// OUTPUTS //
/////////////
//
// date time,interval in minutes,power in watts from test panel
// ,watts per sq metre,watts generated with 16 standard panels
// ,calculated insolation,voltage of test panel,current in test panel,status (0=ok,1=no reading)
//
// yyyy-mm-dd hh:mm:ss,int,float,float,float,float,float,float,int

// Used to access GPIO
#include <wiringPi.h>
// Used to read ADC
#include <mcp3004.h>
// Used by setprecision
#include <iomanip>
// Used for reading the time
#include <ctime>
// Used for making strings
#include <string>
// Used by number to string conversion
#include <sstream>
// Used by file writing
#include <fstream>
// Used by mkdir()
#include <sys/stat.h>
// Used by shutdown
#include <stdlib.h>

// Used by WiringPi to access ADC MCP3004
#define BASE 100
#define SPI_CHAN 0
using namespace std;

// Test last write time
int check_clock_update()
{
long int solartime = 0;
ifstream in("solartime.txt", ios::in);
if(!in)
{
// no file
return(1);
}
in >> solartime;
in.close();
time_t t = time(NULL);
// Give the time 5 minutes because Pi may take some while to shutedown and record time
// This may be lowered to what ever time it takes Pi to shutdown properly
// If Pi power is cut then fake clock time will be upto 1 hr behind
if (t > (solartime+300)) return(solartime); else return(0);
};

// save last write time
void record_time(long int t)
        {
        ofstream out("solartime.txt", ios::out);
        if(out)
{
  out << t;
out.flush();
out.close();
}
        };

// convert any number to string
template <typename T>
  string NumberToString ( T Number )
  {
     ostringstream ss;
     ss << Number;
     return ss.str();
  };

// Make time string YYYY-MM-DD HH:MM:SS for recording the date time of reading
string time_str()
{
time_t t = time(0);   // get time now
struct tm * now = localtime( & t );
string s;
string year = NumberToString(now->tm_year + 1900);
string month = NumberToString(now->tm_mon + 1);
if (now->tm_mon+1 < 10) month = "0" + month;
string day = NumberToString(now->tm_mday);
if (now->tm_mday < 10) day = "0" + day;
string hour = NumberToString(now->tm_hour);
if (now->tm_hour < 10) hour = "0" + hour;
string min = NumberToString(now->tm_min);
if (now->tm_min < 10) min = "0" + min;
string sec = NumberToString(now->tm_sec);
if (now->tm_sec < 10) sec = "0" + sec;
s = year + "-" + month + "-" + day + " " + hour + ":" + min + ":" + sec;
return(s);
};

// For 1st folder name
string time_year_str()
        {
        time_t t = time(0);   // get time now
        struct tm * now = localtime( & t );
        string year;
        year = NumberToString(now->tm_year + 1900);
return(year);
};

// For 2nd folder name
string time_year_month_str()
{
// Get time
        time_t t = time(0);   // get time now
        struct tm * now = localtime( & t );
// Build up string YYYY-MM
        string s;
        string year = NumberToString(now->tm_year + 1900);
        string month = NumberToString(now->tm_mon + 1);
        if (now->tm_mon+1 < 10) month = "0" + month;
s = year + "-" + month;
return(s);
};

// For filename
string time_year_month_day_str()
        {
// Get time
        time_t t = time(0);   // get time now
        struct tm * now = localtime( & t );
// Build up string in a formatted way
// YYYY-MM-DD
        string s;
        string year = NumberToString(now->tm_year + 1900);
        string month = NumberToString(now->tm_mon + 1);
        if (now->tm_mon+1 < 10) month = "0" + month;
        string day = NumberToString(now->tm_mday);
        if (now->tm_mday < 10) day = "0" + day;
        s = year + "-" + month + "-" + day;
        return(s);
};


int main()
{
// General Variables
    float x, chan, irradiance, panels ;
float voltage, current, power, metre, resistor;
long int time_target = 0;
int read = 0, status, interval, fail_count = 0, start = 0;
int writes = 0;
// Interval between samples
interval = 60;
string ts;
// Don't start unless the time is greater than our last reading
// plus 5 minutes. Since the Pi doesn't have RTC we may have to wait
// for the clock to be updated.The Pi fake clock gets written on shutdown
// so we may power up with the last known good time.
// If no file continue, it may be the first run
// If last write time is before now, wait
// if last time time is after now continue
long int check_time = 0;
while (check_time == 0)
{
check_time = check_clock_update();
}
// Handy little library to access various chips via Raspberry Pi
    wiringPiSetup() ;
// This is the ADC chip on the LinkSprite.com Shield.
    mcp3004Setup (BASE, SPI_CHAN) ; // 3004 and 3008 are the same 4/8 channels
chan = 0;
// Just keep repeating until power fail or cntl-c etc
while(1)
{
time_t t = time(NULL);
// Do we take a reading?
if (time_target <= t) read = 1;
if (read)
{
// read ADC on  linksprite.com rpi shield
x = analogRead (BASE + chan);
// If we got a value then do calculations
if (x > 0)
{
// We have loaded the solar panel with 8 Watt resistor
resistor = 63.93;
// Voltage from panel is divided using resistors to produce
// Max 3.3v - this is 6.79 times smaller than the real voltage
// combine this with the ADC output to find correct voltage
// that the panel is generating
voltage = (3.3/1023)*(x*6.79);
// When we know Voltage we use Ohms Law to find current
current = voltage / resistor;
// Now we can work out power of our little panel
power = voltage * current;
// Scale it up dimension wise to 1 sq metre
// Our panel is 27.135 times smaller than 1 sq metre
metre = 27.135*power;
// 16 panels of roughly 1.5 sq metres each
panels = (24 * metre);
// Our little panel is 5.012 Watts when irradiance = 1000 Watts
// So we scale up
irradiance = 199.52*power;
// What's the time of our reading?
ts = time_str();
// Good status
status = 0;
start = 1;
fail_count = 0;
}
// If we didn't get a value then zero everything, set status and time
else
{
// Don't know if we ever get here but if we do
// We still want to record the fact it failed
voltage = 0;
current = 0;
power = 0;
metre = 0;
ts = time_str();
panels = 0;
irradiance = 0;
// Bad status
status = 1;
fail_count++;
}
}
// If we attempted a reading save it providing we have had
// at least one good reading. Only start recording once we
// know there is enough data. Saves SD Card Writes.
if (read && start == 1)
{
// Create pathname in same format as our other weather station
string top = "/home/pi/SolarPanelPower/irradiance";
// If directory isn't there make it otherwise silently fail
mkdir(top.c_str(), 0777);
string pathname, path;
pathname =  time_year_str();
pathname = top + "/" + pathname;
// write 2nd directory of year
mkdir(pathname.c_str(), 0777);
path = time_year_month_str();
path = pathname + "/" + path;
// 3rd directory is year + month
mkdir(path.c_str(), 0777);
// Filename is year-month-day.txt
string filename = path + "/" + time_year_month_day_str() + ".txt";
    ofstream ofile(filename.c_str(), ios::app);
// Interval between readings in seconds needs converting to minutes
// to match weather station
int temp = interval / 60;
    if ( ofile )
    {
// write to file
        ofile << ts << setprecision(2) << fixed << "," << temp << "," << power << "," << metre << "," << panels << "," << irradiance << "," << voltage << "," << current << "," << status << endl;;
        ofile.flush();
ofile.close();
    }
// We have finished this reading
read = 0;
// increase write count
writes++;
// Reset counter interval
               time_target = t + interval;
// write last sample time every 10 samples
if (writes == 10)
{
record_time(t);
writes = 0;
}
// Sleep for 90% of interval time to save CPU
// CPU on Raspberry PI is flat out with this program which uses
// a lot of power. Well over 90% of time is spent running around
// in a loop checking the time to see if the interval time has
// been reached. Not necessary so do nothing for most of the time.
// We could do nothing for 99% but play it safe!
sleep((int)interval*0.9);
// If we fail to get 10 readings in a row shutdown - fault or too dark
// for a reading. Save SD Card Writes.
if (fail_count >= 10 && start == 1)
{
record_time(t);
// wait for any flushing to finish - maybe not needed
sleep(60);
system("sudo shutdown -h now");
}
}
}

// All done, return to OS
return 0;
}




Thursday, 21 August 2014

Monitoring the Health of Plants

Monitoring the Health of Plants

The purchasing of a Raspberry Pi computer for making and designing electronic circuits has opened up a few useful and interesting possibilities. I was initially looking for a way to add to my weather station data that I collect. I am lacking the ability to monitor the amount of light and with it the ability to record cloud cover. Hooking the Raspberry Pi up to a solar panel and reading the power from the sun deals with this issue but whilst working out the details of reading the Sun's energy from the solar panel I was reading up about Infra-red light and stumbled upon Normalized Difference Vegetation Index or NDVI for short. 

NDVI uses Infra-red and visible light to look at how much photosynthesis is taking place within a plant. This involves taking a photo with an Infra-red camera and combining that with the visual light image of the same subject. 

I haven't read anything about needing to know how much Infra-red is coming in from the sun at the time the picture is taken but I feel there may be some mileage in doing so. To this end the first job was to read the Sun's power from a solar panel on a regular basis, every 10 minutes, and store the data so that it can be combined with my weather data. Knowing how much power is coming from the Sun also has the advantage of being able to record how cloudy the day has been as well as how high the clouds are and how dark they are. It can also tell you how clear a day it is.

To work out how much power a solar panel is producing you need to monitor the voltage and current but if the solar panel isn't being used to power anything you can combine these by giving the solar panel a fixed load. If you know the load, the resistance, then all you need to measure is the voltage. Knowing the Voltage and resistance you can work out the current and from there you can work out the power, in Watts, that is being produced. A little bit of mathematics is needed along with a small amount of computer programming and some wiring up. First we need to know the details of the solar panel. The one I have is for keeping a car battery charged and is only a 5 Watt panel.

Solar Panel Irradiance Meter
I'm going into as much detail as I can with regards to reading the Sun's power because I couldn't find much information about it around the web and there is nothing worse than thinking you have found what you want only to find an important piece of information is missing in order to build one yourself.

Solar panels are rated and the cells have been tested with "Standard Test Conditions" which is handy because we know exactly what power it will produce at a certain light level.

The specs of my panel are:
Pmax: 5W
Vpm: 17.9V
Ipm: 0.28A
Voc: 22.41V
Isc: 0.3A
Standard Test Conditions: 1000W/m2 AM1.5 @ 25 Degrees Celsius

What this tells us is that the panel will produce 5W of power when the Sun's irradiance is 1000W per meter squared. In those conditions the panel will output 17.9V and be able to produce 0.28A of current.

Multiplying Voltage by Current gives us the Power: P = V x I,  17.9 x 0.28 = 5 Watts

The panel could produce more power than this if the Sun's irradiance was more than 1000 but the 5W power point allows us to calibrate and scale our readings to this figure. The Voc, The open circuit voltage is the highest voltage that the board can produce with full sun and no load. Isc is the short circuit current or the maximum current that will be produced under perfect conditions.

To get a computer to read voltages we need to use an Analog to Digital converter. The Laika Explorers Kit, or Inventors kit has an ADC on it and the maximum voltage it can read is 3.3V.

We need to scale the voltage that can come out of the panel in normal conditions (17.9V) down to 3.0V using resistors. Not only that but the resistors we choose need to act as a load for the panel. When we load up the panel it shouldn't be able to reach the maximum voltage of 22.41V.

R = V / I will give us the resistance we need to load the panel with.

R = 17.9V / 0.28A
R = 63.9 Ohms

We now need to split this resistance into 2 so when the panel outputs 17.9V the Analog to Digital converter only sees 3V.

17.9V / 3V = 5.96 - this is our scaling factor. One resistor must be 5.96 times bigger than the other.

We now divide our load resistance by 5.96

63.9 Ohms / 5.96 = 10.7 Ohms (one resistor is 10.7 Ohms) the other is 63.9 Ohms minus 10.7 Ohms which is: 53.2 Ohms

I'll use 2 potentiometers, variable resistors, and trim them to exactly the right values using a multimeter. We feed the voltage across the smaller resistor into the Analog to Digital converter. The reason the drawing above shows different resistors is because I used the maximum voltage of 22.41V for the calculations rather than the normal voltage. I did this to make sure that the maximum voltage was never reached under load. I still need to do more tests to make sure that the Analog to Digital converter doesn't see more than 3.3V which converts into a maximum of 19.17V overall. We don't want to blow up the ADC. The Sun's irradiance power could possibly reach 1367 Watts and we have presumed that the actual figure won't go above 80% of this figure because the atmosphere will block at least 20%. If the Sun's power reaching our solar panel does go above 1100 Watts then we'll need to increase our resistors accordingly to protect the ADC.

The Analog to Digital Converter is a 10 Bit converter. This means that the digital output will be from 0 to 1023, with 0 representing 0 Volts and 1023 representing 3.3 Volts.

If we see the number of 600 from the ADC then we known that 3.3v / 1023 x 600 is the voltage (1.84 Volts). We would then multiply this by our scaling factor above, 5.96, which would give us a voltage of 11.54 Volts. We know the load resistance, 63.9 Ohms so we can work out the current as V / R which is :  180mA. From there we multiple V x I = 2.08 Watts.

Our panel is able to produce 5 Watts when the sun's irradiance is 1000 Watts which gives us a scaling figure of 200. Multiply what our panel is producing by 200, 2.08 x 200 and we get a reading of 416 Watts per square meter. That is how much power is in the sun light reaching our panel.

These readings are only correct when our panel is perpendicular to the sun. If we leave it in one position then it will hardly ever be at right angles to the Sun.

At this point we are in the position of being able to leave our panel in a fixed position and work out how much electricity we could produce from the sun, and it would be an accurate representation of what we could expect to produce should we want to install Solar panels on our house roof. Just mount our small panel at the angle of our roof.

For working out how much sunlight irradiance there is we need to compensate for the angle of the panel compared to the angle of the Sun.

If our panel was 45 degrees different from perpendicular to the sun ( or any other angle) then we can use the mathematical Sine function.

The SIN(45) (sin of 45 degrees) = 0.707 - this tells us that our panel reading is only 70.7% of the actual value.

1/sin(45) x 416 = 588 Watts which is the real power in the sun considering we are at 45 degrees to the Sun.

Obviously our panel is not only out in one direction (the tilt) but will be out in the east west angle as well so this angle would also need to be calculated. To work out these calculations we need to know the position of the sun in the sky when we take our readings. To do this we need some serious astronomical calculations, which are available, and which I have a program for working out the position of the sun at any given time. This is where hooking a solar panel to an analog to digital converter and then inputting that into a tiny computer such as the Raspberry Pi allows us to make a really good irradiance / insolation meter.

Our meter, if monitoring the suns power every minute or 10 minutes, can see clouds passing. A high value but not maximum tells us that there are either high cirrus clouds or the day is hazy, low readings tell us that it is over cast.

To get more correct readings we should temperature compensate our readings because a solar panel will lose about 0.4 or 0.5% of it's power for every degree Celsius the panel is above 25 degrees C. This is easy to do by hooking up a small temperature sensor to the Raspberry Pi and sticking it to the back of the solar panel.

Infrared Photography and NDVI
Plants use Red and Blue light to carry out photosynthesis. The structure of plant cells will reflect near infrared light. Scientists have been using this to photograph the earth from satellites for years to work out how well the vegetation is doing on earth. More recently farmers have been using this data to work out how well their crops are doing. Using the power of modern technology and the fact it is cheap and within the hands of the ordinary man we can also use this technology to monitor the health of our own plants.

It should be possible to see areas within your own crop that isn't growing particularly well before it causes a problem and then to rectify the problem which could be lack of water or lack of nutrients.

I have purchased an infrared camera and am in the process of learning how to process the camera image to produce an NDVI image. Basically this simply means doing some maths on the pictures.

The NDVI process is: Subtract the visible light image from the infrared image then divide that by the infrared image plus the visible light image. What is produced is an image which is a ratio of visible and infrared.

From that point you could attach the camera to a balloon and photo your own plot from above.

There is a Public Lab open community project to do just this at http://publiclab.org/wiki/near-infrared-camera

I am hoping to find a correlation between the sun's power as recorded above with infrared pictures obtained.

Accurate data
I am hoping by recording all the environmental conditions including the sun's power, and future soil temperature, that I should be able to document how many hows of sunshine and how many hours above a certain temperature a crop needs to germinate and go on to produce ripe fruit.

Future plans
In theory it might be possible to detect plant diseases and different bacteria using infrared or by using a camera to do spectral analysis on reflected UV. Technology has opened up a whole new avenue of experimentation with plants and the environment for me and allows me to combine my programming and electronic background with growing food.

I have all the technology, it's now just a matter of hooking it up, programming and experimenting and looking at the results and seeing whether they can be useful....more to follow :)









Sunday, 20 July 2014

Light, Energy and Plants

Light, Energy and Plants

While thinking about weather, particularly rain, in providing what plants need to grow well my attention has turned to light and temperature.

Permaculture keeps telling us the reduce energy, grow diverse food plants and generally observe nature to better interact but I keep coming back to the same old issue. Permaculture ideals,or ideas, are all well and good but very few Permaculture people appear to have an good understanding of some of some the issues and therefore can't act, interact, reduce or create better alternatives to achieve some of the goals.

I'm in the same position, how do you grow a wider range of food successfully if you don't know what the plants needs are other than to repeat what commercial people (farmers, seed companies and conventional books) tell you. How can you reduce energy effectively if you don't know where or how you are wasting it. How can you capture enough rain water if you don't know how much water you need.

Observation is the key word, but understanding what you are observing requires learning. The sun's energy is key to everything but apart from saying that what do we actually know about it? The plants use the sun to photosynthesise, great but how and how much? How much energy does the sun produce? I've been reading up and trying to answer some questions.

First of all how much energy does the sun give the planet?

The energy from the sun arrives at the planet in the form of different frequencies. Some of these frequencies our eyes can pick up in the form of colours of light while others are invisible. These frequencies are put into different ranges. From Ultra Violet, through Visible light to Infra Red. Ultra Violet light we can not see but this range is split further down into UV a, UV b and UV c light. We've heard about that because UV can cause skin cancer. Visible light is split into smaller ranges, Red, Orange, Yellow, Green, Blue, Indigo and Violet. After that we have Infra Red.

How much energy in these frequencies has been calculated and put in a form we can understand and compare to other forms of power. The combined power in the Sun's light that hits the earth's atmosphere is 1,366 Watts per Square Metre. There is about the same energy hitting every square metre of the earth's atmosphere to power your electric kettle.

Of that energy, plants take some and use it to make other things, some of which gets stored in the ground in the form of carbon (coal, gas and oil being the most notable) but some energy gets absorbed and heats things up which ultimately causes warm or hot spots which creates differences in temperature which then helps to drive wind and the weather, and of course we can capture some and convert into electricity.

Converting the sun's energy into electricity is something that interests me. Solar panels. The Silicon crystals are made in such a way that they respond, as well as can be made, to as many different frequencies of light as possible. Currently they can convert approximately 15% of light into electricity.

Knowing how much light reaches the atmosphere, and knowing that a solar panel can convert 15% of that into electricity suggests that I can take a solar panel and work out how much light there is at any given time on any given day. From that I could compare how well my plants grow when given certain amounts of light.

Knowing how much light there is should enable me to work out what foreign food plants will grow in my garden.

Things got complicated when I realised that some of the 1366 watts per Meter doesn't reach the ground because of haze, clouds etc but on a clear day at noon approx 1000 watts per meter reaches the ground. While doing some calculations with a solar panel I realised that things got even more complicated because of temperature. All the quoted ratings of a solar panel are based upon a solar panel running at 25 degrees Celsius. When the sun hits the solar panel it warms the panel, often to between 40 and 75 degrees. For each degree above 25 degrees C the solar panel becomes less efficient and loses approx 0.4% of its power for each degree. On a very hot day the solar panel, although supposedly 15% efficient will loose 20% of this.

The long and short of this is that although complicated I should be able to measure how much light and how much energy hits plants.

How efficient are plants?

This then led me to wonder how much energy plants take to photosynthesise. It turns out that they only need between 1 and 4% of the suns energy depending upon the plant. Not only that but plants don't use the full spectrum of light, which once I read about it makes sense. The fact that leaves are green shows that the plants don't use that part of the spectrum as they reflect those frequencies. Plants absorb light in the red and blue parts of the spectrum. This has been demonstrated by looking at how much oxygen a plant produces when different frequencies of light are applied. Plants have evolved as very inefficient energy converters because there is no pressure for them to be efficient, ie, there is plenty of light, plenty of energy in the sun.

Greenhouses

If plants only absorb and use red and blue light (broadly speaking) then why do commercial greenhouse people waste a lot of energy producing light in the full spectrum only for the plants to reject much of it. Perhaps the lighting energy bill could be halved if you only produce certain coloured light. Better testing of how well plants do could also mean that not only the colour of light can be tailored but also the intensity.

Looking deeper into observations and having a deeper understanding of the issues can and will open up many more opportunities for reduction in energy, but also a chance to grow better plants and a wider range of plants.

If I know how much energy (light) falls on my plants, and I know the temperature and rainfall I can choose the plants I grow and be more certain as to their success. Also knowing that the season has started badly (not enough light because of clouds and lower temperatures) should enable me to give up on some plants at an early stage knowing they won't ripen and still have time to plant a second crop that will mature and ripen with the time left.

The biggest problem that I see is that there seems to be little or no information on how much light a plant needs at certain temperatures but the data from solar panels around the world gives enough information about the conditions and this information can be compared against plants.

Uses of light upon disease
It occurs to me that if plants only need certain wave lengths of light to photosynthesise then perhaps there is a chance to beat some plant diseases, such as blight, by not giving the disease the wave lengths it needs. It is perfectly possible that by filtering out some frequencies you can stop fungus, such as potato and tomato blight from starting. UV is known to stop algae in ponds and hence the use of UV lamps to keep the water clear. Something similar could be used on plants.








Sunday, 13 July 2014

Potato blight, the weather, and Dew Points

Potato blight, the weather, and Dew Points

For the last year and a bit I have been recording the weather for various reasons but have many plans for how this data can be used.

A blog post by Deano Martin about Potato blight and compost tea not only raised a few interesting questions but brought to my attention that the weather has a large part to play with blight. Although I was well aware that blight is caused by warm damp conditions I knew little else and his blog post lead to some reading up upon the subject as well as much thought as every good blog post should induce.

I hadn't realised that there are some predefined conditions that would indicate a good chance of blight. Over the years two ways of predicting when blight may start have been developed.

The first one was called the Beaumont Period and is defined as:

Within a 48 hour period 46 hours must have been above 10 degrees C and humidity must have been over 75%

The other, and now preferred method, is called the Smith Period and is defined as:

Any 2 consecutive days where the minimum temperature was 10 degrees C or above and on each day humidity was 90% or above for 11 hours

Since I have been recording the weather details every 10 minutes I have plenty of data in which to work out previous periods when blight may have started but also predict when the next period will be. Working out what to do when you can predict when blight may start is another thing entirely.

A few hours of programming and I had knocked up a way of calculating both Smith and Beaumont methods and am able to compare both but also look back over last year and this year to see how often favourable conditions exist for Potato Blight (or Tomato blight for that matter). This should now enable me to predict, or should the word be forecast, when Blight may start. 

Running through the data I see that the conditions were met on the following days:

Possible blight days (Smith Period): 24th,25th and 25th,26th and 26th,27th of August 2013
Possible blight days (Beaumont Period): 10th,11th of September 2013
Possible blight days (Beaumont Period): 11th,12th and 21st,22nd of October 2013

Possible blight days (Beaumont Period): 27th,28th and 28th,29th of May 2014 
Possible blight days (Smith Period): 27th,28th and 28th,29th of May 2014
Possible blight days (Beaumont Period): 10th,11th of July 2014 

For a start we can see that the Smith Period occurs less often and is considered more accurate. The Smith Period has been used since the 1970's. (My data only goes back to May 2013 and is up to July 11th 2014).

What we can see, which seems to tally with the fact I didn't hear about people having blight as a problem last year, is that Blight was late and many people would have dug up their potatoes around then, leaving just the main crop to suffer, but this year it looks like we have had or might have a more early blight starting the end of May and with July being wet and humid we may well see a few more days which are favourable for blight, the Beaumont period has already been met so clearly conditions have come close.

Obviously these dates are only for my exact location.

Interestingly I have one or two plants which are turning yellow, and started looking poor around the end of May so I am wondering if it is Blight, although it also looks like a mineral deficiency. I'll need to look closer. I had put this down to them being planted directly into young manure and we have had a lot of rain and that bed got rather water logged several times. The bed that I have used for potatoes this year was hastily prepared by simply piling manure onto the ground to a depth of about 18 inches. Allowing the manure to compost in situ, ready to be dug over for an Autumn crop. I simply took advantage of the bed to see if it would grow potatoes in fresh manure, they started growing, so I planted more hoping for a bonus crop when otherwise I didn't have room for potatoes this year.

Knowing that humidity is key to when Blight may start, observing the weather in detail would be in keeping with Permaculture's principle of Observe and Interact. In Permaculture you are supposed to Observe 90% of the time and Act / Interact 10% and although I have been very critical of Permaculture, or to be more precise the way it is taught and the information provided within the Permaculture community, I won't go into this now, I do totally agree that you need to make lots of good observations, although I tend to observe and awful lot but also act much more than perhaps is considered good.

Having an enquiring mind and wanting to clarify observations and also get accurate data I started to wonder how accurate humidity readings taken from a weather station can be when applied to ground, or in this case, Potato canopy level, humidity.

The question is does a humidity reading of 90% at weather station height, also correspond to ground level? I can't take a reading at ground level easily because my weather station bits are up a pole on top of the greenhouse, 3.5 to 4 metres high. This got me thinking about Dew on the grass. 

The Dew Point
The Dew Point, which is the point that water will appear on surfaces, the ground or grass for example, is where the air can not hold any more water and will give up water and transfer it to an object or thing. When Relative Humidity reaches 100% this will happen. The Dew Point is the Temperature when Humidity is 100%

When we see Dew on the ground we know that the Humidity is 100% so, at that time, the weather station should show 100% humidity. It doesn't. At least mine doesn't. I know my readings are accurate to within a sensible margin and there is no reason why they wouldn't be so straight away I can tell something about this observation. Clearly the humidity is slightly higher at ground level, not at all surprising since there is a different micro climate in and around the grass compared to 4 metres above.

Temperature and Humidity are closely related. If the humidity is higher at grass level, as evidenced by the fact we have dew when the humidity reading I take 4 metres up suggests 90%, then the temperature is lower at grass level than we observe at weather station height. We can see that the grass level temperature is between 1 and 2 degrees C lower.

For what it is worth the Dew Point Formula is:

Dew Point Temp in Celsius = Temp - ((100 - Relative Humidity) / 5 )

If I have a reading of 15 Deg C and 90% humidity at 4 metres high but there is due on the ground the Dew Point would be 13 Deg C

This therefore raises the question, does the Smith Period of 2 days above 10 Degrees and 11 hours 90% humidity on each day take into account that readings are taken from above ground normally or should I be taking my readings from ground level? ie, does the Smith Period not mind that the micro climate within the Potato Canopy is different to the place where you measure weather? I'm guessing not.

I'm guessing not because the way the Met Office gives out Smith Period warnings will necessarily be based upon weather stations and not little sensors within potato fields.

If we therefore take into account that Blight may start when temperatures are below 10 Deg C or Humidity levels are higher than 90% at the plant level would we be able to prevent it easier or predict it better?

The other thing about taking readings from above the ground is that it takes no account of the wind. Air flow or wind, will be less around the plants than higher up, so another question to answer would be does blight happen always on these Smith Periods or is wind playing a big part?

Recording the weather in detail, observing, will allow me to look back at the conditions and answer some of these questions but first I need Blight....or perhaps not! Perhaps for me these questions are better left unanswered.


Sunday, 8 June 2014

Pond Life

Pond Life

I think that a pond shows how diverse nature is and how quickly it establishes itself better than anything else that you can put into a garden. Everything requires water and by simply putting a big puddle with plants next to it into the garden it transforms into a fascinating place which is good to look at and helps bring wildlife into the garden.

Today I was looking into the pond and trying to count all the different species and evaluating just how diverse it is.

May 2013
Back in May 2013 just over a year ago the pond was made and wild flower seed was sprinkled over the banks. Several pond plants were bought and then pretty much left to let nature do what it does.








A year later and a lot has happened. The banks are covered with wild flowers that self seeded from last year. The grass has been allowed to run wild around the edges, birds have visited including a Moor Hen, and the wind has brought in beetles, Dragon Flies, May Flies, Damsel Flies and a host of other things. So much has appeared that I have decided to describe as much as I can about what is there now.

June 2014
Both photos are from about the same place. One of the interesting things is how the grass and creeping butter cups have crawled over the edge and are even growing in the margins. 









A camera phone can't do justice to what I spotted today and I'll leave for another day the photographing of all the separate species that are present but in one hour I found within the pond boundary:-

Electric Blue Damselflies, a dozen or more.
Broad Body Chaser Dragonflies, 2 at least.
Small Fruit flies (loads small long flies - can't identify properly)
Various different Hover Flies
Several wasps
Several different Bumble bees
Lots of Tree Bees
Gold Finches drinking, 4 of
Slugs, various colours
Snails
A frog
Several Butterflies
Newt (smooth male and female)
Baby Newts, 4 of
Frog Tadpoles
A leech
Horsefly Larvae swimming in the water
Diving beetles, of all sizes, hundreds of them
Pond Skaters
Water boatmen
Water Fleas
Red Water Mites
Dragon Fly Nymph
Damsel Fly Nymph
Freshwater Shrimp
Freshwater Hoglouse (like a wood louse)
Mosquito Larvae
Midge Larvae
Pond Snails, Thousands
Diving Beetle Larvae
Common Duck Weed
Greater Duck Weed
Canadian Pond Weed
Marsh Marigolds
Water Forget-Me-Not
Water Millfoil, in flower (small red flowers)
White water Lilly
Purple Loosestriffe
Corn Marigolds
Corn Cockles
Corn Flowers
Forget-me-not
Sweet William
Several different grasses
Ox Eye Daisies
Dock
Thistle
Dandelion
Vole (bank Vole? or normal vole)
Poppy
Nettle
Yellow Flag Iris
At least 2 types of Algae, light green and dark green.
White Clover
White Campion
Bristly Ox-Tongue
Snap Dragons
Sow Thistle
Several different Spiders
A worm that had fallen into the pond or been dropped by a bird and hadn't drowned yet or been eaten.

8 or 9 other plants which I can't remember the name of for now (must update this)

If you count slugs as 3 different ones (different colours), Bumble bees as 2 different ones, 2 algae etc there are about 70 different "things" that I could spot within an hour in and around the pond not including multiples of each.

How many different areas within a garden or field could you spot that diversity within such a short time? As far as I am concerned the pond is the best place for wildlife and where nature can be seen at it's best. It's also a place that alters instantly when the wind blows and the sun goes behind a cloud since the insects rapidly vanish when the wind is there and it is difficult to see the bottom of the pond when the sun goes in.

There are also many different micro climates and micro habitats in and around the pond.

There is so much going on in and immediately around the pond. Just watching the diving beetles swim around and then slowly float back to the surface to get air was fascinating. The Horse Fly Larvae looks like a segmented worm or grub and was swimming on the surface. Damsel Flies were all over the place bringing a nice electric blue colour to the scene. Tadpoles swam in and out of view almost burying themselves into the silty layer and a frog was disturbed in the long grass at the edge. The newts are still there and loads of snails were busy eating the algae.

The amount of life which has appeared is quite amazing and how they get there is worth considering. I know when the Moor Hen visited last year it brought within Duckweed and snail eggs since I hadn't seen them before but within hours of the Moor Hen appearing I saw both where it has say on a water plant which wasn't there just before. Beetles and the various flies obviously get there via the wind and flight. Frogs and Newts seek out new homes and they have come from across the field from the dyke I would have thought. Exactly where the leech came from I don't know but presume a bird brought it in. All the plants bar the Duckweed I introduced. The algae I am guessing came from either birds, the soil or the air, maybe even Dragon flies and frogs etc.

The main thing about the pond is that I have done very little but within one year nature has totally colonised it and turned it into a wonderful wildlife habitat.

when I went on a pond course provided by the Wildlife Trust last year people were asking where do they get snails and frogs from etc and how long it takes to establish a pond. The answer was that a pond establishes very quickly and there is no need to introduce anything as it will just appear, and that is certainly what has happened.

It may have taken hours to dig, a few pounds for the pond liner but it has given so much more pleasure and introduced so much diversity to our little field that the effort to start the pond is clearly going to pay back for many years to come.

A pond is well worth investing in and serves many uses from being a focal point to sit and enjoy to giving birds a drinking source and insect source, to providing frogs and newts a home as well as attracting butterflies and bees to the flowers and giving me somewhere to drain water to when we have a lot of rain.