Megasquirt MS2 3.0 unmodified CAS 2nd VR diagram
Thread Starter
Joined: Jun 2003
Posts: 1,324
Likes: 0
From: Western Colorado
MS2 3.0 unmodified CAS 2nd VR diagram
First off, thanks to Jobro for all of his help as well as H4Inf's PDF file.
I figured that I would post this up for others in the MS section as well.
Anyway, I just finished building the 2nd VR circuit as well as the other necessary mods last night. I just read a pm that I got from Jobro and this is part of what he said:
Below is a diagram of what I'm understanding here, as well as my current board before doing this particular change:





I figured that I would post this up for others in the MS section as well.
Anyway, I just finished building the 2nd VR circuit as well as the other necessary mods last night. I just read a pm that I got from Jobro and this is part of what he said:
Originally Posted by Jobro
I believe you remove the 82k which is the 150k in the datasheet, remove the 0.001uF capacitor (datasheet value again page 6, and connect PIN14 to earth, this tells the lm1815 to disable 'one shot ... mode' and enable 'output high when input waveform below zero mode'.
Ken (maui) was saying this is required because the MS2 isn't fast enough to sense the output pulse when there is only 1 tooth on the wheel passing the vr sensor each rpm.
Ken (maui) was saying this is required because the MS2 isn't fast enough to sense the output pulse when there is only 1 tooth on the wheel passing the vr sensor each rpm.





Last edited by 2Lucky2tha7; Jun 6, 2008 at 01:22 PM.
Thread Starter
Joined: Jun 2003
Posts: 1,324
Likes: 0
From: Western Colorado
to this:

Lastly, is there anything else that is necessary to add or delete from this board? I will be running low imp. injectors as well. I bought the assembled board from DIY and here are the above pics for visual reference:


Thanks
Brian

Lastly, is there anything else that is necessary to add or delete from this board? I will be running low imp. injectors as well. I bought the assembled board from DIY and here are the above pics for visual reference:


Thanks
Brian
Hey Brian
Sorry I don't have time to check your physical layout against the schematic. I will tell you that you should REALLY remove the Black capacitor, find a replacement part for that of tantalum or ceramic or metalised polyprop ASAP. Can type Electrolytic capacitors should never be used for something like this.
This schematic is what I consider correct. Notice the new capacitors 'A' and 'B' these are just capacitors to decouple some noise. Their value won't stop the circuit from working, 0.1uF and 0.01uF should be ok values.
ALSO, I'm thinking of doing up a board on socket that would socket mount into the whole protoarea and include, 2nd vr circuit, fan driver circuit, boost control circuit.
Sorry I don't have time to check your physical layout against the schematic. I will tell you that you should REALLY remove the Black capacitor, find a replacement part for that of tantalum or ceramic or metalised polyprop ASAP. Can type Electrolytic capacitors should never be used for something like this.
This schematic is what I consider correct. Notice the new capacitors 'A' and 'B' these are just capacitors to decouple some noise. Their value won't stop the circuit from working, 0.1uF and 0.01uF should be ok values.
ALSO, I'm thinking of doing up a board on socket that would socket mount into the whole protoarea and include, 2nd vr circuit, fan driver circuit, boost control circuit.
Thread Starter
Joined: Jun 2003
Posts: 1,324
Likes: 0
From: Western Colorado
Here's my digikey parts list for anyone who is doing the same thing:
(1) LM1815 sensor LM1815N-ND
(1) .33uF ceramic cap. 399-4407-ND
(1) .01uF ceramic cap. 399-4147-ND
(1) .1uF ceramic cap. 399-4263-ND
(1) 330pf ceramic cap. 399-4173-ND
(1) 1k resistor 1.0KQBK-ND
(4) 4.7k resistor 4.7KQBK-ND
(1) 18k resistor 18KQBK-ND
(1) 1M resistor 1.0MQBK-ND
I personally buy more than the quantity that I have listed because not only are they very cheap, but if anything happens, I have spares.
(1) LM1815 sensor LM1815N-ND
(1) .33uF ceramic cap. 399-4407-ND
(1) .01uF ceramic cap. 399-4147-ND
(1) .1uF ceramic cap. 399-4263-ND
(1) 330pf ceramic cap. 399-4173-ND
(1) 1k resistor 1.0KQBK-ND
(4) 4.7k resistor 4.7KQBK-ND
(1) 18k resistor 18KQBK-ND
(1) 1M resistor 1.0MQBK-ND
I personally buy more than the quantity that I have listed because not only are they very cheap, but if anything happens, I have spares.
The changes to the circuit for MS2-e 2.0 basically put the lm1815 into zero-crossing mode, which creates larger pulses when the tooth crosses the zero-crossing point, but may also help get rid of noise.
MS2-extra 2.0 had the 2nd trigger input changed from a polled pin (meaning the code asked the pin for its status every so often) to an interrupt pin (meaning that every time the chip detects an "edge" to the square wave coming in, it triggers an interrupt on the CPU, which tells the CPU that the 2nd trigger happened). This seems to have made it a bit more noise-sensitive.
Ken
MS2-extra 2.0 had the 2nd trigger input changed from a polled pin (meaning the code asked the pin for its status every so often) to an interrupt pin (meaning that every time the chip detects an "edge" to the square wave coming in, it triggers an interrupt on the CPU, which tells the CPU that the 2nd trigger happened). This seems to have made it a bit more noise-sensitive.
Ken
I'm going to get mine working before I got bed tonight, ok maybe not but I will give it a good shot.

Thats the signal out of the vr with the CAS spinning at 26.5 engine rpm.
also is anyone interested in a PCB that solders onto a socket that is detachable from the prototype area and has all the features I listed above. I'm thinking of making one for myself.

Thats the signal out of the vr with the CAS spinning at 26.5 engine rpm.
also is anyone interested in a PCB that solders onto a socket that is detachable from the prototype area and has all the features I listed above. I'm thinking of making one for myself.
Trending Topics
I'm doing some testing now.
What I have found.
Using MODE-1 seems to make the chip as sensitive as possible without too much noise.
MODE-2 makes the chip less sensitive but might remove some noise.
and MODE-3 makes the chip too-sensitive and noise triggers the chip (so don't use mode3).
MODE2 seems OK and might be better because with my fairly closely gapped cas, using the 24 tooth wheel 107 engine rpm misses some teeth, but 142 engine rpm doesn't. I will test this behaviour with the 2 tooth wheel also. It should make it a lot harder for random noise to cause a false trigger using MODE2 because the noise would need to be greater than 400mV p-p. I'm taking CRO traces I will post them up some people can see what the circuit actually does.
The 2 tooth wheel works down to approximately 150rpm engine rpm in MODE2. Maybe even lower
What I have found.
Using MODE-1 seems to make the chip as sensitive as possible without too much noise.
MODE-2 makes the chip less sensitive but might remove some noise.
and MODE-3 makes the chip too-sensitive and noise triggers the chip (so don't use mode3).
MODE2 seems OK and might be better because with my fairly closely gapped cas, using the 24 tooth wheel 107 engine rpm misses some teeth, but 142 engine rpm doesn't. I will test this behaviour with the 2 tooth wheel also. It should make it a lot harder for random noise to cause a false trigger using MODE2 because the noise would need to be greater than 400mV p-p. I'm taking CRO traces I will post them up some people can see what the circuit actually does.
The 2 tooth wheel works down to approximately 150rpm engine rpm in MODE2. Maybe even lower
Last edited by Jobro; Jun 18, 2008 at 01:55 AM.
The changes to the circuit for MS2-e 2.0 basically put the lm1815 into zero-crossing mode, which creates larger pulses when the tooth crosses the zero-crossing point, but may also help get rid of noise.
MS2-extra 2.0 had the 2nd trigger input changed from a polled pin (meaning the code asked the pin for its status every so often) to an interrupt pin (meaning that every time the chip detects an "edge" to the square wave coming in, it triggers an interrupt on the CPU, which tells the CPU that the 2nd trigger happened). This seems to have made it a bit more noise-sensitive.
Ken
MS2-extra 2.0 had the 2nd trigger input changed from a polled pin (meaning the code asked the pin for its status every so often) to an interrupt pin (meaning that every time the chip detects an "edge" to the square wave coming in, it triggers an interrupt on the CPU, which tells the CPU that the 2nd trigger happened). This seems to have made it a bit more noise-sensitive.
Ken
In zero cross mode (pin14=gnd) the output is high always except during the arming stage. During arming the IC pulls the output low, and sharply releases it to go high again as vr sensor sharply drops through zero.
In the fixed output duration the output is low except for when the zero crossing happens when it has the shot high with a fixed high time. I think a better idea might be to increase the output length.
I'd love to know some technical information about what your are looking for when you poll in pre 2.0 extra, and what you are interrupting on in 2.0 extra.
Have you scoped the chip in the 2 modes? Because the outputs are pretty different.
In zero cross mode (pin14=gnd) the output is high always except during the arming stage. During arming the IC pulls the output low, and sharply releases it to go high again as vr sensor sharply drops through zero.
In the fixed output duration the output is low except for when the zero crossing happens when it has the shot high with a fixed high time. I think a better idea might be to increase the output length.
In zero cross mode (pin14=gnd) the output is high always except during the arming stage. During arming the IC pulls the output low, and sharply releases it to go high again as vr sensor sharply drops through zero.
In the fixed output duration the output is low except for when the zero crossing happens when it has the shot high with a fixed high time. I think a better idea might be to increase the output length.
I'd love to know some technical information about what your are looking for when you poll in pre 2.0 extra, and what you are interrupting on in 2.0 extra.
In post 2.0, we've set up an Input Capture channel (the same as the main trigger). When that IC interrupt happens, it sets the same variable we were using before in poll mode so that the main IC ISR sees it on the next "Ne" tooth, and resets its main tooth count.
The polling method is less noise-prone because the pulse has to be at least .128 ms, if not .256 ms before we detect it. The interrupt method will see every short pulse.
Ken
Hey I have **** going on at home at the moment
I need to test the schematic on breadboard first. But I was thinking that maybe using the LM1815M (surface mount) isn't a good idea because the v3 pcb does it with resistors opamps and a few PNP transistors which are much more easy to get.
The PCB is designed if you wanna get one made, but it will cost you ~$15 (from batchpcb, the money won't touch my hands). But I probably won't work lol
Not to mention you will need to learn to solder surface mount and I can't find anywhere where the LM1815M is available
I need to test the schematic on breadboard first. But I was thinking that maybe using the LM1815M (surface mount) isn't a good idea because the v3 pcb does it with resistors opamps and a few PNP transistors which are much more easy to get.
The PCB is designed if you wanna get one made, but it will cost you ~$15 (from batchpcb, the money won't touch my hands). But I probably won't work lol
Not to mention you will need to learn to solder surface mount and I can't find anywhere where the LM1815M is available
i got you jobro and i hope it didnt sound too pushy with makin the board. priorities first is at home. i just had problems with making the second conditioner circuit and a little unsure on how to make the fan and boost circuits.
The PCB is designed if you wanna get one made, but it will cost you ~$15 (from batchpcb, the money won't touch my hands). But I probably won't work lol
Not to mention you will need to learn to solder surface mount and I can't find anywhere where the LM1815M is available
http://www.newark.com/41K3517/semico...R-LM1815M-NOPB
Ran across some MS forum posts where it was suggested the V3 pcb circuit was more noise susceptible then the LM1815 based circuit,and some debated whether the LM1815 would be a better choice with VR sensors.
What would be real slick is if you design the circuit so....one could jumper the circuit into either mode 1,mode 2 and zero crossing mode.
These guys have them, and show international sites
http://www.newark.com/41K3517/semico...R-LM1815M-NOPB
What would be real slick is if you design the circuit so....one could jumper the circuit into either mode 1,mode 2 and zero crossing mode.
These guys have them, and show international sites
http://www.newark.com/41K3517/semico...R-LM1815M-NOPB







