From 5c134ab7cbbe0a9e18cdbe4d62530a6510dda43f Mon Sep 17 00:00:00 2001 From: Stanley Huang Date: Mon, 25 Aug 2014 12:35:52 +1000 Subject: Update README --- megalogger/README.md | 81 +++++++++++++++++++++++++++++++++++++++++++++++++++ megalogger/README.txt | 7 ----- 2 files changed, 81 insertions(+), 7 deletions(-) create mode 100644 megalogger/README.md delete mode 100644 megalogger/README.txt diff --git a/megalogger/README.md b/megalogger/README.md new file mode 100644 index 0000000..9053d6a --- /dev/null +++ b/megalogger/README.md @@ -0,0 +1,81 @@ +MegaLogger +========== + +MegaLogger is a sketch developed for Arduino Telematics Kits based on Arduino MEGA or MEGA ADK. The sketch features OBD-II, GPS and motion sensor data access, data logging, data streaming and data display. + +The sketch utilize following custom Arduino libraries: + + OBD-II Library + TinyGPS Library + MPU6050 Library + MultiLCD Library + +Configuration +------------- + +MegaLogger has several configurable options all stay in the config.h file. Major options include: + + OBD_MODEL - defines the model of OBD-II Adapter (UART or I2C) + USE_GPS - defines whether GPS is used + USE_MPU6050 - defines whether + MPU6050 (accelerometer & gyro) is used + ENABLE_DATA_LOG - toggles data logging on microSD card + ENABLE_DATA_OUT - toggles data streaming (to mobile devices via Bluetooth) + STREAM_FORMAT - sets streaming data format (binary or text) + +OBD-II +------ + +The kit connects to the OBD-II port of a motor vehicle via OBD-II Adapter for Arduino. There are two versions of OBD-II Adapter available, UART and I2C. The UART version provides ELM327 command-set via serial UART at baudrate of 38400bps. The I2C version works as an I2C device which is accessed by I2C address for OBD-II data access. It also integrates I2C MEMS sensor which provides accelerometer and gyro. OBD_MODEL define in config.h should be corresponding to the model of the adapter. The OBD-II Adapter should be connected at Serial1 or I2C interface and is access from Arduino by OBD-II library. + +GPS +--- +The kit comes with optional GPS receiver which should be connected at Serial2. The incoming NMEA data stream is parsed by TinyGPS library. + +Motion Sensor +------------- + +Motion sensor (accelerometer & gyro) are embedded in I2C version of OBD-II Adapter. They are accessed via I2C by MPU6050 library. + +Data Logging +------------ + +The kit provides complete data logging for OBD-II, GPS and motion sensor data. The data is stored on microSD card if present. Standard Arduino SD library used for accessing microSD card. + +The data is logged in a simple CSV text format.Each line represents a record with time, data type and data value like this: + + [Time Elapsed],[Data Type],[Data Value] + +Time Elapsed is the time elapsed in milliseconds since previous data record. Data Type is the OBD-II PID which is defined in the OBD-II library (e.g. 0x10C is engine RPM). Here is an example data clip: + + 169,10D,0 + 171,111,12 + 170,143,21 + 165,10B,30 + 175,10C,705 + 169,10D,0 + 170,111,12 + ... + +GPS and motion sensor data are defined as special PID which OBD-II standard does not use and are defined in datalogger.h file. + + #define PID_GPS_LATITUDE 0xA + #define PID_GPS_LONGITUDE 0xB + #define PID_GPS_ALTITUDE 0xC + #define PID_GPS_SPEED 0xD + #define PID_GPS_HEADING 0xE + #define PID_GPS_SAT_COUNT 0xF + #define PID_GPS_TIME 0x10 + #define PID_GPS_DATE 0x11 + #define PID_ACC 0x20 + #define PID_GYRO 0x21 + +Data Streaming +-------------- + +Live data can be streamed to a mobile device via Bluetooth (BLE or 2.1) module which is optionally connected at Serial3. Two stream data formats are available, text or binary based. Text based format is same as data logging format in form of CSV. The binary format is based on a framed data format and is used by streaming data to iOS device with Freematics OBD App installed. + +Data Display +------------ + +The kit provides a 3.2" color TFT LCD display. The live data will be displayed on the screen. The LCD display is driven by MultiLCD library. \ No newline at end of file diff --git a/megalogger/README.txt b/megalogger/README.txt deleted file mode 100644 index 4ea0e2d..0000000 --- a/megalogger/README.txt +++ /dev/null @@ -1,7 +0,0 @@ -This is the source code for the Arduino OBD-II data logger, which displays (on a 320x240 TFT LCD shield) and records (to a SD card) GPS and a set of OBD-II data in the form of text-based CSV format file or more compacted binary file. - -To compile the code with Arduino IDE, please copy all library files from the libraries directory to Arduino's libraries directory. - -To use the project file (megalogger.cbp) to compile and upload, please download CodeBlocks Arduino Edition (http://arduinodev.com/codeblocks). - -The source code is distributed under GPL license. -- cgit v1.2.3