Troubles decoding Subaru VR sensors

Hardware inside and outside of the ECU
Post Reply
User avatar
AndreyB
Site Admin
Posts: 14334
Joined: Wed Aug 28, 2013 1:28 am
Location: Jersey City
Github Username: rusefillc
Slack: Andrey B

Troubles decoding Subaru VR sensors

Post by AndreyB »

(posding on behalf of @

Just assembled a Frankenso board and trying to decode my Subaru VR camshaft and crankshaft sensors. Not going well so far - not sure what to do next? I do not have an oscilloscope.

The signal is somewhat close to how it should looks (7 tooth on cam and 6 tooth on crank) but have plenty of noise.

Image
Image
Image

Image
Image
Very limited telepathic abilities - please post logs & tunes where appropriate - http://rusefi.com/s/questions

Always looking for C/C++/Java/PHP developers! Please help us see https://rusefi.com/s/howtocontribute
User avatar
AndreyB
Site Admin
Posts: 14334
Joined: Wed Aug 28, 2013 1:28 am
Location: Jersey City
Github Username: rusefillc
Slack: Andrey B

Re: Troubles decoding Subaru VR sensors

Post by AndreyB »

battery test on VR input passed
onlready tried removing R111 and R112 between signal wires but it only made things worse.
Very limited telepathic abilities - please post logs & tunes where appropriate - http://rusefi.com/s/questions

Always looking for C/C++/Java/PHP developers! Please help us see https://rusefi.com/s/howtocontribute
puff
contributor
contributor
Posts: 2961
Joined: Mon Nov 11, 2013 11:28 am
Location: Moskau

Re: Troubles decoding Subaru VR sensors

Post by puff »

you'd better clarify what you mean by 'made things worse'. As far as I got, removing the w1002-w1003 resulted in some noise on the table. No tests have been performed on car. Besides, I can't see any reports about removing R111&R112
User avatar
kb1gtt
contributor
contributor
Posts: 3758
Joined: Tue Sep 10, 2013 1:42 am
Location: ME of USA

Re: Troubles decoding Subaru VR sensors

Post by kb1gtt »

Is this the same-ish as my little red suby? I was having a bunch of noise getting into the VR signals, then I ran out of time to track it down. Mine is a 98 with a 2002 WRX smashed into it, with lots of questionable wiring. If I had the time, I would tear out all the wiring and start putting stuff in from scratch. However, rumble groan moan, time is a problem.
Welcome to the friendlier side of internet crazy :)
puff
contributor
contributor
Posts: 2961
Joined: Mon Nov 11, 2013 11:28 am
Location: Moskau

Re: Troubles decoding Subaru VR sensors

Post by puff »

As far as I got, the stock ecu works just fine.
User avatar
AndreyB
Site Admin
Posts: 14334
Joined: Wed Aug 28, 2013 1:28 am
Location: Jersey City
Github Username: rusefillc
Slack: Andrey B

Re: Troubles decoding Subaru VR sensors

Post by AndreyB »

kind of somewhat close but still not the clean signal

Image

expected shape
Image

Image

Russian thread see http://rusefi.com/forum/viewtopic.php?f=15&t=1142
Very limited telepathic abilities - please post logs & tunes where appropriate - http://rusefi.com/s/questions

Always looking for C/C++/Java/PHP developers! Please help us see https://rusefi.com/s/howtocontribute
User avatar
kb1gtt
contributor
contributor
Posts: 3758
Joined: Tue Sep 10, 2013 1:42 am
Location: ME of USA

Re: Troubles decoding Subaru VR sensors

Post by kb1gtt »

My frustrations were that I was getting electrical noise coupling in from some other wiring. This was causing false pulses, which was caused by the analog signal having blips. I could see the noise regularly, but it only causes false pulses when those pulses were close to the cross over point.

How is this wired? I'm assuming OEM wiring. Does the OEM use a common GND wire or does it run 2 wires that are twisted down to the sensor? Do we have a schematic for this vehicle? I might be able to help find sources of noise. I believe if we can remove the electrical noise, we can get proper pulses.

Can we get a capture of the analog signal with a scope?
Welcome to the friendlier side of internet crazy :)
User avatar
AndreyB
Site Admin
Posts: 14334
Joined: Wed Aug 28, 2013 1:28 am
Location: Jersey City
Github Username: rusefillc
Slack: Andrey B

Re: Troubles decoding Subaru VR sensors

Post by AndreyB »

No scope - thats the problem exaclty.

I would assume same wiring as yours, looks like similar years. No devices are working, would they not make noise if turned off?
Very limited telepathic abilities - please post logs & tunes where appropriate - http://rusefi.com/s/questions

Always looking for C/C++/Java/PHP developers! Please help us see https://rusefi.com/s/howtocontribute
User avatar
AndreyB
Site Admin
Posts: 14334
Joined: Wed Aug 28, 2013 1:28 am
Location: Jersey City
Github Username: rusefillc
Slack: Andrey B

Re: Troubles decoding Subaru VR sensors

Post by AndreyB »

Paraller to stock ECU we get great signal while running but not so great signal while cranking. Both times hooked up to stock ECU so whatever electrical on the ECU side is the same.

How come the differentce is so significant?

Image
Image
Very limited telepathic abilities - please post logs & tunes where appropriate - http://rusefi.com/s/questions

Always looking for C/C++/Java/PHP developers! Please help us see https://rusefi.com/s/howtocontribute
User avatar
kb1gtt
contributor
contributor
Posts: 3758
Joined: Tue Sep 10, 2013 1:42 am
Location: ME of USA

Re: Troubles decoding Subaru VR sensors

Post by kb1gtt »

At low RPM, the signal is very small, so a small noise becomes a problem. However at higher RPM your VR signal is larger than the noise, so problem goes away.

You say while cranking the signal is still blah for both, but apparently the stock ECU is able to decode well enough to get started and operate correctly. Perhaps a low pass filter which removes higher frequency noise might be the solution. Another thing to consider, by measuring between the wires on the stock ECU we could get an idea for what they have for an impedance. It might show that we have 5kohms or something like that. Then if we reproduce that same impedance on our input circuit, it would likely be less susceptible to noise.

I should figure out a way to measure the impedance of a VR, such that we can know the impedance. You get the most watts and lowest noise floor when the VR impedance matches the capturing circuit's impedance.
Welcome to the friendlier side of internet crazy :)
User avatar
AndreyB
Site Admin
Posts: 14334
Joined: Wed Aug 28, 2013 1:28 am
Location: Jersey City
Github Username: rusefillc
Slack: Andrey B

Re: Troubles decoding Subaru VR sensors

Post by AndreyB »

Very limited telepathic abilities - please post logs & tunes where appropriate - http://rusefi.com/s/questions

Always looking for C/C++/Java/PHP developers! Please help us see https://rusefi.com/s/howtocontribute
User avatar
kb1gtt
contributor
contributor
Posts: 3758
Joined: Tue Sep 10, 2013 1:42 am
Location: ME of USA

Re: Troubles decoding Subaru VR sensors

Post by kb1gtt »

That's sounds about right, and I wonder if he got it running. I was thinking that if I measured the VR's characteristics I could then tune the impedance, filter cut off etc of the MAX's fronted. I guess I could run the DSO quad's VNA on the OEM to get the OEM ecu's characteristics. I did not know about the 85mS zero crossing timeout think. Perhaps this would be a good application for the ones with ECU controlled thresholds instead of the autotune thresholds. Or perhaps I should just use a 24V battery to double the cranking speed from 180 to 360 RPM :)
Welcome to the friendlier side of internet crazy :)
User avatar
AndreyB
Site Admin
Posts: 14334
Joined: Wed Aug 28, 2013 1:28 am
Location: Jersey City
Github Username: rusefillc
Slack: Andrey B

Re: Troubles decoding Subaru VR sensors

Post by AndreyB »

Jared any chance you would crank the red car?
Very limited telepathic abilities - please post logs & tunes where appropriate - http://rusefi.com/s/questions

Always looking for C/C++/Java/PHP developers! Please help us see https://rusefi.com/s/howtocontribute
User avatar
AndreyB
Site Admin
Posts: 14334
Joined: Wed Aug 28, 2013 1:28 am
Location: Jersey City
Github Username: rusefillc
Slack: Andrey B

Re: Troubles decoding Subaru VR sensors

Post by AndreyB »

Заменил два резистора R103+R108 по 5к на один по 10к, а перед ним диод.

Надо теперь только найти маленькний смд диод.
somehow a diode instead of a resistor seemed to help, see http://rusefi.com/forum/viewtopic.php?f=15&t=1142&p=22107#p22101
Very limited telepathic abilities - please post logs & tunes where appropriate - http://rusefi.com/s/questions

Always looking for C/C++/Java/PHP developers! Please help us see https://rusefi.com/s/howtocontribute
User avatar
kb1gtt
contributor
contributor
Posts: 3758
Joined: Tue Sep 10, 2013 1:42 am
Location: ME of USA

Re: Troubles decoding Subaru VR sensors

Post by kb1gtt »

I'm going to be optimistic and plan for next weekend. I have a better scope at work, which I'll plan to bring home.
Welcome to the friendlier side of internet crazy :)
sleepingAwake
Posts: 113
Joined: Fri Jan 13, 2017 4:15 am
Location: CT

Re: Troubles decoding Subaru VR sensors

Post by sleepingAwake »

This may have been mentioned in the megasquirt post but if memory serves either the dual VR conditioner they have or a 2.2k resistor inline with the crank sensor seems to work.
puff
contributor
contributor
Posts: 2961
Joined: Mon Nov 11, 2013 11:28 am
Location: Moskau

Re: Troubles decoding Subaru VR sensors

Post by puff »

What's that dual thing? It has nothing to do with crank. It's cam, and it's rotating too slowly in the very beginning that the fixed hysteresis (watchdog?) time is still too short.
sleepingAwake
Posts: 113
Joined: Fri Jan 13, 2017 4:15 am
Location: CT

Re: Troubles decoding Subaru VR sensors

Post by sleepingAwake »

puff wrote:What's that dual thing? It has nothing to do with crank. It's cam, and it's rotating too slowly in the very beginning that the fixed hysteresis (watchdog?) time is still too short.
http://jbperf.com/dual_VR/v2_1.html

Sorry i thought your issue was with a noisy crank and cam signal. It sounds like your dealing with a software issue instead.
puff
contributor
contributor
Posts: 2961
Joined: Mon Nov 11, 2013 11:28 am
Location: Moskau

Re: Troubles decoding Subaru VR sensors

Post by puff »

The thing is a diode in series with cam sensor helped remove the noise at start, but it could also affect the waveform (right, Jared?)
sleepingAwake
Posts: 113
Joined: Fri Jan 13, 2017 4:15 am
Location: CT

Re: Troubles decoding Subaru VR sensors

Post by sleepingAwake »

puff wrote:The thing is a diode in series with cam sensor helped remove the noise at start, but it could also affect the waveform (right, Jared?)
Maybe try the 2.2k resistor instead?
Would the diode clip the waveform?
puff
contributor
contributor
Posts: 2961
Joined: Mon Nov 11, 2013 11:28 am
Location: Moskau

Re: Troubles decoding Subaru VR sensors

Post by puff »

There was a 10k resistor in series, it's still there, and it didn't help, but the diode helped :-)

Sent from my XT1058 using Tapatalk
User avatar
kb1gtt
contributor
contributor
Posts: 3758
Joined: Tue Sep 10, 2013 1:42 am
Location: ME of USA

Re: Troubles decoding Subaru VR sensors

Post by kb1gtt »

The MAX9926 is configured for an adaptive threshold. The once every 85mS (possibly up to 140mS) the threshold voltage is set to 33% of the max voltage seen in that window. The min it can set the threshold is 15mV. When cranking, this Subaru wheel, and other low tooth wheels, it won't see one tooth in that window, so it sets the threshold to the min at 15mV. Now when a tooth comes along it might generate a pulse of like 500mV which would certainly be enough to register a output. While the threshold could probably be set to something like 160mV, the auto adaption sets it to 15mV. This means that a small amount of noise will trigger a pulse on the output. If you have more teeth, this is not a problem as the adaptive will adjust the threshold to 160mV and your all set. However the lack of teeth cause the threshold to be set to 15mV. So to solve the problem, someone decided to add a resistor across the VR, such that the signal seen at the MAX chip is more like 45mV instead of 500mV.

I need to get out in the garage, then start cranking over the suby, and then add a resistor until I dampen the pulses from the suby VR to about 45mV. Based on that forum post, I'd start at about 2.2k and see how big the pules are.
Welcome to the friendlier side of internet crazy :)
Post Reply