RTK GPS Driven Mower

3,013

19

14

Introduction: RTK GPS Driven Mower

About: My main activities are technical (https://wikifab.org/wiki/Utilisateur:Occitan) or educational (https://www.wikidebrouillard.org/wiki/Utilisateur:Occitan) achievements. Sorry, but it’s written in French !

This robot mower is capable of fully automatic grass cutting on a predetermined course. Thanks to RTK GPS guidance the course is reproduced with each mowing with a precision better than 10 centimeters.

Step 1: INTRODUCTION

We will describe here a robot mower able to cut the grass completely automatically on a course determined in advance. Thanks to RTK GPS guidance the course is reproduced at each mowing with a precision better than 10 centimeters (my experience). The control is based on an Aduino Mega card, supplemented by some shields of motor control, accelerometers and compass as well as a memory card.

It is a non-professional achievement, but it has allowed me to realize the problems encountered in agricultural robotics. This very young discipline is developing rapidly, spurred by new legislation on the reduction of weeds and pesticides. For example, here is a link to the latest agricultural robotics fair in Toulouse (https://www.fira-agtech.com/). Some companies such as Naio Technologies are already manufacturing operational robots (https://www.naio-technologies.com/).

In comparison, my achievement is very modest but it nevertheless makes it possible to understand interest and challenges in a playful way. .... And then it really works! ... and can therefore be used to cut grass around his house, while preserving his free time...

Even if I do not describe the realization in the last details, the indications that I give are valuable for the one who would like to launch. Do not hesitate to ask questions or make suggestions, which will allow me to complete my presentation for the benefit of everyone.

I would be really happy if this type of project could give much younger people a taste for engineering.... in order to be ready for the great robolution that awaits us....

Moreover, this type of project would be perfectly suited to a group of motivated young people in a club or fablab, to practice working as a project group, with mechanical, electrical, software architects headed by a system engineer, as in the industry.

Step 2: MAIN SPECIFICATIONS

The aim is to produce an operational prototype mower capable of mowing grass autonomously on terrain that may have significant irregularities (meadows rather than lawns).

Field containment cannot be based on a physical barrier or buried guide wire limitation as for lawn mowing robots. The fields to be mowed are indeed variable and of large surface.

For the cutting bar, the objective is to maintain the grass’s growth at a certain height after a first mowing or brushing obtained by another means.

Step 3: GENERAL PRESENTATION

The system consists of a mobile robot and a fixed base.

On the mobile robot we find:

- The dashboard

- The general control box including a memory card.

- the manual joystick

- The GPS configured as a "rover" and the RTK Receiver

- 3 motorized wheels

- Roller motors of wheels

- the cutting bar consisting of 4 rotating discs each carrying 3 cutter blades on the periphery (cutting width of 1 metre)

- the cutting bar management box

- the batteries

In the fixed base we find the GPS configured as "base" as well as the transmitter of the RTK corrections. We note that the antenna is placed in height so as to radiate for a few hundred meters around the house.

In addition, the GPS antenna is in sight of the whole sky without any occultation by buildings or vegetation.

The Rover modes and GPS base will be described and explained in the GPS section.

Step 4: OPERATING INSTRUCTIONS (1/4)

I propose to get acquainted with the robot through its manual which makes well appear all its functionalities.

Description of the dashboard:

- A general switch

- A first 3-position selector allows to select the operating modes: manual travel mode, track recording mode, mowing mode

- A push button is used as a marker. We will see its uses.

- Two other 3-position selectors are used to select a file number from 9. We therefore have 9 mowing files or journey records for 9 different fields.

- A 3-position selector is dedicated to the control of the cutting bar. OFF position, ON position, programmed control position.

- Two line display

- a 3-position selector to define 3 different displays

- a LED that indicates the status of the GPS. Leds off, no GPS. Leds flashing slowly, GPS without RTK corrections. Fast flashing LED, RTK corrections received. Leds lit, GPS lock on highest accuracy.

Finally, the joystick has two 3-position selectors. The left one controls the left wheel, the right one controls the right wheel.

Step 5: OPERATING INSTRUCTIONS (2/4)

Manual operation mode (GPS not required)

After turning on and selecting this mode with the mode selector, the machine is controlled with the joystick.

The two 3-position selectors have a return spring which always returns them to the middle position, corresponding to the stopping of the wheels.

When the left and right levers are pushed forward the two rear wheels turn and the machine goes straight.

When you pull the two levers back, the machine goes straight back.

When a lever is pushed forward, the machine turns around the stationary wheel.

When one lever is pushed forward and the other back, the machine rotates around itself at a point in the middle of the axle joining the rear wheels.

The motorization of the front wheel automatically adjusts according to the two controls placed on the two rear wheels.

Finally, in manual mode it is also possible to mow grass. For this purpose, after having checked that no one is near the cutting discs, we put ON the management box of the cutting bar ("hard" switch for security). The instrument panel cut selector is then placed on ON. At this moment the 4 discs of the cutting bar are rotating. .

Step 6: OPERATING INSTRUCTIONS (3/4)

Track recording mode (GPS required)

- Before starting to record a run, an arbitrary reference point for the field is defined and marked with a small stake. This point will be the origin of the coordinates in the geographical frame (photo)

- We then select the file number in which the journey will be recorded, thanks to the two selectors on the dashboard.

- ON base is set

- Check that the GPS status LED starts flashing quickly.

- Exit manual mode by placing the instrument panel mode selector in the recording position.

- The machine is then manually moved to the reference point position. Precisely it is the GPS antenna that must be above this landmark. This GPS antenna is located above the point centered between the two rear wheels and which is the point of rotation of the machine on itself.

- Wait until the GPS status LED is now lit without flashing. This indicates that the GPS is at its maximum accuracy ("Fix" GPS).

- The original 0.0 position is marked by pressing the dashboard marker.

- We then move to the next point that we want to map. As soon as it is reached, we signal it using the marker.

- In order to terminate the recording we switch back to manual mode.

Step 7: OPERATING INSTRUCTIONS (4/4)

Mowing mode (GPS required)

First, you have to prepare the points file that the machine has to go through in order to mow the entire field without leaving an uncut surface. To do this we get the file saved in the memory card and from these coordinates, using for example Excel, we generate a list of points as on the photo. For each of the points to be reached, we indicate whether the cutting bar is ON or OFF. Since it is the cutting bar that consumes the most power (from 50 to 100 Watts depending on the grass), it is necessary to be careful to put OFF the cutting bar when crossing an already mowed field for example.

As the mowing board is generated, the memory card is put back on its shield in the control drawer.

All that remains then is to put ON the base and go to the mowing field, just above the reference landmark. The mode selector is then set to "Mow".

At this point the machine will wait by itself for the GPS RTK lock in "Fix" to zero the coordinates and start mowing.

When the mowing is finished, it will return alone to the starting point, with an accuracy of about ten centimeters.

During mowing, the machine moves in a straight line between two consecutive points of the point file. The cutting width is 1.1 meters Since the machine has a width between wheels of 1 meter and can rotate around a wheel (see video), it is possible to make adjacent mowing strips. This is very effective !

Step 8: MECHANICAL PART

The structure of the robot

The robot is built around a lattice structure of aluminium tubes, which gives it good stiffness. Its dimensions are about 1.20 meters long, 1 meter wide and 80 cm high.

The wheels

It can move thanks to 3 child bike wheels in diameter 20 inches: Two rear wheels and a front wheel similar to the wheel of supermarket carts (photos 1 and 2). The relative movement of the two rear wheels ensures its orientation

.

The roller motors

Because of the irregularities in the field, it is necessary to have large torque ratios and therefore a large reduction ratio. For this purpose I used the principle of roller pressing on the wheel, as on a solex (photos 3 and 4). The large reduction makes it possible to keep the machine stable in a slope, even when the engine power is cut. In return, the machine advances slowly (3 meters/ minute)...but the grass also grows slowly....

For the mechanical design I used the drawing software Openscad (very efficient script software). In parallel for the detail plans I used Drawing from Openoffice.

Step 9: RTK GPS (1/3)

Simple GPS

The simple GPS (photo 1), the one in our car has an accuracy of only a few meters. If we record the position indicated by such a GPS maintained fixed for an hour for example, we will observe fluctuations of several meters. These fluctuations are due to disturbances in the atmosphere and ionosphere, but also to errors in the satellites' clocks and errors in the GPS itself. It is therefore not suitable for our application.

RTK GPS

To improve this accuracy, two Gps are used at a distance of less than 10 km (photo 2). Under these conditions, we can consider that the disturbances of the atmosphere and the ionosphere are identical on each GPS. Thus the difference in position between the two GPS is no longer disturbed (differential). If we now attach one of the GPS (the base) and place the other on a vehicle (the rover), we will obtain precisely the movement of the vehicle from the base without disturbances. Moreover, these GPS perform a time of flight measurement much more precise over than the simple GPS (phase measurements on the carrier).

Thanks to these improvements, we will obtain a centimetric measurement accuracy for the movement of the rover relative to the base.

It is this RTK (Real Time Kinematic) system that we have chosen to use.

Step 10: RTK GPS (2/3)

I bought 2 RTK GPS circuits (photo 1) from the company Navspark.

These circuits are mounted on a small PCB equipped with 2.54 mm pitch pins, which therefore mounts directly on the test plates.

As the project is located in the south-west of France, I chose circuits working with the constellations of American GPS satellites as well as the Russian constellation Glonass.

It is important to have the maximum number of satellites in order to benefit from the best accuracy. In my case, I currently have between 10 and 16 satellites.

We also have to buy

- 2 USB adapters, needed to connect the GPS circuit to a PC (tests and configuration)

- 2 GPS antennas + 2 adapter cables

- a pair of 3DR transmitter-receivers so that the base can issue its corrections to the rover and the rover receive them.

Step 11: RTK GPS (3/3)

The GPS notice found on the Navspark site allows the circuits to be implemented gradually.

http://navspark.mybigcommerce.com/content/NS-HP-GL-User-Guide.pdf

On the Navspark website we will also find

- the software to be installed on its Windows PC to view GPS outputs and program circuits in base and rover.

- A description of the GPS data format (NMEA phrases)

All these documents are in English but are relatively easy to understand. Initially, the implementation is done without the slightest electronic circuit thanks to the USB adapters which also provide all electrical power supplies.

The progression is as follows:

- Testing individual circuits that function as simple GPS. Cloud view of bridges shows stability of a few meters.

- Programming one circuit in ROVER and the other in BASE

- Building a RTK system by connecting the two modules with a single wire. The cloud view of bridges shows a relative stability of ROVER/BASE of a few centimeters!

- Replacement of the BASE and ROVER connecting wire by the 3DR transceivers. Here again the operation in RTK allows a stability of a few centimeters. But this time BASE and ROVER are no longer connected by a physical link.....

- Replacement of PC visualization with an Arduino board programmed to receive GPS data on a serial input... (see below)

Step 12: ELECTRICAL PART (1/2)

The electrical control box

Photo 1 shows the main control box boards which will be detailed below.

Wiring of the GPS

The base and mower GPS wiring is shown in Figure 2.

This cabling is naturally achieved by following the progress of the GPS instructions (see GPS section). In all cases, there is a USB adapter that allows you to program the circuits either in base or in rover thanks to the PC software provided by Navspark. Thanks to this program, we also have all the position information, number of satellites, etc...

In the mower section, the Tx1 pin of the GPS is connected to the 19 (Rx1) serial input of the ARDUINO MEGA board to receive the NMEA phrases.

In the base the Tx1 pin of the GPS is sent to the Rx pin of the 3DR radio for sending the corrections. In the mower the corrections received by the 3DR radio are sent to the pin Rx2 of the GPS circuit.

It is noted that these corrections and their management are fully ensured by the GPS RTK circuits. Thus, the Aduino MEGA board receives only corrected position values.

Step 13: ELECTRICAL PART (2/2)

The Arduino MEGA board and its shields

- MEGA arduino board

- Rear wheel motors shield

- Front wheel motor shield

- Shield arte SD

In Figure 1, it is noted that plug-in connectors were placed between the boards so that the heat dissipated in the engine boards could vent. In addition, these inserts allow you to cut unwanted links between the cards, without having to modify them.

Figure 2 and Figure 3 show how the positions of the instrument panel inverters and the joystick are read.

Step 14: THE ARDUINO DRIVING PROGRAM

The microcontroller board is an Arduino MEGA (UNO not having enough memory). The driving program is very simple and classic. I have developed a function for each basic operation to be performed (dashboard reading, GPS data acquisition, LCD display, machine advance or rotation control, etc...). These functions are then easily used in the main program. The slow speed of the machine (3 meters/ minute) makes things much easier.

However, the cutting bar is not managed by this program but by the program of the UNO board which is located in the specific box.

In the SETUP part of the program we find

- Useful pin initializations of the MEGA board in inputs or outputs;

- LCD display initialization

- SD memory card initialization

- Initialization of the transfer speed from the hardware serial interface to the GPS;

- Initialization of the transfer speed from the serial interface to the IDE;

- Shutting down engines and cutting bar

In the LOOP part of the program we find at the beginning

- Instrument panel and joystick, GPS, compass and accelerometer readings;

- a 3-lead selector, depending on the status of the instrument panel mode selector (manual, recording, mowing)

The LOOP loop is punctuated by the asynchronous reading of the GPS which is the slowest step. So we go back to the beginning of the loop about every 3 seconds.

In the normal mode bypass, the motion function is controlled according to the joystick and the display is updated approximately every 3 seconds (position, GPS status, compass direction, tilt...). A push on the marker BP zeroes the position coordinates that will be expressed in meters in the geographical landmark.

In the save mode shunt, all positions measured during the move are recorded on the SD card (period of about 3 seconds). When a point of interest is reached, pressing the marker is saved. in the SD card. The position of the machine is displayed every 3 seconds, in meters in the geographical landmark centered on the origin point.

In the mowing mode shunt: The machine was previously moved above the reference point. When switching the mode selector to "mowing", the program observes the GPS outputs and in particular the value of the status flag. When the status flag changes to "Fix", the program performs the position zero. The first point to reach is then read in the mowing file of the SD memory. When this point is reached, the turn of the machine is done as indicated in the mowing file, either around a wheel, or around the center of the two wheels.

The process repeats itself until the last point is reached (usually the starting point). At this point the program stops the machine and the cutting bar.

Step 15: THE CUTTING BAR AND ITS MANAGEMENT

The cutting bar consists of 4 discs rotating at the speed of 1200 rpm. Each disc is equipped with 3 cutter blades. These discs are arranged so as to make a continuous cutting band of 1.2 meters wide.

Engines must be controlled to limit current

- at start-up, due to the inertia of the discs

- during cutting, because of blockages caused by too much grass

For this purpose the current in the circuit of each motor is measured by low-value coiled resistors. The UNO board is wired and programmed to measure these currents and send a PWM command adapted to the motors.

Thus, at start-up, the speed gradually increases to its maximum value in 10 seconds. In case of blockage by grass, the engine stops for 10 seconds and retries for 2 seconds. If the problem persists, the 10-second rest and 2-second restart cycle starts again. Under these conditions, engine heating remains limited, even in the case of permanent blocking.

The engines start or stop when the UNO board receives the signal from the pilot program. However a hard switch allows to reliably switch off power to secure service operations

Step 16: WHAT SHOULD BE DONE ? WHAT IMPROVEMENTS ?

At the GPS level

Vegetation (trees) can limit the number of satellites in view of the vehicle and reduce accuracy or prevent RTK locking. It is therefore in our interest to use as many satellites as possible at the same time. It would therefore be interesting to complete the GPS and Glonass constellations with the Galileo constellation.

It should be possible to benefit from more than 20 satellites instead of a maximum of 15, which makes it possible to get rid of the skimming by vegetation.

Arduino RTK shields are starting to exist working simultaneously with these 3 constellations: https://www.ardusimple.com/product/simplertk2b-st...

Moreover, these shields are very compact (phot 1) because they include both the GPS circuit and the transceiver on the same support.

.... But the price is much higher than that of the circuits we used

Using a LIDAR to complement the GPS

Unfortunately, in arboriculture it happens that the vegetation cover is very important (hazel field for example). In this case, even with the 3 constellations RTK locking may not be possible.

It is therefore necessary to introduce a sensor which would allow to maintain the position even in the momentary absence of GPS.

It seems to me (I have not had the experience) that the use of a LIDAR could fulfill this function. The trunks of the trees are very easy to spot in this case and can be used to observe the robot’s progress. The GPS would resume its function at the end of the row, at the exit of the vegetation cover.

An example of a suitable type of LIDAR is as follows (Photo2):

https://www.robotshop.com/eu/fr/scanner-laser-360-...

Be the First to Share

    Recommendations

    • Metal Contest

      Metal Contest
    • Micro:bit Contest

      Micro:bit Contest
    • Back to School: Student Design Challenge

      Back to School: Student Design Challenge

    14 Comments

    0
    toupon
    toupon

    Question 2 months ago on Step 4

    Félicitations pour ce projet. Je cherchais justement un GPS RTK un peu plus "abordable" que les Ublox.
    Le bonjour depuis Toulouse.
    Louis

    0
    Occitan
    Occitan

    Answer 2 months ago

    Salut Collègue !
    Je suis ravi de t'avoir aidé à trouver un GPS RTK pas trop cher.... Ceci dit, le Ublox est sans doute plus professionnel et plus fiable. Une présentation un brin actualisée au lien https://wikifab.org/wiki/Faucheuse_guid%C3%A9e_pa... (voir aussi les autres bricolages et mon espoir de disposer un jour d'un site français similaire à Instructables..;)
    Bien cordialement !

    0
    Bob Bowie
    Bob Bowie

    4 months ago on Introduction

    Occitan,
    Please understand that I have virtually no skill or experience with Arduino.
    Obviously, that includes interfacing beams to triangulate on to determine
    x,y position. Do you have a suggestion for beam hardware and software to
    determine x,y position? Possibly a combination of these beams along with
    GPS can keep the mower on the correct course.

    0
    Occitan
    Occitan

    Reply 4 months ago

    Hi Bob,

    The first thing to do, which I think is the most difficult, is to know the two angles.
    Then, knowing X,Y it is not difficult to drive the rover to make it mow
    straight and continuous strips. The level of knowledge of Arduino is not really high and I can give you what I did for my machine.

    In the meantime, solutions must be found to know both angles….

    I imagine that the communication between the beacons and the rover could use transceivers like the ones I used between my base and the rover ( range of a few hundred meters on a wooded terrain). There are also many others with variable powers, in the form of Arduino shields.

    What principle should be used?

    The first thing that comes to mind is that each time the rover receives a
    luninous signal, it questions the two beacons to know the angle at the time of
    emission. The beacons must therefore be equipped with an angular sensor.

    Another method is to use time, with 3 clocks synchronized on the beacons and the rover. It is assumed that the rotation is synchronized on the second (at each whole second the emission takes place at the origin zero degree). At this point,
    with each light signal received by the rover, it is enough to read the time and
    deduce the direction of emission. In these conditions, there is no need for a radio
    link. Obviously, the light travel time can be neglected…. and the accuracy of the clocks sufficient for the offsets to remain negligible during the time of mowing the grass.

    Well, I’m sure there are plenty of other ways … What do you think ? What is
    your idea ?

    See you soon.

    0
    Bob Bowie
    Bob Bowie

    Reply 4 months ago

    Occitan,
    I must defer to you regarding programming of the Arduino. I am willing to fund hardware that you think might provide a solution to tracking the rover. I have attached a picture of the rover chassis. The wiring includes relays that allow for 2 circuits that control the wheel chair motors as follows:
    1. Futaba transmitter control
    2. Arduino control
    The Futaba transmitter uses one of the joy sticks as a switch to toggle between 1. and 2.

    Here's a Triple Axis Compass Magnetometer offered by Amazon:

    https://www.amazon.com/ARCELI-QMC5883L-Compass-Mag...

    I have no knowledge of the beacons used to triangulate for x,y co-ordinates. The same for GPS solutions.

    Please give me your thoughts on how best to proceed.
    What is your mailing address?

    Bob Bowie
    4618 San Gabriel
    Dallas, Texas 75229 USA

    0
    Occitan
    Occitan

    Reply 4 months ago

    I thought a little more about the beacon system and I realized that it would actually take 3 beacons to have a good precision in the whole field. This is obvious if you think about when the rover is on (or near) the line that joins the two beacons.

    In addition, for reliable identification of the 3 laser beams in a bright environment it is necessary to have a narrow band-pass optical filter centered on the laser lines.

    In short, it seems simple at first, but it will be much more complicated and expensive at the end.

    I believe the most relevant would be the data fusion between a GPS and a laser scanner, as described in step 16 (using a LIDAR to complement the GPS). Choose an outdoor laser scanner.
    (https://www.robotshop.com/eu/en/n301-rotating-2d-lidar-360-30-m.html ).



    However this technique of fusion between laser data and GPS data is not simple and I have no experience in this field. I think the best option for you is to get closer to a fablab, where you can meet people who know Arduino and perhaps also the use of laser scanners.

    I’m sorry, but I can’t help you anymore. Good luck with your project !


    Regards,
    Occitan



    0
    Bob Bowie
    Bob Bowie

    Reply 4 months ago

    Attached is a picture of the rover chassis.

    Chassis_5736.jpg
    0
    Bob Bowie
    Bob Bowie

    4 months ago on Introduction

    I am very impressed with your robotic lawnmower. Unfortunately, I don't speak
    or read French, which makes it difficult to fully understand your unit.
    I have developed a remote controlled lawnmower (see:

    https://www.instructables.com/Remote-Controlled-La...

    Now I would like to make it robotic. I have been able to control the 2 wheel
    chair motors with Arduino (forward, reverse, or stop), but do not have the skills
    to track the location. One approach would be to have 2 modes as follows:

    1. Learn mode-mower is controlled by remote control and records x,y co-ordinates
    while mowing.
    2. Playback mode-mower is placed in the same starting position and controlled via
    Arduino using the previously recorded x,y co-ordinates.

    Note electric power for the wheel chair motors is provided by a General Motors
    alternator driven via the mower engine. This mower has been in service for over
    5 years and continues to do a good job of mowing grass. I can send you plans
    if you'd like. My email is bbowie@yahoo.com

    Please send me your suggestions how I can make this mower robotic.
    Thank you,
    Bob Bowie
    Dallas, Texas

    0
    Occitan
    Occitan

    Reply 4 months ago

    Hello Bob !

    Thank you for your interest.


    Your project is close to mine, except for the means of
    acquiring the X,Y position. I also had the same idea initially to use beacons,
    but I gave up because the technique of measuring by flight of time did not seem
    to me immediate; I find that the use of a GPS is much easier because the
    hardware exists all made and directly usable with an Arduino board (just read a
    serial interface).


    However, the GPS RTK (precision 10 cm) does not work at all if
    the terrain to be mowed has trees with important vegetation cover.


    If this important point is checked, I
    can give you other indications to install your GPS (base and rover).



    See you
    soon

    Regards

    0
    Bob Bowie
    Bob Bowie

    Reply 4 months ago

    Occitan,
    Thank you for your prompt response. I live in Dallas, Texas, and most of
    the grassy areas also have many trees. As you mention, the trees present
    a problem for GPS. That is the primary reason to consider beacons to
    determine x,y co-ordinates.
    Here is the Arduino code that drives the Astro Flight Controllers. These
    Controllers control the wheel chair motors:
    =========================================================================
    #include <Servo.h>
    Servo servo1;
    Servo servo2;
    int i = 0;
    void setup() {
    servo1.attach(3);
    servo2.attach(5);
    }
    void loop() {
    // forward
    for (i = 45; i < 46; i++) {
    servo1.write(i);
    servo2.write(i);
    delay(5000);
    }
    // stop
    for (i = 0; i < 1; i++) {
    servo1.write(i);
    servo2.write(i);
    delay(5000);
    }
    // turn
    for (i = 45; i < 46; i++) {
    servo1.write(i);
    delay(5000);
    }
    // stop
    for (i = 0; i < 1; i++) {
    servo1.write(i);
    servo2.write(i);
    delay(5000);
    }
    }
    =========================================================================
    The other potential application would be a trash (litter) collector. So many
    of our cities and roadways are covered in trash. GPS could work much better
    in this environment where there are not so many trees to obstruct.
    I hope that we can develop a 2 stage approach as I mentioned in the earlier email:
    1. Learn Mode
    2. Playback Mode
    What would you suggest as next steps? Thanks for your interest...Bob

    0
    JohnL245
    JohnL245

    6 months ago

    pretty awesome job. I have not had much luck with accuracy using gps.