Abe & JasonC's NB Cam & Crank input circuits
#21
![Default](https://www.miataturbo.net/images/icons/icon1.gif)
If the capacitors used are Z5U or Y5V, and not temperature stable types such as NPO or X7R, the capacitance can very 2 to 1 over temperature. This means the delay can change by 2° at 7200 RPM. For a high boost, finely tuned engine, that is a bad thing.
Reduce the filter delay and use shielded cable directly from the CAS to the MS.
Frank, the lowpass filter will delay the edges a certain amount of time, not produce a fixed phase shift.
Reduce the filter delay and use shielded cable directly from the CAS to the MS.
Frank, the lowpass filter will delay the edges a certain amount of time, not produce a fixed phase shift.
Last edited by JasonC SBB; 09-10-2008 at 12:51 AM.
#22
Boost Pope
![](/mt2011/images_td/ranks/supporter1.gif)
![](/mt2011/images_td/ranks/smod.png)
Thread Starter
iTrader: (8)
Join Date: Sep 2005
Location: Chicago. (The less-murder part.)
Posts: 33,340
Total Cats: 6,793
![Default](https://www.miataturbo.net/images/icons/icon1.gif)
Did nobody read the caption that says C1 and C2 can be omitted if not required? We're not espousing intentionally high-latency circuits here, merely duplicating what the factory did.
#23
![Default](https://www.miataturbo.net/images/icons/icon1.gif)
It would be a BAD IDEA to have no noise filtering at all by removing C1 and C2.
Joe, no need to be defensive. I'm trying to help.
The factory probably uses NPO caps. Besides, 2° error on the factory map, without FI, wouldn't hurt the engine.
I repeat - anyone who builds that factory circuit is better off reducing those caps by a factor of 4, *and* using NPO or X7R type capacitors.
It would also be prudent to use shielded cable for CKP and CMP. The shield should be connected to the chassis at one end, and one of the inner conductors used for the sensor ground ... connecting from the sensor to the ECU sensor ground.
Anyone who wants a lower parts count circuit, can use the one I posted.
Joe, no need to be defensive. I'm trying to help.
The factory probably uses NPO caps. Besides, 2° error on the factory map, without FI, wouldn't hurt the engine.
I repeat - anyone who builds that factory circuit is better off reducing those caps by a factor of 4, *and* using NPO or X7R type capacitors.
It would also be prudent to use shielded cable for CKP and CMP. The shield should be connected to the chassis at one end, and one of the inner conductors used for the sensor ground ... connecting from the sensor to the ECU sensor ground.
Anyone who wants a lower parts count circuit, can use the one I posted.
#24
Boost Pope
![](/mt2011/images_td/ranks/supporter1.gif)
![](/mt2011/images_td/ranks/smod.png)
Thread Starter
iTrader: (8)
Join Date: Sep 2005
Location: Chicago. (The less-murder part.)
Posts: 33,340
Total Cats: 6,793
![Default](https://www.miataturbo.net/images/icons/icon1.gif)
Jason, regarding the circuit in post 14- I see no pullup on the input side of the gate. Seems to me we need one to the left of R1.
Also, we need the control pin to be tied high. That pin isn't illustrated on your symbol. but the CD4016 has one control per gate.
Also, we need the control pin to be tied high. That pin isn't illustrated on your symbol. but the CD4016 has one control per gate.
#26
![Default](https://www.miataturbo.net/images/icons/icon1.gif)
Is the output of the CAS from 99-2005 and 90-93 the same?
Did anyone try Abe's circuit with the 90-93 CAS?
I have built the CMP input using the optoisolator circuit but everytime the RPM reach a certain value (~1750 rpm), they drop to 0 and then recover, the MS2 staying fully powered.
My next try is to connect the CAS CMP input directly to the MS port without the optoisolator and if that doesn't work, try Abe's circuit.
Thanks
Did anyone try Abe's circuit with the 90-93 CAS?
I have built the CMP input using the optoisolator circuit but everytime the RPM reach a certain value (~1750 rpm), they drop to 0 and then recover, the MS2 staying fully powered.
My next try is to connect the CAS CMP input directly to the MS port without the optoisolator and if that doesn't work, try Abe's circuit.
Thanks
#29
![Default](https://www.miataturbo.net/images/icons/icon1.gif)
Ah yes, that circuit was designed for my setup which is a parallel install - the factory ECU is installed. I don't know if the NB sensors by themselves have pulldown outputs if the factory ECU is not there.
You can add a pullup to the left of R1 and then just get rid of R2.
You can add a pullup to the left of R1 and then just get rid of R2.
Excuse my ignorance, but what is the purpose of the pulldown in the original circuit. Is that for use in a parallel install with the stock ECU? Just curious as to what the interaction is between two ECU's sharing the signal.
#30
Boost Pope
![](/mt2011/images_td/ranks/supporter1.gif)
![](/mt2011/images_td/ranks/smod.png)
Thread Starter
iTrader: (8)
Join Date: Sep 2005
Location: Chicago. (The less-murder part.)
Posts: 33,340
Total Cats: 6,793
![Default](https://www.miataturbo.net/images/icons/icon1.gif)
I'm not sure where you see a pulldown in the original circuit. Can you provide me with a reference designator?
Let me clarify a bit how the circuits in question work, and what Jason and I were talking about.
First, understand how the crank and cam sensors operate. They do not output a voltage, instead, they provide what in the EE industry is called an "open collector" output, which Jason is referring to as a pulldown output. The origin of the term "open collector" stems from the fact that historically, this type of configuration was achieved by attaching the output pin of the circuit to the collector terminal of an NPN transistor, with the emitter terminal connected to ground internally.
I know that not everyone is familiar with transistor theory, but in an NPN transistor, voltage is allowed to flow from the collector to the emitter whenever the base terminal is energized. The emitter terminal is the one with the triangle on it, the collector is the one opposite, and the base is the terminal on the left, which acts as a gate between the collector and the emitter. You can think of it as a relay, where the emitter and collector are the contacts, and the base is the coil. PNP transistors are similar, but voltage flows in the opposite direction and the base is active when grounded rather than when powered.
Sidebar: here's a quick and simple tutorial on how transistors work: Transistor Tutorial
Now, to get back on topic. I've drawn a massively simplified version of how Abe's circuit works, in which I have included the sensor itself:
![](http://img37.picoodle.com/img/img37/3/10/31/thraddax/f_Standalonem_d907367.gif)
As you can see, there is a pullup resistor inside the MS which causes the CPU to see +5v on its input whenever the sensor is "off". When the sensor turns "on", the transistor conducts all the voltage which is passing through the resistor to ground, causing the CPU to see 0v on its input. This is how the processor knows that something is going on.
Now, here's what it would look like if this were a parallel install with the stock ECU in place:
![](http://img29.picoodle.com/img/img29/3/10/31/thraddax/f_Parallelm_6854fd9.gif)
As you can see, there is already a pullup resistor inside the stock ECU. This is how it works from the factory. Since we can't easily eliminate this resistor, we eliminate the one inside the MS instead. The voltage provided by the pullup inside the ECU backflows into the MS, and provides the same functionality as the one we'd have put there originally.
Note that this is the same reason we must remove R7 from the MS with doing a parallel install with the CLT sensor shared between the two. Again, the ECU already has a pullup on the CLT line, and we don't want to do it twice.
Ok, now here's Jason's originall circuit again:
![](https://www.miataturbo.net/forum/attachments/8100d1220938807-input.gif)
As you can see, there is no pullup resistor on the line to the sensor. This assumes that the stock ECU is there providing the pullup voltage.
If we wanted to use Jason's circuit in a standalone application, we'd need to install a pullup, or there would be no voltage on that line, ever. I've modified his drawing to show this:
![](http://img01.picoodle.com/img/img01/3/10/31/thraddax/f_Jasonm_85a3cb3.gif)
One of these eons I'm going to get off my butt and draw a version of Jason's circuit that is complete and ready to use...
Let me clarify a bit how the circuits in question work, and what Jason and I were talking about.
First, understand how the crank and cam sensors operate. They do not output a voltage, instead, they provide what in the EE industry is called an "open collector" output, which Jason is referring to as a pulldown output. The origin of the term "open collector" stems from the fact that historically, this type of configuration was achieved by attaching the output pin of the circuit to the collector terminal of an NPN transistor, with the emitter terminal connected to ground internally.
I know that not everyone is familiar with transistor theory, but in an NPN transistor, voltage is allowed to flow from the collector to the emitter whenever the base terminal is energized. The emitter terminal is the one with the triangle on it, the collector is the one opposite, and the base is the terminal on the left, which acts as a gate between the collector and the emitter. You can think of it as a relay, where the emitter and collector are the contacts, and the base is the coil. PNP transistors are similar, but voltage flows in the opposite direction and the base is active when grounded rather than when powered.
Sidebar: here's a quick and simple tutorial on how transistors work: Transistor Tutorial
Now, to get back on topic. I've drawn a massively simplified version of how Abe's circuit works, in which I have included the sensor itself:
![](http://img37.picoodle.com/img/img37/3/10/31/thraddax/f_Standalonem_d907367.gif)
As you can see, there is a pullup resistor inside the MS which causes the CPU to see +5v on its input whenever the sensor is "off". When the sensor turns "on", the transistor conducts all the voltage which is passing through the resistor to ground, causing the CPU to see 0v on its input. This is how the processor knows that something is going on.
Now, here's what it would look like if this were a parallel install with the stock ECU in place:
![](http://img29.picoodle.com/img/img29/3/10/31/thraddax/f_Parallelm_6854fd9.gif)
As you can see, there is already a pullup resistor inside the stock ECU. This is how it works from the factory. Since we can't easily eliminate this resistor, we eliminate the one inside the MS instead. The voltage provided by the pullup inside the ECU backflows into the MS, and provides the same functionality as the one we'd have put there originally.
Note that this is the same reason we must remove R7 from the MS with doing a parallel install with the CLT sensor shared between the two. Again, the ECU already has a pullup on the CLT line, and we don't want to do it twice.
Ok, now here's Jason's originall circuit again:
![](https://www.miataturbo.net/forum/attachments/8100d1220938807-input.gif)
As you can see, there is no pullup resistor on the line to the sensor. This assumes that the stock ECU is there providing the pullup voltage.
If we wanted to use Jason's circuit in a standalone application, we'd need to install a pullup, or there would be no voltage on that line, ever. I've modified his drawing to show this:
![](http://img01.picoodle.com/img/img01/3/10/31/thraddax/f_Jasonm_85a3cb3.gif)
One of these eons I'm going to get off my butt and draw a version of Jason's circuit that is complete and ready to use...
#32
![Default](https://www.miataturbo.net/images/icons/icon1.gif)
Joe I commend your little writeup above.
drytoast, (typing your handle makes me chuckle, was that what your were eating when you were registering?), the purpose of R2 is to have a slight pull down offset effect on the signal, in case there are ground shifts (slight differences in ground between where the above circuit is, and the ground of the sensor). The reason this offset may be needed, is that the Schmitt trigger (CD40106) threshold centerpoint is not 2.5V, but a bit lower. Therefore it is more sensitive to a slightly positive "low" signal from the sensor, than it is to a slighlty negative "high" signal from the sensor. IIRC the minimum votlage for a definite "low" signal on the Schmitt's input is 0.8V, whereas for "high" it's ~3V. Exact values are in the datasheet.
Did that make sense?
The original reason I put R2 in is that with the factory ECU / parallel setup, I observed that the "low" signal was at ~0.4V, a bit too l close to 0.8V for comfort. If you have a standalone setup and the voltage is much closer to 0V, then R2 is not needed.
drytoast, (typing your handle makes me chuckle, was that what your were eating when you were registering?), the purpose of R2 is to have a slight pull down offset effect on the signal, in case there are ground shifts (slight differences in ground between where the above circuit is, and the ground of the sensor). The reason this offset may be needed, is that the Schmitt trigger (CD40106) threshold centerpoint is not 2.5V, but a bit lower. Therefore it is more sensitive to a slightly positive "low" signal from the sensor, than it is to a slighlty negative "high" signal from the sensor. IIRC the minimum votlage for a definite "low" signal on the Schmitt's input is 0.8V, whereas for "high" it's ~3V. Exact values are in the datasheet.
Did that make sense?
The original reason I put R2 in is that with the factory ECU / parallel setup, I observed that the "low" signal was at ~0.4V, a bit too l close to 0.8V for comfort. If you have a standalone setup and the voltage is much closer to 0V, then R2 is not needed.
Last edited by JasonC SBB; 10-31-2008 at 05:12 PM.
#33
![Default](https://www.miataturbo.net/images/icons/icon1.gif)
Ahhh, makes sense.
As for the handle, that is a long story from University.
Too bad, I didn't see this thread earlier as I probably would have started with a schmitt trigger. Didn't even consider an IC that already does the same thing as this circuit. Oh well. I copied the idea from Abe's handiwork and just used the leftover VR opamp circuit on the MS board like in the attached picture.
The shaded area is what's in the proto area. The dashed lines are connections made with wire. The solid lines are traces already on the board. I tried to copy the same layout as the MS V3 schematics so you can see what components I left out, shorted or replaced with different values. You can ignore the opto circuit at the top. Another unused section I commandeered for clutch signal protection. I just wanted to document it so when something breaks later, I can figure out what I was doing.![](https://www.miataturbo.net/images/smilies/smile.gif)
Note: I used slightly different values in the feedback portion as that was what I had at home. Its about same ratios though. My input filter is also based on components left over from the MS kit. The caps are X7R.
As for the handle, that is a long story from University.
Too bad, I didn't see this thread earlier as I probably would have started with a schmitt trigger. Didn't even consider an IC that already does the same thing as this circuit. Oh well. I copied the idea from Abe's handiwork and just used the leftover VR opamp circuit on the MS board like in the attached picture.
The shaded area is what's in the proto area. The dashed lines are connections made with wire. The solid lines are traces already on the board. I tried to copy the same layout as the MS V3 schematics so you can see what components I left out, shorted or replaced with different values. You can ignore the opto circuit at the top. Another unused section I commandeered for clutch signal protection. I just wanted to document it so when something breaks later, I can figure out what I was doing.
![](https://www.miataturbo.net/images/smilies/smile.gif)
Note: I used slightly different values in the feedback portion as that was what I had at home. Its about same ratios though. My input filter is also based on components left over from the MS kit. The caps are X7R.
Last edited by drytoast; 11-01-2008 at 12:47 AM.
#34
![Default](https://www.miataturbo.net/images/icons/icon1.gif)
I built Jason's Schmitt trigger circuit. Should I add a resistor between the CD40106 output and the MS processor?
Please correct me if I'm wrong, but if there is no current draw by the processor then a 10k resistor wouldn't change the reading. On the other hand, if there is no current draw then I really don't need the resistor.
Please correct me if I'm wrong, but if there is no current draw by the processor then a 10k resistor wouldn't change the reading. On the other hand, if there is no current draw then I really don't need the resistor.
#37
![Default](https://www.miataturbo.net/images/icons/icon1.gif)
Thanks Jason. I asked one of the EEs I work with about this and he said if the Schmitt trigger wasn't TTL I would need a pull up but I had no idea what the CD40106 was.
No real second question, just trying to understand some things and it came out as rambling. I guess my real question is; does the MSII processor (MC9S12) draw current when it reads a voltage?
No real second question, just trying to understand some things and it came out as rambling. I guess my real question is; does the MSII processor (MC9S12) draw current when it reads a voltage?
#38
![Default](https://www.miataturbo.net/images/icons/icon1.gif)
thx Jason
Drytoast, I used your design (hope you don't mind) and put Abe's components in it's place. I also reordered the components so they actually fit in the VR area. No need to use the proto area.
Although it looks difficult and there seem to be a lot of wires, it's really not that bad.
Drytoast, I used your design (hope you don't mind) and put Abe's components in it's place. I also reordered the components so they actually fit in the VR area. No need to use the proto area.
Although it looks difficult and there seem to be a lot of wires, it's really not that bad.
Last edited by WestfieldMX5; 11-28-2008 at 05:13 PM.