# Build thread for main-display-in-car CANbus display project "Onyx M2"



## Onyx (Oct 8, 2019)

*Build log index*

Hey everyone,

As you may know from the "Data Access" thread, I've been working on a CAN bus display system for the Tesla Model 3 for a while now. The original idea was: "could one build a system that allows web apps to run directly on the car's main display that would levage the wealth of information found on the CAN bus(es)?". The answer turned out to be, yes! I posted a couple of videos on a signal browser and a novelty "Back to the Future" display. The code for all of this is public, and available from https://github.com/onyx-m2. Of course, there are quite a few moving parts to this, and I haven't done a great job of documenting how to get this up and running for yourself. I do know that the setup has been replicated successfully though, with relatively little direct help from me - so it's possible!

I've recently decided to embarque on a journey to expand the use of this system to an instrument cluster mounted behind the steering wheel. For whatever reason, I felt the urge to document the development of this thing more thoroughly and share it in case there's interest from the community. So I've started a build log, which is available to the public at https://www.notion.so/Public-Build-Log-Onyx-M2-Project-7db0d597cfff43deb5ac00117d942e6b. It's authored in Notion, my tool of choice for wiki-like content. I've tried to see if I could import the log entries as thread posts, but the formatting gets lost, so I somewhat gave up. If anyone knows a good and easy way to import markdown content into forum posts, please let me know (I tried a bunch of markdown to bbcode converters, but they all butchered my posts).

So what I propose is to post updates here, pointing to the Notion log entries, and hopefully have a conversation about the build in this thread. If this turns into me talking into the void, that's fine too. 

A quick note on the hardware to tap into the signals: I use a Macchina M2 (thus the name of the project).










This is hardwired into both the Vehicle behind the center console, and Chassis bus under the passenger seat, and transmits data over Bluetooth and Wifi. It uses my phone as a communication relay to a cloud hosted server, which allows the app running on the main screen in the car's web browser to pull in the data . I suspect there will be questions on this. Please ask away. I'll eventually post a better overview of how all this works in the build log.


----------



## Onyx (Oct 8, 2019)

*Past Videos*
Warning: these videos are very poorly produced, long winded, and generally embarrassing - sorry about that! I may or may try to make better ones in the future

*Very first proof of concept, showing dumping of CAN bus on the car's main display*






*Showing off the very first signal browser *(I was calling it OTA at the time, as in "over the air", as apposed to running wires to an external diaplay)






*Messing with a novelty "back to the future" themed display*


----------



## Onyx (Oct 8, 2019)

*The proof of concept steering wheel instrument cluster*


----------



## Onyx (Oct 8, 2019)

*Improving and powering the mount!*




  






This one doesn't end well, sadly. 
All part of the process though, can't all be wins.


----------



## Onyx (Oct 8, 2019)

Another iteration of the mount, and I go for a drive with the instrument cluster and figure some more stuff out.




  






I also got a nice hike in.


----------



## JWardell (May 9, 2016)

The integrated Qi charging is really over the top, very nice!


----------



## Needsdecaf (Dec 27, 2018)

This is so awesome.


----------



## Onyx (Oct 8, 2019)

No update this weekend, as I ran into multiple issues, and didn't actually get anything new completed. In a nutshell, the charger failed and I had to order a new one, and my M2 started acting unreliably and I wasted hours chasing the cause (turns out it was simply that the data logging sd card was full).

Another update soon-ish.


----------



## Onyx (Oct 8, 2019)

It's starting to work.... 
Write up tomorrow, probably.


----------



## Needsdecaf (Dec 27, 2018)

It's tomorrow. Inquiring minds want to know! 

Did you get the bluetooth direct working? 

This is seriously awesome, did I mention that?


----------



## Onyx (Oct 8, 2019)

Ah ah, yes, it's tomorrow, but I haven't done the write up yet.

I'm still working on the BT direct thing - it's going to work but the Web <> Android direct communication is a more finicky than I thought it would be.

And thanks!


----------



## Onyx (Oct 8, 2019)

*Installing the powered mount and automating the mobile app*




  






Re-reading this _lengthy _entry, I feel like I may have gone overboard on the details - I'm sorry. 
There are a whole bunch of pictures at the end of the post if you just want to see what it looks like in the car (from a bunch of different angles).

I'm not sure if this week was way more effort than previous ones, or it was just more setbacks... but regardless, I'm super happy with the result, and can't wait to work on the instrument cluster itself a little more now.

Also, I need to make a video soon, because this looks way more impressive when you see it in action!


----------



## Onyx (Oct 8, 2019)

@Needsdecaf The direct (bluetooth) interface is running!  I still need to go for a drive as a real test, but the car was charging so the only thing I could test easily (for latency) was the brake light and the turn indicators, all of which are instantaneous (no perceivable lag) and in the case of the turn indicators, perfectly in sync with the main display.

I ended up building a transport layer into the software be able to seamlessly switch between native vs. web socket. It works really well, and I'm super happy with how little code I had to rework for such a huge change. I got good at debugging the web view on the device too, all from vscode - so working on the native interface is almost as easy as running it in a browser. It helps that the M2's bluetooth signal reaches into my office when the car is parked in the garage. The range is actually surprisingly long for a sketchy little ESP32 with only the trace antenna. I'm probably getting lower transfer rates because of the distances, but it's 100% fine for development.


----------



## Onyx (Oct 8, 2019)

Probably won't have an logbook update this weekend.

I did go for a short road trip yesterday though, and the instrument cluster (in direct mode) performed perfectly. Each way, I got to destination with my phone at 100% charge (cool!), and there wasn't a single loss of signal, or any issue with the mount, during the ~2 hours of driving.

I've been working on the look of the instruments, here is what "look v2" looked like. "Looked" like, because v3 is already being designed. In v2, I kept the same basic layout, but went for a thinner font and thinner elements in general. It was a huge improvement to the looks, and frankly made the main car screen look faded, dated, and overweight!










The new cluster will move away from the BMW inspired dual-dial design, to a larger, center dial that incorporates more dynamic elements. Working out the trig now, because it has lots of curves.


----------



## Gtimart (Dec 22, 2019)

I'm digging it, a lot! I wonder where you'll land. I also wonder if you'll be building these modules and offering them once you're done?


----------



## Needsdecaf (Dec 27, 2018)

This is awesome, nice job!

So are you using a similar coding / interface to the Scan My Tesla app?


----------



## Onyx (Oct 8, 2019)

It's been a while since I posted an update. I did use my phone instrument cluster all winter long, but didn't really improve it during that time. I do love it, and frankly can't imagine not having it anymore. Tesla had me convinced that it was okay for cars to not have a cluster behind the steering wheel, but nope, it's better with one. Much better!

Obviously the ability to adapt it to whatever I want when I want it is also super awesome, and somewhat of a dream come true for me. I'll start posting updates again soon, as I've gotten back into the project over last few weeks. I already have a slew of improvements, and a brand new UI that looks really nice (in my opinion). Here's a sneak peek:










I'm also going to be breaking out the CAD again soon, as I've ordered electronic components to make a more traditional version of this thing that'll be permanently mounted in the car. As convenient as I've made the system, with auto-launch-on-insertion-into-the-holder, I still need to insert and remove my phone - which is not great for very short rides, or running lots of short errands.


----------

