Skip to main content

Autonomous lawn robot developed

· 4 min read
Alexander Röse
Software Developer

Project duration: 6 weeks
Number of developers: 1
Lines of code: ~500
Hours worked: ~300
Programming languages: Go, JavaScript, Python
Technologies: RaspberryPi, Arduino, ESP32, WebSocket

final lawn mower

Idea

The idea was simple. No more mowing the lawn yourself and build a robot to do it for you. And so the idea for the autonomous lawn robot was born.

The start of the project

So I started planning. I wanted to keep the robot as simple as possible and bought a hoverboard that I used as a base. I built the firmware of the hoverboard with the help of the GitHub repository Hoverboard-Firmware so that I could control the motors of the hoverboard.

Hoverboard

Removing unnecessary parts

Next, I removed all unnecessary parts of the hoverboard. This included the housing and parts of the electronics. I also had to saw off a piece of the axle so that it would fit on the board.

Removing Axle

First prototype

After I had removed all the parts, I assembled the first prototype. To do this, I screwed the axles onto a board.

First Prototype

Second prototype

After I had carried out the first tests, I built the second prototype. This one has a reinforced board, as the board on the first prototype was too thin and the screws had ripped out at the points where the front two castors were attached.

I have attached a power bank to the battery (shown here in blue), on which an ESP32 is mounted. The ESP32 is connected to the hoverboard and controls the motors. At that time, it was still controlled via a PC controller and not autonomously.

Second Prototype

Attaching all components

After spending some time with the second prototype, I decided to mount all the components on the board. I switched from the ESP32 to a Raspberry Pi because it offered me more options, such as connecting a camera.

lawn mower without case

Housing and distance sensors

I bought the housing of an old lawn robot from the classifieds. I installed three ultrasonic sensors in the front of this housing and another one at the back. I can use the ultrasonic sensors to measure the distance to obstacles and program the robot lawn mower to avoid them.

lawn mower open case

Communication

I decided to read out the motor data with Python and pass it on to the Go programming language. In Go, I used the sensor data to calculate how the robotic lawnmower should move.

communication

To be able to view the sensor data, I created a website that displays it in real time. The website is connected to the Raspberry Pi and displays information such as the speed of the motors, the distance to obstacles and the battery status.

website for lawn mower

Robot lawn mower in action

As you can clearly see here, the robotic lawnmower detects the wall using ultrasonic sensors and avoids it - without having to lay a wire in the ground.

Price list

Here is a list of the components and their prices that I purchased for the robot lawn mower. Components that are not listed I already had at home. However, they can also be purchased on Amazon or other platforms.

ComponentPriceStore
Hooverboard45,00 €Kleinanzeigen
2x Swivel castors9,98 €Baumarkt
Housing30,00 €Kleinanzeigen
Blade motors + blade disk80,00 €Kleinanzeigen
Buck Converter Step-Down Modul13,98 €Amazon
REV Intermediate switch3,59 €Baumarkt
Compass Module6,29 €Amazon

Ready for your next project?

Arrange a non-binding initial consultation with us now and we will show you how we can realise your project.

Start now