The World Maker Faire was just over. The event impressed me a lot in many aspects. Here are some pictures I took during the event, in which you can also find my exhibition table. Image may be NSFW. Clik here to view.
Freematics OBD-II Adapter is the world’s first OBD-II device integrating an Arduino connected to peripherals of accelerometer, gyro, temperature sensor, Bluetooth/BLE and microSD socket. The adapter can optionally lead out a cable connecting with and powering an external device via either SPI, I2C or serial UART.
The onboard main controller is an AVR ATMega644PA which can be programmed in the standard Arduino way. The vehicle OBD-II data as well as all the peripherals connected to the MCU can be easily accessed with Arduino libraries.
What can it really do? It can do a lot with enough imagination, as it is fully programmable and can work standalone. The most straight-forward applications include:
Smart vehicle data logger with smartphone connectivity
Data source or controller of another device which wants to interact with vehicle data
Programming – Hardware
The onboard ATMega644PA is programmed via ICSP, either by USBASP or Arduino as ISP.
* Please be cautious that with some cheap USBASPs with no enough impulse filtering, it is highly recommended that the adapter is powered from the OBD-II port (12V input) instead of USBASP’s VCC pin in order to prevent the board from being damaged by impulse current on the moment of plugging the USBASP to computer.
To program with Arduino, connect the adapter’s SPI pins to Arduino’s ICSP pins and the reset pin to Arduino’s D10. Following is the ICSP connector pinout.
To use Arduino IDE as programming environment, please download the addon package and extract to Arduino IDE’s directory. After doing that, additonal board type of Freematics OBD will appear in Arduino IDE’s Tools->Board menu.
You can then use Arduino IDE to develop program for the Freematics OBD-II adapter. Following libraries can be used for access the onboard resources of the adaper:
Today I was very happy to visit Sydney’s hackerspace OzBerryPi at Chippendale EngineRoom and presented my project Freematics there. The awesomeness of hackerspace is wherever you go around the world, you can immediately find a group of people sharing the same interests.
Freematics OBD-II Emulator is a vehicle data bus emulation device. It is a 12x8x3cm box equipped with a 16-pin OBD-II port, 9 dials, 3 switches, a USB debug port, a 12V power input and a power button, emulating a car’s data bus with emulated data adjustable by physical dials. The OBD-II port is physically identical to the one of a real car. OBD-II complaint device can be plugged into the port and work as if in real cars. The emulator is practically useful and cost effective in OBD-II application development by saving the time and fuel for debugging and testing programs with real cars.
Following protocols are simulated:
CAN 500Kbps/11bit
CAN 250Kbps/11bit
CAN 500Kbps/29bit
CAN 250Kbps/29bit
ISO9141-2
KWP2000 Fast
KWP2000 5Kbps
By default following OBD-II PIDs can be controlled through the 9 dials:
Engine RPM
Engine coolant temperature
Vehicle speed
MAF air flow rate
Engine load
Fuel level
Fuel pressure
Intake MAP pressure
Throttle position
The dial controlled PIDs can be customized. If customization is needed, please provide the list of PIDs (in HEX, e.g. 010C, 010D…) or contact before placing an order.
Recently since I added performance box features to the OBD logger sketch the size of compiled code keeps exceeding the limit of Arduino Nano or UNO’s program space. Today I tuned up the code to make it fit the 30KB program space and also fixed the compiling issue with Arduino IDE 1.5.x.
MultiLCD library now supports ILI9341 based TFT LCD (SPI interface). The library also compiles in Arduino IDE 1.5.x and works with Arduino DUE in addition to all 8-bit counterparts.
Image may be NSFW. Clik here to view.
With the new library, I just got a SPI TFT LCD module working with Arduino DUE perfectly.
CodeBlocks Arduino Edition and Arduino Builder have just been both updated today. Support for Freematics OBD-II Adapter was added in both software. Several bugs were fixed for Arduino Builder.
CodeBlocks Arduino Edition is ideal for productive Arduino project development. It comes with all latest libraries supporting hardware distributed on this website, including OBD-II products, OLED/LCD products etc. The latest version has built-in support for Freematics OBD-II Adapter.
Data2KML is a command line program which takes in data log files generated by the MEGA logger, an Arduino sketch developed for Arduino OBD-II Data Logger Kit, and outputs KML file for viewing the logged data with Google Earth. A data log file is originally recorded in CSV format by MEGA logger, in which, each line represents a record with time, data type and data value(s) like this:
[Time Elapsed],[Data Type],[Data Value]
Time Elapsed is the time elapsed in milliseconds since previous data record. Data type is based on the HEX number of standard OBD-II PIDs (e.g. 0x10C is engine RPM), as well as some extensions for GPS and sensor data (refer to the MEGA Logger source code). Here is an example data clip:
Freematics Data Charting Service is set up to provide users of Arduino OBD-II data logger kits an easier way to review logged data. Simply by choosing and uploading a log file (with CSV extension), charts for OBD-II data and a GPS track will be illustrated on the spot in web browser. The service is for beta testing now and is being improved actively.
The rendering of GPS track in web browser requires Google Earth. Please install Google Earth if you don’t have it.
Once you see the map, hold Shift or Ctrl key and then scroll with mouse to adjust the view point angle. This is something Google Maps don’t provide.
The yellow marks in the map are the brake points in the track.
The URL of chart/map page is static so you can share it with others
If you have got your log files ready, head up for Freematics Data Charting Service now. Even if you don’t have anything, you can still view some sample data there.
Image may be NSFW. Clik here to view.The prototype of a new TFT LCD shield being developed is working on my desk now. On this shield, XH-2.5 connector sockets for I2C and UART are provided, as well as microSD socket which is important for us to do data logging. The TFT LCD used is interfaced with Arduino via SPI, which makes the display draw faster and consume much fewer pins than common parallel interface. This shield will be part of a new lower cost data logger kit based on DFRobot Bluno, an Arduino UNO with onboard BLE (Bluetooth Low Enery).
Finally! Freematics OBD App is available in Apple App Store. Apple requests a review of hardware when App communicates with one through wireless data communication (BLE in our case). So we shipped a sample hardware of our Freematics OBD-II Adapter to No. 1 Infinite Loop and the reviewing process didn’t even take longer than the shipping and we were excited to be able to find the App in App Store.
Currently the App only has very limited functions and is basically for verifying the system design, especially the data communication between iOS and our telematics products based on open-source hardware. But we are really eager to make it really useful and interesting. As is already scheduled, a Kickstarter campaign will be started after new year for raising the funds for pushing forward the App development.
The definition of commonly use PIDs in OBD library has been updated. That means more vehicle data can be accessed easily with Arduino now. Following is a brief description of defined PIDs in current library, categorized in engine, intake/exhaust, speed/time, driver and electric systems.
Engine
PID_RPM – Engine RPM (rpm)
PID_ENGINE_LOAD – Calculated engine load (%)
PID_COOLANT_TEMP – Engine coolant temperature (°C)
The new Telematics Hardware Store is open from the new year. Based on OpenCart, the new store provides better user experience, comprehensive order tracking and more accurate shipping fee calculation which actually saves you shipping cost.
Just spent some time on Freematics Charting. Besides tweaking up the performance a little bit, a new feature was added. By selecting two points on the driving track in the map window, the data chart on the left will automatically zoom into that range. By double clicking a points on the track, the chart will zoom into that point of time and 10 seconds before and after that point. Now the chart and the track on the map can be kind of synchronized.
MultiLCD library now supports ILI9341 based TFT LCD (SPI interface). The library compiles in Arduino IDE 1.5.x and works with Arduino DUE in addition to all 8-bit Arduino.
Image may be NSFW. Clik here to view.
With the new library, I just got a SPI TFT LCD module working with Arduino DUE perfectly.
Nordic nRF51822 is a SoC chip integrating ARM Cortex M0 and Bluetooth Low Energy. Its advantage over TI CC2540, which is used in current Freematics OBD-II Adapter and OBD-II data logger kits for BLE communication, is that it has a 32-bit ARM core with more sufficient processing power comparing to CC2540′s 8-bit 8051 core, while the cost is only a little higher. That means, more work which previously requires additional chip can be done in that SoC chip. With bold imagination, there is possibility to port Arduino to this chip so that it can be programmed like Arduino or Maple.
I just got a nRF51822 dev board on hand and will start evaluation shortly.
The screen is driven by SPI with fast rendering speed. For software, it is supported by MultiLCD library which provides easy API for displaying characters/digits of various size and drawing bitmaps.