All Mowers - Settings

Setting up the Mower for your garden:

So you've built the lawn mower, tested the components and are ready to mow.  Now we need to customise the mower operation to fit your garden.  All gardens are different so there are a variety of mower settings which can be tuned for best performance in your garden. 

This guide will try to help you set up the mower for your garden and get you familiar with the mower operation. (settings options are the same for the Little Monster, 220, 330 and LAM Monster mowers)

Mower Setup Options in Arduino

When the initial code is uploaded to the Mower the original generic settings will be uploaded to the mower.  These settings can be adjusted in the Arduino IDE or using the TFT Touchscreen and settings menu.

It is recommended to use the mower keypad and TFT Touchscreen menu as these settings will then be saved on the MEGA (in the EEPROM).   If a setting is saved to EEPROM it will always override the settings in the Arduino Code

These saved settings will then uploaded into the mower even if a newer software version is uploaded (but not backwards compatible with older versions). 


Ensure Mower Code is Activated

Please see the page Arduino Software Setup and read Loading Arduino Code Point 3.  Ensure you are using the Mower Code and not the Aerator code which is integrated into the same sketch.

You should see the text

TFT Touchpad:

To enable the TFT Touchscreen function, change the settings in the Arduino code on the MEGA VX.X to:

If you are still using an LCD screen and keypad (not a TFT touch Screen), from V9.2 onwards you will need to activate the LCD code by changing  //#define LCD-KEYPAD to  #define LCD_KEYPAD   (remove //)   in the MEGAX.X code



To access the settings menu simply press setup on the TFT touchscreen.



Settings Menu.

The settings menu is divided into different categories.  These menus are almost identicle for the TFT Touchscreen and LCD Keypad.  (The TFT touchscreen will however get more capabilities as the code develops)

1. Time            - Allows the user to set alarms and the mower main clock

2. Sensors       - Allows modification of how the sensors function

3. Motion         - Customise the movement of the mower for your garden

4. Navigation   - Customise how the mowers Navigation systems work

1. TIME:

Set Alarm 1:

Set Alarm 2:

Set Alarm 3:           Starts the mower running at this time

Set Clock:              Mower main clock time can be set


Mow Alarms

In the Alarms section you can set times when you would like the mower to start.  To activate the Alarm set the variable to ON, then input the time in hours and minutes.  This alarm will activate daily at this time and start the mower.  This assumes you have a docking station in the garden as the alarm will activate the exit docking procedure.

The exact actions the mower takes when these alarms are activated can be selcted in the LCD menu.  To modify these actions to your own set of commands the code needs to be modified in the Arduino IDE in the Time_Alarms tab.




SONAR ON/OFF        - Turn the sonar sensors on or off individually

SONAR Distance       - Set the distance at which the sonars stop the mower

SONAR Sensitivity     - Modify the sensitivity of the sonar sensors. Number of consecutive sonar sensor detections of an object before the mower avoids it.

Battery Min/Max        - Set the minimum battery level where the mower stops operation to re-charge

Wire ON/OFF            - Turn the perimeter wire sensor ON or OFF

Rain ON/OFF            - Turn the rain sensor ON or OFF

RAIN Sensitivity       - Sets the sensitivity of the rain sensor

WIFI ON/OFF           - Turn the WIFI function ON or OFF

BUMPER ON/OFF    - Activates/deactivates the front bumper bar.

ANGLE ON/OFF       - Activates/deactivates the angle sensor

TIP ON/OFF              - Activates/deactivates the tip over sensor


 Example of the SONARS in operation.




Example of the Tip Over Sensor in operation. 



Wheel Speed        - Adjust the speed of the Left and Right wheel to get the best straight line motion

Blade Speed        - How fast the mower blade spins

Blades ON/OFF   - Enbales the blade motor to permanently ON or OFF

Turn Angles        - Sets the minimum and maximum turn the mower makes when it senses a wire or object.  The software will choose a random turn time between these two set points.  (1800ms = 1.8seconds)

Reverse Dist       - The distance the mower reverses before making a turn. (2000ms = 2seconds)

Max Length        - The distance the mower will travel in a straight line before making a turn anyway.  This is useful if the mower ever gets stuck on something that at least at some point it will reverse and make a turn (hopefully un-sticking itself).  This is measured in loops of the code ran.

Pattern Mow      - Pattern setting the mower will start to mow with.  This can also be changed in the WIFI  APP dynamically as the mower is operating.

- Random #

- Spiral @

- Parallel ||

Adjusments to the parallel pattern can be made in the TFT menu or in the arduino settings section of the code.  Adjustments can be made to the the Left Turn and Right Turn delay to get a 180° turn.  The length of the line and the distance between lines can also be adjusted.





Set PID        -  When the mower tracks along the perimeter wire it uses a PID function to stay on the line.  The PID works by measuring the error (distance) between where the mower should be (over the wire) and where it is now.

Depending on the motors you used, these values PID will need tuning.  the biggest effect is done by modify the P value.  (Power Value)

  • If your mower is "snapping" from right to left along the wire - reduce the P value
  • If your mower is not following the line sharply enough - increase the P value

A P value between 0.08 and 1.2 is a normal range.  Depending on the motors used this value can change.

Dock ON/OFF       - The enables or disables the charging dock.  If this is disabled many features of the mower will also be disabled.  If disabled the mower will just park in the garden once the battery is exhausted.  If the dock is enabled the mower will navigate back to the docking station using the perimeter wire.

Tracking Dir       - Setup the direction the mower will track the wire (CW Clockwise or CCW Counter-Clockwise) when leaving the docking station and returning to the docking station.

Exit Point 1&2       -   After exiting the docking station this is the distance the mower should travel around the wire before entering the garden.  If you have a large garden you may want the mower to start at the far end of the garden (Zone 2).  Increase or decrease the Cycles number until the mower starts mowing at a good position in the garden.  There are 2 zones which can be setup.  Zone 1 and Zone 2.

Wire Find FwdBck -  When the mower has finished mowing it will try and re-find the perimeter wire to track it home to the docking station.  This is the distance/loop cycles the mower will travel forwards in a straight line looking for the wire to be detected.  Once this cycle max has been reached the mower assumes something has gone wrong and that it wont find the wire.  The mower will the reset the docking sequence to the start and try and find the perimeter wire again.  Forward and Backward cycles can be set.

Wheel Counter - Maximum number of wheel rotations before the tracking loop restarts. This is important when the mower gets stuck (see video below - Never Quit!!) as the wheel inputs are measured,  When a single wheel receives too many inputs the tracking cycle is restarted.  This is measured in loops of the code ran.

Here there needs to be a balance between the wheel spinning and the mower just going around a corner.  If the mower is resetting the docking sequence while it is tracking the wire normally, increase the value. 

Boost - This feature is only available in software V9.7 via the settings in the arduino code.  See Boost_Turn = 1     This boost will aid the robot to follow the perimeter wire when tracking.  At sharp corners the robot cannot follow the wire in standard mode.  The boost feature allows the robot to turn sharply once the wheel PWM falls below a certain value.  For example whehn the right wheel PWM is at full and the left wheel PWM is at 150 then the robot is trying to make a Left turn.  The PWM setting can be set to give the robot a backwards left wheel motion to further turn the robot and make the tight turn.

For the 220 Mower small motor try a Min_Track_PWM value of 140 to 150

For the Planetary Motors try a Min_Track_PWM value of 100 to 110

The Robot should stay in a good straight line without wiggling but have extra turning power at sharp corners.


 Video of Docking Sequence Steps:


Docking sequence steps for the mower and relevant settings

1. Stop mowing  (battery min)

2. Turn to the set compass heading for home (compass home dir)

3. Find the perimeter wire (wire find distance)

4. Turn to the home tracking direction. (Tracking Dir )

5. Track the wire back to the docking/charging station

6. Detect the charge (amps) on the charging pins.

7. Power down the mower.

8. Mower is docking and re-charging. 




Compass ON/OFF           - Yes you guessed it.

Compass Home Dir        -  This is the compass heading in degrees that the mower will turn to when the mower tries to dock.  The mower will stop mowing, turn to this compass heading and then search for the perimeter wire in that direction which it will then follow to the docking station.  Setting a "clever" heading can help the mower set off in a optimised direction so it doesn't need to follow 100m+ of wire to get back to the docking station.  

The following diagram and video will help with understanding the components of the home wire tracking.



Heading Hold ON/OFF  - enables the heading hold function which keeps the mower in a straight line on gradients.

Compass PID        - Sets the strength of correction (PID) for keeping the mower in a straight line when heading lock is on.


Of course docking can be a challenge as the world is not perfect.... The Mower has various logic loops to detect problems and react to set the mower in the best direction to complete the docking procedure.



Docking sequence for the mower and relevant settings

1. Stop mowing  (battery min)

2. Turn to the set compass heading for home (compass home dir)

3. Find the perimeter wire (wire find distance)

4. Turn to the home tracking direction. (Tracking Dir )

5. Gets Stuck on the ladder

6. Wheel Counter starts.  (wheel counter)

7. Backs up.

8. Turn to the set compass heading for home (compass home dir)

9. Find the perimeter wire (wire find distance)

10. Turn to the home tracking direction. (Tracking Dir )

11. Track the wire back to the docking/charging station

12. Misses to detect the charge (amps) on the charging pins.

13. Mower is stuck in the docking station (wheel counter)

14. Backs up.

15. Turn to the set compass heading for home (compass home dir)

16.  Find the perimeter wire (wire find distance)

17. Turn to the home tracking direction. (Tracking Dir )

18. Detects charge Pins

19. Mower is docking and re-charging. 



TFT Pictures      - Turns ON or OFF the pictures in the TFT Menu.  No pictures is simply quicker for the menus

USE PCB      - Selects if a PCB is being used (Clock Pins / Relay and settings are different).  Ensure this is selected if using a PCB

Robot Type       - Ensure this is set to Mower for Mower use

Clear EEPROM       - Clears all the EEPROM settings resting the MEGA to the factory status.




Other Settings in the Arduino IDE

Exit dock Sequence

This sequence needs to be re-written in the Arduino IDE if you wish to have a different exit movement from the docking station


the motion of the mower as it exits the garage and turns can be modified in the Arduino code in this function:

void Manouver_Exit_From_Docking_Station() {

modify code here to suit your garden needs
delay(7000) = a 7 second movement time.
delay(3000) = a 3 second movement time.
SetPins_ToTurnLeft(); = Mower will turn left + delay
SetPins_ToTurnRight(); = Mower will turn right + delay