Wednesday, October 14, 2020

Racecapture OBD/CAN Config file creator for NC Miata


CAN
Parameter Name Description Mode Mode PID Min/Max/P
ECTEngine Coolant Temp57610/9999/2
RPMEngine RPM51300/10000/0
VSSVehicle Speed Sensor51340/9999/2
TPTP51360/100/0
ABSFlag53370/9999/2
LOAD_CALCLoad Calculated57600/100/0
SPARKADVIgnition Timing Advance5762-180/180/0

OBD
Parameter Name Description Mode Mode PID Min/Max/P
PIDS_01_T0_20Supported PIDs 01 - 320x010x000/9999/2
MS_DTC_CLEAREDMonitor Status: DTCs Cleared0x010x010/9999/2
FUELSYSFuel System Status0x010x030/9999/2
LOAD_CALCLoad Calculated0x010x040/100/0
ECTEngine Coolant Temp0x010x050/9999/2
STFTShort Term Fuel Trim0x010x060/100/0
LTFTLong Term Fuel Trim0x010x070/100/0
MAPManifold Absolute Pressure0x010x0B0/9999/2
RPMEngine RPM0x010x0C0/10000/0
VSSVehicle Speed Sensor0x010x0D0/9999/2
SPARKADVIgnition Timing Advance0x010x0E-180/180/0
IATIntake Air Temperature0x010x0F0/9999/2
MAFMass Air-Flow0x010x100/9999/2
TP1Throttle Position 1 Absolute0x010x110/100/0
O2S_PRESENT# of O2 Sensors Present0x010x130/9999/2
O2S12_VRear O2 Sensor Voltage0x010x150/15/1
OBD_STANDARDSList Complied Standards0x010x1C0/9999/2
RUNTIMERuntime since engine start0x010x1F0/9999/2
PIDS_21_to_40Supported PIDs 33 - 640x010x200/9999/2
MIL_DISTDistance w/ MIL on0x010x210/9999/2
EGRP_DSDEGR Purge Desired0x010x2C0/100/0
EVAPCPEVAP Canister Purge0x010x2E0/100/0
FLIFuel Level Indicator0x010x2F0/100/0
DTC_CLR_WARMUPSwarmups since DTCs cleared0x010x300/9999/2
DTC_CLR_DISTDistance w/ DTCs Cleared0x010x310/9999/2
BAROBarometric Pressure0x010x330/9999/2
EQ_RATIO_ACTAFR(λ) Actual0x010x340/2/2
EQ_RATIO_ACT_mAAFR (λ) mA0x010x340/9999/2
CAT11_DSDCatalyst Temperature Desired0x010x3C0/9999/2
PIDS_41_to_60Supported PIDs 64 - 960x010x400/9999/2
MS_DRIVE_CYCLEMonitor Status: Drive Cycle0x010x410/9999/2
VPWRControl Module Voltage0x010x420/15/1
LOADLoad Absolute0x010x430/100/0
EQ_RATIO_DSDLambda Commanded0x010x440/2/2
TP_RELThrottle Position Relative0x010x450/100/0
AATAmbient Air Temperature0x010x460/9999/2
TP2Throttle Position 2 Absolute0x010x470/100/0
APP1APP Sensor 10x010x490/100/0
APP2APP Sensor 20x010x4A0/100/0
ETC_DSDThrottle Position Desired (duty)0x010x4C0/100/0
DTC_CNT# of DTCs0x220x2000/9999/2
DTC_CNTD# of DTCs (on demand)0x220x2020/9999/2
MAP_VManifold Absolute Pressure Voltage0x220x9000/15/1
APP1_VAPP Sensor 1 Voltage0x220x9140/15/1
APP2_VAPP Sensor 2 Voltage0x220x9150/15/1
TP1_VThrottle Position 1 Voltage0x220x9170/15/1
TP2_VThrottle Position 2 Voltage0x220x9180/15/1
ETC_DSD_DEGThrottle Control Desired (degrees)0x220x91A-180/180/0
ETC_ACT_DEGThrottle Position Actual (degrees)0x220x93C-180/180/0
FAN3_SWCooling Fan Relay Control0x220x9670/9999/2
GEN_CHRGLPGenerator Warning Light0x220x9680/9999/2
IDLEIdle Speed0x220x96E0/9999/2
GEN_DSD_VGenerator Voltage Desired0x220x97C0/15/1
EGRP_STEPSEGR Purge Steps0x220x98E0/9999/2
PID_09D3_DISABLED0x220x9D30/9999/2
ACCS_SWA/C Relay0x220x11010/9999/2
BOO_SWBrake On/Off Switch0x220x11010/9999/2
INGEAR_SWIn Gear Switch0x220x11010/9999/2
PSP_SWPower Stearing Position Switch0x220x11010/9999/2
PID_11020x220x11020/9999/2
FAN1_SWCooling Fan Relay Control0x220x11030/9999/2
FAN2_SWCooling Fan Relay Control0x220x11030/9999/2
IMRC_SWIntake Manifold Runner Control0x220x11030/9999/2
MIL_SWMalfunction Indicator Lamp0x220x11030/9999/2
AC_REQ_SWA/C Refrigerant Pressure Switch0x220x11040/9999/2
PID_11110x220x11110/9999/2
IAT_VIntake Air Temp Voltage0x220x114A0/15/1
ECT_VEngine Coolant Temp Voltage0x220x114D0/15/1
TPCTThrottle Position Closed Voltage0x220x11690/15/1
O2S12_A_V0x220x11740/15/1
MAF_VMass Air-Flow Voltage0x220x11770/15/1
APPAccel Pedal Position (full range)0x220x13400/100/0
FUEL_PWInjector Fuel Pulse Width0x220x14100/9999/2
IMTV_SWVariable Intake Air Control0x220x160D0/9999/2
O2S_HTR11_SWO2 Sensor 1 Heater Control (Front)0x220x16310/9999/2
O2S_HTR12_SWO2 Sensor 2 Heater Control (Rear)0x220x16310/9999/2
O2S12_FTRear O2 Sensor Fuel Trim0x220x163E0/100/0
PID_1681_DISABLED0x220x16810/9999/2
BARO_VBARO Sensor Voltage0x220x16B30/15/1
VT_ACTValve Timing Actual0x220x16CD0/9999/2
VT_DIFFValve Timing Error0x220x16CE0/9999/2
VT_DUTYValve Timing OCV Control Duty0x220x16CF0/100/0
GEN_FCGenerator Field Coil Control Duty0x220x16E80/100/0
GEN_VGenerator Output Voltage0x220x16E90/15/1
TIRESIZETire Revolutions Per Mile0x220x16F00/9999/2
HIDET_SWHigh Detonation Switch0x220x17060/9999/2
LAMBDA_MOD_SWLambda Modification Switch0x220x17060/9999/2
PID_17080x220x17080/9999/2
PID_17100x220x17100/9999/2
FP_RELAY_SWFuel Pump Relay Switch0x220x17180/9999/2
PID_171E0x220x171E0/9999/2
PID_171F0x220x171F0/9999/2
PID_17210x220x17210/9999/2
PID_17220x220x17220/9999/2
PID_17240x220x17240/9999/2
PID_172E0x220x172E0/9999/2
PID_17300x220x17300/9999/2
PID_17350x220x17350/9999/2
PID_17360x220x17360/9999/2
PID_17370x220x17370/9999/2
PID_173B0x220x173B0/9999/2
KNOCKRKnock Retard0x220x1746-180/180/0
PID_174E0x220x174E0/9999/2
PID_174E0x220x174E0/9999/2
PID_174F0x220x174F0/9999/2
LDP_VSL_DVEVAP LDP Very Small Leak Detect Value0x220x176B0/9999/2
LDP_VSL_SVEVAP LDP Very Small Leak Safe Value0x220x179A0/9999/2
PID_17A60x220x17A60/9999/2
LDP_MON_currentEVAP LDP Monitoring Current0x220x17F40/9999/2
LDP_REF_currentEVAP LDP Reference Current0x220x17F50/9999/2
LDP_IDL_currentEVAP LDP Idle Current0x220x17F70/9999/2
LDP_SL_DVEVAP LDP Small Leak Detect Value0x220x17F80/9999/2
LDP_VSL_FVEVAP LDP Very Small Leak Fail Value0x220x17F90/9999/2
LDP_EVAPCPEVAP LDP Incorrect Purge Flow Value0x220x17FA0/9999/2
CPP_SWClutch Pedal Position Switch0x220xA2110/9999/2
BPA_SWBrake Pressure Applied Switch0x220xA2110/9999/2
PNP_SWPark Neutral Position Switch0x220xA2110/9999/2
IVS_SWIdle Validation Switch0x220xA2110/9999/2
SCCS_VCruise Control Voltage0x220xA2160/15/1




CAN DATA

candata

OBD DATA

obddata

Monday, July 20, 2020

Race Capture Pro install on 1.6 Miata

This write up describes how to install RCP on a 1.6 Miata. The following sensors are connected to RCP:


  • RPM
  • Coolant Temp
  • Fuel
  • TPS
  • Brakepos


There is no CAN on the 1.6. To get data from the sensors you have to "tap into" the sensors. Therefor you either need the Pro version that has Digital and Analog inputs or you need the Track version with a AnalogX.
Some of this might apply for the 1.8, the 2.0 has CAN and none of this is relevant.

Having this, https://www.miataforumz.com/1990-200-Miata-Wiring/90diag.pdf is useful.

Mounting

I decided to mount my RCP on the transmission tunnel. My car is a Harris Hill Challenge Series race car so there is no interior to care about. To make it fit nice I decided to rotate it 90 degrees, if you do this you need to swap the X/Y axis in the App.


Power

I prefer to have the Race Capture powered on even if the ignition is off. That way you get accurate logging even if you need to restart the car (due to spin out, spit stop, etc). 
From the engine fusebox you can get fused circuits that are always on. There is a BLUE/YELLOW wire comming out of the fusebox that I connected to the RCP via a switch.

It's not recommended to connect it directly to the battery without a fuse. 

A simpler solution is to just use a battery pack via the USB.


RPM / Coolant / Fuel from instrument cluster


On my car it's relatively easy to access the instrument cluster and tap into those wires. There are two connectors on the back of the instrument cluster that feeds the various gauges. The instrument cluster also has some information printed on the circuit board, that can be used as an extra check.
The instrument cluster has two connectors, the left one (from driver) is labeled "1" in the wiring diagram and the right one is labeld "2" in the wiring diagram. Each wire within the connector is labeled by a letter.


RPM

The RPM signal is taken directly from the tach input. This wire is not used by the ECU so you don't risk of messing with the engine management. 
Tap into the 1H wire, that is the YELLOW/BLUE wire on the left connector. Connect it to one of the pulse inputs.

Fuel

Tap into the 1A wire, that is the YELLOW wire on the left connector. Connect it to one of the analog inputs. 
The input is not linear so you need the following mapping for the sensor:

9.4v = 0%
7.5v = 25%
5.1v = 50%
3.0v = 75%
0.7v = 100%


Coolant

This taps from the sensor that goes into the gauge cluster, the ECU uses a different sensor. 
Tap into the 2L wire, that is a BLACK/BLUE wire on the right connector. Connect it to one of the analog inputs.
The input is not linear so you need the following mapping for the sensor:

8.2v = 144F
5.3v = 180F
4.1v = 198F
2.2v = 235F
1.6v  = 260F

It's recommended that you calibrate these values! There seems to be a large discrepancy. 

As you can see the fuel and coolant temp goes over 5v, so you will not be able to monitor fuel levels below ~50%, or coolant colder than ~180F. 
You could use an opamp to "amplify" the signal to a smaller value. You could also put a diode if you want to shift the span.
I haven't tested the higher coolant temp values, these are just based on the data for the sensor.
For more accurate readings it would be better to use the regulated 5v provided by the race capture, but this makes you stock gauge unsuable.

At least for the coolant it uses an unregluated voltage to calulcate the temps, so the temperature will depend on the alternator voltage. 


TPS

The 1.6 Miata TPS is more of a switch than a linear position sensor. With the TPS you can only monitor WOT, Partly Open and Closed. You can either tap into the wires directly at the ECU or at the sensor, accessing the ECU is easy on my car.
Tap into the RED N wire from the right connector of the ECU and connect to a analog input.
Tap into the GREEN/WHITE  L wire from the left connector of the ECU and connect to a analog input.

Add the following script:

setTickRate(25)

tps_id = addChannel("TPS",10,0,0,100,"%")

function onTick()
   local not_wot = getAnalog(3)
   local pressed = getAnalog(4)

   if     not_wot == 1 and pressed == 0 then
     setChannel (tps_id,0)
   elseif not_wot == 1 and pressed == 1 then
     setChannel (tps_id,50)
   elseif not_wot == 0 and pressed == 1 then
     setChannel (tps_id,100)
   end   

end


Make sure you get the correct wires, the arrows shows what RED wire and what GREEN/WHITE:

Brake Position

There is no brake pressure sensor in the Miata. I just connected to the brake light in the rear. Tap into the GREEN wire on the tail light and connect to a digital input.