comma pedal - commaai/openpilot GitHub Wiki

Table of Contents

Explanation

The comma pedal is used to provide stop-and-go capability on openpilot-supported cars that don't currently support it.

The comma pedal is a gas pedal interceptor. It is a device that is inserted between a car's electronic gas pedal and the ECU (Engine Control Unit). It detects the voltage from the gas pedal which represents the pedal's position. It then writes that same voltage back out to the ECU as if the gas pedal had produced it. When openpilot is engaged, openpilot sends the virtual gas position through the comma pedal instead.

openpilot normally controls gas and brake using the ECU's cruise control commands. Since the ECU thinks the commands are coming from a cruise control, it imposes rules for when those signals will be honored. Cars without stop-and-go impose a minimum speed requirement (usually around 25mph) for the ECU to honor gas (acceleration) requests. As a result, openpilot can't be engaged below 25mph and though most ECU's will allow braking down to 0mph, gas cannot be sent once you fall below the limit. This means that openpilot must disengage after coming to a complete stop, or if the car needs to accelerate after dropping below the minimum speed.

History

When comma originally setup Open Pilot on their Acura ILX, they created their own interceptor to give it stop-and-go capability. However, it was considered a hack, therefore no plans for making interceptors were originally published.

comma reportedly believes ECU hacks are a more elegant solution to the stop-and-go problem. However, it is difficult to hack the ECU of every car. This is where an interceptor comes in.

Though comma stated that their original interceptor wasn't in any shape to publish, they surprised us all with the gift of an open-sourced interceptor - the comma pedal!

Much of the code comma used on the Acura still exists in openpilot. This means that the Pedal will be (initially) easiest to use on a Honda/Acura car. comma has tweaked and cleaned up a lot of that original code for us to use.

comma has also stated very emphatically that the comma pedal is NOT SUPPORTED by comma AT ALL. It is not something they are going to focus on and thus it is mostly up to the community to support it.

What it Does

The comma pedal has 4 main systems:

  1. 2 Analog to Digital Convertors
    • This is used to read the voltage from the car's gas pedal into the comma pedal's processor. The gas pedal produces an output Voltage between 0 and 5 Volts.
  2. 2 Digital to Analog Convertors
    • This is used to send voltage back to the car's ECU as if the gas pedal had produced it.
  3. 1 CAN Bus
    • The CAN Bus is the car's communication network. The comma pedal communicates with openpilot using the CAN Bus. It connects to the comma giraffe.
  4. 1 USB
    • This is used to program and monitor the comma pedal, itself.
When openpilot is NOT engaged, the comma pedal reads the voltage from the gas pedal and just passes it along to the ECU.

When openpilot IS engaged, the comma pedal gets gas commands from openpilot and emulates a gas pedal to the ECU.

The comma pedal is constantly sending the physical gas pedal's position to the CAN bus for openpilot to read.

Obtaining a comma pedal

You cannot buy a pre-built comma pedal from comma. Perhaps someone will begin selling them, but for now, you must either build it yourself (not recommended) Or have one fabricated through a service like Macrofab.

More information on HOW to do that will be added to this wiki in the future.

You can find an article written by a community member on how to build your own through MacroFab:

comma pedal: Building with MacroFab by Joshua F. Rountree

The information needed to build one is located in comma's NEO GitHub repo.

Guides for Building / Troubleshooting Your comma pedal

comma pedal: Updating the Firmware over CAN by @jfrux Use this guide to update your comma pedal for compatibility with openpilot v0.5.10+

comma pedal: Building with MacroFab by @jfrux

comma pedal: Wiring the Connectors by @jfrux

comma pedal: Flashing the Firmware by @jfrux

comma pedal: Installing in Your Vehicle by @jfrux

Vehicles Tested / Being Tested

Acura

  • AcuraWatch Plus

Honda

  • Nidec Hondas

Toyota

  • All DSU Toyotas w/o stop and go

Volkswagen

  • Golf MK6

Ford

  • F150, Fusion
⚠️ **GitHub.com Fallback** ⚠️