Seeking Information

On the basis that more information is better than less, Tim Wise sought to get a bit more from his NC MX-5 Touring 4 car

Touring 4 MX-5 racer Tim Wise knows a thing or two about data acquisition in racing – he was involved as it was just coming on board in IndyCar racing in the ’90s, helping to get teams up and running with their data and telemetry systems. Now a software engineering manager at Google, he races for fun. But that doesn’t mean he’s not still seeking to get the most out of his data system, and with some inexpensive mods and a bit of time, he managed to get tire pressures and temperatures, fuel consumption and even heart rate information into the data feed of his AiM system.

“The motivation was there were some parameters that I thought could be really valuable,” he explains. “AiM ships an ECU driver with their system to get the basic parameters out of the data system and I tried to work with them to have them update their ECU by providing some of the CAN [Controller Area Network] frame definition to them. It was a struggle, and I was never able to get their beta ECU file to deliver any data from the parameters we were looking for. In January they released an update to their software where you could derive your own ECU file; but the downside was you had to start from scratch.

“I did some investigation and I found on miata.net there’s a group of people who are reverse engineering the NC CAN network. From there I built a new ECU driver in the software to collect all the data that was being broadcast, but the AiM feature did not allow the querying of data.”

Racing-dedicated systems that can communicate with the AiM dash are available, but they are quite expensive, so another piece to the puzzle came together for Wise’s setup, in this case it was a Raspberry Pi computer, an inexpensive, one-board, open-source computer popular for many do-it-yourself applications. Wise discovered a Raspberry Pi with a CAN adapter would allow him to query the parameters he wanted.

Information from the OEM tire pressure monitoring system was Wise’s primary goal. But he didn’t stop there. He also thought fuel consumption data would be useful, so he didn’t have to do what so many others were doing in pumping out fuel and weighing it to figure out what was needed for a race or qualifying session.

Wise says he did much of the work while laid up after surgery last June – racing in SCCA’s Western Conference, Wise had already qualified for the Runoffs by then. Knowing he wasn’t going to be very mobile for a while, he decided to see if his plan was at all feasible. The Santa Cruz, Calif., resident tested the system at a regional race at Mazda Raceway Laguna Seca in September, and it worked – and not only to get the information he sought in the beginning.

“This was total scope creep, because I was laid up on the couch and couldn’t do anything else,” he says. “The Raspberry Pi natively has a Bluetooth interface, so I was able to program the Bluetooth interface to gather data from a Polar heart rate strap. That now gets pushed to the CAN network and gets stored and logged in the AiM system. Then I found a cellular board that plugs on top of the Raspberry Pi, put a sim card in it, and wrote some software that sends engine vitals to the pits via SMS text. So they can get the oil temp, the water temp, oil pressure…they can get my heart rate data and the tire pressures, via text.”

Wise says a lot of the credit goes to the miata.net community that reverse-engineered the NC network to begin with. Wise has returned that favor by giving back any channels he finds to the community, such as brake pressure, steering and yaw rate. 

“It’s been a fun project, and it was one of those, ‘Could this actually be possible and valuable?’ – and it kind of consumed me in all my non-working and non-sleeping hours for three months,” Wise says. “But in the end I learned a lot. I had never done any CAN networking, never done any socket programming, never done any Bluetooth programming, so I figured out how all these things work on the Raspberry Pi. It was a great learning experience.”