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.

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

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.

 

Vehicle Kinematics

comparison-10-13-18-e1539411077256.png
Some different mower designs. From left to right, a one, two, and three mower blade design.

Picture yourself at your local grocery store. Our grocery store has two kinds of shopping carts: the big one that I grab for loading up 24 packs of Mountain Dew, and the small one I use when the Missus asks me to get a gallon of milk and some cans of soup. The small cart is half the length of the big one.

Which of these two carts is easier to navigate through the store? Or worded more technically, which one has a smaller turning radius? I think you can see where I’m going with this.

All else being equal, a smaller wheel base and foot print is going to be easier to control using our differential drive system. A longer mower is going to swing through a larger radius, and is going to be more difficult to control and position accurately. For a given amount of drive wheel rotation, you will get more angular travel at the front of the mower with a longer wheel base than a smaller one.

specs
Some high level measures for the three configurations. I didn’t design them in order of number of blades, that’s why the designations don’t match.

It turns out that there are other considerations that impact whether one cutting blade is the best choice for our mower design. A single blade mower allows for the most simple blade drive system. But as you can see from the table above, the single blade design is almost 9in longer than either of the other two designs.

The extra length tradeoff needs to be weighed against the simplicity gained by the cutting blade system. There is also a tradeoff between number of blades and cutting width. By going with a single blade design, you lose at least 5in of cutting width compared to a two or three blade design.

Long story short, of the three designs, the single blade is pretty inefficient by some measures. It is the longest of the three, has the smallest cutting width, and requires the most material to fabricate. If I’m going to be successful with the robot lawn mower build, these are serious considerations that need to be taken into account.

Selecting a Motor

As I mentioned previously, I need to find a motor manufacturer that posts more than a picture of their product on an electric bike. I need torque curves and CAD models. I am surprised at how few of these manufacturers exist, or at least have websites that I can find. Maybe I just don’t know how to search for them.

Part of the problem is that I’m looking for a motor that has power output on the level of a small riding lawn mower. Finding smaller BLDC motors has been pretty easy, but finding something that operates efficiently at lawn mower speeds while still outputting decent torque has been challenging. Also, it has to cost no more than a few hundred dollars, because I’m cheap and I need some money left over for an RTK GPS module down the road.

So I’m starting out from behind the 8-ball to begin with. I wasn’t sure such a motor existed until I found the folks at Golden Motor. These guys are a little sketchy, and they need to hire a web designer from the 21st century. But they appear to have a wide selection of motors in some pretty epic sizes, with fairly comprehensive performance data, too.

But before we go looking at individual motors, let’s review our requirements.

Motor Requirements

At the moment I am leaning toward a single mower blade design. I’ve learned the hard way that complexity is not your friend, and simple designs are generally more robust.

To maximize the deck width, I am considering a 30in long blade. A 30in blade needs to rotate no faster than 2400RPM to be safe. Riding mowers with one single 30in cutting blade are equipped with engines that output about 10ft-lbf of torque.

The plan currently is to have four 12V 35Ah sealed lead acid batteries wired in series to power the motor. So it must be rated for 48V.

Evaluating the BLDC-108 Motor

This is a 1500W motor that Golden Motor makes. It’s also the only one that doesn’t have  a nice chart for all the relevant performance parameters, but they did give an excel spreadsheet with several data points. I graphed the data and here’s what it looks like.

BLDC-108 speed torque power
The speed and power versus torque curves for the BLDC-108 motor. The blue curve is speed and the red curve is power. Excel only lets you plot two separate y-axes, which is very frustrating. Get it together Microsoft, this is 2018!

The efficiency of the motor is greater than 85% between 1 to 3.5ft-lbf torque with a maximum efficiency of 88% at 3325RPM and 2.6ft-lbf torque. The motor consumes about 40A of current at the torque shown on the chart.

To achieve the maximum safe blade rotation speed of 2400RPM, we need to use two pulleys of different diameters on the motor shaft and the blade spindle. Taking the maximum speed the motor operates at of 4072RPM and dividing it by 2400RPM gives us the pulley ratio we’ll need, which in this case is 1.7.

If we use the motor with a pulley ratio of 1.7, we could obtain 5.9ft-lbf of torque at 1800RPM. Reducing the speed increases the torque.

Some thoughts about this motor:

  1. The torque is a little on the low side, even after you factor in the pulley ratio. I suppose you could go with a higher pulley ratio, but that reduces your speed even further, which I’m told affects the quality of your grass cut.
  2. I like that the current draw is only 40A. With four 35Ah batteries, you could in theory get 3.5 hours of operating time, neglecting current consumption from other electronics and motors. I like that number.
  3. The picture on the website is nothing like the CAD model you can download. So that’s something I’ll need to investigate if this is the motor I choose.

The motor is priced at $142 with $60 for shipping. BLDC motors require a separate motor controller, so that will be another $95 with $30 for shipping. So a system built around this motor will cost a total of $327. Not horrible. I wish I knew why the shipping was so high…

Next time I’ll evaluate the 3000W HPM3000B motor.

More Mower Musings

I’ve had some more time to think about our mower blade and the system that will be required to power it. To summarize what we discovered last time:

  1. A 21in blade is the maximum size we can use.
  2. A larger mower will be more efficient in general because a smaller portion of the mower width will be used to overlap the previous pass.
  3. Typical brushed DC motors are probably not a great way to power the blades.

Two Cutting Blades or One?

I think I need to retract statement (1) above. It turns out there are larger blades out there, the only caveat is that they have to be rotated at a slower angular velocity to maintain a blade tip speed of less than 19,000ft/min.

Using the math I outlined previously, a 30in blade needs to be rotated at just over 2,400RPM to achieve a blade tip speed of 19,000ft/min. This turns out to be a good thing too, because this slower speed can be achieved by using different sized pulleys on the drive motor and spindle, which will allow us to trade higher RPMs for more torque, which will be needed with a larger blade.

I was really hoping to avoid a mower with two blades for a few reasons:

  1. Complexity: two blades means two spindles, some idler pulleys, and more moving parts.
  2. Blade interference: the travel paths of the two blades need to overlap a little so you don’t miss any grass, forcing us to make sure the blades don’t get out of sync and crash into each other
  3. Vibration: I imagine two blades will result in more vibration, but this is speculation.
  4. Real estate: the mower deck needs to also house (4) 12V 35Ah batteries and a bunch of control boxes. Two spindles and a large belt with idler pulleys eat this space up really quick.
  5. Robustness: More parts means more opportunities for failure.
  6. Cost: More parts means more cost.

So seeing as we can use one blade while still achieving a cut width of about 30in, I think this is the preferable solution. There are mowers out there that use 30in blades, but the torque required for such a blade size is pretty high. This mower is equipped with a Briggs and Stratton engine that outputs 10.5ft-lbf of torque at 2,400RPM.

Keep in mind that’s engine torque output, not torque at the rotating blade, but that still means our electric motor needs to output at least 5.25ft-lbf at 4,800 RPM (see the pulley ratio math below). I’m guessing that will be a difficult number to achieve.

Motor Alternatives

Regarding (3) above, I think a brushless DC motor may be the way to go. I found this motor on an electric scooter parts store which seems promising, but I need to see a torque to RPM curve to be sure. Coincidentally, that motor is rated for 4800RPM, which results in a pulley ratio of about 2:1. Not bad.

On the down side though, most of those motors are designed to be used with sprockets and chain, which isn’t a great idea for mowers. There’s a reason mowers use pulleys and V belts. I suspect it is because they allow for a more fluid transmission of torque to the blade and also slippage if the blade hits something rigid, resulting in less strain on the drive motor or engine.

This will mean I’ll probably need to fabricate a custom drive pulley to adapt to the motor shaft and accommodate the V belt required by the blade spindle.

What Do The Other Engineers Think?

ryobi-rear-engine-riding-mowers-ry48110-64_1000
The Ryobi RY48110 electric riding mower. I wonder what’s inside?

This is the 21st century. Has anybody designed an electric mower with similar parameters to the ones we’re looking at here? Turns out the answer is yes. The specs for the Ryobi RY48110 riding mower:

  1. Looks like they’re using a few 12V 25Ah lead acid batteries for power.
  2. They use two BLDC motors directly connected to the cutting blade.
  3. Deck width is 38in which would imply a ~19in blade length.

Funny story, if you pull up the parts list and google their replacement motor part, you come up with this motor rated at 48V, 32A, 1800W, 4500RPM. So we’re at least in the neighborhood.

A few comments about this mower:

  1. They’re using this motor to drive a ~19in blade. We’re looking at using a motor that is actually rated at 1600W to drive a blade that’s more than 50% larger. Not good.
  2. Direct drive is interesting, it’s definitely simpler. I would be interested to see what kind of connection hardware they use.
  3. A 19in blade implies a maximum blade tip speed of 3800RPM. The motor is rated for 4500RPM. I wonder if the mass of the blade results in a equilibrium rotation speed of about 3800RPM. If not, the mower isn’t in compliance with ANSI B71.1-1990.
  4. How do the two motors stay in sync? I wonder if the blade paths overlap or if there is some kind of chain or belt between them to maintain their angular offset.
  5. Being BLDC motors, I also wonder what the controller looks like. I imagine it shoots for a fixed rotation speed. I would be interested to know what that rotation speed is.
  6. The Cadillac version of this electric riding mower only offers 100Ah of charge at 48V. That’s only 4.8kWh of energy. Our system with four 12V 35Ah batteries can store up to 6.72kWh of energy. This is interesting because not only does the riding mower need to cut grass, but it also has a possible 250lb person it’s driving around too. So I think we’re on the right track as far as power requirements go.

In Summary…

  1. I need to get some torque speed curves for these motors. Otherwise we’re just guessing about motor capability here.
  2. I think our power system is appropriately sized based on the RY48110 specifications.
  3. Torque output is still the big unknown here. The RY48110 gives us a baseline to work from though.
  4. It looks like BLDC motors are going to be the device that powers our blade, seeing as the folks at Ryobi arrived at the same conclusion we did.

Mower Musings

One of my goals for this winter is to design the prototype autonomous lawn mower. The rover V2 is coming along nicely, and while I have a few systems left to work on, the big ones are already implemented and working. So I spent some time this week thinking about the thing that makes a mower a mower: the cutting blade.

IMG_3958
The motor from Craigslist. The label says “24VDC 500W 4300RPM”.

A few months ago I purchased a small electric push mower off Craigslist. It had a DC motor and a 12in cutting blade that I disassembled for the mower project. I figured the “cutting grass” problem is essentially already solved and that there’s no sense in reinventing the wheel. But now that I’ve done some thinking, I’m not sure this problem is as simple as it seems.

Choosing the Right Sized Blade

Eventually I will attempt to integrate an RTK GPS system on the mower. Depending on who you ask, you’ll find that RTK GPS systems are accurate to about +/-1in. For the rest of this post I will be talking in terms of accuracy relative to the base receiver. Absolute positioning with any degree of accuracy is another can of worms altogether.

What +/-1in means is that at any given time, the mower could be 1in to the right, or 1in to the left of its reported position. Let’s say it’s 1in to the right while it’s mowing a row in your lawn. That +/-1in means when it doubles back for the next pass, it could be off by 1in in the other direction. Basically, +/-1in means there could be up to a 2in gap between passes.

So we will need to overlap passes by some amount. You would normally do this anyway if you were mowing your lawn manually. I overlap passes with my push mower by about 4in when I’m mowing my lawn to make sure I don’t miss anything, and we’ll want the robot mower to do this too to maintain a quality lawn cut. So we’ll need at least 6in of overlap: 2in to account for RTK GPS drift and 4in to account for normal overlap.

The issue I’m trying to highlight here is that the narrower your mower, the more critical it will be that it is positioned accurately. You can’t tolerate much drift because you’ll start missing passes if you’re mislocated by any amount. And to overlap such that you don’t miss passes requires overlap equal to 50% of your blade width, which is very inefficient.

This is why (in my opinion) RTK GPS works pretty seamlessly on big agricultural equipment. Those tractors and combines are a whole order of magnitude larger than our mower. They’re also out in big open fields with great GPS reception, but that’s a rabbit hole for another post.

So Pick the Biggest Blade Size, right?

Well, sort of. If you do much searching, you’ll find that the biggest blade you can get your hands on is about 21in. There’s a good reason for this: mowers cut best when the blade rotates at near-ballistic speeds, and if you make a blade much larger than 21in and then rotate it at 3600RPM, anything it hits turns into a piece of shrapnel. Not to mention what could happen if the blade itself shatters. Go look up some lawn mowing accident videos to see what I mean.

In my reading, I found that our friends at the American National Standards Institute (ANSI B71.1-1990) did some testing and recommended manufacturers keep the blade tip speed below 19,000ft/min, or 216mph. That’s linear velocity, not angular velocity. Remember that angular velocity is equal to linear velocity divided by the radius through which it rotates.

So How Fast Should We Spin the Blade?

So knowing that we want a big blade size and that we want to achieve a blade tip speed of just shy of 19,000ft/min, we can calculate the required angular velocity.

velocity
The maximum angular velocity of a 21in mower blade for compliance with ANSI B71.1-1990. Don’t forget the calculation between radians and revolutions.

Knowing the angular velocity, we can now calculate the required power if we know the torque the mower blade will experience spinning through thick grass. Unfortunately, that’s a very difficult figure to arrive at. So instead of doing some convoluted math to estimate the torque to cut through grass, we’ll just take the gross torque ratings listed by the folks out at Briggs and Stratton, as their mowers generally cut through grass with no problem.

e450 engine series gross torque
The gross torque versus RPM curve for a Briggs and Stratton 450e series engine.

This engine is one of their lower end models. Briggs and Stratton advertises gross torque at 2600RPM, so for this engine it would be 4.5ft-lbf of torque. If we take 5ft-lbf of torque as the required torque to cut through grass, we can estimate the power we’ll need for an angular velocity of 3450RPM.

Min power
The minimum power our motor needs to supply to keep a 21in blade spinning at 3450RPM.

Does the Craigslist Motor Cut It?

Electric motors aren’t like gasoline engines. Their torque to RPM curves are much simpler. With no load attached to the armature, the motor will spin very fast while outputting very little torque. If you apply a small load to the motor, the angular velocity will decrease slightly and torque will increase slightly. If you keep doing that until the motor stops turning, you’ll arrive at the stall torque. This is the maximum torque the motor can output.

So electric motor torque to RPM curves are linear. To draw them, you only need three pieces of information: the angular velocity and torque at a given point on the curve and the no load angular velocity. Using that information, you can draw a line for the torque curve.

motor specs
The best information I could find for the motor I salvaged.

The table here indicates the no load speed is 4300RPM and gives an operating point of 0.96ft-lbf (1.3N-m) of torque at 3700RPM. From this information you can find the stall torque and the maximum power the motor can output.

stall torque and max power
The calculation for the stall torque (top) and maximum power (bottom). The maximum power for a brushed DC motor occurs at half the stall torque and half the no load speed. This is why those variables are divided by 4 in the Power calculation above.

The manufacturer says that the rated power for the motor is 500W, but from my calculations I’m not sure that’s true. However, I am very surprised that the calculated power is this low. It’s very possible I have no clue what I’m doing here with these calculations. If that is the case, please call me out on it.

A motor that gets even close to the power levels we need would have to be a 2500W motor. We have a 24V power system, and we need the motor to spin at 3600RPM minimum. Doing a brief web search for those terms doesn’t come up with many promising alternatives. I’m not sure motors with those parameters are practical or even exist, at least in the PMDC variety.

So What Have We Learned?

I can think of a few things:

  1. If RTK GPS is our positioning technology, we’re going to want to make the mower as wide as we reasonably can.
  2. To keep our mower safe, the blade tip speed needs to be no faster than 19,000ft/min.
  3. Mower blades don’t come much larger than 21in long, so if we want a deck bigger than that we’ll be adding complexity to our design.
  4. We’re going to need a boat load of power to spin that 21in blade at power levels generated by gasoline engines.
  5. A permanent magnet DC motor may not be the way to go given these constraints.

I hope these musings about the mower make sense. I am always open to opinions and criticism about the evidence above, and what conclusions should be drawn from them.

Brushless DC motors, on the other hand…