I couldn’t find any reference to the Ego Z6 battery zero turn mower in the forums so I thought I’d post a few photos of my own conversion in case anyone else is looking to do this…
It just turned out to be much simpler and quicker without having to take anything apart. The control levers use hall effect transducers, rather than simple potentiometers, and in the absence of any schematics it was easier to just do it mechanically. I will probably delve into the control circuitry at some point in the future but this was the fastest way to get it up and running.
Thanks for sharing these photos @MartinRob
I’m looking to do a very similar conversion and am shopping around the various electric zero turn options to see which model is best suited for this sort of conversion. Do you have any more info about your experience with the Z6? How difficult was it to tap into the drive controls mechanically like this? Anything you would do differently next time?
In my opinion, it’s pretty useless to drive controls mechanically like that on an electric mower. If that’s the only workable solution, find another brand that works with direct electronic control.
It is very easy to drive the control levers mechanically. You just need to remove the dampers and replace them with linear actuators. The black 3D-printed adaptors on the ends of the linear actuators allow them to bolt straight in. The red blocks (also 3d printed) hold back the reversing springs. With these in place, and the dampers removed, there is next to no resistance on the levers so low power, fast moving actuators can be used. The ones I chose have a standard 5V RC interface so they can be driven directly from an RC receiver. I also added a relay in parallel with the seat switch so the mower will run without a passenger.
The rear mounted module containing the electronics drops into the 2 holes designed for accessories and everything is powered from the on-board USB socket. The means that everything can be put back to standard in a matter of minutes, which is useful as this was a brand new mower still under warranty.
One slightly more intrusive addition I made later was to put a relay across the cutting motor switch. This isn’t essential but it enables Ardupilot to turn the cutting motors on and off.
As for the Z6, it’s a great machine, very powerful and very well built. I still need to do some work fine tuning Ardupilot as the mower tends to wander a bit and the turns could be improved. I just got it to the point where it worked well enough to do the job and then moved on to other projects.
Do you have any detail on how you configured ardurover/Mission Planner to accomplish an auto mower run? I am a novice and fumbling getting the configuration and parameters right. I have an older robot mower that I’m going to gut and use the two drive motors and the blade motors and replace the controls with ardurover. Interface to the brushed motors is pretty straightforward motor controls. Any advice on flight pack and other hardware?
Hi Mark,
I’m very much a novice in this area too but the Rover setup section of the Ardupilot is incredibly comprehensive and helpful. I used the following hardware:
Pixhawk 1 flight controller
2x Sparkfun ZED-F9P GPS (for position and yaw)
Holybro 915Mhz 500mW telemetry radios
Flysky FS-i6X/FS-iA10B RC
and I’m just in the process of adding a Maxbotix I2C sonar after a couple of collisions
I have now removed the linear actuators and control the motors by emulating the Hall sensors which the Ego mower uses to detect the position of the control levers.
Yaw maybe a problem for you on a smaller mower as the motors will probably interfere with magnetic compasses and you probably won’t be able to get RTK GPSs far enough apart to work for yaw.
This is amazing! I own the same mower and bought all of the same stuff to do this conversion two years ago. My life got super busy and I had to shelf the project for a while. I didn’t purchase the actuators because I kept thinking that I could emulate them. Did you reach out to Ego, or reverse engineer the USB device by sniffing USB packets, or what? Any details would be so appreciated. Has the mower been mowing for you regularly for a whole year now? A big congratulations to you fir getting this all to work. I love the housing, and non- invasive work. It looks great! Did you CAD your prints in Onshape, or do you have CAD files available? How about configuration files or tuning details for Ardupilot?
Yes, the mower did a whole season’s mowing with the actuators but I decided to have a go at eliminating them for this season. Having done so, the mower is now much more responsive and once Ardupilot is disarmed the mower is completely back to standard for manual mowing.
No help from Ego, just many hours with a logic analyser. Although the Hall sensor boxes have USB C connectors the data is not USB, it’s a proprietary (or something I’m not aware of) balanced serial bus that carries messages from all the modules on the mower. The messages format is:
2-byte header 0x55AA
1-byte message ID
1-byte length (always 14)
8 data bytes
2-byte CRC (polynomial 0x1021)
For the Hall sensor boxes the 8 data bytes appear to carry the raw 16-bit values from 4 Hall sensors in each box. The boxes are sealed (potted) so it’s not possible to see the hardware without major surgery but I’ve managed to emulate them pretty well using an ESP32 board.
I used an old (2016) version of Sketchup for the 3D printed bits. You are welcome to the STL files if you want to duplicate anything.
I’m still working on the Ardupilot tuning, hopefully it will stop raining eventually and I’ll be able to have a proper go at it!
This is the small box with the ESP32 that intercepts the messages from the Hall box (the white bit with the black cable) and replaces them with messages based on the channel states on the Pixhawk SBUS.
Thanks for the quick response. Congratulations on an entire year without having to sit on the mower the entire time. I’m pretty jealous. I have about 2 acres to mow. Spring is not a happy time.
Your analyzer work results in some incredibly useful info for me, and I’m sure others too. After first just trying a scope on the pinouts, it was clear I needed to see the digital signals. I bought a cheap analyzer and started trying to figure it out, but never got it pinned down. So, you’re using a Nano on each left and right side. Does it include USB-C in and out, so it can pass through to allow old school manual driving operation, in addition to mimic mode for the Ardupilot control? I only see the one jack in your picture. Do you just swap the USB hall sensors back to manually drive?
I actually bought a pair of the sensors and magnets from EGO, but even with them in hand, it’s not clear what lies under that melted pot material. Once the mower is working, maybe I’ll try to see what’s underneath.
I’d love to print your STL’s. My hardware is very similar, but I may need to modify the box a bit. I had originally envisioned using a Plano box, like this, Plano Box but I think your setup is certainly cleaner.
Now, we just need to move the charge jack to the front, and build a funnel shaped solar parking garage, so it can plug itself in to charge when it’s done. LOL
I’m actually using a single ESP32 DEVKITV1 board on the lefthand side to emulate the sensors from both sides. On the righthand (slave) side I just have a FET switch to disable the Ego sensor. The ESP32 is ideal for this because you can connect any peripheral to any pin so I was able to generate the balanced signal by connecting a UART tx to one pin and the inverted tx signal to another. It also has Bluetooth and Wi-Fi which may be useful one day for something.
It’s not clear in the photo but there is a USB C male connector on the other end of the box and a short USB lead to the Ego sensor. So, yes, when Ardupilot is disarmed normal manual control is possible. Here’s a photo of the slave side (the other side is the same but also has the ESP32 board)…
I just used off-the-shelf breakout boards. The middle one is a TS3USB221 USB switch which I thought I would need but it turns out I didn’t because the Ego sensor can be disabled by pulling the CC signal low so I used thalf of theTS3USB221 to control that instead.
If you have an Ego sensor on the bench you can get it to send messages just by applying 12-15V to VBUS and ground. The balanced output will appear on D+ and D- but the signals swing between 0 and 3V so you don’t really need a balanced receiver to look at them.
If you pull the USB CC signal to ground the transmission will stop. This is used to detect and control collisions on the bus but came in handy for disabling the sensors too.
I bought this mower today, because I got sick of the petrol stink.
I looked at automation as an afterthought; really silly on my part, given that I have a CupCadet ZT2 I started automating, but haven’t had enough time to complete it.
Would I be asking for too much by asking if you could share the program for the ESP? Do you have a circuit diagram? I’d like to replicate your work.
I’ve attached the Arduino code for the ESP32. It’s pretty straightforward, the difficult bits were decoding the Ego message protocol and emulating the non-linear Hall sensors.
I don’t have a circuit diagram as such, as I just used breakout boards for the hardware, but I’ll try to put a diagram together showing the interconnections.
Have fun with the Ego, it’s a great mower and ideal for this project.
The code provided by Martin compiles in the Arduino IDE with the DOIT ESP32 DEVKIT V1 board selected, which is available when the esp32 framework is installed.
@MartinRob, I really like the aluminum that you used to elevate the antennas on the stock round tubing roof mounts. Was it pre-bent to 90 degrees like that? Can you provide a source? Did you print end caps or ??