Meet Lawny! It’s a lawn mower with a first-person view camera that allows you to cut grass while controlling a remote-controlled robot!
I’ve built it using a Raspberry PI, H-Bridge, electric motor, and camera. It can be controlled from a mobile phone or a desktop.
The project's main idea is to control a lawnmower using a phone and see the exact same picture as a lawnmower.
Here is the full video of its creation and all the concepts that are described in this article:
System DesignI have a Steel Razors Trimmer Head. If I add an electric motor, it will be a grass cutter. The motor rotates the blades, and they cut the grass. Simple.
If I want to control the motor, I need a relay and a controller. In my case, I used a Raspberry PI 5 (because I had it). However, any Raspberry device could support pulse width modulation and a camera.
That will be a static lawn mower. But I want to cut grass everywhere, not just in one spot, and I want to be able to turn the mover left and right.
So I am adding two more electric motors.
The construction will be heavy, so I need power, not speed, and I will use windshield wiper motors from a real car. Like this.
Next, I need to control speed and rotation direction, so I am adding several H-bridges. I have a separate video that explains how to control a motor with H-Bridge; you can check it out if you want:
The first limitation is that I need two Pulse Width Modulation channels to control a single motor. But I have two motors, which means that I need four channels. To solve this problem, I am adding two more relays to switch the signal between pins.
Further, I need to see where the lawn mower is going, so I am adding a camera module to the Raspberry PI.
Additionally, I need some power sources. To prevent power drop elements that consume a lot of current, I will use a separate battery for the motors and a power bank for the Raspberry PI and electronics.
And finally, I will control this system from a mobile phone with a cross-platform application through wi-fi.
It looks mad, but it’s not a connection schema; it’s just a schematic explanation of the system.
Cutter boxI will start with a cutter box.
I have a piece of plywood. I need to cut the bottom surface and walls. Some walls will be a bit taller.
Next, I want to attach walls to the plate. I will use wooden bracket connectors and do a lot of drilling again. Additionally, I need to make a few holes to accommodate the cutter motor.
And finally, I can assemble everything together.
And install the motor.
Now, I have razors with a motor. But it’s a static block. To move this cutter, I need to create the rest of the body, which will hold the cutter box and allow me to move the whole construction left and right.
I will use a three-wheel setup—two front wheels and one rear, which rotate on a pivot.
If the left wheel has more speed, the lawnmower will move to the right, and the rear wheel will be turned by force of the body.
If the right wheel has more speed, the lawnmower will move to the left, and the rear wheel will be turned accordingly.
And finally, if the speed is equal, it will move straight.
I am starting with forming the sides of the body. I need to cut them from plywood.
When the sides are done, I add two car windshield wiper motors. These electric motors have a gearbox with more torque and will work better with a heavy project.
Next, I need to make the front box for the electronic components. This box should be sealed and will help keep the components safe from moisture and grass.
Additionally, I am adding the rear side. It should hold the third wheel.
Now, it’s time to add wheels.
In this project, I used several different types of wheels. I started with the cheapest option and decided to hammer coupling nuts inside it. The wheel cracked, but it was the best I had :)
Finally, the third wheel completes the moving part of Lawny.
I will create four rectangular holes in the mower deck to allow for cutting grass at different heights. The cutter will be attached to the sides with bolts, and these holes will enable its vertical adjustment.
The next stage is painting. I bought the cheapest white paint in Home Depot and took some color pigments from my basement.
First, review how to control a motor with one Pulse Width Modulation signal and one GPIO using an H-Bridge and a relay.
If I send the signal to Input 1, the motor will rotate.
If I send the signal to Input 2, the H-Bridge will change the current polarity, and the motor will rotate in the opposite direction.
I can add a simple relay to switch the inputs between two pins from Raspberry PI.
I will have two electric circuits. The first one is a 5V circuit with controller elements. Twelve-volt connections have thin lines on the schema.
We have :
- Raspberry PI: It's the brains of the system.
- Two H-Bridges to control Lawny movements.
- Three relays: two additional relays for the movement and one relay to control a grass cutter motor.
- Two windshield wiper motors
- A motor for a grass cutter
- 12 V battery (at least 9AH)
- A power bank
And now we make that schema happen. I am starting to place electronic elements in the box.
Further, I am adding both windshield wiper motors and connecting their black and yellow wires to the H-Bridge motor’s output.
And last but not least, I am adding a physical switcher. It will be very helpful if we can disable all the motors in case of losing control with a single button.
The remaining part is to connect all wires and add a battery and a power bank.
And yes, it’s another epic fail. These wheels don’t have enough grip to move and turn the mower.
In action:
Additionally, the crack in each wheel doesn’t add durability.
UpgradesSo it’s time for the first upgrades!
I can throw out old wheels and grab a better pair.
Now, I will not hummer coupling nuts inside. I will heat and pressurize them inside. See, I am learning!
The next upgrade - the rear wheel. It also has a bad grip and is too small for Lawny. Moreover, it doesn’t look great.
And now we are talking!
The remaining part is to install it. I am drilling and cutting again to make it reliable.
My wife saved me the second time by painting. She created such a nice face!
And I am adding a camera to the front surface.
Finally, I can do another Lawny test!
Upgrades #2On the second test, lawny didn't manage to go on top of the tall grass.
The grip is much better, but still not enough to handle tall grass.
Back to the basement. Now, I know how to fix it. I have a lot of wooden screws.
There is no need to spend tons of money on expensive wheels if we can go into Mad Max mode and tune current rims.
The last improvement for this video is the blades. To be honest, the electric motor is too weak to cut tall grass. It gets stuck, the motor overheats, and it doesn’t work as intended.
Luckily, I can replace my previous blades with a solid option, and I am sharpening them as much as possible.
The result looks aggressive, and that is awesome.
The outcomeUltimately, I could cut tall grass and navigate Lawny through all obstacles without any issues. Lawny could easily do the regular cutting. An overgrown lawn will require more time, but eventually, the lawnmower will tackle it as well. The cutter motor could be more powerful, depending on the grass and how often you use it.
In action:
That’s it.
Let me know in the comments here on in the video if you want to know the software part of the system or what you think in general!
Thank you for reading (or scrolling 🙂)!
Comments