SHEEP

COUNTER

by

Ian Kemp

August

2000

Sheep Counter.

Aim

This project is designed to meet the need of a busy sheep farmer. Counting sheep can be a time consuming and awkward task and so a solution to this problem would be to make an electronic counter so that every time a sheep passes through a gate the counter would add one. However, it must only count up one when the sheep has actually passed through the gate, e.g. if the sheep pauses in the middle of the gate the counter should not go up one.

Research

The gate needs to be wide enough for the sheep to be able to easily pass through and yet not so wide that more than one sheep at a time can get through. To find out some details of the physical size of sheep I e-mailed a sheep farmer that I know, Mr Shepherd.

A screen shot of my e-mail is shown below.

In the reply that I received from Mr Shepherd, he advised me that for the width of the sheep in the flock, most are about 40 cm wide, with some of the larger ones being as much as 50 cm. He also said that, the light beam needs to be about 45 cm above the ground so that it will be able to detect both the larger, mature animals and also the smaller lambs.

I therefore intend designing my system for a gate that is 60 cm wide as it will ensure that it works properly for 50cm.

Specification

My system must be able to reliably detect sheep passing through the 60cm wide gate and not be affected by any ambient conditions.

My system must be able to count up to at least 999 and be capable of being reset to zero.

My system must operate from 12 volts, since this is readily available from the farm vehicles.

It must also consume little power since it must not provide a drain on the farm vehicles batteries. I therefore want my complete system to have an average current consumption of less than 100mA.

Generation of possible solutions

There are several ways in which this could be achieved.

(a) A small device to emit a radio signal could be attached to each sheep so that as it goes through the gate, a radio receiver detects the transmission and increments a counter. The problem with this is that it would be expensive to put a radio transmitter on every sheep and the batteries would have to be regularly changed in each of the sheep transmitters.

(b) A tuned circuit could be attached to each sheep so that as it passes through the gate an oscillator attached to the gate post and at the same frequency as the tuned circuit, would loose energy. Such a loss could be detected and then used to increment the counter. This is the principle used by many shops to deter and catch shop lifters and is again expensive to fit each sheep with the required tuned circuit.

(c) A light beam could be set up across the gate way so that as the sheep breaks the beam, the counter is incremented. This method requires nothing to be attached to each sheep and so is the cheapest and easiest system to implement. It is this system that I will investigate and use for my system.

I can use either a Light Dependent Resistor (LDR) or a photodiode for my light beam sensor, and either Light Emitting Diodes (LEDs) or a filament lamp for my light beam producer. Filament lamps are not very efficient and consume too much power. Since this equipment must be battery operated it is essential that it should be as low a power as possible. I am going to therefore use LEDs. Looking through the Rapid Electronics catalogue, there is an 8mm diameter red LED with a rated output of 4.5 candela, which is the brightest one that I have been able to find.

For a light sensor I am going to use a LDR, since I have used them before in my class work and know how to use them in circuits. To find details of the characteristic curve of the LDR I consulted the RS Components catalogue CD ROM and found a data sheet for the LDR, type NOPRP12. (Data sheet file number 232_3816.pdf). A table of the electrical characteristics and a graph of resistance against illumination are shown below, as extracted from the data sheet.

To test the range of the LDR and LED I set up the following circuits.

The resistor R1 was calculated as:

The maximum current through the LED is 30mA. The forward voltage drop is 1.85V.

Therefore the voltage across R1 is 12 - 1.85 = 10.15V

So R1 = 10.15/0.03 = 338.

The nearest preferred value available was a 390 resistor which I used.

The power dissipated by the resistor will be approximately given by

But with the LED only on for half of the time, the mean power is half of this value, so a 0.25W resistor will be suitable.

I measured the light level in the lab where I was working and also outside, and found that the illumination inside was 650 lux and outside 5,000 lux. This corresponded to resistances of 1000 and 200. Using a value of R2 of 1k and the LED, I found that I could achieve
Join now!


a voltage change of 1V when the LED was 30cm from the LDR. When I repeated the test outside I found that I could only achieve a change of 1V at a distance of 10cm, due to the additional ambient brightness. Changing R2 to 220 had little effect to the overall range of working. I therefore concluded that this was not going to work.

When I discussed the problem with my supervisor he advised that I should look at the section B question in the summer 2000 examination for the old AS electronics syllabus. The system diagram ...

This is a preview of the whole essay