It’s impossible to know when society began to manicure its front lawns. Truth be told — cutting the grass was, and still is a necessity. But keeping the weeds at bay, trimming, edging and so forth is not. Having a nice lawn has become a status symbol of modern suburbia all across the globe. When the aliens arrive, one of the first things they will surely notice is how nice our front lawns are. This feature of our civilization could have only been made possible with the advent of specialized grass-cutting machines.
It could be argued that the very first lawnmowers were live stock. The problem was they were quite high maintenance devices and tended to provide a very uneven cut, which did not bode well for families striving for the nicest front lawn on the dirt road. Coupled with the foul odor of their byproducts, the animals became quite unpopular and were gradually moved out of site into the back yards. Other solutions were sought to maintain the prestigious front yard.
The first mechanical lawnmower was invented in 1830 by a man named Edwin Budding, no doubt in an effort to one-up his neighbor, who still employed a Scythe. Budding’s mower looked much like today’s classic reel mowers, where a rotating cylinder houses the blades and rotates as the mower is pushed forward. Budding was granted a patent for his device by England, much to the dismay of his fellow neighbors — most of whom were forced to buy Budding’s mower due to the fact that everyone else in the neighborhood bought one, even though they weren’t actually needed.
By the early 1930’s, the cold war started by Budding and his neighbor had spread to almost every front yard on earth, with no end in sight. Fast forward to the modern era and the lawn and garden market did 10 billion in sales in 2014 alone. Technological advances have given rise to highly advanced grass-munching machines. For smaller yards, most use push mowers powered by a single cylinder IC engine. Many come with cloth bags to collect the clippings, even though everyone secretly hates using them because they gradually fill and make the mower heavier and therefore more difficult to push. But our neighbors use them, so we have to too. Larger yards require expensive riding mowers, many of which boast hydrostatic transmissions, which owners eagerly brag about at neighborhood get-togethers, even though they haven’t the slightest clue of what it actually is.
Us hackers are no different. We have front lawns just like everyone else. But unlike everyone else (including our neighbors) we have soldering irons. And we know how to use them. I propose we take a shot-across-the-bow and disrupt the neighborhood lawn war the same way Budding did 85 years ago. So break out your favorite microcontroller and let’s get to work!
Will the REAL Autonomous Lawnmower Please Stand Up
Firstly, let’s put one thing to bed. Those ridiculous “robotic mowers” that use a boundary wire and cut in random paths are not what we’re talking about. Any hacker worth their weight in 0.1uf capacitors knows it needs positioning. “How’s that?” , you ask? Well, just watch one of those things scurry about like some stupid bug running from the wind and you’ll say to yourself — “You know, this thing would work a lot better if it knew where the heck it was”. And that’s what we’re going to do. In order to make a real autonomous lawnmower, we need positioning. If we can locate our mower on an XY Cartesian plane, then the automation part is much easier to do.
Yes, there are other ways to achieve autonomy for our lawnmower and I highly encourage you to discuss them in the comments. But this article will focus on autonomy via positioning. Specifically, positioning provided by satellites.
GPS, RTK and Differential GPS
When it comes to getting a fixed position on something outdoors, the first thing that comes to mind is GPS. The second thing that comes to mind about 25ms seconds later is accuracy. We all know that GPS has an accuracy of about 15 meters or so. And that’s not going to work for our autonomous lawnmower. There are two other options, however: RTK and Differential GPS. Both have the accuracy we require.
Before we get into the other systems; let’s do a quick review of plain old GPS. The GPS in your phone is measuring the distance between it and at least three satellites. This allows it to find its location via trilateration (not to be confused with triangulation). The accuracy of course is determined by the accuracy of the distance measurement to the satellites. This distance is determined by atomic-clock-precise time stamps coming from the satellites. The receiver simply takes the difference between the time of transmission and time of reception and multiplies it by the speed of light to obtain the distance between it and the satellite.
Along with a time stamp, the satellite also transmits its position. Armed with the distance from the satellite and the position of the satellite, the receiver essentially knows the radius of a circle — with the satellite at the center and the receiver on the perimeter. Once three of these circles come into contact, BAM! You’ve got your location via trilateration.
There are several things that limit accuracy; one of the biggest being the atmosphere. The ionosphere can slow the signals, causing problems. The more atmosphere the signal has to go through, the greater the effect. So a signal coming from a satellite on the horizon will be affected more than from a satellite directly overhead. This type of interference is constantly changing and introduces an unavoidable margin of error in positioning — up to 10 meters.
RTK and Differential GPS
Now that we know how GPS works and its fundamental limitations, we can understand how to remove those limitations to obtain a higher level of positioning accuracy. This can be done with the introduction of a second “fixed” receiver. Fixed meaning it doesn’t move and its location in known exactly. The mobile receiver (the one that needs positioning) must be relatively close to the fixed receiver, so the two receivers can compare signals from the same GPS satellite and then talk to each other about it.
The fixed receiver looks at the GPS signal received, and then looks at the signal received from the mobile receiver. Because the fixed receiver already has a known position, it can see any error in the signal, and send the correction over to the mobile receiver. This is how both Real Time Kinematic (RTK) and Differential GPS work.
Differential GPS can get down to about 10cm accuracy. RTK looks at the analog part of the signal along with the digital part, and can get down to 2cm accuracy. Which is plenty accurate for our automated lawnmower.
Free Market Options
There are some options available to purchase hardware for this type of positioning accuracy. They’re not inexpensive, but also not out of reach for anyone (or group) who wants to take a serious bat to this project. REACH RTK is the cheapest we can find at abotu $570, but the kits sell out quickly every time they come back into stock. There is also Swift Navigation’s Piksi setup, a more expensive option (that we’ve covered before) which rings in at about $1k. If you know of any more RTK setups out there, be sure to let us know in the comments.
Using an RTK GPS setup for an autonomous lawnmower is now within your or your team’s grasp. If you know where the thing is in real time, writing the code and doing the mechanical engineering are problems with common and straightforward approaches. So why hasn’t it been done? What are you waiting for?
We’re Talking Lawn CNC
Maybe this will charge your capacitor banks… What happens when you combine an autonomous lawnmower and gcode? Mind-blowing awesomeness? Give your mower the ability the turn the blades on/off and you could be CNCing your grass instead of just cutting it.
The picture I’ve painted makes sense or larger turfs where the relatively small and battery operated robomowers are less effective. With a large enough land area it becomes less reasonable to install a perimeter wire and makes the GPS setups more desirable (although there are ways to fake the perimiter wire signal which could make for an interesting GPS hacked onto an existing robot mowers).
At a consumer level there are kinks to work out for large scale autonomous mowing, like safety, obstacle avoidance (fallen limbs, people or livestock), fuel level monitoring and the like. But for hackers, this concept is too fun to pass up. We’d love to hear about your adventures in automated mowing, and fully expect we’ll one day see a 1-acre sized Skull-and-Wrenches carved into a grassy field. Send us a tip with your story and it might end up on the front page.