View Full Version : The task (lawn mower topic)

07-31-2018, 07:35 AM
The task

Automatically mow a field 100ft x 1000ft.

Task started: 4/2018
Task Completed: :confused:

The tool.

I found the mowing deck on Craig's list 3 months ago,
the engine was blown so the mower deck only cost me
$300, then I found an 14.5hp Briggs engine on Craig's
list for $120 and with a little searching I also found an
electric PTO clutch that fit the engine for $60.
7255 7256 7257

the next thing I need to find is a 24Vdc alternator. the briggs engine has
a 9 Amp 12vdc alternator to charge the battery for the 12vdc system(PTO clutch, Arduino(2), Lights, PC and starting engine).
The Electric drive system is 24vdc.

Electric Drive System:
(1) Sabertooth 2x60 with the V2(kangaroo) motion control board.(Serial interface)
(2) 1000 watt electric wheelchair motors with encoders.($150 from Ebay, sweet!)

Control System( Manual Mode ):
(1) Arduino Mega
(1) Arduino Nano (Safety System)
(2) XBee-PRO 900HP

Control System ( Automatic ):
(1) Lanovo S10 laptop PC (Windows XP)
(1) US Digital USB4 device(I/Os, encoder cards, analogs)

Current Senors:
(1) Yocto-GPS
(1) Yocto-D3
(2) Encoders (odometer, Direction)


08-05-2018, 07:02 PM
Looks like a fun, real-world system!
How much fabrication experience do you have? Do you have machining tools?
I'd love to see more about how this project goes!

08-05-2018, 07:47 PM
Looks like a fun, real-world system!
How much fabrication experience do you have? Do you have machining tools?
I'd love to see more about how this project goes!
This is Tommy_T we're talking about, jwatte. It's another developmental stage of the Magnificent Mule (http://forums.trossenrobotics.com/showthread.php?4314-More-Mule-then-Rover/page15); autonomous instead of human control through FPV or direct viewing from the porch.

Not sure I would trust any of my code to safely on a platform equipped with a proper gas-powered mower deck. I would definitely have to build a collision sensor system around the bot's perimeter to ensure nothing ever gets near the blades.

08-05-2018, 09:48 PM
It's another developmental stage of the Magnificent Mule (http://forums.trossenrobotics.com/showthread.php?4314-More-Mule-then-Rover/page15)
tician, I see it as too big a task for the mule. the mule is just not fast enough.

this platform is designed for mowing speeds needed to do 3 acres in 6 hours.
and with the gas engine also strong enough to charge the battery packs they can
be greatly reduced in size and weight.

this platform is also using servo motors for it's drive system.

the Mule System is waiting for snow.


08-06-2018, 06:30 AM
It can't be said I didn't give an electric mowing deck a try.

but, after seeing what a 14hp gas engine can do with even very overgrown
grass like the below image, I'm sold.


08-06-2018, 07:08 AM
Not sure I would trust any of my code to safely on a platform equipped with a proper gas-powered mower deck.
tician (http://forums.trossenrobotics.com/member.php?4806-tician), this platform while using a different control protocol(serial), does use the same safety logic
as the mule, which has demonstrated its worth countless times.

It turns out these gas engines have a terminal on the coil of the ignition system that when ground is
applied it stops the engine, so interfacing the engine kill to the control circuits is very straight forwards.
also, the mower blades are controlled by an electric clutch, which is also easy to connect to the safety system.

the electric clutch draw 5amps at 12vdc.
the gas engine has a 9amp built-in generator.


08-06-2018, 08:40 AM
Plan A:


record a perfect sequence of going 100ft then turning 180deg to the left with a .5 ft overlap of
last cut path, then going back 100ft and turning 180deg right with the overlap, then stop.


take an image with a webcam of a target area. using that image I should be able to correct any
alignment issues from last cut path, then just rerun the last recorded path.

the high contrast between sky and tree tops should come in handy.

repeat 154 times.

the pauses should come in handy as a way to control drive motor temperatures.
it does get very hot out in the sun.


08-06-2018, 12:15 PM
Because it's a known, surveyable area, you totally should use RTK GPS. You can get centimeter precision using just that!
Adding vision and other sensors would be candy on top.

Also, 14.5 HP is just, what, 11 kW? How much safety do you REALLY need for that anyway? :-D :-D

Using LiFePo4 batteries as stabilizers for the alternator seems like a great idea, as long as you can avoid overcharging, presumably by shunting in some big resistive load of some sort (or turn off the alternator.)

08-06-2018, 08:52 PM
Because it's a known, surveyable area, you totally should use RTK GPS. You can get centimeter precision using just that!
jwatte (http://forums.trossenrobotics.com/member.php?7432-jwatte), I'm sure it would help, but not sure how it would handle tree lines the block sections of the sky(lost satellites) errors.

I'm looking into it, thanks.


08-07-2018, 10:09 AM

Just as I was about to test the record/playback software one of my motors failed,
seems like a motor brush problem(spring broken).



08-07-2018, 04:13 PM
seems like a motor brush problem(spring broken).

That's unfortunate!
I am more and more becoming a fan of brushless motors ....
They're as robust as steppers, but faster and higher power!

08-09-2018, 12:56 PM
While waiting on parts to repair my motor, got to thinking about plan B.

some of these type devices have a 500m range.
found one on ebay with 250m outdoors range for $60.00
almost seems like it should be a plan A, but because of costs, it's
still a plan B.


08-10-2018, 06:29 PM
got the brushes, but wrong size.
because the springs failed on the brushes from the motor
I has able to remove springs from new brushes and put
them on my old brushes, and get the motor to run.

I was able to test the record/playback software. while it did
function as planed, it could not repeat angles to required tolerance.

the platform has about 6deg of lost motion in the drive train(gears,sprockets,chains)
so some type of angle feedback is needed.


08-10-2018, 11:08 PM
6 degrees is a fair amount! I imagine you already tightened up everything you can?
If you wiggle it, can you see what the limiting factor is?

08-11-2018, 06:41 AM
can you see what the limiting factor is?


the motor gearbox has 2deg of lost motion in them.
a few years ago I opened one of these type gearboxes
and pinned it's internal gears to their shafts and was
able to reduce it to .5degs, but because chains stritch
and motor brackets can move with heavy loads I gave
up on that approach.

that's when I came up with the below idea.


This device gives me .008deg resolution of the angle
the device is moving(Q axis). it also lets the platform
make sweet crop circles.

this device has limitations. (losing contact with the ground, and the math is convoluted)


08-12-2018, 11:09 AM
While waiting on cash flow(payday), I had a very strong LED light sitting around
so I tested using it as a target, see if my cheap webcam could pick it up from

My cellphone camera could pick it up.

But, not my webcam.



08-12-2018, 05:13 PM
Oh, that's nice!

If losing contact is a problem, I bet a Raspberry Pi + camera pointed down can, in a pinch, be turned into a picture-based visual odometer. I've wanted to try that, but never gotten around to it. (I believe that downwards-facing cameras for slow speeds can be more accurate than the general-purpose cars-on-streets visual odometers that have significant drift.)

08-12-2018, 08:37 PM
I bet a Raspberry Pi + camera pointed down can, in a pinch, be turned into a picture-based visual odometer.
Jwatte, monocular visual odometry off loaded on a Pi seems like a fun test, but I'm still looking at mechanical methods
of getting reliable odometry information.

I'm currently testing a 6" #40 chain sprocket.


I get .015" resolution with current setup.


08-13-2018, 06:23 AM
The next test is finding the maximum distance my webcam can
reliable pick up an LED TARGET. The corps(corn this year) make
a sweet target, but they are not always there.


08-13-2018, 03:59 PM
Having the LED be the "brightest thing" seems hard. Can you recognize some blinking pattern instead? Of course there will be latency for that, but that might not be so bad.

08-13-2018, 06:52 PM
Having the LED be the "brightest thing" seems hard. Can you recognize some blinking pattern instead?
jwatte, not a bad idea, few years ago I'v played with image filters that only showed difference between two images, blinking pattern
would work in that setup.

Sweet idea!


08-14-2018, 10:41 AM
With this platform I tested a new GPS and Magnetic senor from Yocto
7292 7293

While I was able to get good GPS data, the Magnetic sensor didn't
give good tilt compensated compass data.

So I replaced with a Phidget 3/3/3, and now seem to be getting repeatable
compass values.


08-15-2018, 06:14 AM
With the compass integrated to the software I'm ready for next try.

X=distance traveled
C=compass bearing
Q=platform Yaw sensor
Overshoot Value=Increases with speed, using servo motors keeps the value very consistent

(A) position platform at start location (facing Target)
(B) Press "S" on keyboard, (X axis is set to Zero)

Step 1: platform Zero Radius turns(+) while X<3.1ft
Step 2: C=80deg, Speed(mowing speed) while X<103.1ft - Overshoot Value
Step 3: Q=-45deg, Speed(turning speed) while X<121.3ft - Overshoot Value
Step 4: C=280deg, Speed(mowing speed) while X<221.3ft - Overshoot Value
Step 5: Q=+45deg, Speed(turning speed) while X<227.5ft - Overshoot Value
Step 6: Localization(webcam, or wireless trip wire device, or beacon)

repeat steps 154 times.

Looks like I need to put a little more effort on the mower's discharge shut.

It's loading up, leaving lines of clippings on the field.


08-15-2018, 11:49 AM
Good news on the clippings :-)

My experience is that compasses are super inaccurate, and only useful as a 1% corrector in a Kalman filter.
You really want to use a gyroscope IMU for near-term delta angles, and heading derived from GPS path traveled as another corrector input.

08-16-2018, 10:37 AM
My experience is that compasses are super inaccurate
jwatte, I also have not found a reliable way of using these type compasses yet.
I'm looking at the gyro next.

The one sensor that seems to give me repeatable results is the X/Q sensors.
had some fun in the field turning circles, repeated very nice.

for fun I may try cutting all 2 acres in circles.


08-16-2018, 10:53 AM
for fun I may try cutting all 2 acres in circles.

Someone else's field.
In the middle of the night.
Leaving no trace.

"Alien robots did it!"

08-16-2018, 03:28 PM
I'v noticed that the webcam I'm using takes a lot of PC
resources. So I ordered a set of Photoelectric Security Alarm Infrared Detector Sensor


should be a fun test.


08-16-2018, 11:47 PM
You really want to use a gyroscope IMU for near-term delta angles
My current gyro is 8yrs old, they have a new technology(MEM) in today's gyro,
so I have new one coming.

they say no drift, my current gyro has 7deg per minutes.
time between localisations is about 1 minutes.
I seen some stats that list drift of MEM sensors at 10deg per hour, that would work out
to .1deg in the time between localization .



08-18-2018, 06:24 AM
heading derived from GPS path traveled as another corrector input.
A good test to check the repeatably of the derived GPS Heading, would be to use the Q to turn
large dia. circle then stop when a preset heading is reached. should stop the same place
if it repeats.


08-18-2018, 03:23 PM
After setting up a test for the new gyro( easy test, just set a zero and wait )
I was able to test the repeatably of the GPS heading value.

the red flag is where the platform started each circle.
the orange cones are the stopping locations of each circle.(I didn't localize the starting direction for each circle)
where the platform is sitting is it's last circle(ran out of cones).


I spent about an hour changing software and turning circles, when
I got back to the new gyro it was still under 1deg. (sweet,so far)


08-23-2018, 07:14 PM
I had mixed results with the 9 DOF IMU, while it seemed to repeat when the ICE engine
was off, the values changed by 30 deg once the engine was running.

So, I got a 6 DOF device(no magnetometer) and had very good results.
without localizing I was able to complete 12 cycles
(Zero turn + 90deg, go 100ft at 87 deg,turn 180 deg, go 100ft back, turn + to starting angle)

I had a motor issue(brushes) so I looked around for replacement motor( the ones
I have now I got from ebay for $175.00 four years ago), the only ones I could find
that were the same as the ones I have were listed at $400.00 + free shipping.
So I made him an offer of $250.00, he countered at $275.00.
they just arrived(sweet!).
I checked the brushes in these motors and they looked new(even sweeter!)


08-28-2018, 03:01 PM
Using the light and camera to offset for the gyro drift worked sweet.


takes 6 seconds to get offset value because I cant run the camera when it's doing
it's cycle(requires too much PC resources) .


08-29-2018, 09:01 AM
Looks like it is working great!

Would be fun to do, but probably would not work on my yard. Most of my mowing is doing rough trails, where at most I run over the same part of the trail twice. That is my mower deck is 5' wide and the trail in most areas is at most 8' wide. Also I need to at times adjust the height to avoid Rocks, Tree roots... Plus I spend probably more than half of my time cutting back berry vines and other brush that try to reclaim the trails.

I wonder in your case, if it would be possible to have your automated mowing try to do something similar to what a human might do. That is when you complete a pass across the field, there usually is an obvious visual indicator where you mowed. At least when I typically have done it, which is usually a week later than when it needed it :D Most of the time you can see the track of the wheels.

So wonder if you could use camera or the like to try to follow where the previous track was, offset by some amount... Just wondering

08-29-2018, 02:24 PM
KurtEck, I could see a way to use cameras to track the last cut path using
image filtering in some applications, but because of seasonal variations in
grass cover I have not tested that approach.

having a PC or micro controlling the height of a mower deck seems straight
forward to me. I can see a way even with my Gravely 48" deck(height set by 4 pins) .


08-29-2018, 05:33 PM
I'm going to have to rethink how I make the 180deg turn back to the starting location.

It's making divots in the field(dragging inside wheel).

which sucks, because I was getting a perfect overlap of last cut path.



09-01-2018, 08:25 AM
While I'm pleased with the pace of this task, it's going to have to wait until next
spring. Winter Is Coming, and that's a different project(Mule).

Very fun task.

09-01-2018, 03:57 PM
Move to California! :-D

09-01-2018, 06:36 PM
Move to California! :-D
jwatte, and miss playing with snow?. can't get my head around that.

this season playing with snow is going to be even more fun(going to pick it up and move it, sweet!)


09-02-2018, 11:54 AM
going to pick it up and move it, sweet!

You make a compelling case!

Anyway, if you want to train a lawnmower on what to do, based on what you yourself are doing, you might want to check out these latest contraptions:

* https://developer.nvidia.com/embedded/buy/jetson-xavier-devkit (allegedly 10x faster than the TX2?)
* https://www.stereolabs.com/zed/ (not open source, but they do have good Jetson support)

09-02-2018, 06:41 PM
jwatte, handy winter reading(links above).

While not pleased with the gyro stability in this application, was
impressed with the implementation, easy to import to current software.

the layout of the system I'm now using seems best for this task.
1) point platform in general direction of light beacon.
2) home all axis (X,Q)
3) calibrate gyro
4) press start.
5) platform completes one cycle
6) platform localize gyro offset with camera to light beacon and Zero X Abs
7) platform Repeats if beacon found(pauses if not).......

with this setup if the platform stops for any reason, to restart
is just, point and click.

this winter I may look at making my own gyro(I got some pictures in my head, and lots of space on top of the mower deck)

Right now I'm checking around for one of these(image below)

this is the idea(photoshoped image)