top of page
Building.jpg

Build Steps

I started this Lawnmower Robot project in June 2020 and I started this page to share the experience and the knowledge that I have gathered. Here you find all the building steps in chronological order that was executed to build this Robot and Perimeter wire station.

DCmotor.png

01

Selecting the motor

I started by looking for DC motors including gearbox to get a robot with a speed that is not to fast to give the cutter time to cut the grass and not get stuck. I found this 12V DC motor with a gearbox with a gear ratio of 150:1 that gives it about 40rpm axel rotation speed and with a wheel of about 150mm in diameter the speed should be about 40 * 150 * pi  / 1000 = 1.9m/s. This motor also includes an encoder so that you can read out the rotation speed.

02

Robot wheels

I found plastic wheels that had a diameter of 140mm and I bought aluminium mounting hubs for the 6mm DC motor axel.

Wheels.png
Build1.png

03

Robot chassis

I designed a simple robot chassis to create a sturdy base to handle uneven ground but still keep the weight low. The chassis consist of a 2.0mm thick aluminium plate that I bent on two sides for mounting the DC motor gearbox driving the big front wheels.

04

Micro controller, motor driver and battery

I selected the Arduino Uno micro controller to keep the robot simple and low cost. I started with a 12V tool battery and I selected the L298N motor driver for driving the two DC motors and I was now ready to test the robot on grass.

RobotInGrass.png

05

First test drive

This first test on grass shows that the motor power is way to low for quite flat grass and gets stuck all the time. The robot clearly needed more power.

06

Test drive with more power

I changed to a 18V power tool battery and this showed that the robot was to fast on flat and down hill and still not enough power to keep this speed in even the slightest up hill.

Motor.png

07

Change to lower gear motor

I had to buy new DC motors of the same model but with a lower gear ratio of 200:1. This should give about 30rpm on the motor axel which would give the robot higher torque and a lower top speed.

08

Test with lower gear motor

This is the first test with lower gear motors and I have also added one ultra sound sensor to detect if the robot is about to hit a bigger object. You can see that when the robot switches from running forward to back instantly, the high torque makes the robot almost fall over.

09

Improved motor control

Here I have added motor acceleration and de-acceleration to stop the robot from damaging the motor gear box on quick stops and to stop it from almost falling over when changing from running forward to backward. You find the Robot source code function softSpeedDown and softSpeedUp under Source Code page that handles this.

10

First version grass cutter

It was now time to start adding cutting function to the robot. I installed a 12-24V DC motor in the middle of the chassis and added a second L298N motor driver in the back electronic box connected to the 18V battery and controlled with a PWM output from the Arduino. Then I built the first version of the cutter that you can see in the image. This cutter was based on a aluminium pot lid to keep the weight down and I attached three standard cutting knife blades. It was now time to test if this could actually work for cutting grass.

GrassCutter.png

11

First test of the grass cutter

I did this simple test to make sure that I would not damage the DC motor and just move the robot manually to see how well it could cut the grass. I started with running the DC motor at 50% power by having the Arduino PWM output port, that control the motor driver, running with a 50% duty cycle (speed value set to 128 of 255 in the robot source code).

Please be aware that the risk for cutting your self when running this test is quite high as you don´t know if something might break or come loose so use a camera to check the cutting progress and keep your fingers and feet away from the cutting knifes.

One problem I could see with this cutter version is that the blades was to close to the ground, about 20mm, and was cutting the grass very short and hitting low objects in the way such as paving stones.

12

Adding bumper

One thing I quickly noticed when test running the robot was that even when I added one more ultra sound sensor to avoid hitting objects it still missed walls when coming in at an angle and would run directly in to thin objects such as a chair legs. So I added a bumper (Lego) connected to a micro switcher for collition detection. It worked okay in house.

13

Collision detection outside

When testing the bumper on grass it was clear that it gets stuck on the grass and if I would mount the bumper higher up to avoid grass patches, it would miss low objects instead and still get stuck. This was when I realized that I was not going to solve this without some active fence.

14

Second version grass cutter

On This version I had found a round stainless steel disc from a pie pan and I bought replicas of the Husqvarna cutting blades that are sharp on both sides which gives you the option to run the cutting motor in random direction on each cutting session to get twice the range on the blades. 

GrassCutter2.png

15

Cutting test with new cutter 

With the second version of the cutter and now running the cutter motor power at around 78% (speed value set to 200 of 255 in the robot source code) the cutting effect was much improved.

Also much less problem with hitting low objects as this cutter and blades are about 35 mm from the ground.

16

Perimeter station version 1

The first version of the Perimeter wire station was a very simple system using a Arduino Uno connected to a L298N motor driver to send out a 5KHz square pulse, perimeter wire station source code. The motor driver was powered by a 12V battery and connected to the perimeter wire with just two 10 ohm resistors to get enough current for the receiver on the robot to detect any pulse without burning the motor driver or the resistors.

You can see in the oscilloscope image the wire pulse as yellow line pulsing from 0 to 12 volt and the blue line pulse detected by the robot sensor only detecting a 0 to 0.1 volt pulse. This was not working very well and the robot kept passing the wire.  

PerimeterTest.png
Oscilloscope.png
PerimeterSensor.png

17

Robot perimeter sensor

The perimeter sensor on the robot is a 10 milli Henry coil with a diameter of 10mm. It is connected to a LM358N operation amplifier setup to amplify the signal 500 times. The output from the amplifier is connected to one of the analog inputs on the Arduino. Even with this relativily high amplification I could not get a big enough pulse from the wire at higher distance than a couple of cm which was to short for the robot to have time to detect the pulse and change direction before running over the wire.

18

Robot escaping

This perimeter system test shows the problem with a weak sensor signal that do not create a clear signal enough for the robots Arduino analog input to detect if it is a pulse or just noice.

PerimeterStation3.png
Oscilloscope2.png

19

Perimeter station version 2

By adding two 10µF capacitors to the perimeter wire station I could change the square pulse signal on the wire to a more shark fin shape that you see on the oscilloscope as a yellow line. This shark fin pulse that rises from 0 - 12 volt slower, gives the coil on the robot pulse sensor time to build up a higher charge that is then amplified 500 times by the LM358N operation amplifier.

In the image on the oscilloscope you can now see that the blue pulse signal from the amplifier is now from 0 to 4.0 volt which is almost the maximum pulse height you can get from the LM358N since it is powered with 5 volt.   

20

Perimeter wire working

With the high analog pulse from the pulse sensor to the Arduino analog input I could now make the robot stop way ahead of passing the wire. This gives alot of room to optimize the threashold in the robot source code at what pulse signal strenght the robot should change direction.

21

Using motor encoders

The front wheel motor encoders are here used to make the robot drive straight by constantly synchronizing the left and right motor speed to get the same encoder pulse tempo.

In the first video the encoders are sychronized but you can see that the robot still turns to the left. This is probably because the left wheel is slightly smaller.

In the second video I have added a compensation value of 0.96 times the speed on the right wheel to make the robot drive straight.

22

EMI problem

When testing the perimeter system with the gras cutter motor enabled there was a lot of EMI (Electromagnetic Interference) from the DC motor causing the perimeter pulse sensors on the robot to get false positiv detections and getting stuck in an avoid wire loop.

DCmotor.png

23

Solving EMI problem

All brushed DC motors create a lot of noise on the power line. This creates electromagnetic radiation that causes interference in the perimeter wire sensors and signal amplifier on the robot. This can be reduced in the following steps:

  1. Twist the power cable to the DC motor

  2. Add a ferrite core to the power cable and wound it around the core at least one time

  3. Add a ceramic capacitor between the DC motor poles

24

Lawn mowing

First successful lawn mowing test with buried perimeter wire.

bottom of page