drive by wire throttle control for bmw e39, which sits in between the throttle pedal and DME, and can recieve throttle commands over canbus
The target vehicle is a 2003 bmw e39 540iT, to be able to brake using the semi-autonomous driving software OPENPILOT.
This has only been tested on one car, and not extensively
Do not expect this to save your life, it's a convenience feature at best
This is specific to the drive-by-wire throttle pedal of a bmw e39 540i. Part number 35426786282
Picture of e39 throttle pedal
I'm not sure what other cars, if any, use this same throttle pedal
NOTE: this is the LATER version of this part, with the internal positon sensor. The earlier versions connect to the position sensor via an external linkage
The throttle pedal is mostly a glorified potentiometer, it recieves a 5v refernce signal from the car, and the output voltage indicates to the DME how depressed the throttle pedal is.
0v corresponds to 0% throttle, and the pedal at its top position. 5v corresponds to 100% throttle, with the pedal completely depressed
On the bmw e39, the bus topology is an eclectic mix of canbus and LIN, but luckily the one true canbus connects to all the important pieces openpilot needs to talk to, including the DME (engine compute module)
This isn't accessible through the obd2 connector (which uses a separate "diagnostic bus" with limitations) as far as i can tell, and requires tapping into the true canbus further upstream.
There's an available branch of the main canbus accessible via (???) , which the throttle control module will split off of. The brake module will also split off this bus in a different location but that's a different repo.
E39 canbus topology map, specifically the HIGH cluster which is more integrated
If you have a KOMBI or LOW cluster, the topology is a little different, the same bus tapping approach will work, but it's worth knowing the differences E39 canbus topology map, specifically the HIGH cluster which is more integrated
- Arduino Nano
- DAC
- ADC
- Canbus module
- canbus splitter
A general diagram of the whole system is below



