PurpleMow - the plan
Mowing the lawn by pushing a noisy mower in front of you seems rather old-fashioned. The obvious alternative is to purchase a robotic lawn mower. But the cost of these are outrageous, especially if you want to avoid cheaper specimens that you might find mowing adjacent flowerbeds or want to avoid finding the robot going berserk on your neighbor's neatly planted flowers. So why not build one of your own? The material is hardly that expensive and the electronics and software could not be that hard to construct!? In this blog we are going to report from an attempt among colleagues at PurpleScout to build an open-source autonomous lawn mower of our own.
Robocut as role model?
The team consists of eight people from Purple Scout, all very skilled in computer science and programming, but lacking experience in electronics and hardware construction. We will attempt to build the autonomous lawn mower as an Open Source project, providing code and electronic schematics to the public. In return we're hoping to get feedback on how things can be improved. GitHub is used for sharing any project and product information. Target date is set to beginning of May when the grass starts to grow after the winter.
Android has a quite new API for developing apps for USB accessories, called ADK. The accessories can be controlled by sending commands to a I/O board with a USB host. Of course, this implies that an Android device needs to be connected via USB for the mower to function. That could be considered a bad idea but at the same time this gives access to all the fantastic things that comes with an Android device, like a multitude of sensors and a very competent Linux system. And nowadays Android phones have become quite inexpensive.
The plan is to hook up an Android device to a Arduino card and then connect the Arduino card to three DC-motors and a bunch of sensors. Two motors drive the right and left wheels and the third motor acts as the cutter motor.
The Arduino card is specially developed for Android ADK, callled Mega ADK. This card has an ATMega 2560 processor and a USB shield, 54 digital I/O pins(of which 14 provide PWM output), 16 analog input pins.
As one of the participants in this project is devoted to embedded Linux systems, he, and his team, will be developing the application for a card called Raspberry PI connecting to the same motors and sensors.
The team is going to meet every two or tree weeks and develop the code in "code bursts". Here is roughly what we hope to achieve during these sessions.
|Session 1||A first draft of a simple app that controls the motors. With a set of buttons on the screen of the android device control at least on and off of the motors.|
|Session 2||Implement integration with a sensor, like the range sensor that detects obstacles, for starters.|
|Session 3||Integration of Burried Wire Fence (BWF) sensor.|
|Session 4||Moist sensor. If it rains, do not mow lawn! Also, if enough time, implement timer functionality so the user can provide a mower schedule|
|Session 5||Motion detection using the accelerometer on the Android device. If the machine is lifted up from the ground or is turned up-side-down the motors have to stop immediately.|
|Session 6||GPS integration. Using the GPS of the Android device keep track of what areas have been covered in order to more efficiently cover large lawns.|
|Session 7||Remote log in over SSH via WiFi. Functionality provided to check logs and alarms but also to order the machine to start mow, return to base, or move the mower to a certain GPS position and start mowing from there. This could be a scenario where one mower is supposed to cover multiple lawns each fenced in with a BWF cable.|
|Session 8||Video streaming. The user would like to check in from a remote location to see that everything is working smoothly or if the device has been stolen.|
|Session 9||Remote control via Wifi from other Android device or web app. Send GPS position and current status to the remote device.|
|Session 10||Battery charging. Automatically find the charging station when battery voltage gets low.|
|Session 11||Charging control.|
|Session 12||Security. If the machine detects that it has been lifted, a PIN-code has to be provided to start operating again. Other security scenarios?|
|Session 13||Deploy on an actual lawn. Party!|