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.

What is Comma.ai?

Comma is like Tesla Autopilot for your existing car. It plugs into the car’s OBD-II port and uses data from your car’s existing sensors to do some Level 3 automation (ish). That’s partial automation — if the systems fail or there’s a major incident on the road, you still need to be ready to take over. But it works well on highway drives and anywhere you’d normally be using cruise control.

This might sound sketchy, but Comma was actually ranked #1 by Consumer Reports. After a few months of using it, I can attest it’s not a fly-by-night hardware operation, and the software is quite good.

What cars support Comma.ai?

Comma’s official compatibility list is here, but if you don’t see your car listed it doesn’t mean it’s not supported. As I later found out, there’s an “unofficial” list of community-supported vehicles (like this for Mazda) where the sensors exist but capabilities have various limitations.

In my case, CX-5 models earlier than 2022 have all the sensors needed for the full Comma.ai experience, but the EPS motor (which provides lane departure warnings by rumbling the wheel a bit) isn’t strong enough to move the wheel enough for medium to large turns when automated. That changed in 2022 model years and later, which is why they’re officially supported.

Earlier models are community-supported, and there are some asterisks around what you get with the out-of-the-box Comma experience. But — if you’re willing to do a 30 minute part swap (that I thought would be scary and warranty-voiding, but is actually easier than you’d think with my guide below) you get the full Comma experience, which is better than most built-in car autopilot features today.

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:

  1. 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.
  2. 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.
  1. 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.
  1. Disconnect your car battery using a 10mm wrench to prevent the airbags from firing.
  2. 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.
  1. Now that you’re in, you’ll see the same motor mounted, as pictured here:
  1. 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.
  1. 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.

  1. Screw the bolts back in, reconnect your battery, and you’re all set! Once the Comma turns on, you’ll go through an installation process. Like this video shows, you’ll want to select “Custom software” but then you’ll enter the URL https://smiskol.com/fork/jafaral/mazda-eps22-swap 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.

Update: 6 months later

Highly recommend the Comma, and will continue updating this post with observations.

  • After ~500 drives and 10k+ miles, I’ve never had any safety issues, and have even relied on it in rain and snow because it did a better job of observing lane markings than I could.
  • I’ve noticed on some roads it adjusts the wheel back and forth a bit more than it should — this is a known issue called “ping-ponging” and some other branches are supposed to be better at minimizing wheel turn. More info is available on the Discord channel, but it hasn’t been a big enough issue for me to investigate further.
  • I might try some of the other forks like Sunnypilot that offer more customization.
  • I have noticed that the unit doesn’t do well in extreme temperatures, which usually happens when you leave it connected in a hot or cold parked car. Before purchasing, I had read reviews of people whose units broke in extreme heat, and I think it’s a real concern but avoidable in average climates. Either way, I’ve been disconnecting the unit and putting it in the glove box when I know it will be in direct sun or extreme temps. Quite easy to do, and so far no issues there.
  • I do think having the Comma as a dash cam is an underrated benefit. The team discourages its use as such, but it’s good enough and gives me some peace of mind.

Responses

  1. Adam Avatar

    Any idea if this will work on a 2017 CX-5 GT AWD?

    1. zacharyhamed Avatar

      I believe 2017 was a redesign year so anything 2017-2022 should be substantively similar. Mine is a GT as well so your trim should work.

  2. Diego Avatar

    Hi Zach, What is the part number for the new EPS?

      1. Diego Avatar

        The part number JJ501-013611 refers to the EPS motor. Would this be compatible with a Mazda CX-9? Specifically, could a CX-5 EPS be installed into a CX-9?

  3. Jonathan Avatar
    Jonathan

    Hi Zach,

    Thanks for this detailed write up. I’m a total novice to any of these. What do you mean you had to install a special fork? Is that a software and do you do it directly on the comma? Thanks!

    1. zacharyhamed Avatar

      Ah I should’ve mentioned that! When you first turn it on, you’ll go through an installation process. One of the steps will ask what software to install, so you’ll say custom software and then enter the url https://smiskol.com/fork/jafaral/mazda-eps22-swap. This video shows the process, it might be a bit outdated but should be roughly the same.

  4. Trav Avatar

    Do you know if a similar fork exists for Comma 4? I have a 2018 CX-5 and and plan to upgrade the EPS and it seems like going with the newer HW would make the most sense.

    BTW, thanks for sharing your experience. I just learned about Openpilot and was briefly bummed to not have a compatible model until finding your site.

    1. zacharyhamed Avatar

      Same! I would have gotten one much sooner if I had seen it on the compatibility site.

      I’m pretty sure there’s no difference in the setup process between the 3 and 4 — it’s definitely nicer hardware and smaller overall but as far as I’ve read, theres no major differences so the fork itself should work on it as well. I’d check the Mazda channel in the Discord to be sure though.

      1. Trav Avatar

        Update: New EPS was installed from a 2023 Mazda purchased from the seller you linked to. Was a little worried about the difficulty of the installation but between a roof rack, trailer hitch, trailer light wiring and a Carplay install, this was the easiest. Install took about 20 minutes with a socket set using a 4″ extension. I am guessing it would have been a little more tricky using a standard wrench for the bolt in back.

        Now just waiting on the Comma Four. Also reading up on SunnyPilot it looks like you can spoof other cars within the setting menu so don’t even need a separate fork (of the SunnyPilot fork) if you want to use that. Just choose CX-5 2022+ Mazda and it will work correctly with the new EPS.

        1. Nick Avatar

          Hey, do you feel any difference with the LKA after installing the new motor?

          1. zacharyhamed Avatar

            Yeah it’s much, much stronger. Before it was a gentle reminder that you were leaving the lane, but if you didn’t move the wheel to adjust you’d just keep drifting out of the lane. Now the LKA is strong enough to keep you in the lane without touching the wheel on most highway turns. (It depends on how fast you’re going – you can do stronger / wider turns the slower you’re going, since the wheel has to turn less every foot you drive to get you centered in the lane, if that makes sense.)

            So with the new motor, if you’re going normal speeds, normal curve, the wheel will essentially be turning itself. If you hit a curve that’s too strong for it, the unit will gently beep twice to alert you that you need to “help” the wheel (i.e. apply more turning force yourself). If you were to do nothing and ignore it, you’d drift out of the lane but the motor is still applying turning force to try and keep you in, it’s just not applying enough because the curve is too strong.

            So I basically keep my hands on the wheel and pay attention, and when I see a curve coming up that looks too wide or if the unit beeps, I apply a bit of turning force to help it out. But it’s essentially doing the thinking and turning for 99% of cases for me.

        2. zacharyhamed Avatar

          Oh awesome I’ve been thinking of trying Sunnypilot – this is the push I needed! Thanks for following up and glad it worked out 🙌

          1. Travis Avatar

            Comma Four is installed with Sunny Pilot and working great on my 2018 CX-5 GT. For anyone else concerned about the motor install, that was less time consuming than the actual Comma Four install.

            Appreciate your blog, don’t know if I would have looked more into it without seeing your blog when googling. Cheers!

          2. zacharyhamed Avatar

            Love it! Thanks for the kind words and glad it helped 🙌

  • Peter Lin Avatar
    Peter Lin

    hi there, thank you for this amazing write up. I share my comma 4 with my wife’s honda cr-v. Do you know if I absolutely need to install the special fork? I have a 2019 mazda 6, and I plan to do the eps motor swap.

    I am currently on openpilot 0.11. Will it automatically recognize my mazda and turn it into dashcam mode?

    1. zacharyhamed Avatar

      Thanks! And based on Trav’s comment here, I would try Sunnypilot which seems to allow you to change cars from the Settings menu. I haven’t tried it yet but I plan to, it gives more customization overall.

  • Peter Avatar

    Hi Zach,

    Do you or anyone know which harness will go with the 2019 Mazda 6? I purchased the “mazda” harness and it does not match my 2019 Mazda 6.

    Now I’m trying to find out if the CX-5 harness matches my Mazda 6 better, or the CX-9 harness.

    1. zacharyhamed Avatar

      Unfortunately I’m not sure – the closest I could find is this Reddit thread that suggests the CX-5 one might work, but doesn’t sound super definitive. But the Mazda wiki page says the Mazda 6 should work so it should be one of them…

  • Leave a Reply

    Your email address will not be published. Required fields are marked *