mowbot2

Our first generation robotic lawn mower wasn’t the complete success that we hoped it would be.  It started off simple enough, as a remote controlled lawn mower, using a hobby RC controller and some used wheelchair motors.  With some simple steel framing, the lawn mower was durable, easy to drive, and worked surprisingly well for a remote controlled mower.  Well, it was a little hard to steer in a straight line.  That’s why I added a GPS.  However, when I attempted to add the GPS and inertial guidance functionality to see if it would operate autonomously, it failed miserably.  Although it would navigate to preset waypoints, it would only find one waypoint on the North side of lawn, and one waypoint on the South side.  Obviously, this wouldn’t be sufficient to operate as an autonomous lawn mower.  The goal here was not a random pattern, but a parallel path mowed lawn.

Everything changed one day when I found out about Swift Navigation’s Piksi RTC GPS.  With Real Time Kinematics (the RTK part), it operates using two GPS units and a radio link between them.  This allows it to calculate incredibly accurate positions, in relation to each GPS.  What this means is that I can leave one GPS unit at a fixed location, put the other one on the robotic lawn mower, and have it calculate coordinates from the fixed GPS down to 2 centimeter accuracy.  Yes, 2 centimeters!  This meant that a robotic lawn mower was suddenly possible again.

Piksi

Rather than use the heavy and large steel frame from the original robotic lawn mower, I decided to upgrade everything.  Using 80/20 extruded aluminum tubing, I was able to construct a smaller frame that allowed unlimited possibilities for mounting sensors and external components.  I moved the batteries up over and between the rear wheels, dropped the motors down horizontal, and increased the size of the tires.  The previous tires tended to slip on wet grass.  The new tires are Sno-Hog tires, and provide incredible grip on all surfaces.

80-20

I then added on-board chargers (one for the mower battery and one for the wheelchair batteries) and wired them to a single plug so it would be easy to recharge at any outlet.

Charger

The new robotic mower design also included a box above the mower, made out of the 80/20 framing and acrylic glass, which houses the electronics.  Two fans control the temperature inside, with one blowing in and one blowing out to generate a cross breeze.  The brains of the robot are an Intel NUC with an i5 processor, 8 GB of RAM, a 120 GB solid state hard drive running Windows 8.1, and four USB 2 ports.  Eventually I put a hinge on the top piece of acrylic and the entire electronics section was fully enclosed from the elements.  Not that I planned to drive this in the rain, especially with expensive electronics on board.

Camera

For vision, a Logitech HD Pro webcam (C920) was mounted on an L-shaped bracket.  The camera has a tripod mount, so it mounts easily to the 80/20 framing.  The camera has an attached USB cable, so it plugged in easily to the PC, using USB port #1.  The PC was also configured to use an 802.11ac Wi-Fi card, and broadcasts its own Wi-Fi network.  I then set up the PC using Remote Desktop so I could run code on the machine while the robot was driving.  Using the webcam, I get a nice video feed to monitor the progress.  Using OpenCV software, I should be able to instruct the robot not to drive over anything that is not green grass colored.

Arduino Clone

The Piksi GPS was mounted inside the electronics enclosure, but an antenna was added on a tall mast above the rest of the electronics, so it had a clear view of the sky.  This used USB port #2.  An Arduino clone was added to provide PID control of the fans, which could slow them down to a stop when the outside temperature was exceptionally cold (for when I use it as a snowplow).  This used USB port #3, which provided power to the board and established a link for continuous serial port communication.  This will also allow me to add additional sensors to the Arduino, and have it communicate back to the main software running on the PC.

Emergency Stop

To provide safety during operation, I devised a way to cut power to the main lawnmower motor and blade, and to stop the wheelchair drive motors while allowing the computer to continue to run, all with the press of an emergency stop switch on the top of the electronics enclosure.  This switch is a normally closed switch which opens when pressed, and locks into position once pressed, so you have to twist it to turn it back on.  The switch is wired to two relays which can each handle 30 amps of current.  When the main power switch is turned on, the relays engage and remain engaged unless the emergency stop switch is pressed.  The main power switch controls all power, and disconnects power to the PC.  I wanted to be able to shut down the PC safely when the emergency switch was pressed, but all moving parts of the mower had to stop immediately.  I also tried to wire in a remote controlled emergency switch, but found out the the remote control receiver did not have power until everything was powered on, so the switch couldn’t close and the whole unit couldn’t power up.  It was a catch-22 and I removed it for the time being.

Relays

 

The motors are still being controlled with a Sabertooth 2×25 motor controller from Dimension Engineering.  It works well, but next time I’d probably add one that had a direct USB connection.  I ended up using packet control and an FTDI cable plugged into USB port #4 on the PC.  The software then sends specific commands addressed to this motor controller, and there is a checksum to verify the correct command was received.  Another fail-safe step.

FTDI Cable

The software on the PC was written in Python for east of integrating it with everything I had to include.  The Piksi site had some sample Python code in Github, which made getting the GPS data easier.  It was fairly straightforward to write the motor controller software, although some initial testing indicates that precise motor control may not be possible without feedback from additional sensors.  For example, making clean 90-degree turns based on motor timing is difficult, and not very reproducible.  Adding rotary encodes to the wheels or inertial sensors may help increase the accuracy.

I have encountered several problems, especially with the Intel NUC computer.  It seems it is sensitive to voltage fluctuations, and the power circuitry can be easily destroyed by over or under voltages.  I’m currently searching for a new DC-voltage converter so I can take 24 volts and supply 18 volts to the NUC.

At the present time, I have the mower driving with the software code, and I hope to have it controlled to drive to waypoints via GPS shortly.  The Piksi GPS units are working fine, and the accuracy has been verified.  The next plan is to set up boustrophedon cellular decomposition to break the lawn up into logical areas to mow, so the mower finishes in an efficient manner.  This part will be hard, since I have yet to find any examples of boustrophedon code.  I’ll post my code when it is working, and I’ll update this as I make progress.

 

8/14/16 Update: A viewer of this site submitted the following link which may be useful for others attempting the same project: http://www.eecs.ucf.edu/seniordesign/sp2013su2013/g02/

40 comments on “The New Autonomous Lawn Mower (Version 2.0)!

  • Jaakko Törmälehto

    Hello!

    I have been waited this postage after I read RC mower project! Months, really. You decided to make everything by yourself. What was the reason for that? I mean Arduino.

    Because, I thought you had a plan to use APM 2.5 autopilot (today Pixhawk is better, I think). Why you didn’t use that?

    I have planning to make similar project, but much bigger scale so I hoped I could get experience from your project. To use Piksi was good idea. I understood that they have made integration for Pixhawk.

    Do you have plan to test also Pixhawk?
    There are really nice features like Follow Me, satellite maps etc. Even ground station software for Android (example DroidPlanner).

    Best regards
    Jaakko

    • Alligator

      I decided to go with the Swift navigation solution because the Ardupilot (with regular GPS) simply wasn’t accurate enough to mow straight lines in the lawn. When I tried it, the best accuracy I could get was a single waypoint on one side of the lawn, with a second waypoint somewhere on the other side. I’ll probably keep working on this design for now, but I may expand to other technologies as time and money permits. Good luck with your work!

      • David

        Dear Alligator,

        I own a company who produce RC mowers for professional in ITALY
        I’m going to buy the Piksy to test it on our mowers.
        Do you think we can find a way to share your job on our products.

        Thanks a lot

        David

        • Alligator

          I think it’s great you are going to try this. I’m still working on my code, so there isn’t much to share at this time.

  • Tim

    I’m curious how much money (rough estimate) you have in Version 2.0 of the mower? Are you still rocking the original electric mower? Also – I’m on a pretty steep hill, how does it (or do you think) it might handle hills with the better tires?

    Thanks!

    Tim

    • Alligator

      I probably have about 50 hours of time into this project. It’s hard to add up since it has been spread out so much. With version 2.0, I completely disassembled the first version. The new tires provide a LOT more traction, so much now that I am not worried about wheel slip. The worst is with wet grass, so if I mow on dry days, I’m generally safe.

  • Ryan

    I’ve been trying to figure out how to do this and also found Swift Navigation GPS. My concern was still that it might be thrown off if the mower were drive under a tree or other obstacle. Have you had any issues with that?

    In regards to your issues with accurate turns, have you seen this video: https://www.youtube.com/watch?v=ZONORxZOxZw

    He states this functions using GPS and a compass. Have a you tried a compass? My thought was to use rotation sensors at the wheels, but he is getting very accurate 180 turns with a compass…

    • Alligator

      That video is great! My next step is going to be to add a compass, although I understand they drift over time. However, for my purposes, I’m hoping the error won’t be significant. I am concerned about dropping the GPS signal from the Swift Navigation GPS, but I figure with some extra sensors, I can compensate for this until I get my lock back.

  • Zach

    Great project, thanks for sharing the details! Do you now have it running fully autonomous using GPS waypoints? If so, how’s it working out?

    • Alligator

      I’m still working on the code. I have the GPS getting data, but I’m having trouble with the turns. I just picked up a new compass module and will add that to try to get accurate turns.

  • Jack

    Great Job! Thanks for sharing the work! I’ve been doing some research on the internet and I am glad found this on going project! I hope to be able to build the “Autonomous Lawn Mower” and “Autonomous Snow Blower” as well soon. Just ordered some hardware including two 350w motors and the 2×30 Sabertooth driver. I am in the process to choose a computer platform and I am wondering why you don’t use the Raspberry Pi or BeagleBone like boards? Would you think the following new product would be helpful as seen on http://www.emlid.com/reach/ ?

    • Alligator

      Looks like an interesting device. Anything that gets better resolution than a GPS would be worth investigating. I chose a full PC instead of a Raspberry Pi or BeagleBone Black (I’ve used both) simply because I had more USB ports available on the PC. I wanted to plug in an HD webcam and have some extra processing power for machine vision, which is down the road as I continue to work on this project. Have fun!

      • Jack

        Thanks for the Reply. What kind of Robotic related development software do you use and customized it to control the mower on Windows 8? Is it “Microsoft Robotics Developer Studio” ?

        • Alligator

          I had considered several different robotics software packages, but ultimately I decided to use Python. It’s free, I knew how to program using it, and it works well. If you have the skills, I’d certainly encourage people to use alternative environments.

  • Kp

    Would you be willing to share step-by-step plans and instructions? The whole robotics theme fascinates me, but I know nothing of electronics not electronics, and only know intermediate levels of .NET

    • Alligator

      Sorry, I haven’t put together step-by-step instructions. I made it up as I went, and posted as much as I had on this site. I often find the best source of help is to find a forum for what you are using (microprocessor, computer, programming language, etc.) and ask other experienced users for some assistance.

  • Kp

    Hopefully this white paper helps you with your algo.

    http://lib.dr.iastate.edu/cgi/viewcontent.cgi?article=3053&context=etd

    • Alligator

      Excellent paper! Thanks!

  • Tim Dee

    How can I get plans to build this project

    • Alligator

      Sorry, I don’t have any plans, other than what you see on this site. You will certainly want to improve on this design, so I’d encourage you to build off of any portions of the project that look like they might fit your needs.

  • DM

    I kinda want to have your children. Thats hard cause im a guy and not gay. But with our combined skills, I am sure we can make something happen.

    In other words; great job. Thanks for documenting it. I had been planning something similar for a while and I just started down the path. I did not realize how hard the autonomous part would be until I read your blog and its comments. I had assumed I could record the movements and then have it play them back – and that would work for some of the time. But it would never be autonomous (or shouldnt be) because you could never trust it. I just dont think GPS will ever be the answer. Obviously its part of the sensor package, but I think you will need offsite processing (computer) or something else…maybe infrared borders. I thought the roomba would be a good idea to follow…but a lawnbot is just too dangerous. I always have in mind: what if my son was asleep on the grass, spread out. If I cannot trust it to mow around him without issue, it is not autonomous.

    • Alligator

      Thanks! I am disappointed with the performance of the GPS I selected for this project. Perhaps if I had a clear plot of land without trees, then this would work better. However, I am considering detaching the mower and adding a snow plow, and then trying it out on a rectangular driveway to see if I can fine-tune the pattern first. Once that is working, then perhaps I’ll increase the pattern complexity.

  • robert laird

    What size of 80/20 are you using?

    • Alligator

      40 mm x 40 mm (about 1.5″ x 1.5″)

  • spencer

    The Piksi looks to be about ~$1000. Pricey but cheap for RTK. Without a compass it’d be hard to have straight rows (even with RTK). Have you had much luck by adding a compass? When you said “I am disappointed with the performance of the GPS I selected for this project” were you referring to the Piksi?

    • Alligator

      Yes, I was referring to the Piksi. I had a hard time with the GPS losing the signal due to trees and multi-path signals. If I had a clear view of the sky, I believe it would have performed better.

  • Dennis Kelly

    I have been thinking about autonomous mowing and am thinking about the mower as a gigantic CNC router and the lawn as a gigantic work piece. There are lots of software programs that will compute tool paths which would allow you to mow all sorts of patterns in the lawn. From your experience it looks like direction would be the sticking point. Perhaps your camera would be a way to determine the heading direction accurately.

    Good work, I will be bookmarking this site to follow your progress.

    • Alligator

      This is a really interesting idea! This would solve the problem where mowing passes for some areas of the lawn are not adjacent to other mowing passes (boustrophedon decomposition). I’m continuing to experiment in this space and will have updates from time to time as things are developed.

  • Manuel

    Frist of all, great project!!
    I have a few question regarding the motors.
    Which kind of motors do you use? (I guess stepper motors) And how did you connect the motors to the tires?

    Can you provide more picture please?
    Thank you,
    Manuel

    • Alligator

      The motors were used motors which I purchased online. They come from an electric wheelchair, and are already fully geared so they run at the correct speed. The motors had a bracket to connect to the tires already on them, so I used that. I believe you can buy other connectors from Super Droid Robots if you don’t have them already. Sorry, those are all the photos I have at this time.

  • qianus

    how do you do the steer?

    • Alligator

      It uses skid steer, similar to how a tank drives. One of the rear wheels turns while the other goes in the opposite direction. It works, but does dig up the grass a little from time to time. It’s all controlled by the motor controller.

  • Exclusiveicon

    Do you have anything in place for stabilizing the camera/video feed while driving over bumps in the lawn? Shocks? software stabilizing?

    • Alligator

      No, mainly due to the added cost such a stabilization system would add. If you were so inclined, I imagine you might be able to use something similar to the stabilization systems used on drones. Another option might be some type of shocks for the wheels. I am fortunate enough to have a fairly smooth lawn, so this wasn’t a necessity.

  • Kris Rydberg

    Do you have any interest in commercializing your your autonomous lawnmower, ie. turning it into a business?

    • Alligator

      It would be fun to turn this into a business, but I think the design needs optimization for manufacturing and some additional development.

      • Aaron Tulli

        Hello i am building a autonomous/RC controlled lawn mower similar to yours and i was looking at the version one post you made and im having a hard time keeping track of all the wires you have going from each electronics device. Do you have a schematic from version one that i could look at?

        • Alligator

          I’m sorry, I looked back through my files and was not able to locate a schematic I could share. I’m guessing I either hand wrote one out while assembling it, or worked it out as I went along. Each component was used as intended, so you just have to think about how you would lay it out and wire it up if you were adding one component at a time. Once you reach a problem area, stop and consider whether you can share connections with other components, or whether you need to add another device to solve that problem. Good luck with your build!

  • Zach

    Can you tell me how you mounted the wheelchair motors to the 8020? I can’t see the details in your photos and am curious for my own project. Thanks!

    • Alligator

      When I mounted them to the 80/20 aluminum, I used some extra scrap pieces of aluminum and bolted the motors to that scrap piece. I then bolted the scrap piece to the 80/20 using some of the 80/20 bolts. It worked, but it wasn’t as stable as I would have liked. I don’t think there is a an easy way without using another piece of metal. Bolt the motors to the metal, then the metal to your robot frame.

Comments are closed.