1991 BMW 318iS - Signal Drop & Noise

http://jbperf.com/dual_VR/index.html

1991 BMW 318iS - Signal Drop & Noise

Postby bmwman91 » Wed Jul 22, 2015 1:35 am

I integrated a dual VR 2.1 board into the stock Motronic 1.7 case for a datalogger project. Today I did my first few test log runs and found some interesting things. Hopefully my issues are familiar to the resident expert(s) and have reasonably straightforward solutions! The car uses the stock 60-2 crank wheel (the teeth are on the outside of the harmonic damper and there is a rubber ring between the teeth and hub that bolts to the crank). The stock VR sensor is also used. The VR sensor cable in the stock harness is shielded all the way to the ECU. I have installed the dual VR board inside of the Motronic case, directly onto the VR signal input pins, so the connection is as short as physically possible. The VR sensor has 2 connections in the ECU: one is connected to ground, and the other (I assume) is the + signal which is used to measure RPM. This latter one is what I used for VR1+ on the dual VR board. So, VR1- is basically grounded.

Issues:
1) No RPM pick-up at idle (~700RPM). Pick-up seems to begin at ~1500RPM. The stock 60-2 crank wheel is what the VR sensor is sensing. It is sort of odd that below ~1500RPM the RPM value reads as ~230RPM, and very consistently too, except when triggered noise pegs it a max value (determined in firmware).
2) Sinusoidally varying RPM readings from ~1500RPM to ~3000RPM. I assume that this is due to the teeth on the 60-2 wheel not being concentric with the crank and as the distance between the wheel & VR sensor varies, so too does the zero-crossing detection of the MAX9926?

Ideas:
- Would it make sense to eliminate the current limiting resistor (replaced with jumper) on VR1- since this wire from the VR sensor is connected to ground in the ECU?
- The output signal from the dual VR board runs through ~2ft of repurposed serial cable (standard 24ga wire bundle with foil shield, was formerly a RS232 serial cable). Should I look into running this signal through its own shielded single-conductor cable?
- If none of the above work (or other suggestions), I can borrow an oscilloscope from work to measure the VR sensor output voltage at a few RPMs. The peak-peak amplitude increases linearly with RPM, correct?

Here is a piece of a plot showing the behavior at idle. 9876RPM is a firmware-default value I use to indicate that the measured period between pulses is out-of-bounds. The 230RPM reading is odd though since that is not a firmware-default of mine. It is approximately 1/3 of the actual idle RPM. Every now and then the RPM value will "lock on" briefly at idle (not shown), and then revert to this behavior.
http://www.e30tuner.com/assist/vrsignal ... ing_01.png

Here is a zoomed-in shot of the behavior in the 1500~3000RPM range, which ceases above ~3000RPM. The period of the sinusoidal-looking section coincides perfectly with the RPM, and the waveform certainly looks like it is coming from a 60-2 wheel! It is interesting that it "locks on" above ~3000RPM.
http://www.e30tuner.com/assist/vrsignal ... ing_02.png
http://www.e30tuner.com/assist/vrsignal ... ing_04.png

A pull across most of the RPM range in 2nd gear. Noise is an issue in some parts of the rev range.
http://www.e30tuner.com/assist/vrsignal ... ing_03.png

Here are a couple of photos of the installation as it looks now. The left pin is the VR sensor + signal, and the right one is connected to ground (other VR sensor wire endpoint).
http://www.e30tuner.com/assist/motronicmadness01.jpg
http://www.e30tuner.com/assist/motronicmadness02.jpg

Anyway, hopefully that is enough detail to get the troubleshooting moving. Let me know if there is any additional information that would be helpful here. Thanks!
bmwman91
 
Posts: 5
Joined: Wed Jul 22, 2015 12:10 am

Re: 1991 BMW 318iS - Signal Drop & Noise

Postby jbelanger » Wed Jul 22, 2015 10:56 am

First, is there any possibility of not having the sensor VR- connected to ground. That can have a significant performance impact. And second, even if that pin is grounded it is a very bad idea to connect the board ground there; connect the dual VR board ground to the ECU board ground close to its power supply or to the connector power ground pin.

So start with moving the ground. And if you can disconnect VR- from the ground that would be even better. Then see what you get. If you still have issues at low RPM (which is a very surprising thing with the MAX9926), try to get a scope to have a look at the input VR signal and the output or the dual VR board.

Jean
Image
jbelanger
 
Posts: 3578
Joined: Sat Oct 03, 2009 12:24 pm
Location: Quebec, Canada

Re: 1991 BMW 318iS - Signal Drop & Noise

Postby bmwman91 » Wed Jul 22, 2015 12:57 pm

Thank you Jean. I will connect the board's ground to a proper ground point, rather than the "grounded" VR- sensor pin, and report back. Hopefully this does the trick.

With respect to the rest of your suggestion, are you saying that I should see about taking the VR sensor's VR- connection and disconnecting it from ground (which would leave it floating)? Since I am still running the car from the stock ECU, I am a little hesitant to go messing with that, but I might be able to think of a way to disconnect it in a way that I can "undo" if necessary.
bmwman91
 
Posts: 5
Joined: Wed Jul 22, 2015 12:10 am

Re: 1991 BMW 318iS - Signal Drop & Noise

Postby jbelanger » Wed Jul 22, 2015 1:03 pm

What I meant is that you want one wire from the sensor to VR+ and the other sensor wire to VR-. And none of these should be connected to ground. However, if this sensor is also used by the ECU and the ECU grounds VR-, there's not much you can do. If the sensor is only used through the dual VR board, you could run a separate wire for VR- which would connect VR- directly to the dual VR board and nothing else; that might be something that could be reversed if needed.

Jean
Image
jbelanger
 
Posts: 3578
Joined: Sat Oct 03, 2009 12:24 pm
Location: Quebec, Canada

Re: 1991 BMW 318iS - Signal Drop & Noise

Postby bmwman91 » Wed Jul 22, 2015 2:02 pm

Got it. Yes, since the Motronic is deliberately grounding the VR- wire, I assume that this is probably required by whatever electrical design the unit employs for crank speed sensing (there is a custom Bosch IC in there that, among other things, handles crank speed input). Hopefully this is just a problem with my "lazy" grounding choice.

I doubt that I am the first person to use your board on a Motronic-equipped car, and just about every OBDI vehicle with a Motronic uses a 60-2 wheel with the VR- wire connected to ground, so I assume my problems are mostly of my own making.
bmwman91
 
Posts: 5
Joined: Wed Jul 22, 2015 12:10 am

Re: 1991 BMW 318iS - Signal Drop & Noise

Postby bmwman91 » Wed Jul 22, 2015 11:34 pm

I cleaned up the installation of the VR board inside of the ECU, and used a ground point that is very close to one of the main ground pins for the analog sections of the board. After taking a look at how the VR- pin comes in, it does connect to the board's ground, but there is a rather long path between where this pin comes in and where it joins the rest of the board's grounds, with various passive components related to VR+ grounding on it, and it also has guard ring traces enclosing all of the crank sensor input components. It's a DC ground for sure, but who knows what the AC impedance to ground is at that position. Anyway, I am not sure if it was hurting anything to use the VR- pin as the ground connection, but it is obviously bad practice so I changed it.
http://www.e30tuner.com/assist/motronicmadness03.jpg
http://www.e30tuner.com/assist/motronicmadness04.jpg
http://www.e30tuner.com/assist/motronicmadness05.jpg

My data logger was still giving yucky measurements (same as yesterday), so I put a scope on the VR board's comparator output (close to where it connects to the dsPIC microcontroller in my logger). The results indicate that the electrical part is probably NOT the culprit here. So, there must be something weird in my firmware that I didn't find during testing & simulation.

Is there anything obvious that I am missing in this scope shot? It all looks pretty peachy to me...a little noise here & there, but nothing that would trigger a logic event on the microcontroller's input capture module (3.3V device with this signal coming in to a 5V tolerant pin).
http://www.e30tuner.com/assist/vrsignal ... ing_05.png
http://www.e30tuner.com/assist/vrsignal ... ing_06.png

Apologies for giving you the run-around since the issue looks like it is in my firmware. Hopefully this info will be useful to others somehow!
bmwman91
 
Posts: 5
Joined: Wed Jul 22, 2015 12:10 am

Re: 1991 BMW 318iS - Signal Drop & Noise

Postby jbelanger » Wed Jul 22, 2015 11:50 pm

Those scope traces do look fine to me too. You might want to try to see what they would look like if you zoom in to make sure that none of these little noise peaks are more than that. A low resolution sometimes hides very short pulses.

And if there are very short pulses making their way through, you could also filter them out in your code. Putting a threshold for acceptable pulse duration could do the trick. But there may be something else that needs fixing first (as you already know).

Jean
Image
jbelanger
 
Posts: 3578
Joined: Sat Oct 03, 2009 12:24 pm
Location: Quebec, Canada

Re: 1991 BMW 318iS - Signal Drop & Noise

Postby bmwman91 » Thu Jul 23, 2015 12:01 am

jbelanger wrote:Those scope traces do look fine to me too. You might want to try to see what they would look like if you zoom in to make sure that none of these little noise peaks are more than that. A low resolution sometimes hides very short pulses.

And if there are very short pulses making their way through, you could also filter them out in your code. Putting a threshold for acceptable pulse duration could do the trick. But there may be something else that needs fixing first (as you already know).

Jean


Yup, I zoomed in and verified that there are no anomalous spikes that could trigger an unwanted logic event. Even if there were, the output from my logger is so wildly different than what is going in to it that there must be an issue in the firmware. Frankly, it is probably a little over-complicated...an RPM value is calculated from each tooth period and then stored in a ring buffer, and then the final RPM output value is made by FIR low-pass filtering the last 60 tooth periods in the buffer (with special provisions for the missing 2 teeth). The idea is to control RPM "noise" due to physical tolerances on the toothed wheel, but I suspect that something silly is going on related to that. I'm digging through my firmware code and reading up on making more detailed stimulus files for simulating pin logic events in the development environment.

Whatever the outcome, I think that I will get the scope on the VR+ signal since that is something I have been curious about for a long time. There is very little information about that signal in the E30 world!
bmwman91
 
Posts: 5
Joined: Wed Jul 22, 2015 12:10 am


Return to Dual VR

Who is online

Users browsing this forum: No registered users and 1 guest

cron