One of my preferred subject is Internet of Things. I love it, mainly because it is the link between the Digital and the Physical world, and I started working with Computers (well, a long way ago) in the final year of my Physics studies, where one of the goal of my thesis was to control a laser, a set of sensors and actuators with a computer (Oh, you wouldn’t believe but it was an Intel 80286, and it was enough).

Another reason is that I really see Internet of Things as a paradigm to build solutions with the goal of improving the quality of life. Simply try to image what in the near future could be done: better and smarter cities, buildings, more safety, a better and more comfortable living environment and so on.

Then, as part of my job (I work for Oracle as a Cloud Architect) I have, from time to time, to contribute to demos to show how our Cloud technologies can be used to develop complete solutions.

One great colleague, F. Marini, proposed me to implement in our new Rome offices a nice demo, based on Anki Overdrive. We have demonstrated it many times (“tournee” is still going on) and it is a great way to show something nice to see, cool, that implements a complete, end-to-end solution based on Oracle IoT Cloud Service and a set of (more than 10) Oracle PaaS and SaaS services.

Image for post
Image for post
Image for post
Image for post
Oracle Anki Overdrive demo, in Milan and in Rome

It is a really cool demo and it is working well. But an obvious question very soon arrived: “Have you ever tried to work with a real car?”

The simple answer was: yes it can be done. We have certified solutions from partners that have been integrated with our IoT Cloud Service. We have also a “mini-SaaS” application, called Oracle IoT Fleet Monitoring, that is natively integrated with our IoT CS.

The real question for me, the challenge, was: are you able to do that with a “Maker’s approach”, for a demo?

We love challenges. It is the sweet part of our job. And the challenge became more real when my manager asked me if I wanted to present a “Connected Car demo” in our Cloud Show in Rome.

In the Anki Overdrive demo, data comings from the (small) cars on the tracks are transmitted to SmartPhones, used for the game, using Bluetooth (BL) protocol. BL packet are sniffed using a Raspberry PI equipped with Adafruit protocol sniffers. The RPI acts as a gateway between the physical world of sensors and our IoT CS, producing a real-time stream of messages. Then, we have a Real Time dashboard, alerts, reports developed with our BI Cloud Service and some more functionalities (like a small drone starting every time an accident happens).

What about the solution if we’re using a real car? This is the initial idea:

Image for post
Image for post
Architectural Vision

Nice. Here some more details:

  • RPI is used as a gateway
  • Data are read from vehicle’s on-board unit using the OBDII port; a dongle (the blue one in above picture) is inserted into the port and it communicates with RPI using BL protocol
  • Real-time latitude and longitude are provided from an USB GPS, connected to the RPI
  • Python code is used to read real-time OBDII and GPS data
  • A NodeJS proxy, inside the RPI, sends data to Oracle IoT CS using Oracle IoT JavaScript client library
  • Obviously, the serialization format chosen for messages is JSON
Format of a single message

The OBD2 data model is already available in Oracle IoT CS. This is the list of data defined in the standard model:

Image for post
Image for post
OBD2 Data format

An important data supplied, useful to estimate the fuel consumption, is Mass Air Flow (MAF).

In this picture you see the car position, as gathered from the GPS, shown using Oracle IoT Fleet Monitoring application:

Image for post
Image for post
Car’s position

If you had a set of vehicles, you could see those inside the window, zoom on one of those and follow real-time data coming from OBD2 interface:

Image for post
Image for post
OBD2 data

Most of the code of the project is available on my OBDII GitHub repository. There is also a Wiki with an explanation of several key points. Obviously, as every developer (and probably I’m not) the documentation is not perfect, but I have tried.

Yes, the demo has many others functionalities. Maybe I’ll write another story.

Date a Cesare quel che è di Cesare”: Oracle Anki Overdrive demo was started from our colleagues in Spain. They have provided all the info and the shared infrastructure and now the demo is available in many countries all around Europe. In Italy we started from that point and decided to grow from small to real cars. Enjoy.

Written by

Born in the wonderful city of Naples, but living in Rome. Always curious about new technologies and new things. I work in a big Cloud Company.

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store