If you’re the scientifically and technologically curious type and don’t know about Ben Krasnow’s Applied Science YouTube channel, you are in for a real treat. The brilliant, ever-patient, always methodical Ben experiments with chemistry, physics, electronics, and electromechanical systems, always with real-world applications in mind. He has built a basement electron microscope, figured out how a backscatter x-ray works, made his own Aerogel, and played around with “bullet time” photography.
In this episode of Applied Science, Ben trains his o-scope on the CAN (Control Area Network) bus of a Tesla Model S to see what sorts of information he can glean from the data there. He shows you how to access the CAN bus connector, explains what some of the data in the data logs means, and shows real-time data returns while pressing the accelerator, etc. At the end of the video, he also shows you how he managed to get real-time CAN bus data to display on the car’s web browser. Tesla doesn’t really want you monkeying with and displaying this real-time data to the in-car monitor, so there’s no easy, wired way in. Ben does a clever workaround involving a Raspberry Pi, a CAN bus shield, node.js, a tethered cell phone, and wirelessly feeding the data to the car computer’s web browser like it was any other web content.
I don’t really know that much about CAN bus hacking (and don’t even currently own a car), but I found this video really fascinating and I learned a lot. On the video’s YouTube page, Ben also posts a number of useful resources for CAN bus hacking, for Teslas and for on any car’s CAN:
- Complete Raspberry Pi with CAN bus shield and 12V buck converter
- Diagnostic connector pinout (scroll through the images)
- Tesla diagnostic connector
- RPi CAN bus tutorial
- Get node.js installed on the RPi
- I used socket.io, which is a module that installs into node.js
- Tesla CAN bus reverse engineering
- I will post the node.js code on my blog
Hey, and how about that $14,000 Tektronix multi-domain oscilloscope he uses? In the immortal words of The Joker, “Where does he get those wonderful toys?”