I’ve received a few of the weldments back from the shop. While I wait for them to finish fabricating the mower deck weldment I’ve started to put some components together.
Back when I installed the wheel encoders on the wheel chair motors, I stupidly drilled a hole through the dust cover on the back of the motor so I could run data wires to the encoder. In hindsight, I should have run them through the little sleeve that the power and brake wires were routed through.
I had to take the brake off to put the encoder on the motor anyway, so there was a perfect amount of space for the encoder wires once the brake wires were removed from the sleeve.
Because you can’t undrill a hole I purchased a pair of cheap gear motors off eBay for $80. I mostly wanted them for the motor dust cover, but it will be nice to have spare parts on hand in case I need them down the road.
I took the aluminum back piece off the motors and removed the two white wires you see in the picture. The hole you see them sticking through was where I routed the data cables for the encoder.
Pro tip for dealing with these motors: There are two Philips head M5x150 screws holding the aluminum back piece to the mounting plate. These screws have lock washers under them. The screws are ridiculously soft and easy to strip the heads on. If you want to remove them so they’re still reusable, it’s best to use an impact driver. It’s extremely easy to strip them using a screwdriver.
I managed to strip the screws on both motors before I drilled them out and discovered this, so heads up to anyone modifying the motors like I am here. I ordered replacements that were socket head cap screws instead, hoping to avoid this issue in the future.
Once you have the aluminum back piece off, you’ll see wires inside like this:
The inside is going to be quite dusty with a lot of little brush particles inside. I blew it out with compressed air after taking this picture.
You can pull the white wires through pretty easily, but I had to bend the black wire terminal so I could get access to the hole to feed the encoder data cables to. I also ended up removing the brushes so I’d have more room to work.
Once you’ve got the white brake wires removed, you can pretty easily push the encoder wires through. The end result looked like this:
One thing I realized doing this is that it would have been pretty easy to drill holes into the aluminum back piece for screwing the encoder base down. I selected an adhesive backed encoder because I didn’t want to mess with it. But going to the trouble to take it apart like this changes that calculus. If I find myself doing this again, I’ll order an encoder that has clearance holes for mounting screws.
After I had everything wired up, I tested the encoder to make sure it was working well. Nothing like having to tear down a motor after it’s already on the robot to fix a loose wire.
I also wanted to make sure that running the data cables next to the power supply cables wouldn’t cause any issues. I didn’t find any during the bench test. Fingers crossed none pop up in the field either.
I used 5/8-11 screws for all the connections in the front caster assembly. I wanted to standardize on one size so I could buy several of one type of lock nut. Unfortunately the width of a 5/8-11 lock nut is 0.9375in and I don’t have a wrench that size. I also don’t have a hex wrench for the socket head cap screws either. The picture above shows everything hand tightened. I’ll have to go pick up the right tools to get this all put together.
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…
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.
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.
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.
I’m trying really hard not to turn the height adjustment mechanism into a science project. All it needs to do is (1) support the mower deck and (2) allow the height of the deck above the ground to be easily adjusted.
You can find some exciting mechanisms out there to adjust the height of a mower deck. Google Scag Tiger Cat Height Adjustment if you want to see one of the more interesting ones.
A lot of mowers have a mechanism that lets you adjust the mower deck with one single lever. While I like these mechanisms I don’t think they’re necessary for the robot mower. How often do you typically adjust your lawn mower’s height? I do it once a year, if that.
For this project, having to adjust the height in four places versus one is a small price to pay compared to the time it would take to both engineer a mechanism that would work for our robot mower. Not to mention the cost to make it. Springs and linkages get expensive quickly, and the risk it won’t work right goes up fast when you start adding lots of moving parts.
I like simple. I’m not that bright, so I figure if I can envision something working, chances are it will probably work okay in real life. To adjust the height of the deck, pull the quick release pin, rotate the lever to the appropriate height, and put the pin back in. Do that in four places and your done. Simple!
The nice thing about CAD software is you can see how different ideas play out before you spend a fortune to discover they don’t work. The past month or so I’ve been drawing up robot mower designs with little luck. The model above is the only one I feel even moderately good about.
Most of the concepts I’ve put together so far feature a sheet metal chassis shaped around my batteries and motors. The upside with these previous designs is that it allows for the smallest vehicle footprint. The downside is that they involve a lot of welding and waterjet parts, and it’s difficult to come up with a simple mechanism to adjust the deck height because the motors mount directly to the chassis.
This new concept has the mower deck hanging beneath the robot frame. Separating the deck from the robot frame allows both to be simplified greatly. To adjust the deck height I plan on putting a few turnbuckles between the robot frame and the mower deck. An added bonus is that I can disassemble it and throw the robot in the trunk of my small Hyundai sedan for field testing.
One potential downside I anticipate with the design above is that it will be top heavy. The four batteries have to sit on top of the robot frame. We can box them in and secure the to the frame, but I’m not sure what the vehicle center of gravity will look. Guess we’ll have to do some more modeling to find out.
The XLR charger came in the mail today. I was a little worried because it was advertised as 24V output and after I bought it I realized that you really need something like 28V to charge a 24V lead acid battery. The 12V float charger I have is actually 15V at 150mA.
The charger was advertised as being used to charge electric wheelchair batteries though, so I didn’t worry too much. I checked the output voltage and it came it at 27.3V. Not too bad.
The connection between the panel mount XLR and the charger was a little disappointing though. It’s tight. Really tight. I’ve been trying to break it in, but I may have to take the panel mount apart and grind down the poka-yoke feature. Just enough to let it slide on though, not enough to remove it completely. It’s there for a reason.
If you think a good design is expensive, you should look at the cost of a bad design.
-Ralf Speth, CEO of Jaguar Land Rover
I know from experience that Mr. Speth is correct. So with a good functional understanding of my electrical components and a wiring diagram in hand, I set out to create a detailed CAD model of the wheelchair.
I do a lot of CAD modeling at my day job, and it’s something I really enjoy. But you don’t have to get anywhere near the level of detail shown below to start seeing real benefit from a CAD model.
CAD modeling is difficult and tedious if you’re doing it right. That’s because you will run into questions like these:
How does that enclosure mount to the chassis?
Where will I position that switch?
Do those components fit in that small area?
Can I route those wires through there?
Is that plate rigid enough to hold that enclosure in place?
In a nutshell, CAD modeling forces you to plan. The more detailed your model, the more detailed your plan. You can choose to do your planning in the garage when you’re scotch taping your Pixhawk and GPS to a chunk of cardboard, or you can do your planning in a CAD program from your air conditioned kitchen while you sip an iced tea. I prefer iced tea.
CAD pro-tip: most stuff is already modeled up somewhere. You just need to know where to look. A good place to start is the manufacturer’s website. Search for the term “CAD model” or “STP file” with the part number after it. Almost everything on McMaster’s website has a CAD model you can download, too. Do some digging. You’ll be surprised what you find!
Before I started drawing up the modifications I was going to make to the wheelchair, I spent a lot of time reverse engineering the existing structure. Would you buy new cabinets for your kitchen remodel before measuring your kitchen? Of course not, and modifying the wheelchair is no different. You’d measure things out to understand your constraints.
It’s important to know what you’re working with so you don’t accidentally put components that interfere with stuff on the wheelchair. But beyond constraints, having a good reverse engineered model also reveals possibilities. Unexpected places to bolt stuff suddenly pop out at you. Places to run wires begin look obvious.
If you don’t have a good set of calipers you need to get some, this will make reverse engineering your existing structure alot easier. The more accurate your CAD model, the more value it will have. Measuring the ID of a hole with a tape measure just doesn’t work that well.
Another cool side effect of reverse engineering something is the learning aspect. Some engineers out at Pride Mobility probably spent a few months hashing this wheelchair design out. I know they put a lot of thought into it. I can learn a thing or two from how it’s built and why it has the parts and features on it that are there.
Hopefully I’ve sold you on the importance of laying things out. Spend several hours thinking about your robot and drawing things out, even if it’s on a dirty paper towel. The alternative is ugly.
A More Robust Robot
No more cardboard. I found these pretty inexpensive enclosures that were the right size for this project. You’ll have to purchase a separate mounting panel if you want something to attach your parts to, which I did. As an added bonus, Polycase provides CAD files of their products on their website.
I mentioned previously that I suspected there was a lot of magnetic interference coming from my motors that was affecting my compass. To try and mitigate that, I decided to segregate all of my power electronics from my control electronics.
The control enclosure is intentionally oversized for the components it houses. Eventually I may insert some kind of companion computer and RTK GPS unit. Or maybe a camera. Who knows? But at least with extra space, I’ll have options.
Connecting the Enclosures
Connecting the two enclosures posed some surprising challenges. Power to the Pixhawk and other control electronics comes from the BEC, which is in the power electronics enclosure. But the control signal for the Sabertooth comes from the Pixhawk. All in all I needed to run 9 wires minimum between the two enclosures.
I spent way too much time researching connectors and wire assemblies, trying to find a cost effective solution. I bought 100ft of phone cable at a garage sale for $2 and initially intended to use that, but how do you connect your wires once they’ve been fed back into your enclosure?
I wanted to avoid crimping my own custom cables because it requires some expensive, specialized tools that I would use once, maybe twice. I also wanted a solution that was plug and play, to allow me to modify things on the go or add additional wires down the road. So soldering was out.
I also had to contend with signal loss through the cables. You can only run a 26 gage wire so far before you start getting noticeable losses. You can double up on small wires to mitigate that effect, but that’s not a proper solution in my opinion. So in summary, my constraints were:
No crimping or soldering
Flexibility for changes in the future
No major signal loss through the cable
One cable between the enclosures
Robust and secure construction
During my research I stumbled upon these D sub connector breakout boards made by Winford Engineering. They even had a CAD model on their website. If you pair these connectors with a cable that is made of something bigger than 26 gage wire you’ve got a pretty good solution, I think. Spend $5 on an old DB15 or DB25 cable at the goodwill, and another $20 for a pair of those D sub connector breakout boards and you’ve satisfied all of those constraints.
The male DB15 breakout board. The jack screws clamp the breakout board to the adapter plate, and the adapter plate screws into the enclosure wall.
There were a few drawbacks to this solution though. I had to make a custom adapter plate to mount the D sub connectors to the enclosure. And the smallest DB15 cable I could find was still 2ft long. Not great, but they don’t make them in 10in lengths off the shelf. And as I mentioned, I’m not too excited to get into the custom cable making business.
I initially intended to make the adapter plate out of aluminum, but looking around it might be just as cheap to 3D print it. The numbers I get back from some quotes I have out will determine what I decide. That interior profile with a +/- 0.020in tolerance is going to be expensive to machine.
Mounting the Enclosures
To mount the power enclosure, I had a small aluminum plate cut. The enclosure is attached to the plate and the plate is attached to the wheelchair base.
I’m trying use something other than steel for material wherever I can to prevent further compass issues. Even absent the compass problems though, steel is difficult to cut through. Unless the rigidity is required it’s probably worth it to use aluminum if you can.
The Sabertooth 2X60 comes with a cooling fan and a nice heat sink. I’ve set up the power enclosure to take advantage of this feature by drilling holes in the enclosure to allow the fan to pull air through it. I also selected the grey colored enclosure instead of the black to try and keep heat retention to a minimum. If you’ve ever owned a black car in the summer time, you’ll know why.
To mount the control enclosure, I made a small pedestal weldment that functions like the seat did before I removed it. This allows me to adjust the height of the enclosure if I need to move it further away from the motors. The enclosure bolts to the weldment the same way the power enclosure does.
Connecting the Motors and Batteries
To connect the batteries and motors to the power enclosure, I found these interesting connectors called Posi-Locks. They allow you to both electrically and mechanically connect your wires. Strip the wires, cram them, and cinch them down. They aren’t cheap, but they are reusable.
We’ll see how well they work once I start putting things together. I’m using six 10 gage Posi-Locks for connecting the two motors and B+ and B- battery terminals to the Sabertooth 2X60.
Someday I hope to actually build a robot lawn mower. I’ve tried to design everything here in a modular fashion so I can take this equipment over to the new robot without too much hassle when that day comes.