Decoding Nissan style Mitsi Electric 360 slot cam sensors

For discussing and developing different RPM/Position decoders using our superior modular architecture! One thread per pattern, please.
Locked
User avatar
Fred
Moderator
Posts: 15431
Joined: Tue Jan 15, 2008 2:31 pm
Location: Home sweet home!
Contact:

Decoding Nissan style Mitsi Electric 360 slot cam sensors

Post by Fred »

Nissan and perhaps other manufacturers (GM?) use optical camshaft position sensors with 360 slots around the outer perimeter and usually one slot per cylinder on the inner ring, usually of varying length.

Here are some examples :

Image

Skyline/RBXX(D)E(T) :

Image

This text pinched from one of our members posts on another board :
510rob wrote:* The outer 1° sensor(s), with three aperture slots, must contain multiple (perhaps three?) opto pickups, and must be connected to some type of sequential detector block; the opto behavior is not at all what I'd expect to see from a simple opto-sensor being interrupted with a piece of paper; it seems to require a properly sequential change on each consecutive aperture slot in order to register a valid edge-trigger signal. The sensor works as an "opto" only when the wheel is turning as it would in normal operation. Mitsubishi may have done this to eliminate false timing signals at low speeds/cranking ???

* The inner "120°" sensor is a typical binary sensor.

* Both outputs need pull-up resistors.




I stumbled across an interesting description of the CAS timing scheme...

If you have a look at the pic of the Rb25 CAS you will see the slots on the outside of the disk are at 1 deg spacing and the inside of the disk the 6 slots are of vairing size starting at TDC for each piston. There are 4deg difference in each slot with the first slot 4 deg wide and the last 24deg wide. The divider simply counts the number of degrees using the 1deg signal while the 60deg signal is low (while there is metal between the sensor, not slot). The results are in binary

36 = 100100, 40 = 101000, 44 = 101100, 48 = 110000, 52 = 110100, 56 = 111000

If you only read the middle digits, take the 1 off the front and the 00 off the end your left with

001 = 1, 010 = 2, 011 = 3, 100 = 4, 101 = 5, 110 = 6

These 3 digits are latched and feed through a binary to 1-of-6 decoder. The outputs from the decoder are on for 120deg of each cycs compression stroke up to TDC and is conected to the base of 6 NPN transistors. The colectors of the transistors are conected the the ignition signal from the ECU and the emitters conected to the RB25 coil driver pack, 1 for each coil. The ign sig from the ECU only gets to the coil to be fired and is blocked to all the others by the transistors.
I also convert the 60deg signal from wide slots to narrow slots so the RB30E ECU thinks its got a RB30 CAS.


http://www.calaisturbo.com.au/printthre ... ge=2&pp=40
I hope that helps you with your efforts Sean, I'd love to see that working. It would make FreeEMS THE choice for Nissan enthusiasts :-)

Admin.
DIYEFI.org - where Open Source means Open Source, and Free means Freedom
FreeEMS.org - the open source engine management system
FreeEMS dev diary and its comments thread and my turbo truck!
n00bs, do NOT PM or email tech questions! Use the forum!
The ever growing list of FreeEMS success stories!
User avatar
SleepyKeys
LQFP144 - On Top Of The Game
Posts: 549
Joined: Mon Feb 11, 2008 10:52 pm
Location: Arizona
Contact:

Re: Decoding Nissan style Mitsi Electric 360 slot cam sensors

Post by SleepyKeys »

Admin wrote:Nissan and perhaps other manufacturers (GM?) use optical camshaft position sensors with 360 slots around the outer perimeter and usually one slot per cylinder on the inner ring, usually of varying length.
Yes my V8 LT1 has that same sensor. Since the high resolution track has even highs/lows you should be able to trigger on rising and falling and get 2x the crank angle updates from it, no?
I hope that helps you with your efforts Sean, I'd love to see that working. It would make FreeEMS THE choice for Nissan enthusiasts :-)

Admin.
Yes it does, and well see what I can do! I should have my proto all setup in the next day or two. I have an extra distributor, so I may just spin it with a drill and use as a stim :)

-Sean
You snooze, you lose!
User avatar
Fred
Moderator
Posts: 15431
Joined: Tue Jan 15, 2008 2:31 pm
Location: Home sweet home!
Contact:

Re: Decoding Nissan style Mitsi Electric 360 slot cam sensors

Post by Fred »

seank wrote:Since the high resolution track has even highs/lows you should be able to trigger on rising and falling and get 2x the crank angle updates from it, no?
Yes, you could do that, but I have my doubts about how many rpm would be supported with that scheme. that would be 720 interrupts per engine cycle, 360 per revolution, 6000rpm, 100rps, 36000 interrupts per second, 40,000,000MHz bus rate, 1000 single cylcle instructions per interrupt while doing NO other math. If you only use one edge, it looks better, but still not good. Using the xgate it may be possible, but I strongly doubt it on the main core. Good luck to you though :-)

Admin.
DIYEFI.org - where Open Source means Open Source, and Free means Freedom
FreeEMS.org - the open source engine management system
FreeEMS dev diary and its comments thread and my turbo truck!
n00bs, do NOT PM or email tech questions! Use the forum!
The ever growing list of FreeEMS success stories!
User avatar
ababkin
LQFP112 - Up with the play
Posts: 215
Joined: Tue Jan 15, 2008 5:14 pm

Re: Decoding Nissan style Mitsi Electric 360 slot cam sensors

Post by ababkin »

indeed looks like the job for XGATE

i had that crazy idea once: to try estimating PPP or do some sort of knock detection using just the wheel with lots and lots of fine teeth (i.e measuring and interpreting rotational acceleration patterns). This wheel may bring this idea closer to reality.
Legal disclaimer for all my posts: I'm not responsible for anything, you are responsible for everything. This is an open and free world with no strings attached.
User avatar
SleepyKeys
LQFP144 - On Top Of The Game
Posts: 549
Joined: Mon Feb 11, 2008 10:52 pm
Location: Arizona
Contact:

Re: Decoding Nissan style Mitsi Electric 360 slot cam sensors

Post by SleepyKeys »

ababkin wrote:indeed looks like the job for XGATE

i had that crazy idea once: to try estimating PPP or do some sort of knock detection using just the wheel with lots and lots of fine teeth (i.e measuring and interpreting rotational acceleration patterns). This wheel may bring this idea closer to reality.
It's mounted on the cam, which is driven with a belt or chain, which means it will "soak up" knock, making it harder to detect as a % change. I think the best way to see knock like that would be a VR sensor and a DSP. That way you can plot an infinite number of points, in theory anyway and figure a % change.

Yes, you could do that, but I have my doubts about how many rpm would be supported with that scheme. that would be 720 interrupts per engine cycle, 360 per revolution, 6000rpm, 100rps, 36000 interrupts per second, 40,000,000MHz bus rate, 1000 single cylcle instructions per interrupt while doing NO other math. If you only use one edge, it looks better, but still not good. Using the xgate it may be possible, but I strongly doubt it on the main core. Good luck to you though :-)

Admin.
The stock ECU uses two 68hc11's(special "F6" variant) and from the documentation I read it reads on rising/falling. It can be done, check out this link. This guy build a router board based on the high/low signals http://www.bailey-eng.com/LTCC.html
You snooze, you lose!
User avatar
Fred
Moderator
Posts: 15431
Joined: Tue Jan 15, 2008 2:31 pm
Location: Home sweet home!
Contact:

Re: Decoding Nissan style Mitsi Electric 360 slot cam sensors

Post by Fred »

What sort of ignition do they run stock?

If you only treat the outer slots like a counter :

interrupt from outer slot :
check state of inner sensor
if (high)
increment counter
return
else
compare counter with table of slot length - cyl number
update position info
zero counter
return

...or similar, yeah, probably, but if you intend to watch the difference in time between each and use it for averaging speed as well as sync, then the load might be too much.

The main code (at least later) won't use normal tables, but rather pre sorted trees with arbitrary points in space for tuning. Doing lookups on those is about 10x slower than a normal table, but the tunability and generic nature of the code will be well worth it. I hope that the 360 slot wheel and that setup get along nicely :-)

Admin.
DIYEFI.org - where Open Source means Open Source, and Free means Freedom
FreeEMS.org - the open source engine management system
FreeEMS dev diary and its comments thread and my turbo truck!
n00bs, do NOT PM or email tech questions! Use the forum!
The ever growing list of FreeEMS success stories!
User avatar
SleepyKeys
LQFP144 - On Top Of The Game
Posts: 549
Joined: Mon Feb 11, 2008 10:52 pm
Location: Arizona
Contact:

Re: Decoding Nissan style Mitsi Electric 360 slot cam sensors

Post by SleepyKeys »

Admin wrote:What sort of ignition do they run stock?

If you only treat the outer slots like a counter :

interrupt from outer slot :
check state of inner sensor
if (high)
increment counter
return
else
compare counter with table of slot length - cyl number
update position info
zero counter
return

...or similar, yeah, probably, but if you intend to watch the difference in time between each and use it for averaging speed as well as sync, then the load might be too much.

The main code (at least later) won't use normal tables, but rather pre sorted trees with arbitrary points in space for tuning. Doing lookups on those is about 10x slower than a normal table, but the tunability and generic nature of the code will be well worth it. I hope that the 360 slot wheel and that setup get along nicely :-)

Admin.
My LT1 uses a mechanical distributor in stock form. I just uses the cam wheel to achieve a 720deg cycle so the computer can sequentially fire injectors. I guess they were too cheap to equip it with individual coils from the factory.

Like ababkin said, looks like a job for the xgate. I followed up on a few posts by guys interested in adding xgate support to gcc. I'll let you know what they say.
You snooze, you lose!
User avatar
Fred
Moderator
Posts: 15431
Joined: Tue Jan 15, 2008 2:31 pm
Location: Home sweet home!
Contact:

Re: Decoding Nissan style Mitsi Electric 360 slot cam sensors

Post by Fred »

Awesome :-) Let me know who they are, I should put them in touch with someone else that is working on that...
DIYEFI.org - where Open Source means Open Source, and Free means Freedom
FreeEMS.org - the open source engine management system
FreeEMS dev diary and its comments thread and my turbo truck!
n00bs, do NOT PM or email tech questions! Use the forum!
The ever growing list of FreeEMS success stories!
User avatar
jbelanger
LQFP144 - On Top Of The Game
Posts: 387
Joined: Sat Feb 23, 2008 8:58 pm
Contact:

Re: Decoding Nissan style Mitsi Electric 360 slot cam sensors

Post by jbelanger »

Admin wrote:Awesome :-) Let me know who they are, I should put them in touch with someone else that is working on that...
I don't know if he's one of the guys mentioned but James Murray (from MS2/extra) is working on this.
User avatar
ababkin
LQFP112 - Up with the play
Posts: 215
Joined: Tue Jan 15, 2008 5:14 pm

Re: Decoding Nissan style Mitsi Electric 360 slot cam sensors

Post by ababkin »

BTW, since you bring up the topic of compilers and xgate, (and i hope i don't hurt anyone's feelings) but a local friend of mine, who designed many many embedded applications in past 20yrs of his career for cars and other stuff (he's one of the most known tuners in bmw world), strongly recommended me to just spend the measly $100 (or whatever it costs) on the codewarrior license instead of futzin' around with the gcc and other open source tools. He argues that the value of CW much exceeds the price diff between the opensource and CW license. He also approved our choice of a Freescale MCU for our purpose.

I haven't really tried CW, but his argument was quite compelling.
Legal disclaimer for all my posts: I'm not responsible for anything, you are responsible for everything. This is an open and free world with no strings attached.
Locked