Containing cattle with GPS virtual fencing

Thread Starter

Dave Hawkins

Joined May 30, 2013
20
Hello- I am new to this forum and I am doing an internship on a cattle ranch where the cattle is kept bunched into a small group and moved to new pasture twice daily. We currently use electric fence to make the paddocks but I am interested in GPS Virtual Fencing. I read about it here http://www.theatlantic.com/technolo...l-fences-will-transform-rural-america/272957/

I contacted the inventor, Dean Anderson, and he said that his patent has now run out - it can be found here http://www.pat2pdf.org/ and enter Patent #6232880

I found a very inexpensive GPS board ($8.95) here http://www.weirdstuff.com/cgi-bin/item/20164

but I don't know much about wireless datalinks, which would be necessary so that the unit mounted on the cattle could communicate with the base station.

There are other challenges such as power - I suppose solar would be good, and what kind of stimuli to make the cows move is also a question.

Any help I can get on this project would be appreciated as I would like to build one and test it on our cattle here.
 

wayneh

Joined Sep 9, 2010
17,498
There are already some commercial geofencing products for pets and even children I think. You'll get farther faster, I think, if you reverse engineer from those products. Maybe one of them will suit your needs.
 

edwardholmes91

Joined Feb 25, 2013
210
It is indeed a very interesting idea and something I can see actually being implemented in some, way, shape or form in the not too distant future. A lot of the questions you pose though about power and stimuli to make the cows move are already answered in great detail in the article!
 

wayneh

Joined Sep 9, 2010
17,498
... I am ready to start building ...
No offense, but I don't think so. I think you're just getting started and still have a lot of design choices to make.

I've never seen the "steer the cow" strategy before in the existing commercial devices, which simply provide a stimulus at their border like a buried wire dog fence. The animal has to learn which way to go to avoid the border.

One thing you need to think about is the technique for reprogramming the animals' units. You could use a remote base station but that requires a long-range transmitter/receiver. Maybe you could tolerate infrequent programming at short range? I mean, real fences don't move so you could simulate a real fence with NO remote programming.

If I was doing this project, I think I'd start without the capability for remote reprogramming, to eliminate the whole Tx/Rx issue. Solves a LOT of problems. If you get a good design for a static fence, then expand to add the remote communication abilities.
 

Georacer

Joined Nov 25, 2009
5,182
First you need to decide and let us know your decisions about:

1. How you will excite/motivate/punish the cows in order to inhibit them from crossing the virtual line. I think that isn't in our jurisdiction to decide; rather it's the farmer's.
2. Decide how you will mount the unit on the animal. Will it be a collar? A muffle? Something completely different?

After that, we will suggest you solutions for power, GPS monitoring and programming.

Unfortunately, in my mind, I can't imagine the total installation smaller than a large collar or a tiny saddle.
 

Thread Starter

Dave Hawkins

Joined May 30, 2013
20
Thanks all for the feedback. I think it would indeed make sense to do the project in stages. My preferred sequence would be ...

1) Try to track one animal remotely using a GPS board / data link / solar power.
2) Research sounds / stimuli to add at a later time

For Step 1 I am hoping that the $8.95 GPS board I found would work, but I don't know much about connecting that board to a wireless data link. I think I can figure out the solar power piece myself OK.

So my reason for coming to this forum initially is to get help on the wireless datalink part. To get really specific, I need somehow transmit the real time GPS data to my laptop over a distance of a couple miles and some pretty hilly terrain. If I can do that and also have my laptop transmit commands to the mobile unit, I think everything else will be pretty easy.
 

Brownout

Joined Jan 10, 2012
2,390
I need somehow transmit the real time GPS data to my laptop over a distance of a couple miles and some pretty hilly terrain.
That rules out any of the usual wireless network technologies. You might read up on packet raido. I don't know enough about it to even offer advise.
 

THE_RB

Joined Feb 11, 2008
5,438
...
For Step 1 I am hoping that the $8.95 GPS board I found would work, but I don't know much about connecting that board to a wireless data link.
...
Not a great GPS for a commercial portable device. It's large, old fashioned and power hungry.

There are a lot of very low power new GPS modules on the market, which will be important if you want small size as you can use a much smaller battery.

Personally I think the idea will require significant amounts of skill and work to even get a good prototype made, never mind the additional work of bringing it to market with manufacturing and sourcing issues.

The questions you are asking and the GPS you are considering lead me to believe that you don't have a lot of expertise in this area and will need some expensive paid help if you are serious about making this product. I'm not trying to be mean, it's just that I think you really underestimate how hard this will be and how much it will cost to achieve.
 

Georacer

Joined Nov 25, 2009
5,182
I have a different comment to place.

If your goal is to actually come up with a working prototype, then you first need to complete the design phase of your project. Don't just cross your fingers, decide to solve problems in the future and hope for the best.
It is very important that you come up with:
1. The specifications of your device.
2. The theory of operation.
before you start building.

If you don't, it's more than likely that you will reach a dead end mid-way and you 'll need to change your design plans, having wasted money and both of our time.

So, once again, I urge you to provide items 1 and 2 of the list above.


If, on the other hand, you just want to experiment with digital technology, we can start right now from any point, regardless of the result.
 

Thread Starter

Dave Hawkins

Joined May 30, 2013
20
Not a great GPS for a commercial portable device. It's large, old fashioned and power hungry.

There are a lot of very low power new GPS modules on the market, which will be important if you want small size as you can use a much smaller battery.

Personally I think the idea will require significant amounts of skill and work to even get a good prototype made, never mind the additional work of bringing it to market with manufacturing and sourcing issues.

The questions you are asking and the GPS you are considering lead me to believe that you don't have a lot of expertise in this area and will need some expensive paid help if you are serious about making this product. I'm not trying to be mean, it's just that I think you really underestimate how hard this will be and how much it will cost to achieve.
You are right that I do not have a lot of expertise in this area. I have a 25 year old electrical engineering degree that I never used in the business world - flew AF jets instead. I do have some experience tinkering with BASIC Stamp modules and such and I'm a serious do-it-yourselfer, having built my own houses and such. So I appreciate the comments here from people who actually know what they are doing. I am currently trying to get actual plans and parts lists from the inventor, Dean Anderson, but I don't know if that will be possible because he collaborated with somebody from MIT and I am not in contact with that person. So here I am talking up the project to see if I can generate any interest from someone who knows what they are doing.
 

Thread Starter

Dave Hawkins

Joined May 30, 2013
20
Georacer, I probably would be interested in just cobbling something together to see if the concept is really viable on real cows in my actual environment, which is what I have access to right now. If there is a more suitable GPS board available at a decent price, great, but if not, I would probably just experiment with the one I have found, hopefully find some wireless datalink that works and move forward as best I can. I come from the school of "Ready, Fire, Aim" (as opposed to Read, Aim, Fire) in business and it has always served me well.
 

Georacer

Joined Nov 25, 2009
5,182
If this is what you choose, here is what I suggest.

A quick theory of operation:
The GPS unit will communicate the position of the module and let the onboard microcontroller be aware of it.
The microcontroller will have the fence coordinates pre-loaded and make the necessary decisions.
The microcontroller will also send its location via the communications module to a base station.

Start by building the GPS communicatoin. You need to use a microcontroller that will communicate with and orchestrate the GPS and the communications module.
An Arduino will do fine for your project. Cheaper and more professional solutions are the bare Atmega328 chip or a PIC variant. I don't think a BASIC stamp can cut it.
Do you have any experience with any of the above systems?

On the GPS selection, I suggest one of these two:
https://www.sparkfun.com/products/465
https://www.sparkfun.com/products/8234
They have small footprint and an on-chip antenna. The selection will depend on the voltage level of the system.

The first step will be to hook up the GPS receiver with the microcontroller and manage to read the serial input that the GPS streams every second.


As a glimpse into the future, since you need to have a multi-nodal network, I have read that the XBee Series 2 implement it quite easily. They have a range of up to a few miles, depending on power.
I estimate unit cost at about $200 for the total installation on the animal.

Keep in mind that given the knowledge level you present, it will take several weeks to guide us even via the system basics. Similar project presentations will be much more beneficial and we 'll link you to them when we find that they will be of help. Be prepared to do serious reading by yourself. This project isn't a trivial one.
 

Thread Starter

Dave Hawkins

Joined May 30, 2013
20
I am prepared to do some serious reading and experimenting. All I need is guidance and I appreciate the guidance you all are giving me so far.

Off to move cows, then dive into reading about Arduino's and Xbee's.

Thanks!
 

Brownout

Joined Jan 10, 2012
2,390
If you're going to use XBee, you'll need the "pro" line to get the range you need. Also, you'll need to use the 9000 series. Keep in mind that higher power means more drain on batteries, which might be a show-stopper.
 

shortbus

Joined Sep 30, 2009
10,045
I have a dumb question about this project.

The GPS is only going to track the cows. If they are in the pasture, you already know where they are, so why the need to track? Using GPS to turn on an electric fence seems like a lost cause to me.Wouldn't it make more sense to use RFID to turn on the fence?

From the little bit I know about milk cows, from helping an uncle years ago on a farm, they have a pretty good hierarchy amongst themselves. One cow is the leader. His cows new when to come in to milk on there own. You could almost set your watch by it. The one cow that was the "leader" or boss (why a cow is referred to as 'bossy') knew the routine and led the others. You only need to teach the one 'lead' cow.

But you will still need to have a person to change the pastures if that is being done. Never herd(a little cow humor) of farmers doing that though. They do change pastures but not twice a day. It's usually done every day, pasture 'a' today pasture 'b' tomorrow. And it is done with a gate in the fenced "lane" from the barnyard to the pastures. At least that's how it's done in the area I live in.

Now if these are beef CATTLE and not milk COWs that a different story. But the RFID seems like a better fit than GPS in either case.
 

wayneh

Joined Sep 9, 2010
17,498
If it was me, I'd take for granted that the electronics can be worked out by clever people skilled with such things. As I said, there are commercial solutions that closely resemble what you need, and you don't want to reinvent more than you have to. It's a big systems problem, yes, but not really any new technology. "Just" putting modules together into a larger working machine.

Instead I'd start by focusing on the more ambiguous problem of the cow-steering device. This would be new "prosthesis" technology. You can work on that problem in the field (hah!) without a gps since you can watch the cow up close - you'll know where it is and which direction it is facing. You'd only need a standard radio control setup from the hobby store to send signals to whatever cow-mind-control device you are testing.

Having a solid knowledge of what you will use to control each cow will hugely help make design choices downstream regarding power usage and such.
 

Georacer

Joined Nov 25, 2009
5,182
If you're going to use XBee, you'll need the "pro" line to get the range you need. Also, you'll need to use the 9000 series. Keep in mind that higher power means more drain on batteries, which might be a show-stopper.
I guess you mean the 900MHz series. Yes, I meant to say that and I forgot about it. You lucky Americans have that band open.

I have a dumb question about this project.

The GPS is only going to track the cows. If they are in the pasture, you already know where they are, so why the need to track? Using GPS to turn on an electric fence seems like a lost cause to me.Wouldn't it make more sense to use RFID to turn on the fence?
RFID tags have a range of only 20-30cm. That means that there have to be tags on the fences exactly at the reader height (wherever it is placed on the cow) and in a pretty much continuous line. I don't see how that could happen.
 

BMorse

Joined Sep 26, 2009
2,675
I would start with Georacer's suggestions with the communications of the modules with the "host" system that will "guide" the cows to where they need to go.....

As for directing the cows to move in a certain direction... why not use a collar system with 2 "cattle prod" type devices (or 3, you may have to place one near the back end of the cow to give it a push forward :) ), similar to ones used in dog collars for training them, or containing them in an invisible fence system, one on each side of the collar, nothing too harsh or powerful, just something that is enough to "annoy" the cow to try and move away from it, so if you want it to steer right, the left prod would activate and give the cow a "push" towards the right and vise versa.

As for power, I am sure these cows will be grazing in the daytime, so adding solar panels on top of the collar to keep the batteries topped off would aid in keeping the system up an running, check out these at Solarbotics.

Building a GPS based system like this would eliminate the need to place anything around the fields, the whole "fencing" will be virtual, and can be changed at anytime on the fly via the main system.
 
Top