Smart cloud-based vehicle OBD-II diagnostics logging and analysis using Azure IoTHub, Stream Analytics, and Machine Learning.
Cloud-based services are going to be a central part of IoT (Internet of Things) development. This project explores a potential real-world application, automobile engine data collection and analysis. All vehicles include an OBD-II diagnostics port that provides access to a wealth of internal data. This project collects some of that data, sends it to the Microsoft Azure IoT Hub, analyzes it with Azure Stream Analytics and Machine Learning, and stores the results in Azure Blob storage.
One such analysis is early detection of maintenance issues; in this prototype system we monitor engine coolant temperature and look for abnormalities. The machine learning algorithm learns the normal temperature behavior and then classifies out-of-normal conditions. For richer and more accurate modeling we include month information, allowing the system to learn seasonal changes in behavior.
This project uses the Arduino MKR1000 board with an ARM processor and integrated WiFi. It was developed as part of the “World’s Largest Arduino Maker Challenge” sponsored by Arduino.cc and Microsoft. It is called Car Smart as a reference to the use of Machine Learning for data analysis.
The device is a “black box” that is installed in the vehicle with no human interface. You can see in the image above the ODB-II interface board on top and the Arduino underneath. Because the focus of this project is on moving intelligence to the cloud, the in-vehicle device is a simple data logger and does no data analysis of its own.
A Microsoft Azure Stream Analytics job takes these incoming messages, processes them with a custom Azure Machine Learning Web Service, and writes the results to a CSV file in Azure Blob Storage. Here the Stream Analytics dashboard shows a burst of activity as the events come in.
The result for now is a simple CSV file with the recorded temperatures and the Machine Learning classification as LOW, NORMAL or HIGH. Note the change to classification of HIGH when the temperature goes higher than expected based on the training data.
The machine learning algorithm shown below is a multiples decision forest. A spreadsheet of training data was uploaded to train the model. The training data contains several hundred samples along with a LOW/NORMAL/HIGH classification. After training, the trained model can deployed as a web service and used to classify new samples of the data.
Read more: CarSmart