Menu

Tree [62ca1b] master /
 History

HTTPS access


File Date Author Commit
 Dashboards 2015-03-09 Jacob Jacob [6a705f] Added error handling for CSV log files that fai...
 Gauges 2015-03-09 Jacob Jacob [1e5534] Corrected low and high values for gauge
 images 2015-03-14 Jacob Jacob [e0af2f] Added Logo's to repository (logos created by Ja...
 .gitignore 2014-05-08 Suriyan Laohaprapanon Suriyan Laohaprapanon [dd5f34] Initial commit
 AUTHORS 2015-03-14 Jacob Jacob [f0497a] Updated readme for GitHub markdown flavour and ...
 FCLoggerFD3S.xls 2015-03-15 Jacob Jacob [ed1239] Implemented equations in config file for auxila...
 FCLoggerNISSAN.xls 2015-03-15 Jacob Jacob [ed1239] Implemented equations in config file for auxila...
 LICENSE 2014-05-17 Suriyan Suriyan [49f30d] Update Copyright line and author name
 Makefile.am 2014-05-08 Suriyan Laohaprapanon Suriyan Laohaprapanon [0ef2d1] More clean up
 README.md 2015-03-15 Jacob Jacob [d13dde] Updated README.md
 compile.sh 2015-03-09 Jacob Jacob [3145cf] Added script to compile the source using 'make'...
 dashboard.c 2015-03-08 Jacob Jacob [e4862d] Fixed many compile issues and run-time errors.
 helpers.c 2014-05-20 Markus.Ippy1981 Markus.Ippy1981 [f36c03] Updated copyright with original author
 helpers.h 2014-05-20 Markus.Ippy1981 Markus.Ippy1981 [c92637] forgot name line
 main.c 2015-03-15 Jacob Jacob [ed1239] Implemented equations in config file for auxila...
 package.sh 2014-05-17 Suriyan Suriyan [49f30d] Update Copyright line and author name
 powerfc.c 2015-03-17 Jacob Jacob [62ca1b] Improved coding and replaced constant with appr...
 powerfc.h 2015-03-15 Jacob Jacob [ed1239] Implemented equations in config file for auxila...
 raspexi.cfg 2015-03-15 Jacob Jacob [cb7b91] Updated to match example in GitHub repo issue #7
 run.sh 2014-05-17 Suriyan Suriyan [49f30d] Update Copyright line and author name

Read Me

Raspexi

A'PEXi Power FC Interface for Raspberry Pi

Summary

Digital Gauge Display for A'PEXi Power FC which runs on Raspberry Pi. Raspexi is capable of communicating with the Power FC to retrieve diagnostic information and display the information in the form of aesthetic guages and dashboards. Raspexi has been tested for Mazda Power FC's and is currently in beta testing for Nissan, Subaru and Toyota Power FC's.

The Gauges and Dashboards used in this software are adapted from MegaTunix by David J. Andruczyk

The A'PEXi Serial interface is adapted from FCLogger by Hitoshi Kashima

Installation

Pre-Requisite

Rasberry Pi with Raspbian OS. Tested versions:

* 2013-05-25-wheezy-raspbian
* 2013-09-25-wheezy-raspbian
* 2014-01-07-wheezy-raspbian

Install

Extract the archive raspexi-yyyymmdd.tar.gz to /home/pi:

$ cd /home/pi
$ tar xvzf raspexi-yyyymmdd.tar.gz

Configuration

There are a few configurable settings in raspexi.cfg:

[default]
port = /dev/ttyUSB0
baud = 57600,8,n,1
interval = 35
model = Mazda
dash1 = Analogue_Dash_1280_720.xml
dash2 = Commander_1280_720.xml
dash3 = Digital_Dash_1280_720.xml
dash4 = Race_1280_720.xml
analog_eq1 = 1.4 * (AUX1 - AUX2) + 9.0
analog_eq2 = 0.5*AUX3+2.5
csvfile = /home/pi/raspexi/log/raspexi.csv
  • port ==> Serial port device name

  • baud ==> Serial port baud rate

  • interval ==> Data refresh interval

  • model ==> Mazda, Nissan, Subaru, Toyota

  • dash1, dash2, dash3, dash4 ==> Dashboard XML file

  • analog_eq1, analog_eq2, analog_eq3, analog_eq4 ==> Analog equations for auxiliary input relations. (See section 'Analog Auxiliary Input Relationship Equations' for more details)

  • csvfile ==> CSV log output file

Note: If the 'csvfile' location is set to the /tmp directory then it will be removed by
the system on (re)start

Note: The 'model' setting is in testing and has only been confirmed for Mazda (March/2015)

How To Run

You can run this release with the following command:

$ cd /home/pi/raspexi
$ ./run.sh

Gauge Datasources

The following Descriptions are for information which the Power FC will return for a given model. The Datasource Name can be used in the dashboard XML files to define what information a particular gauge will display:

Note: The current version is in testing for support for vehicles other than Mazda (March/2015)

Description Datasource Name Mazda Nissan Subaru Toyota
Engine Speed (rpm) RPM ✓* ✓*
Absolute Intake Pressure (Kg/cm2) Intakepress ✓*
Pressure Sensor Voltage (mv) PressureV ✓*
Engine Load (N) EngLoad ✓* ✓*
Mass Flow Sensor #1 (mv) MAF1V ✓* ✓*
Mass Flow Sensor #2 (mv) MAF2V ✓* ✓*
Throttle Sensor Voltage (mv) ThrottleV ✓* ✓* ✓*
Throttle Sensor #2 Voltage(mv) ThrottleV_2 ✓*
Primary Injector Pulse Width (mSec) Primaryinp ✓* ✓* ✓*
Fuel correction Fuelc ✓* ✓* ✓*
Leading Ignition Angle (deg) Leadingign ✓* ✓* ✓*
Trailing Ignition Angle (deg) Trailingign ✓* ✓* ✓*
Fuel Temperature (deg.C) Fueltemp
Metering Oil Pump Duty (%) Moilp
Boost Duty (TP.%) Boosttp
Boost Duty (Wg,%) Boostwg
Boost Pressure (PSI) BoostPres ✓* ✓* ✓*
Boost Duty (%) BoostDuty ✓* ✓* ✓*
Water Temperature (deg. C) Watertemp ✓* ✓* ✓*
Intake Air Temperature (deg C) Intaketemp ✓* ✓* ✓*
Knocking Level Knock ✓* ✓* ✓*
Battery Voltage (V) BatteryV ✓* ✓* ✓*
Vehicle Speed (Km/h) Speed ✓* ✓* ✓*
ISCV duty (%) Iscvduty ✓*
Mass Air Flow sensor activity ratio (%) MAFactivity ✓* ✓*
O2 Sensor Voltage (mv) O2volt ✓* ✓* ✓*
O2 Sensor #2 Voltage (mV) O2volt_2 ✓* ✓*
Secondary Injector Pulse Width (mSec) Secinjpulse
Suction In Air Temperature (mV) SuctionAirTemp ✓*
Analog Auxiliary Input #1 AUX1
Analog Auxiliary Input #2 AUX2
Analog Auxiliary Input #3 AUX3
Analog Auxiliary Input #4 AUX4
Analog Auxiliary Input #5 AUX5
Analog Auxiliary Input #6 AUX6
Analog Auxiliary Input #7 AUX7
Analog Auxiliary Input #8 AUX8
Result of Analog Equation #1 Analog1
Result of Analog Equation #2 Analog2
Result of Analog Equation #3 Analog3
Result of Analog Equation #4 Analog4
Coming soon ...
Instantaneous vehicle power (kW) Power
Vehicle Acceleration (100km/h/s) Accel
Force exerted in Newtons (N) ForceN
Force exerted in G-force (G) ForceG
* Implemented but untested

Analog Auxiliary Input Relationship Equations

It may not be convenient to view AUX1, AUX2, etc, in a gauge as is. Therefore we have implemented a simple linear equation parser for the raspexi.cfg file. The linear equations can be represented in the form 'y=m*x+b'. Here, the result 'y' is stored in either Analog1, Analog2, Analog3 or Analog4 depending on the definition in raspexi.cfg, 'm' is a multiplier, 'x' is an auxiliary input (AUX1, AUX2, etc) and 'b' is an adder.

Two examples are as follows:

  • For 'y' = Analog1, 'm' = 1.4, 'x' = AUX1 - AUX2 and 'b' = 9.0. The resulting line in raspexi.cfg could be analog_eq1 = 1.4 * (AUX1 - AUX2) + 9.0.

  • For 'y' = Analog2, 'm' = 0.5, 'x' = AUX3 and 'b' = 2.5. The resulting line in raspexi.cfg could be analog_eq2 = 0.5*AUX3+2.5.

Note: The multiplication, subtraction and addition cannot be changed and spaces in the equation are ignored.

Custom Gauges and Dashboards

You can create your very own custom gauges and dashboards using MegaTunix which you can download compiled here or the source here.

To create your own Gauges you can use the MtxGaugeDesigner.

To create your own Dashboards (which can include custom gauges) you can use the MtxDashDesigner.

Once you have saved the custom Gauges and Dashboards in the XML file format you will need to make sure that the XML field element <datasource> contains the appropriate 'Datasource Name' from the table above for each <gauge> in the dashboard XML file.

Development

  1. Download or clone the original MegaTunix source code using:
    $ git clone https://github.com/djandruczyk/MegaTunix
  2. Set up all dependencies and build MegaTunix
    (See README.md in MegaTunix for more detail)

  3. Download or clone Raspexi source code from :-

$ cd MegaTunix $ git clone https://github.com/MarkusIppy/raspexi-viewer-linux raspexi

  1. Add raspexi/Makefile to MegaTunix AutoConf configuration file (configure.ac)
    or apply the following patch.

diff --git a/configure.ac b/configure.ac index e868b1b..9bec24f 100644 --- a/configure.ac +++ b/configure.ac @@ -311,6 +311,7 @@ MegaTunix32_dbg.iss MegaTunix64_dbg.iss Doxyfile WIN_NOTES.txt +raspexi/Makefile ]) AC_OUTPUT

  1. Execute autogen.sh to generate build configuration.

$ ./autogen.sh CPPFLAGS="-UDATA_DIR -DDATA_DIR=\\\"./\\\""

Command line option CPPFLAGS="-UDATA_DIR -DDATA_DIR=\\\"./\\\""
is need to override data directory (ex. /Dashboards, /Gauges, ...)
of MegaTunix to working directory.

  1. Build Raspexi

$ cd raspexi $ ./compile.sh

  1. To build a binary package for deployment:
    $ ./package.sh
    The binary package raspexi-yyyymmdd.tar.gz will then be created.

History

Revision Date (d/m/y) Notes
R6 15/03/2015
  • Added support for Nissan, Subaru and Toyota (by JacobD10)
  • Added CSV log file error handling (by JacobD10)
  • Added XML dashboard file incorrect 'datasource' error handling (by JacobD10)
  • Added linear equations to define the auxiliary relationships from the config file (by JacobD10)
R5 07/07/2014
  • Implementation of auxiliary inputs AUX1-AUX8 (by SonicRaT)
R4 07/05/2014
  • Revising and refactoring for public release (Google Code)
R3 18/04/2014
  • Implement multiple dash board (up to 4), can be switch by key 1/2/3/4
  • Full screen on start
  • Data save to CSV file
R2 05/04/2014
  • Implement PowerFC RS-232 protocol (based on fclogger.py)
  • Add configuration file (raspexi.cfg)
  • Fix issue Gauges data location
R1 31/03/2014
  • Initial release
Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.