Monday, May 30, 2016

Robotics for Gardeners and Farmers, Part 1

What would you like to do with your garden or farm that you can't make time for, don't have patience for, or just can't imagine how you'd go about getting it done? Weeding without herbicides? Maintaining a continuous canopy of foliage by replacing plants as they mature? Dispensing with rows and using nearly all of the available space nearly all the time? Mixing native flowers in with your vegetables in a random fashion? Selectively harvesting certain plants in a polyculture mix without having to crush others under wheels to do it? Including perennials in your mix? Allowing poultry to range free under the shade of your taller crops, without fear that they'll wander off or be taken by a fox or bobcat? Whatever it is, there may soon be a machine available that makes it not only possible but practical.

Some of the items on this wish list, or others you might have come up with yourself, are probably already practical for those with a bit of knowledge about available technologies and a willingness to tinker. For example, it's not too difficult to imagine a drone (see below) establishing a virtual fence around a flock of chickens, and also keeping any predators that might show up at bay. With a bit more knowledge, some imagination, and persistence, all of the items I listed above can probably be accomplished with technologies that are available now.

This term has a range of meanings, but is usually applied to aircraft that are either operated remotely or which navigate for themselves. That auto-navigation can be entirely preprogrammed, a combination of preprogramming and flexible routing, or entirely autonomous, based on goals and rules. Drones can resemble either conventional aircraft, with fixed wings and one or more propellers pulling them forward, or helicopters, with one or more (usually at least two) rotors, primarily producing lift, spinning around vertical shafts. The most common configuration, and what most people think of when they hear the word drone outside of a military context, is four such rotors, arranged in a square, with most of the mass of the craft suspended in the space between them, at the center of that square.

Not tomorrow, and probably not the day after, but most likely within the next decade, tiny drones on the scale of moths or butterflies, with enough sophistication to be variously useful, will become available. With appropriate sensors and programming (see below), these should be very helpful in collecting all sorts of information, anything you might want to know about what's happening in your garden or field, and all without any disturbance more significant than occasionally brushing a rotor or wing against a leaf. They should also be capable of performing a wide range of very detailed operations, for example pollination, but possibly even the precise application of tiny amounts of potent substances, which might mean herbicides and pesticides, but might also mean something less noxious, like concentrated sodium hydroxide or phosphoric acid, or an inoculating solution containing some specific bacteria or fungus.

The simplest sort of sensor is a switch, which allows current to pass or blocks it from passing, like a light switch. Many light switches do what they do by tipping a tube containing mercury (a metal that is liquid at room temperature) so that it either makes an electrical connection between two wire contacts or does not. That sort of tube, partially filled with mercury, can also be used to detect whether something to which it is attached, like a lamp, has tipped over. There are also magnetic switches that close (make contact to form a circuit) when in close proximity to a magnet and open (break the circuit) if there is no magnet nearby. These are frequently used to detect whether a door or window has been opened. Sometimes a sensor is nothing more than a thin rod, even a feather, connected to such a simple switch, which completes a circuit if the rod is moved far enough, and breaks that circuit again if the rod is allowed to swing back. Sensors can also be a good deal more complex, but I'll need to lay some groundwork before addressing this subject in detail.

Program or Programming
These words are basically interchangeable, and both can be either a noun or a verb. As nouns they refer to the collection of computer code (hand waving pending more detailed discussion) embedded in or available to be loaded into a computer processing core, which you can think of as the chip at the heart of a computer, although processing cores come in many types and sometimes with many on a single chip. As verbs they refer to the act of creating such code.

So there's not a lot I can say without defining some additional terms, a process that's sure to continue at least throughout the next installment, and perhaps several installments. I will attempt to make this a little more interesting than your typical glossary.

Automation need not involve computers, nor even anything electrical; it can be entirely mechanical. Farmers have been using automation since the advent of the earliest horse drawn sickle mowers, more than 150 years ago, and many forms of automation have become common on farms, from the microwave ovens in kitchens, with their rotating platters and timers that turn them off after a preset time, to combine harvesters that cut, thresh, and temporarily store grain, distributing the chaff back onto the field. Automation is difficult to define, but when you've seen as many examples of it as just about everyone living in the developed world has seen, you're sure to have a pretty good idea of what it's about.

Robot is even more difficult to define, in large part because people have differing ideas about what the word should mean, and attempting to provide a definition might be considered a fool's errand. There's even a podcast devoted to determining whether particular examples qualify as a robot. Again, you probably have a reasonable sense for what is meant by the word, but I would like to fill out the picture a bit:
  • Sense, Think, Act — The most fundamental attributes of a robot are that it
    1. somehow acquires information (even just a simple on/off signal) from its environment
    2. decides what action to perform (and whether to perform that action) based on the interaction of that information with its programming
    3. performs the action, when the decision is to do so
  • Physicality — While there are 'bots' that exist only as programs and are data-only in and data-only out, having physical form, some sensors and/or some mechanism of its own, is generally considered to be a requirement for being a robot, and it's devices having this property that we're concerned with here.
There are other properties we might include, for differentiating between a robot and an automaton, or between a robot and an artificial intelligence, but these distinctions aren't particularly relevant in this context, so let's leave it at that.

Robotics is the study and practice of everything that goes into creating robots, and is therefore a radically multidisciplinary field. It includes, but is most certainly not limited to, mechanics, electronics, and computer science. Happily, you don't have to know everything about all of the various aspects of robotics to take advantage of the robots created by roboticists, nor even to make valuable contributions to the field. You can combine purchased bits with your own bits to create novel devices that perform tasks for which no off-the-shelf solution exists, in fact doing this is broadly encouraged, and supported with a wide variety of parts, kits, and code that is free to use. I'll provide some sources for these in a future installment.

Until the next installment, I'd like to suggest that you look around for examples of automation that are already part of your life, and give some thought to what else you might like to automate, if doing so were reasonable and affordable.

No comments: