Smart Home Robotic Lawn Mower Project

Having tested out my algorithms for a while now, I'm currently deciding on the best robotic lawn mower to purchase. I'm also doing a quick project to see if it is better to build my own.

The focus of this project is the intelligent control of a robotic lawn mower. Whilst some robotic lawn mowers are fairly smart, they will never have access to the wide range of information and context available to my contextual smart home.

Like all of my smart home projects, the goal is simply to improve our quality of life and that of the wildlife in our garden. By using whole home context to deliver a much smarter, zero touch user experience, our grass will simply be cut efficiently and quietly, without us having to even think about it.

Assumptions

I've made a few assumptions with my models. I've assumed that a typical robotic mower takes around 100 minutes to charge and that it has a run time of about 150 minutes but, these can easily be changed based on the specific model I end up adding to my smart home.

There are a few weather related sensors and data feeds that I've assumed are not directly useful:

The biggest assumption I've made with this project is that the chosen robotic lawn mower has an API (cloud based or local), that allows my contextual smart home to intelligently control it. This is a key factor in selecting the right mower.

Design

A lot of robotic lawn mowers allow you to control them via an Amazon Echo, Google Home or via an app but, this is not really smart and is just another form of remote control. Some also allow scheduling but this is often 'blind' to the wider environmental factors or weather conditions.

The goal of this project is ensure that my contextual smart home has ALL of the required information and context to intelligently control a robotic lawn mower, with full awareness of the important factors and without me having to do anything. I'm after a zero touch user experience and all I require is to be told when some mower maintenance is required or an unexpected issue has arisen.

My smart home knows about the weather, the weather forecast, rain and the sun. It also has occupancy information, so it knows if we are at home and if we are in our garden. Part of this project is to understand what other context is required to deliver the best possible user experience.

The main goal of this project is to work out the best algorithms to decide when the robotic lawn mower charges, stays in its base station and comes out to cut the grass. My definition of 'best possible user experience' also means it won't try to cut the grass when we are relaxing in our garden. If any 'issues' arise, then our smart home will make a voice announcement and send a notification.

Charging & Battery Level

I'm assuming that I can monitor the robotic lawn mower's battery level and charging state via the vendor's API. This will be used in the decision logic, to ensure it only starts cutting with a fully charged battery and returns to base when the battery level becomes too low. Some models of mower will only start cutting when the battery is fully charged.

I will also be looking at solar charging of the mower using PV panels.

Irrigation

I obviously don't want the robot lawn mower to deploy if the lawn irrigation is in use or has recently been used. This is something most robotic lawn mowers simply won't know about but my smart home does. Some mowers can sense wet grass though.

Occupancy & Presence

One of the key things in delivering a great user experience for me is that the robotic lawn mower is not deployed when we are outside enjoying our garden. This also goes a long way to making it much safer. My contextual smart home has incredibly powerful occupancy detection and modelling, which also includes the garden and also many features within in it (patio, garden room, shed, paths, etc.).

This means the mower will return to base and stay there whilst people are in our garden. This includes visiting tradesmen, such as our window cleaner. As soon as the (connected) side gate to our garden is opened, the mower will return to its base station. Again, an 'off the shelf' robotic mower will simply not know about garden occupancy.

These are some of the sensors providing garden occupancy information:

Reporting

Each time the robot lawn mower is a deployed, completes a cut, or is recalled mid-cut, I get a notification to let me know when and why. I will also be informed of any exceptions or faults.

Our contextual smart home can also deliver voice announcements but, these are reserved for reporting issues only, as they would quickly become intrusive. There is no reliance on the robotic lawn mowers features or app here. These are common capabilities of my contextual smart home, ensuring a seamless and personalised user experience.

Schedules

My contextual smart home supports controllers, to easily enable some very powerful adaptive schedules. This makes it very easy to define when the mower should be deployed. In practice, I aim for one cut a day, assuming all other factors allow it. Most robotic lawn mowers are fairly quiet but, I still wouldn't want to run one at night as we have neighbours and wildlife to consider. My contextual smart home is providing much more intelligent control than a smartphone app will allow.

Threat Level

My robotic lawn mower takes account of the threat level and returns to base if it is too high. This is something only my contextual smart home knows about. This part of my advanced security and safety system.

Weather

Frost
There is no easy way to detect frost on the ground but monitoring of the outside temperature is a good indicator and my contextual smart home also monitors weather forecasts for frost.
Hail
There is no easy way to detect hail on the ground but my contextual smart home monitors weather forecasts for hail.
Humidity
High humidity levels are a good indicator of recent rain or wet weather arriving soon. I have numerous humidity sensor in and around my smart home. I also pull in Internet data feeds for extra validation.
Lightning
My contextual smart home has a local lightning detection sensor which will be used to return the mower to its base station for a set time duration.
Rain
My contextual smart home features a high quality and very accurate, real-time rain sensor and rainfall gauge. It also monitors the weather forecasts for rain. It obviously knows about historical and recent rainfall too.
Sleet / Snow
There is no easy way to detect snow on the ground but outside temperature is a good starting point. My contextual smart home also monitors weather forecasts for sleet and snow. Residual snow on the ground is an area where I need to do more research.
Temperature
If the weather is too cold, the batteries won't last as long. I also don't want to be cutting the grass in the colder, wetter months and outside temperature is a good indicator of these. Similarly, I will avoid cutting the grass if it is really hot, to protect the mower.
UV Index
My contextual smart home pulls in Internet data feeds with the local UV index and analyses and tracks it. It also has a local UV sensor. Whilst its use is not immediately obvious, it is a good indicator of sun intensity and this, along with wind speed, helps to understand how quickly the grass might dry out.
Visibility
My contextual smart home also pulls in Internet data feeds on visibility and analyses and tracks it. If the visibility is 'poor' or 'very poor', then this is a good indication of fog or other moisture that may not be detected via other sensors.
Wind
High winds are not necessarily a problem for a robotic lawn mower but, they may cause things to fall on to the lawn and create dangerous obstacles. For this reason, I don't want my mower to deploy if the current wind speed is too high. I use both local wind speed measurement and Internet data feeds.

Wildlife

There is a lot of wildlife in my garden and I do a lot of things to encourage it. This includes a pond, bird bath, planting hedges, installing nest boxes for birds, boxes for bees, etc. In the warmer months, frogs will explore the lawn at dusk, looking for insects to eat, so I don't to deploy my robotic lawn mower. At night time many other creatures come out (such as hedgehogs), so running the mower over night is also something I don't want to do. I also don't want to run the mower around dawn, as this is when the birds are very active in our garden and looking for food on our lawn, watering at our bird bath, etc.

This might sound quite restrictive but, it leaves the majority of the daylight hours available to cut our lawn and it is fairly small, so it doesn't take very long to cut.

Location

Some robotic mowers have GPS positioning technology. Our mower will also be tagged using a Bluetooth Low Energy (BLE) tags and its position triangulated by our contextual smart home.

Mower Selection

My rear lawn is fairly small at around 750 square feet and is bounded by a conservatory wall, raised decking, paving and a flower bed. This means a fairly small robotic lawn mower will able to cut the grass quite quickly.

Aside from the key features of the mower, the main thing I'm looking for is an open API, that allows full control of the mower. This will be the key factor in my choice of robotic mower deployed in my garden.

Secondary to that but also important, are the features and navigation skills of the mower itself. The lawn in our back garden is quite small and flat but, the mower must be able to navigate around and avoid the following features in our back garden:

It also needs to be able to navigate efficiently, to ensure all the grass is cut and no bits are not missed.

Most robotic lawn mowers are battery powered and charge via a mains powered base station. They use a perimeter wire and sensors to constraint them to the required cutting area. One end of the perimeter wire is connected to the base station and the wire is laid along the border of your lawn and held in place using stakes. The other end of the wire then terminates back at the base station, to form a loop. The base station charges the mower and provides the wire with an electrical signal. Sensors on the mower use this signal to guide it within the boundaries and to return to the base when the lawn has been cut or when the battery needs to be recharged.

Programming is typically done using an on-board control panel that has on/off buttons and menus for setting seasonal timers, scheduling cutting times, creating zones, configuring edge cutting settings, running diagnostics, and viewing the cutting history. It's going to be interesting to see how this can be made to work with my planned intelligent control.

Smart Home Software

The use of technology abstraction allows me to model a robotic lawn mower and all it's key features and actions before I even own one :-) This allows me to test all my algorithms, context dependencies and sensor dependencies and for my contextual smart home to send me notifications on what is happening, despite the lawn mower not physically existing yet.

I can simply model mower battery state based on mower run-time until I physically have a mower and can query battery state in real-time. This allows me to start my testing.

Smart Home Integration

To enable this level of robotic lawn mower control, I have written a new Java class to model the mower and all its characteristics. This can then inherit all of the whole home context and have real-time access to the state information of everything else connected to my smart home.

My smart home will then communicate with the mower using the vendor's connection protocol, e.g. the Husqvarna Automower Connect API.

My contextual smart home does a regular check to see if all the conditions are met to run the mower (battery level, raining, etc.) and tracks when the mower was last deployed, recalled or completed a cut. From this it then decides whether the mower should be deployed or not. Some events (garden occupancy, rain sensor detecting rain, etc.) cause this check to happen instantly, in case the mower needs to be recalled.

Testing

Despite not having a robotic mower yet, I'm now testing all of the intelligent control functions, to ensure it is all working as expected. The mower control software logs all of the 'reasons' why it isn't cutting the grass, so that I can optimise my models and algorithms.

Summary

My control software is working really well and providing clear feedback to allow me to test my algorithms and control logic. I get a notification each time the robotic lawn mower is deployed, is recalled or completes a cutting sequence. This is an ongoing research though, to see what works best and delivers the best possible user experience.

The next part of this project is to acquire (or build) a suitable robotic lawn mower and to integrate the control with my contextual smart home software.

One thing is clear so far, relying on weather forecasts alone to control a robotic lawn mower isn't going to work anywhere near as well as using local sensors and context. They are simply not local enough, too pessimistic and not very specific on timing.

Examples

My @smartest_home will tweet when the robotic lawn mower is being deployed to starting cutting our grass.

My @smartest_home will tweet when the robotic lawn mower is being recalled due to rain.

My @smartest_home will tweet when the robotic lawn mower is being recalled because the garden is now occupied.

My @smartest_home has a lightning detection sensor and will tweet when it is detected after a while and also track the frequency of strikes.

My real-time rain sensor allows my contextual smart home to know how much rain has fallen in a given period of time.

Further Research Required

Grass Wetness

One of the things I'd like to add to this project is a sensor to measure how wet the grass is. I'm currently testing with my Smartisant Soil Moisture Sensor SML1, to see if this can accurately measure the grass wetness.

Rainfall Analysis

I plan to make the tracking of rainfall much more advanced. My contextual smart home will soon be able to track rainfall in terms of volume and minutes of rain, per hour for the previous 7 days. This will allow more accurate predictions of when the conditions will be right to cut the grass and also be useful for its smart irrigation.

Further Reading