Page 1 of 1

Pre-Buy Question: Creating a buffered datalogger

Posted: Tue Mar 06, 2018 1:24 am
by Nimco
I'm trying to build a system to fit my use case, and I'd like some guidance on the approach.

We regularly do long road trips in our truck (Ford F150) towing a travel trailer. We're also complete data geeks. We currently use an Automatic OBD-II connector to log our trips which works very well for us. However, it only collects very limited information and we'd like to collect substantially more. As a guess, I'd suggest we'd want to collect 20-30 data points from the OBD-II port, as well as GPS data and I'm planning to build an RF sniffer to intercept the TPMS sensors on the travel trailer too.

I'd like to capture each of these data points at an interval of roughly between 1 second (e.g. RPM, vehicle speed, etc) and 1 minute (e.g. tire pressure). For crude simplicity, I've been ballparking it as ~100 bytes per second (assuming 1 byte for the metric ID, and 1 byte for its value). That would put the total dataset at just under 400KB per hour of driving.

My goal is to transmit this data to a remote server (that I control), ideally via HTTPS, that will store this data (likely in InfluxDB) and we'll use for our own geeky stats perusal later - probably using Grafana. Often our road trips take us through places with no cell signal, so storing a buffer of the data on the device is necessary. The way that the Automatic works where the Bluetooth OBD-II connector links to my iPhone to sync the data, but supports buffering of the data locally in case my phone is not in the vehicle, works really well for us. I'm trying to take a similar approach here, unless there are any strong recommendations for a better approach. I'm trying to avoid relying on WiFi or putting a data SIM card in the device.

I was planning on building this using an Arduino and a CAN-BUS shield, but I suspect a Freematics device would be much cleaner.

I have a basic working knowledge of Arduino (I'm comfortable building the TPMS intercept, for example). I am perfectly comfortable designing the API and data storage system on the server-side to accept data in whatever form makes most sense. I haven't done iOS development for years (in case an app on my phone is needed as part of this) but I can probably cobble something together if necessary.

Questions:

# Has someone done anything similar to this that I could copy / learn from?
# Which Freematics device would be most suitable for this task?
# Any advice on how to go about solving this?

Re: Pre-Buy Question: Creating a buffered datalogger

Posted: Sat Mar 17, 2018 6:28 am
by crazywizard
Hi Nimco, I have an almost similar requirement though mine requires transmission of the data stream over GSM with intermittent buffering on the device. I order the Freematics ONE(not ONE+) and with it, came GSM module and a SD card slot.

If you can program Arduino, then you should be able to write to the SD card as needed. You can then upload your data file via either the GSM module or the wifi module at programmable intervals.

Checkout this config file for a sense of available configurations
https://github.com/stanleyhuangyc/Freem ... r/config.h