05-05-2022 02:34 PM
I’m pretty new to coding in general, as well as extremely new to NI tools/hardware. I have a NI myRIO-1900 that was a gift and I would like to see if it’s possible to use it to make a custom gauge set for my car. My goal is to be able to read real-time data from the cars ECU then process that data and display it through a custom UI that is output through a composite video connection. Is this even remotely possible?
I am also considering using an Arduino to accomplish the same thing but I’m not sure which is more likely to work and more likely to work well.
05-05-2022 04:02 PM
What you are trying to do is possible with a myRIO. But I think you might find it challenging, and the community around a myRIO is smaller than an Arduino. Help might be even harder to find when you are asking about a myRIO with CAN. There are some options. Commercially there was the XCAN which added CAN to a myRIO with a pre made library. I never used it but it seems to be using the MCP2515 which is a common SPI to CAN chip. You'll find these in the Arduino world with shields like this, or this. There are several MCP2515 libraries but they basically are wrappers around the SPI commands to get the raw CAN frames.
What's a raw CAN frame you ask? Well I have a CAN blog series. Part 1 talks about what a frame is and how you might read or write them. If you are sniffing an OBD2 port you'll see all kinds of traffic periodically sent by several ECUs in your car. Understanding what those raw frames mean is a challenge. What you are trying to do is convert frames into engineering units. I don't want to know the data is 0x23 41 15, I want to know my RPM is 3312. This conversation from signals to frames usually requires a database which has the scaling information in it. (Part 5 CAN blog). You can look at the changing values in a log, and you might get lucky. But there is so much data. If your vehicle is common enough there might be a community online that maintains a DBC of the scaling data.
Connecting an LCD to a myRIO is pretty easy and there are lots of documentation. Here is the myRIO project essentials. There are a couple of sections on LCD displays, here is one. If you want something more like a color display, well there isn't much. Different displays are driven differently, and I'm sure a library of tools could be made, but the effort is probably very high. Like I would probably take a few months to develop one, and I consider myself to be pretty good and this whole LabVIEW thing. You could think about publishing your data to a webpage published on the myRIO, then have a device connect to it and view the page. I honestly don't know how hard this is either.
LabVIEW is a really cool tool, and the myRIO is an awesome little piece of hardware. But if you are starting out fresh, it will be very overwhelming. Try to start small. Checkout the online training, or online videos. Deploy simple code to the myRIO, maybe work through some of the essentials guide I mentioned.
Unofficial Forum Rules and Guidelines
Get going with G! - LabVIEW Wiki.
17 Part Blog on Automotive CAN bus. - Hooovahh - LabVIEW Overlord