Notice to YSPilots/YSFLIGHT

Notice to YSPilots/YSFLIGHT
Legacy Pack available under the YSFLIGHT category.
Any individual requests for a model must be made to my email address, see bottom of the page..

Thursday, 25 April 2013

Project Freya: Moisture Sensor to the LCD screen

Okay, the first thing I thought would be useful would be to write data to an LCD screen, and my arduino starter kit came with an LCD screen.

So, my set up looks like this:


The sensor leads are going off in the middle on the left hand side of the image.

Tada! Code:

#include <LiquidCrystal.h>
LiquidCrystal lcd(0, 1, 5, 4, 3, 2);
const int sensorPin = A0;
const float baselineMoisture = 0.0;
void setup(){
// Serial.begin(9600);

void loop(){
  int sensorVal = analogRead(sensorPin);
//  Serial.println(sensorVal);


The result is this:

When the sensor (Two wires… 2 posts ago…) is not touching anything moist it reads 0:


And when my dry fingers are across the two wires:


// The potentiometer to the left is for LCD brightness

Project Freya: Overview

I wanted to give my little Arduino project a proper name. And with it coming along in leaps and bounds I figured it was about time to give it a good one.

So, Project Freya. Freya being the Norse goddess of love and fertility. Fertility being the key here as it’s to be used on a farm to assess fields… (So soil fertility)

Basically the outline of the project is for a device that does the following:

  • Records the coordinates for a given position
  • Records soil moisture taken from a probe/set of probes
  • Logs both of these values onto something that enables easy translation into a GIS program, in my case ESRI’s ArcMap.

My platform of choice is the Arduino (From

I picked up the Arduino Uno Starter Kit.


I figured I’d do all the tutorials and so forth and get my hand in to the language. I did the first tutorial and decided to free lance from there.

The first part of the requirement was for GPS reception:
For this I got an Adafruit Ultimate GPS Logger Shield.

The advantage of this is that it fills both the first and third requirement, GPS and SD card. Perfect!

I wrecked the board whilst soldering on the pins though, I stuck on standard male pins, then realised I actually needed some of the inputs to run the sensors and later the LCD screen, so I had to unsolder the pins and put header pins on, and broke some of the tracks in the process. Note: if you are using this board, choose header pins straight away and don’t even try and solder on normal pins…


My moisture sensors are very simple, and partially described in the previous post. The circuit diagram can be seen here:


These are the actual probes of the sensor. Two nails soldered to wires. These will be mounted to something, maybe a broom handle, with some method of ensuring that each sample site the probes are inserted the same distance from each other and to the same depth.


That’s the basics of the project. It has expanded from these few key parts a bit now, see later posts about that though!


Arduino Moisture Sensor


Hallo, so, I got an Arduino to take the place of my Raspberry Pi. It’s more hardware oriented and therefore more geared towards the RPi projects I mentioned earlier.

So, my first goal is to create a moisture sensor.

This is done using the analogue pins.

Analogue pin 0, A0, is held low by a 10kohm resistor, Above this is one wire of the sensor. From the +ve rail is the other wire of the sensor. Currently the sensor is simply 2 bits of wire and the moisture is read from my fingers. But in the final prototype it will be read off of 2 nails stuck in the soil.

Circuit diagram

This is the code I used, it echos the reading back over the serial port to the computer.

const int sensorPin = A0;
void setup(){
void loop(){
  int sensorVal = analogRead(sensorPin);


Refresh rate is 1/2 a second.

Saturday, 13 April 2013

RIP Monkey

So, my dear little pet lamb, Monkey, died. She had been unwell for a few days. Possibly as a result of the diarrhoea she has had since we took her in, maybe it just took it’s toll on her system. She got weaker and weaker and refused to eat so we had to try and force feed her with electrolytes and glucose solution, but it didn’t help and she passed away in the night.


I’ll remember you fondly little Monkey.

Monday, 8 April 2013

Raspberry Pi: Minecraft Pi...

So, I've been trying to come up with some ideas for projects for my Raspberry Pi. These are some of the better ones:
First one is for use with Minecraft Pi edition..
So, here it is, couple the Raspberry with a GPS, take the GPS data and convert the coordinates into 1m increments  maybe set a different map datum as well, so where you are is Zero, Zero, Zero. Take that coordinate data and use the following bit of code:
world.setBlock(x,y,z,blockTypeId (Say stone or dirt, whatever))
Take the x, y and z data from your GPS and you've got a little system you can walk about with and it'll crudely map the terrain you're walking over. Of course you'd have to walk every metre of an area you want... but the idea is there.

Second, this one i'm thinking of doing more seriously. Again, needs a GPS, and a tracked robot. So, I work on a farm, we have lots of fields. Something that would be useful to know is the surface moisture, as it can tell us a lot about what is happening in the field, is there a blocked drain, do we need to put one in, will the yield of this area be good or is it too water logged. (There are more interesting things to know about a field, ie Nitrate concentraiton, humus thickness, compaction etc, but moisture is the easiest to get a reading on).
So, moisture probe on a stick. Set the boundaries of the field into the computer, and set the little rover off. Every metre or so, stick goes into the ground and result gets recorded. Get this throughout the field and plug the data into ArcMap, turn it into a heat map and you've got a nice indicator of how the fields look moisture wise. Would probably reveal some interesting trends... Maybe. This could also work as a hand held probe thing, which would save on programming, but would require a bit more leg work and time. 

With the hand held probe, could use LED indicators to point to the next sample point, then maybe a LED to indicate when to sample.
Ideas Ideas!

Tuesday, 2 April 2013

Pikachu joins Monkey: The Pet Lambs

So, we've got another little pet lamb to keep Monkey company.
I called her Pikachu because she has little black tips to her ears and looks very cute. Funny story surrounding her "becoming a pet lamb"
Her mother is a shearling (That is a sheep that's over 1 years, younger than 2). The shearlings on Botton Farm are still about to fatten up and eventually go for meat. However one of the tups seems to have not been castrated properly and served a ewe shearling... The result was Pikachu walking around in with the 'lambs.' The shearlings are not really old enough to have lambs of their own, so Pikachu became a pet lamb as well. She's just with us for a little while to make sure she survives, then she'll got to another house probably. Till then she can share Monkey's box.