A DIY Autonomous Robotic Lawnmower

Whoa, wait a minute! Isn’t this a Robo Car website? True, but wouldn’t it be nice to have an autonomous lawnmower to save you from spending time mowing your lawn and therefore give you more free time to do RC Car racing? If so, read on to give you an idea of how I built my low budget prototype autonomous robotic lawnmower, but please remember this is just a guide and none of this design is set in stone.

Warning! This article describes the process of building an autonomous lawn mower for your entertainment and scientific inquiry. THIS IS NOT AN INSTRUCTION MANUAL OR GUIDE FOR BUILDING AUTONOMOUS MOWERS. IF YOU DECIDE TO BUILD ANYTHING YOU ARE DOING SO AT YOUR OWN RISK. A full size autonomous lawnmower, like this one, can be a VERY DANGEROUS machine — please consider carefully the implications before even thinking about building a machine like that. If you plan on building a self-driving mower you are doing so at your own risk.

Additionally, ArduPilot’s Developer Code of Conduct explicitly excludes ArduPilot from running systems where ArduPilot is effectively in control of human lives.

If you do a search on the IoT for “diy autonomous robotic lawnmowers” you will come across a vast selection of diy autonomous robotic lawnmower articles ranging from simple and inexpensive to very complex and very costly. Basically autonomous robotic lawnmowers have been around for quite a while and were kept within the lawn cutting area by sensing a wire buried around the perimeter of the cutting area of interest. However, now that GPS and especially RTK GPS guidance controllers have come into the hobbyist price range, building an autonomous robotic lawnmower using RTK GPS guidance has become a reality. Whereas the wire sensing autonomous robotic lawnmowers usually followed a random cutting pattern, sometimes cutting the same cutting area multiple times, the RTK GPS guided autonomous robotic lawnmowers can be programmed to meticulously cut a nonrepeating swath of grass row after row until the lawn is completely mowed. Still interested? Now on to the nuts and bolts of building an autonomous robotic lawnmower.

The typical autonomous robotic lawnmower is usually composed of a chassis, some form of motive power, a cutting head, a power source, and some form of cutting path guidance. I chose 1/4 inch thick black ABS plastic sheets to build the chassis which consists of two plates one 19 inches X 12 inches and the other smaller plate 15 inches X 12 inches. The larger plate serves as the mounting point for the differential steering motor controller, the drive motors, the cutting head motor, the batteries, the power switches, and a speed controller for the cutting head motor. The three photos below show how I positioned the aforementioned components on the main 19 inches X 12 inches plate. The smaller plate is attached to the main chassis plate with 72mm long 1109 Series goRAIL, one in each corner using appropriate metric hardware, to provide a mounting surface for the RTK GPS Path Guidance Module as shown in the fifth photo below.

The differential steering motor controller receives steering and throttle PWM signals from the RTK GPS Path Guidance Module and converts those PWM signals to differential steering and throttle voltages to control the two 12vdc drive motors.

The drive motors are mounted in U-channel with L-brackets, shown in the fourth photo below, and are coupled to two GLOBACT 1/8 1/10 17mm Hex RC Wheels and Tires using a D-shaft clamp, a 12mm Hex Wheel Adaptor, and finally a 12mm Hex to 17mm Hex Wheel Adaptor with appropriate metric machine screws. The rear caster wheel is 3 inches in diameter, can be purchased here, and mounted to the Main Chassis with appropriate hardware.

The cutting head motor shaft of 8 mm in diameter is connected to the cutting head with a 8 mm to 10 mm threaded shaft adapter who’s threaded 10 mm shaft conveniently fits the mounting hole in the cutting head. The cutting head motor, as seen in the three photos below, is mounted on its own vertically adjustable platform with its threaded shaft adapter penetrating the main chassis plate to couple with cutting head on the underside of the main chassis plate as shown in the fourth photo below.

The two sets of 12vdc battery pairs, seen in the three photos below, provide power to the differential steering motor controller which powers the drive motors and the speed controller that powers the cutting head motor. I chose 12vdc NiMH 3amp-hr batteries because they do not have to be removed from the chassis to be charged as would LiPo batteries that require a balancing charger. Additionally the NiMH batteries are heavy, compared to a LiPo battery, and help provide additional weight that keeps the chassis moving smoothly over thick grass.

The power switches, seen on the left in photo three below, are a pair of SPDT with center OFF switches which allows me to either use the switches to provide battery power to the differential steering motor controller or the cutting head motor speed controller or charge the two sets of battery pairs through their respective charging ports adjacent to each power switch.

Since DC motors draw the most current at stall or when first turned on, I decided to power the cutting head motor with a variable PWM speed controller which can be seen on the right in photo three below. Employing this type of controller allows me to switch on the cutting head motor and gradually bring it up to the desired cutting head speed which protects the 12vdc NiMH batteries from a high current surge when starting the cutting head motor.

Okay, now that we have the lawnmower chassis put together, how are we going to program the mower to meticulously cut a nonrepeating swath of grass row after row until the lawn is completely mowed? This is where the RTK GPS Guidance Module comes in to play. You can build your Guidance Module as you see fit. Basically the Module should include a RTK GPS module, GPS L1/L2 antenna, Telemetry radio compatible with the Base Station telemetry radio, a Single Board Computer (SBC), a RC receiver, as a minimum. If you like using ArduRover/Mavlink for controlling your lawnmower, you can use a Pixhawk 2.1 as your SBC and add the necessary RC receiver and telemetry radio and RTK GPS module.

My Lawnmower Guidance Module employs an RTK GPS module that provides RTCM corrected X and Y position coordinates to an appropriate Single Board Computer (SBC) running the DC path_follow template which is used to record and playback a mowing path sequence over the lawn cutting area of interest. Using a RC transmitter to control the lawnmower steering and throttle through a RC receiver attached to the SBC through an RC Mux, I recorded the row by row path that I wanted the lawnmower to cut the grass in the area of interest while in the User Mode. Placing the lawnmower back at the start of the recorded path, I then set the RC Mux to use the output of the SBC for steering and throttle guidance, instead of the RC transmitter, put the lawnmower in the Full Auto mode and watched it repeat the previously recorded path. Yes, I know that this is kind of a primitive way to record and playback the recorded mowing path compared to using ArduRover/Mavlink, but hey, this is a budget build.

Comments or questions? Please post below.

Main Chassis Front View (1)

Main Chassis Side View (2)

Main Chassis Rear View (3)

Main Chassis Bottom View (4)

Chassis Upper Mounting Plate with Bobble Head Mandalorian and Baby Yoda (5)

Rear of RTK GPS Guidance Module on upper Chassis (6)

Towards an affordable Base Station for outdoor RTK GPS RC Car racing

Even though RTK GPS hardware has come down in price substantially over the last couple of years, building a RTK GPS Base Station is still not inexpensive for the average RC Car enthusiast. However there is hope and I will show how a barebones Base Station can be built at a reasonable out of pocket cost.

The cost of the Base Station I described and built in my recent Blog post Using the Donkey Car Path_Follow Template with RTK GPS pencils out to around $580 (plus shipping for some of the parts) which puts it over $600. This barebones Base Station can be built for under $400. Interested? Then read on.

The Barebones Base Station, unlike my original Base Station, integrates the RTK GPS module with the ESP32 WROOM processor and does away with the LCD Display, but retains the Sparkfun L1/L2/L5 Survey Grade antenna (for future proof operation) and the Sik telemetry radio for RTCM message transmission to the Rover. The integrated RTK GPS module/Processor (PX1122R L1/L2 RTK Evaluation Board shown above) comes from the NavSpark Store in Taiwan and can be found here on the store website. Before you get all excited about the low price of $95 compared to the Sparkfun ZED-F9P RTK GPS module, just remember that the module is being shipped from Taiwan by FedEx air which, in my case added $55 to the cost of the module as I live on the US East Coast, will probably run between $50-$60 depending on where you live. Obviously the closer to Taiwan that you live, the cheaper the FedEx shipping will be. I queried the NavSpark Store as to a possible US distributor, but it was a no-go as they said that the overhead was too high to make a reasonable profit. Bummer to say the least.

Before moving on to the programming and evaluation of the PX1122R L1/L2 RTK Evaluation Board, a word about the Sparkfun L1/L2/L5 Survey Grade antenna. The L5 band upgrade is preoperational and should be fully in place by 2027 so the Sparkfun antenna should future proof your Base Station as RTK GPS modules that support the L1/L2/L5 bands become available. However there is a cheaper L1/L2 Survey Grade antenna that can be found here for $78. I have tested this Beitian BT-160 on a NavSpark Store PX1122R Breakout Board and it provided performance comparable to the Sparkfun Survey Grade antenna for about $50 less.

The programming of the PX1122R L1/L2 RTK Evaluation Board can be accomplished by following the steps in the Getting Started with PX1122R RTK Evaluation Board to install the Windows GNSS Viewer on page 3 and for setting up the EVB as a Base Station (2/3) using the Survey Mode on page 10. Based on my experience with the Sparkfun ZED-F9P using the survey-in mode, I recommend a Survey Time of 600 (sec) and a Standard Deviation value of 30 (cm) though other users seem to like the default values of a Survey Time of 60 (sec) and a Standard Deviation value of 30 (cm).

Now is the time to select a suitable enclosure for the Evaluation Board (EVB) and attach the Sik telemetry Radio and suitable Survey Grade Antenna as seen without an enclosure in my prototype photo below and the completed Base Station in the second photo below. The Very Quick Short Baseline Test (1/2) on page 13 can be used to determine the location of the TX, GND, and 5V_O pins on the EVB that should be connected to the Sik telemetry radio to transmit the RTCM correction messages to the Rover. The EVB TX pin should be connected to the RX (2) on the Sik telemetry radio while the GND and 5V_O connect to the Sik telemetry radio Ground (6) and the Power (1) respectively. The EVB TX pin must be set to 57,600 baud as shown in the third photo below. Unfortunately the NavSpark Store designers did not use a separate UART to transmit RTCM correction messages, like Sparkfun does, so the USB1 and the TX/RX UART must be the same rate of 56,700 baud. This should not create a problem since the RTCM correction messages being output on USB1 are for observation only with the GNSS Viewer therefore speed is not an issue. The only item left now is to verify the RTCM correction message output. This can be accomplished by clicking on the GNSS Viewer RAW tab and selecting “Configure RTCM Measurement Data Out” as shown in the fourth photo below. Since the “RTCM Measurement Data Out” default configuration was very similar to the Sparkfun recommended configuration for the ZED-F9P Base Station, I left them as is. If you decide to make changes to the “RTCM Measurement Data Out” default configuration, make sure you select “Update to SRAM+Flash and then hit the “Accept” button.

Prototype Base Station
Completed Base Station
Configure TX Baud Rate
Configure RTCM Measurement Data Out

Now comes the proof of the pudding so to speak. I started up the PX1122R L1/L2 RTK Breakout Board located on my DC Lawnmower Rover by plugging the Breakout Board Sparkfun UART to USB converter output to my trusty laptop running the GNSS Viewer. I then plugged the Base Station Evaluation Board USB1 output into a suitable 5 vdc supply and watched the PX1122R L1/L2 RTK Breakout Board GNSS Viewer output shift from “Position fix 2D” in the Message Bar to “Float RTK” and finally to “Fix RTK” (see photo below) once the Base Station Evaluation Board has completed its Survey Mode and began transmitting RTCM correction messages to the Rover Breakout Board. If you are using a Sparkfun ZED-F9P RTK GPS module on your Rover, you should see the module RTK yellow LED go from solid yellow to flashing yellow (Float) and finally go out completely (Fix) once the Base Station has completed the Survey Mode and a Fix solution is reached.

Fix RTK

Questions or comments? Please post below.