Installing Comma.ai on a 2018 Mazda CX-5
I recently ordered a Comma.ai kit to add semi-autonomous driving capabilities to my 2018 Mazda CX-5. It took some trial and error (and help from the Comma.ai community on Discord) to get it working properly, but I highly recommend it as I’ll explain later.
I’m sharing the steps I took in case it’s helpful for others looking to install the Comma 3X on the same or a similar vehicle. It’s a pretty intuitive process, all things considered, but there weren’t a lot of guides with photos on how to do the actual installation process.
A false start
When I initially received the Comma 3X kit and installed it (follow the installation video and Jafar’s post, it’s pretty simple) I thought I’d be up and running quickly. However, the device seemed stuck in dashcam mode and didn’t move the steering wheel at all. After digging into the Discord server and reading more, it appeared to be an issue with fingerprinting my specific Mazda model.
I reset the device and installed a special fork I found on the Discord server which had more Mazda car fingerprints to help identify how to interface with the car. This worked on a test drive, but the car would beep aggressively every 5 seconds if you weren’t holding the wheel very deliberately, making highway driving difficult. Even without Comma installed the car would complain when you had cruise control enabled and weren’t holding the steering wheel in the right place, but adding the Comma made it complain much more.
The Discord community recommends trying a wheel cover with weights underneath, which worked somewhat but was quite bulky. Ultimately, I decided to pursue the ultimate solution I had been trying to avoid: swapping out the EPS motor.
Swapping the EPS motor
The EPS motor on pre-2022 Mazdas is designed for very lightweight lane departure vibrations. I always thought it felt a bit underpowered, and you could feel the car lightly bouncing between the lane markers. On any serious turn, the car would just continue to depart the lane.
Newer Mazda EPS motors can apply more torque to the wheel, allowing for real LKAS (lane keep assistance) that can turn the car even through 10+ degree curves. I was initially hesitant to replace the EPS motor because I wasn’t sure exactly where it was located. But after reading the pinned messages on Discord and asking a few questions, the community reassured me it was pretty straightforward.
The process ended up being easier than I anticipated, although there were a few tricky parts. Here’s a detailed breakdown of how it works:
- Order the new EPS motor from eBay — the LKQ store has several options, but you have to make sure the vehicle is model year 2022 or higher. As an example, here’s a search on LKQ’s eBay store, or just look for “2023 Mazda CX-5 Power Steering Pump OEM”. You’ll also need a 10mm and 12mm wrench for later.
- You’ll receive a hunk of metal similar to this. The only part needed is the circular gearbox-looking piece on the left of this picture.
- Remove the two bolts pictured here, which will detach the shaft from the EPS motor. Use a 12mm wrench for these and be careful not to lose the small plastic gear in the center of the motor once you remove it.
- Disconnect your car battery using a 10mm wrench to prevent the airbags from firing.
- While not required, I recommend removing the cover to the left of the steering wheel. It pops out easily and improves access to the EPS motor.
- Now that you’re in, you’ll see the same motor mounted, as pictured here:
- Here’s the trickiest part: you need to remove the same two bolts on the old gearbox, but one bolt is close to a piece of metal, making it hard to fit the wrench in. It’s doable but will take a few attempts. Both bolts are on quite tight, so don’t be afraid to use some force to loosen them.
- Once the bolts are out, unhook the 3 cables at the top and detach the old motor.
- One tip: the small gear kept falling out or misaligning as I tried to install the new motor. Rather than fumbling with alignment, I positioned the gear on the other (already mounted) side so it was already lined up correctly. You’ll see what I mean.
- Screw the bolts back in, reconnect your battery, and you’re all set! You’ll want to install this modified fork on the Comma 3X, which tells older Mazdas to use the new EPS motor.
Review
After installing the new EPS motor, I’ve been really impressed with its performance. I wouldn’t even bother installing Comma.ai on an older Mazda without it — the experience is just too annoying otherwise.
The upgraded EPS motor enables stop-and-go adaptive cruise control, which by itself is a fantastic improvement for city traffic. It also provides LKAS that keeps the car smoothly centered in the lane without any warnings to keep your hands on the wheel. These enhancements make long drives much more pleasant.
With the new motor, I’ve completed a few hundred-mile road trips with only three or four interventions to assist with turning, and just a handful of additional interventions in busy city traffic. It really is quite capable.
Since I had Comma installed before the EPS motor upgrade, I spent some time observing the Openpilot lane markings as we drove. There was never a point where the green outline indicating the car’s projected path was misdirected or where the detected lane markers deviated from reality. I also drove at night and in the rain, with no issues whatsoever. This gave me a lot of confidence in the system’s capabilities.
Special thanks to the Comma team for building an incredible hardware product, and to all the maintainers of Openpilot and volunteers in the #Mazda Discord channel.