BMW E36 Guide: Difference between revisions
No edit summary |
|||
Line 26: | Line 26: | ||
Recommend a dedicated 10 bar / 145 PSI 0.5-4.5v pressure sensor. [https://www.autosportlabs.com/product/10-bar-145-psi-fluid-pressure-sensor/ Pressure Sensor] | Recommend a dedicated 10 bar / 145 PSI 0.5-4.5v pressure sensor. [https://www.autosportlabs.com/product/10-bar-145-psi-fluid-pressure-sensor/ Pressure Sensor] | ||
==Road speed (differential speed sensor based)== | |||
This calculates gear and speed based on the differential speed sensor. Assumes engine RPM is connected to the first RPM input. | |||
<pre> | |||
setTickRate(10) --10Hz | |||
--virtual channels | |||
--addChannel("name",SR,prec,min,max,"unit") | |||
speeddiff_id = addChannel("Speed_",10,0,0,160,"MPH") | |||
gear_id = addChannel("Gear_",5,0,0,5,"gear") | |||
--global constants | |||
--edit these to match your car | |||
first = 4.20 | |||
second = 2.49 | |||
third = 1.66 | |||
fourth = 1.24 | |||
fifth = 1.00 | |||
final = 3.46 | |||
tirediameter = 24.7 | |||
--global variables | |||
rpm = 0 | |||
rpm_diff = 0 | |||
speed = 0 | |||
function updateSpeedDiff() | |||
rpm_diff = getTimerRpm(1) | |||
speed = rpm_diff*tirediameter*0.002975 | |||
speed = speed + 0.5 -- round because 0 prec. truncates | |||
setChannel(speeddiff_id, speed) | |||
end | |||
function updateGear() | |||
rpm = getTimerRpm(0) | |||
local gearErr = 0.15 | |||
local gear = 0 | |||
if speed > 2 then | |||
ratio = rpm/(rpm_diff*final) | |||
if ((first - ratio)^2) < (gearErr^2) then gear = 1 end | |||
if ((second - ratio)^2) < (gearErr^2) then gear = 2 end | |||
if ((third - ratio)^2) < (gearErr^2) then gear = 3 end | |||
if ((fourth - ratio)^2) < (gearErr^2) then gear = 4 end | |||
if ((fifth - ratio)^2) < (gearErr^2) then gear = 5 end | |||
end | |||
setChannel(gear_id, gear) | |||
end | |||
function onTick() | |||
updateSpeedDiff() | |||
updateGear() | |||
end | |||
</pre> | |||
=External Reference= | =External Reference= | ||
* [http://www.scribd.com/doc/247124381/1998-BMW-E36-Electrical-Wiring-Diagram#scribd BMW E36 Wiring Diagram] | * [http://www.scribd.com/doc/247124381/1998-BMW-E36-Electrical-Wiring-Diagram#scribd BMW E36 Wiring Diagram] | ||
* [http://wedophones.com/Manuals/BMW/1996%20BMW%20318is-c%20-%20320i%20-%20325i-c%20-%20328i-c%20%20Electrical%20Troubleshooting%20Manual.pdf Wiring Troubleshooting Manual] | * [http://wedophones.com/Manuals/BMW/1996%20BMW%20318is-c%20-%20320i%20-%20325i-c%20-%20328i-c%20%20Electrical%20Troubleshooting%20Manual.pdf Wiring Troubleshooting Manual] |
Revision as of 14:06, 8 May 2017
BMW E36 (1990 - 1999)
RPM
Use the wire connected to the instrument cluster #20, black wire. Also available on the round diagnostic connector at the back of the engine compartment (black wire, Pin #1)
RaceCapture/Pro Timer RPM Configuration
- Timer Mode: RPM
- Timer Speed: Medium
- Pulse Per Revolution: 3
Engine Temperature
In research
Fuel Level
In research
(Needs verification)
- 0 ohms empty
- ?? ohms 1/4
- ?? ohms 1/2
- ?? ohms 3/4
- 260 ohms full
Oil Pressure
Recommend a dedicated 10 bar / 145 PSI 0.5-4.5v pressure sensor. Pressure Sensor
Road speed (differential speed sensor based)
This calculates gear and speed based on the differential speed sensor. Assumes engine RPM is connected to the first RPM input.
setTickRate(10) --10Hz --virtual channels --addChannel("name",SR,prec,min,max,"unit") speeddiff_id = addChannel("Speed_",10,0,0,160,"MPH") gear_id = addChannel("Gear_",5,0,0,5,"gear") --global constants --edit these to match your car first = 4.20 second = 2.49 third = 1.66 fourth = 1.24 fifth = 1.00 final = 3.46 tirediameter = 24.7 --global variables rpm = 0 rpm_diff = 0 speed = 0 function updateSpeedDiff() rpm_diff = getTimerRpm(1) speed = rpm_diff*tirediameter*0.002975 speed = speed + 0.5 -- round because 0 prec. truncates setChannel(speeddiff_id, speed) end function updateGear() rpm = getTimerRpm(0) local gearErr = 0.15 local gear = 0 if speed > 2 then ratio = rpm/(rpm_diff*final) if ((first - ratio)^2) < (gearErr^2) then gear = 1 end if ((second - ratio)^2) < (gearErr^2) then gear = 2 end if ((third - ratio)^2) < (gearErr^2) then gear = 3 end if ((fourth - ratio)^2) < (gearErr^2) then gear = 4 end if ((fifth - ratio)^2) < (gearErr^2) then gear = 5 end end setChannel(gear_id, gear) end function onTick() updateSpeedDiff() updateGear() end