More Backyard Testing

The weather the past two weekends has been good enough to take the robot out for some testing with the new RTK GPS system. The Ardusimple boards are pretty awesome. The things I like about them:

  1. It is plug and play with the Pixhawk (mostly).
  2. It is configured to automatically survey in the base location. This means you don’t have to mess with U-Center and configure it out of the box, unless you want to plug in specific coordinates.
  3. The long range radios I ordered mean you don’t have to mess with injecting the RTCM data stream through telemetry, although I will eventually attempt this.

Those things I like are huge. A few minor things I didn’t like:

  1. The connector on the board is technically the correct Pixhawk connector, a JST-GH 6 pin connector. Which is great, but every Pixhawk I’ve seen has DF13 connectors. So I had to buy an adapter cable.
  2. And then I had to mod the adapter cable because apparently the pinouts are inverted between the DF13 and JST-GH connectors. Frustrating.
  3. The antenna choices offered by Ardusimple included a nice IP65 antenna and a unenclosed one. Initially I wanted the IP65 antenna, but then realized it came with a 5m (!) long cable. Where are you supposed to store 15ft of wire on a robot like this? So I went with the unenclosed version with a 10cm long cable.
IMG_4241
The robot wheelchair with the RTK GNSS antenna mounted to the top enclosure. The second longer antenna is for RTCM corrections from the base station.

Once you tweak the adapter cable, you can plug it in to your Pixhawk and get RTK positioning in no time flat! Very awesome. No need to even tweak anything in mission planner. It will interpret RTK float and RTK fixed messages from the rover module.

To set up a base station, I grabbed my charcoal grill, a micro USB DC adapter, and an extension cord.

Image-1
The base station is on the grill. The thought was the metal shell would make a good ground plane to mitigate multipath.

And it worked pretty well until the rover tried to ram it in auto mode. Not cool, robot wheelchair. Not cool.

Another issue is that my backyard is a crappy GPS environment. It was pretty easy to get an RTK fix when stationary, but in motion losing one or two satellites was enough to bump back to RTK float. Bummer!

So to fix these two issues I moved the base station to my front yard which had a better view of the sky, and mounted the unit on the roof of my car, which I’ve heard makes an excellent ground plane. Whoever said that is right.

This was quite an improvement. I was able to run autonomous missions while maintaining an RTK fix for 80%+ of the time in the back yard.

IMG_4267
The black tick marks is the position of the front caster as it runs a loop in my driveway.

I had the robot run an autonomous mission in circles in my driveway and the repeatability was still pretty good. The tick marks on the drive way indicate the position of the side of the front caster through each pass. The distance between the furthest two tick marks is 5in.

Overall, the Ardusimple boards are looking like a very good investment.

Small Design Changes

mower 1-6-19
The robot mower design as of this weekend. Some wiring is completed.

I’ve decided to change a few things on the robot mower design. I have a tendency to get hung up on really small things by spending way too much time thinking about them. The deck height adjustment was turning into one of those things.

I’ve changed the design to include four simple clevis pins. They’re $0.50 a piece. You don’t need to adjust the deck height that often, and spending $100 on parts to do that in a fancy way is a waste of effort and money.

I modeled up a discharge chute because I think the mower will need one to look professional. I intended to 3D print it, but it turns out the dimensions are big enough that most hobby websites won’t take it. I know of a place nearby that does industrial 3D printing and they quoted me $290 for the part out of ABS. Yikes. Maybe I’ll try to adapt an off the shelf chute instead. That’ll be more reverse engineering but it will probably work better. And cost a few hundred less.

xt60
Some simple XT60 connectors for the motors. They’re rated for 60A and should be appropriate for this application.

I’ve started modeling up some wires and coming up with a way to neatly connect the motors was more challenging than I thought it would be. I found some “wall mount” XT60 connectors that will hopefully will work well. I’ll have some mounting plates NC machined and then attach the XT60 wall mounts to the plate.

u-Blox ZED-F9P

As Roby over at Deep South Robotics can tell you, there is a lot of snake oil being peddled in the RTK GPS space. I’ve been a quiet spectator in this area for as long as I’ve been working on the mower project, and I’ve seen a lot of systems come and go.

Two modules that I had my eye on for a long time were SwiftNav’s Piksi V1 and Emlid’s Reach. Both were L1 only systems. I religiously visited their forums and poured over commenter’s experiences with both modules. In a nutshell, here’s what I learned:

  1. L1 only systems can take a long time to get an RTK fix, and they can lose them in a heartbeat
  2. If you’re in the air with a quadcopter or fixed wing plane, an L1 system generally works well because there is no multipath
  3. If you have any kind of multipath that you are contending with, you are absolutely screwed with an L1 system

On top of that, integrating these systems require that master’s degree in computer engineering I talked about earlier (remember, I am a lowly mechanical engineer, wires aren’t really my thing). Neither system is truly plug and play, from what I can tell. A lot of the integration has to do with injecting GPS corrections through telemetry over MAVLink, as I understand it.

Then last year I discovered that u-Blox was coming out with their own L1 system, the NEO-M8P. I watched a very thorough introduction to the module and was almost going to buy one when I noticed that u-Blox was coming out with a multi-band, multi-constellation RTK GNSS receiver, the ZED-F9P.

I contacted the folks out at u-Blox and they said that an evaluation board would be available in Q1 of 2019, but in my research I stumbled across the folks at Ardusimple. These guys are making a similar evaluation board for the ZED-F9P module that includes a Pixhawk GPS port. Talk about simple.

Is this the holy grail of RTK GNSS? From my experience with this board so far, the answer is yes.

A Simple Test

I conducted a test similar to the one in the video I linked to above. I took reported baseline measurements from u-Blox’s u-Center software, converted the NED components to a net distance and then compared the value with a tape measure.

img_4197
The test setup. The receiver on the left is the base, the on the right near the laptop is the rover. Yes, that is my neighbor’s two story houses in the background.

I intentionally placed the receivers in a really crappy area of my yard to see what these modules are capable of. My neighborhood has lots of two story houses, and many fully grown trees, although they are without leaves this time of year which certainly helps. Here’s a panoramic shot of the backyard, with my house to the right:

img_4193
My backyard. The deck where the test was conducted is on the right.

Bottom line is that this was a pretty challenging multipath environment. I would estimate 50% of the horizon was occluded by my and my neighbor’s house. The remaining areas were pretty well covered up to about 20° if you exclude bare trees. How well did the modules perform?

It’s tough to see in the picture but the NED measures in meters are:

N = -2.1990    E = 0.1063    D = -0.0006

Using the 3D distance formula on these components and converting to inches gives a baseline distance of 86.6759in. You can see in the picture above that the rover antenna is sitting right at 87in. Holy geography Batman indeed!

Some Other Observations

A few other things I noticed in my brief time working with these modules:

  1. The Ardusimple boards have the LED status “backward” from what you’d expect. No corrections means solid blue light, receiving corrections but no fix is blinking blue, and RTK fix is no light. Counter intuitive, but their documentation does mention this.
  2. Just for fun I covered the antenna and waited for the light to turn on, indicating the RTK fix was lost. When I removed my hand, the light would turn back off consistently after less than a second. It appears that if you lose your fix with these modules, you can get it back very quickly, even in a challenging environment.
  3. I kept moving the boards toward the alley between my house and my neighbor’s house, just to see what it would take to force the modules to lose the RTK fix and I was able to get as far as 227in from the base point in the picture above, which was about 3 feet away from my covered patio area before I lost my RTK fix.
  4. Even after I lost the RTK fix, the baseline error was only 12in in 3D float mode. Still really good. Keep in mind during most of this test, I am standing at the laptop taking pictures and fiddling with u-Center. So my body is blocking some signals, too, I’d imagine.

So far these boards are looking awesome! Next step is to hook things up to the Pixhawk.

Mower Positioning

5939749916dcd.image
A typical robot lawn mower on the market today. It’s basically a Roomba, but for your lawn. Have fun tearing up your lawn to bury cable!

When you google “robot lawn mower” you will find a bunch of Roomba looking robots like the one above. The missing ingredient between these robots and the one I’m attempting to make is one thing: positioning.

When you need your lawn mowed, you want it to be mowed 100%. You don’t want half the lawn cut and the other half not cut. You don’t want gaps of uncut grass between your stripes. You don’t want random paths cut through your lawn. You want nice, parallel, alternating stripes.

To accomplish that, you need to know the location of the mower throughout the process so you can keep track of areas that have been cut, and so you can cut the grass in a specific manner. Back and forth stripes, for example, or perhaps a nice circular spiral moving outward from a tree.

I’ve come to the conclusion that to really automate the mowing process, you need at least +/-1in of positioning accuracy. Historically, such a system required a $40,000 survey grade GPS system from Trimble or Leica and the equivalent of a master’s degree in computer engineering to integrate it into your robot.

So the Roomba mower guys, given these constraints, came up with the following solution:

Who cares where the mower is? Just fence it in and have it mow all the time. You’ll eventually cut all the grass. We gotta make a product that we can realistically sell to people at a profit, you know.

-Some engineering manager out at Roomba Mowers Inc, I’m guessing

Every robot mower has to compete with the neighbor kid that will mow your lawn for $20. He’ll even try to make the stripes in the front lawn mostly straight and parallel. That’s the price point and level of quality that you have to beat with any robotic mowing system.

The Roomba mower guys sacrificed quality and scalability to get there with their system. Those are probably decent tradeoffs if we’re honest. While these Roomba mowers are for the most part a novelty, for some folks they work okay. But in the scenarios where they do perform well, they’re probably not value added at their $2,000+ price point.

So for years, guys like me that dreamed of real robot lawn mowers were left with just that: dreams. I don’t have $40,000 laying around, and I’m a mechanical engineer, not a hardware guy or a computer engineer. And even if I had both of those things, such a system can never turn a profit in the market place.

Enter u-Blox with the ZED-F9P module….

Lithium Batteries

What would a composite lithium ion battery look like if we were to use one for the mower?

Untitled
What the performance of a hypothetical lithium ion battery could look like if we were to use one.

We need a nominal voltage of 24V, so if you string 7 18650 batteries with a nominal voltage of 3.6V you’d end up with 25.2V, which should work fine.

String 15 sets of those 7 rows of batteries connected in series together and you get a battery with 45Ah of charge. Not too shabby. This would be a 7s15p battery in lithium ion parlance, I think.

Two of those 7s15p batteries would fit in each of our two battery bays. You’d need a total of four to achieve the numbers shown above. They’d fit in our robot something like this:

Lithiums
How the lithium batteries would fit in the battery bays. Very compact. Very expensive.

The weight savings here are significant: 70lb. This is to be expected, but I’m surprised it’s this high. I don’t have a truck to haul this robot around in, so the lighter I can make it, the easier it will be to take it out for field testing. The reduced weight should also decrease the power consumption from the robot’s drive motors, making it more efficient, and possibly more agile.

The cost is still going to be over $1,000 though. Talking with some suppliers, I think the 18650 cells cost a little less than what Amazon will quote you, probably closer to $4.50 per cell. But you still need some fancy charging equipment, and there will be labor and material cost for building up the battery and coming up with a way to secure them in the battery bay.

I may start out using SLA batteries because the monetary risk is pretty low, about $300. They may perform better than I’m expecting. If they don’t, the lithium ion batteries appear to be a good plan B if we need more run time.

Power Consumption Revisited

I think I may have incorrectly estimated my power needs for the mower. A key assumption I’ve been making is that the motor will generally need to be capable of generating ~5ft-lbf of torque during maximum operation. I’m not sure this is really true though.

Do We Really Need 5ft-lbf of Torque?

The 5ft-lbf of torque figure comes from taking a typical gasoline push mower engine and looking at the gross torque output of the engine. But one variable I forgot to consider is that the torque curves I looked at are associated with an engine typically used with an 18in to 21in blade. Our mower uses a 12in blade.

Intuitively, the torque we need to cut through grass is going to be positively correlated to the amount of grass we’re trying to cut at once. So a smaller cutting blade should require less torque than a larger blade. There’s less grass for the blade to run into, sapping momentum from the rotating blade.

I have no idea what the relationship between blade length to required torque looks like. I am going to assume it is linear for simplicity, but I have no clue if this is a good assumption. The torque you need is also going to be related to the quantity of grass clippings circulating around under the deck impacting the blade. Good luck modeling that.

Given the smaller blade size, let’s say you only need 60% of that 5ft-lbf torque value, so 3ft-lbf or 2.2N-m of torque. That’s the ratio between a 20in blade and a 12in blade.

How Much Current Does the Motor Draw at 3ft-lbf of Torque?

The performance curves for the E30-400 motor say that the motor consumes 56A of current at 3ft-lbf of torque. I think this is a more accurate number for current draw from the motor.

E30-400_Chart
Performance curves for the AmpFlow E30-400 DC motor.

How Much Power Does the Motor Consume at 3ft-lbf of Torque?

Another mistake I made was pulling power numbers off this chart thinking they were power supplied to the motor, not shaft power output by the motor.

This is an important distinction, because no motor is 100% efficient. The input power should be the power supply voltage of 24V times the current consumed at a given point on the curves. At 3ft-lbf of torque, it’s (56A)(24V) = 1344W.

This jives with the chart above, because shaft output power at 3ft-lbf or 2.2N-m of torque is about 1040W. That would imply an efficiency of (1040W)/(1344W) = 77%. The chart says the motor is about 75% efficient at this torque, pretty close to this estimation.

So under maximum operating conditions, each motor should consume 56A of current and 1344W of power. The three motors collectively consume 168A of current and 4062W of power.

Is That a Good or a Bad Number?

The 168A number is acceptable because it is right at the limit of what the Mauch current sensor can handle. It’s rated for 200A of current and that leaves us 32A of current for drive motors and miscellaneous control electronics, which should be enough.

So assuming our three mower deck motors consume 56A, our two drive motors consume 12A and our control electronics consume 5A of current, you could have a maximum of 197A drawn from the batteries. Very little margin, but I think it should be okay because…

Maximum Versus Typical

One additional thing I’d like to mention is that I think these are maximum power consumption numbers. Previously I referred to them as typical power consumption numbers.

Do you need 3ft-lbf of torque while mowing the entire time? I doubt it. The calculations above prove that if our electric motors need to operate at 3ft-lbf of torque, they should be able to do it. Operating at 3ft-lbf of torque drops the rotation speed down to 4500RPM which results in a blade tip speed of 14100ft/s, which is a little lower than I’d like but should work.

Run Time Recalculated

Turns out I also miscalculated how battery charge adds when batteries are connected in parallel versus series. In series, battery voltage adds. In parallel, charge (your amp hours) add. Previously I assumed your total charge is the sum of each individual battery charge.

Since we have two sets of batteries connected in series, and then in parallel, our equivalent battery is 24V, 70Ah. This makes sense because I think the Ryobi lawn mower is advertised at 24V, 70Ah too. It’s the same battery set up, apparently.

If we were to run all three deck mowers with a load of 3ft-lbf torque on them, it would take (70Ah)/(197A) = 21 minutes to completely drain our batteries (again, assuming that’s even possible to do, in reality it isn’t).

At half this torque value, total current consumption would be 28A for each deck motor, resulting in 113A total. That results in (70Ah)/(113A) = 37 minutes of run time. The E30-400 motor consumes 29A of current at peak efficiency, so I’m hoping that I’ve sized these motors for the sweet spot of their performance.

If you were to bump up the battery size used on the mower to four 50Ah batteries, run time would be (100Ah)/(113A) = 53 minutes. Doing this would add 34lb to the mower, which would show up in the current consumed by the drive motors.

Thoughts

Even though I have more confidence in these numbers being correct, they’re still disappointing. I would like to shoot for a minimum 2 hours of run time. The only two ways I can think of to get there:

  1. More efficient motors and electronics.
  2. Larger batteries.

Using BLDC motors would increase our efficiency, but they cost 4 times the brushed DC motors I intend to use. Reduced run time is an acceptable trade off to save $700 in my opinion.

Larger SLA batteries start getting pretty ridiculous beyond the four 35Ah’s I’m using currently. The battery bay has to grow to accommodate the larger batteries, and that pushes the wheels out, increasing the wheel base and negatively affecting vehicle performance.

Additionally, the added weight makes me wonder if the 0.125in sheet metal battery bays are sufficient to support the weight of the batteries. Two 50Ah SLA batteries weigh 64lb. I’d probably want to reinforce it just to make sure.

We could switch to some Lithium Ion batteries, but here the cost is at least as bad as switching to BLDC motors.

Lithium Lead Acid Comparison
A brief cost and performance comparison of a composite lithium ion battery versus our current 12V, 35Ah SLA battery.

If you were to make a composite battery out of 18650 cells equivalent to the four 35Ah SLAs I’m using currently, it would cost just shy of $1,000 in 18650 cells alone. And that doesn’t even include labor to build the battery and a fancy charging system to go with it.

I found some guys that make custom 18650 batteries, and maybe they can do it for cheaper. I’m starting to understand why Tesla’s use lithium ion technology. If you need a boat load of power and have any kind of space or weight constraint, you kind of have to. Unfortunately, I drive a 2003 Honda Accord, not a Tesla Model X and so the mower project can’t afford some legit lithium ions.

I may have to get used to about 30 minutes of run time.

Power Consumption

I decided to make the autonomous lawn mower fully electric for one big reason: If a person has to walk out to the mower with a gas can and refill the tank, is it really autonomous?

Ideally, you want the mower to do it’s job without any human intervention. If you have a gas engine, no matter how you cut it fuel has to be delivered to the mower in some fashion. With an electric design, you can have the mower automatically dock with a charging station when the battery gets low. No human required.

So from the get-go I have been trying hard to make the mower electric. I am encouraged by some electric riding mowers out there that use SLA batteries as their power supply. I like SLA batteries because they contain a lot of energy and are fairly cheap. Minimizing battery weight and volume isn’t a huge constraint for this project, thankfully.

Because these electric riding mowers cut grass and carry a ~200lb person on the mower, I have been operating under the assumption that as long as our batteries are larger capacity than those on this riding mower, we should be okay. That Ryobi mower features a battery bank that consists of four 12V, 25Ah SLA batteries.

I am beginning to question that assumption…

Power Consumption

Sizing the batteries ultimately depends on how much power the mower needs. The deck motors take the lion’s share of power consumption. Previously I estimated the mower would require motors that can output at least 5ft-lbf of torque to cut through thick grass based on typical gas engine torque output.

Examining the torque curves for the E30-400 motor I selected for our design shows that at 5ft-lbf or 3.7N-m torque, the motor consumes 1400W of power. If you assume all three motors pull this level of power, the deck motors collectively consume 4200W.

The drive I’m using on the mower design are stolen from the wheel chair. I suspect they are rated for 500W but I am not sure. The gearbox on them ensures they will generally be operating in an efficient area of their torque curves, so I am going to consume both motors consume 250W, and collectively consume 500W between the two motors.

The control electronics are almost negligible compared to the power consumed by the motors, but I will budget 100W for all the other little things on the mower, just to be safe.

That brings the total estimated power the mower needs during operation to 4200W + 500W + 100W = 4800W.

Battery Capacity

The batteries I’ve selected are four 12V, 35Ah SLA batteries. If you assume we intend to discharge these batteries 100% (and that doing so was physically possible), you could obtain (4)(12V)(35Ah) = 1680Wh of energy. If we were to draw 4800W of energy from these batteries, we would drain them in (1680Wh)/(4800W) = 21 minutes. Yikes.

But it gets worse. Because we’re pulling so much power out of these batteries, it looks like you have to discount the total amount of energy you can get out of them. I’m not entirely sure what that calculation looks like, but from the SP12-35 datasheet, it looks like a 1hr discharge rate only allows you to get 21.8Ah of charge out of each battery. That’s only 60% of the 20hr rate of 35Ah. I could be wrong about this interpretation of the datasheet, please correct me if I am mistaken.

Some Thoughts

Do the motors really draw that much power? Holy moly I hope not. At their most efficient, the motors draw 500W of power. Running the calculations above with this number gives you a run time of 48 minutes. Still not great.

The reality is somewhere between those two extremes. Taking the average of the two gives 35 minutes of run time. I was hoping for something more in the neighborhood of 2 or 3 hours. Going up to some 12V, 50Ah batteries could give us some extra oomph, but I don’t think it will be 3 hours of oomph.

Please let me know if these numbers seem way off base, it’s my best swag at them I can come up with. The last thing I want is a mower that can only cut grass for 10 minutes.