Miata Turbo Forum - Boost cars, acquire cats.

Miata Turbo Forum - Boost cars, acquire cats. (https://www.miataturbo.net/)
-   ECUs and Tuning (https://www.miataturbo.net/ecus-tuning-54/)
-   -   Cam signal idea for full sequential (https://www.miataturbo.net/ecus-tuning-54/cam-signal-idea-full-sequential-36404/)

mrtonyg 06-26-2009 02:53 PM


Originally Posted by Joe Perez (Post 424056)
Both inputs of the scope are set to DC, so they are showing you the absolute voltage on the line at any given time. At the left, the green 1> icon shows you the 0V point for channel 1. It is quite clear that the signal coming from the VR sensor is positive with regard to ground for half of the cycle, and negative with regard to ground for the other half.


Do you contend that the waveform shown in channel 1 is not an AC sine wave?


Joe, of course that is an AC sine wave. That is what I have been saying. You have half the signal above the 0v line and the other below.

Your contention was that if you move the 0v line to the bottom of the sine wave you still have an ac signal...which you don't because all the voltages are above 0v.

You might still get a signal with one of the probes on the negative shield wire but the proper signal is your negative probe on one signal wire and your positive probe on the other signal wire (because that is what the PCM sees).

I will be out vacationing for the next couple days, see you all later.

JasonC SBB 06-26-2009 02:58 PM


Originally Posted by mrtonyg (Post 424060)
What sensor are we talking about here. The VR sensor doesn't have a need for reference or input voltage.

Correct, but Mazda may have decided to return one side of the VR sensor output to 12V to make the input circuitry in the ECU simpler.

JasonC SBB 06-26-2009 02:59 PM


Originally Posted by mrtonyg (Post 424069)
Joe, of course that is an AC sine wave. That is what I have been saying. You have half the signal above the 0v line and the other below.

And then if you instead connect one of the signal wires to 12V, and measure at the other signal wire, you would see half the signal below 12V, and half above 12V.

Joe Perez 06-26-2009 02:59 PM


Originally Posted by mrtonyg (Post 424069)
Your contention was that if you move the 0v line to the bottom of the sine wave you still have an ac signal...which you don't because all the voltages are above 0v.

No, it wasn't.


Let's go back and look again at what we both said:


Originally Posted by mrtonyg (Post 424037)

Originally Posted by Joe Perez
It's not until you connect the sensor to an input circuit that you really define a reference. Typically, one side of the sensor is connected to ground.

That is incorrect, if you connect one side of a VR sensor to ground it will not generate the expected ac sine wave.

The only wiring that goes to ground on a vr sensor is the shield wire, not the signal wires.


What I started out with was that the VR sensor, by itself, is a device generating a balanced output signal (one where the voltages on the two wires are always of equal but inverse magnitude) and that this voltage is not referenced to anything at all except for the other leg, until such time as one of the two legs is connected to a common point. Typically, this common point is the ground point of whatever circuit is being used to receive the signal from the other wire.

You then replied that connecting one side of a VR sensor to ground causes it not to generate "the expected ac sine wave."

I then posted a scope trace showing the output of a VR sensor which has one leg connected to ground, where you can see that the output is an AC sine wave.


What am I missing here?

Joe Perez 06-26-2009 03:01 PM


Originally Posted by JasonC SBB (Post 424073)
And then if you instead connect one of the signal wires to 12V, and measure at the other signal wire, you would see half the signal below 12V, and half above 12V.

Correct. The output of the sensor will swing above and below whatever voltage is at the common point. If you connected one side of the VR sensor to +12, then measured the other side with a scope, you would see a signal swinging above and below +12 if the scope probe's ground was connected to chassis ground, and you would see a signal swinging above and below 0v if the scope probe's ground was connected to the same +12 point as the other leg of the sensor.

IOW, all electrical potentials are relative to a reference point.

AbeFM 06-26-2009 06:08 PM

Yes yes, and it's all -10,000v relative to some van degraff generator located in toledo. The important thing is that it's centered on the refernce voltage - i.e. the peak differential between on leg and the other.


Of course, little of that matters for this guy - I'm still a fan of buying a $0.50 sensor, putting it by the gear, and glueing a magnet like you would a bicycle. :-) OEMs do this, so it's not unreasonable.


Originally Posted by Joe Perez (Post 424017)
This is one reason why the MS1 cannot do full sequential, as its trigger inputs are edge-detecting only and require all edges to be evenly spaced. So we ignore the trailing edge, read the leading edge of CMP (which has a fixed relationship to CKP) and use it to reset the cycle counter.

Couldn't you look at falling edges and get the same information, PLU... no, I guess you need even spacing, eh?

Joe Perez 06-26-2009 07:04 PM


Originally Posted by AbeFM (Post 424120)
Couldn't you look at falling edges and get the same information, PLU... no, I guess you need even spacing, eh?

Correct. Both triggers on the MS1 are edge-detecting, and the trailing edge of CMP would produce uneven spacing. Actually, there's no technical reason for this limitation. The primary trigger must be edge-detecting as it's the CPU's hardware IRQ line (which by design recognizes only falling edges) however the second trigger is a general-purpose I/O line. They could have written the code to be state-detecting: IOW, when you receive a CKP and branch off to the interrupt routine, test CMP to see if it is high. If it is, then reset the wheel counter. Otherwise, increment the counter as normal.

You know, I just realized something- you could easily implement this in hardware! Put CMP and CKP into an AND gate, and do a one-shot on the gate output's falling edge. That would give you the ability to do four-channel ignition with MS1. (Still no four-channel injection.)

AbeFM 06-26-2009 07:22 PM

It's all down to if the software will know what to do with it.

You're the guy who loves assembly, why not dive in there and fix it? :-)

More seriously, yes, I'm a fan of doing it in hardware, if the software can take advantage of it, that seems like a sweet, simple set up. As would be griding off all the teeth till you're down to one, which is what you are doing, no?

Joe Perez 06-26-2009 07:31 PM


Originally Posted by AbeFM (Post 424139)
You're the guy who loves assembly, why not dive in there and fix it? :-)

Largely because I have no CAS, and I've gotten to the point where I'm starting to think about the next car rather than the current one. If all goes to plan, that one will be running MS3.



As would be griding off all the teeth till you're down to one, which is what you are doing, no?
Huh?

AbeFM 06-26-2009 09:17 PM

Next car? Wimp! A little love and attention and that would be a quick car. Time to get serious about mechanicals. Come out to Cali and we'll have that motor out and fixed up in a jiffy. :-)

Well, you're basically masking from the CPU all but one pulse of the cam, right?

Joe Perez 06-26-2009 09:38 PM


Originally Posted by AbeFM (Post 424191)
Next car? Wimp! A little love and attention and that would be a quick car. Time to get serious about mechanicals. Come out to Cali and we'll have that motor out and fixed up in a jiffy. :-)

It's looking increasingly likely that this will happen, though whether it winds up being San Diego or LA is uncertain. Obviously the motor build would take place, but it would probably be fairly low-key; retain the 1.6 block and just load it with new rods & pistons. The idea would be to get in-and-out for minimum cost. At most, a slightly larger turbo would be in order. I have to be realistic however- I've reached a point of diminishing returns with this car.



Well, you're basically masking from the CPU all but one pulse of the cam, right?
Well, yeah. Of the two pulses, one would be masked. It is, of course, irrelevant for my car since I currently have zero cam pulses.

AbeFM 06-28-2009 02:23 AM

One pulse would be an infinite upgrade!

Hmmmm.... I know a certain guy who's sitting on a pile of 1.8's with nice modern heads.... :-)

slowmx5 06-30-2009 09:30 AM

Guys,

Been working nights and just catching up. Some great stuff here. Can someone summarise (for a non-electrical engineer) the options for me? Simplicity and reliability are the key requirements. Got some time off coming up and getting the car sorted is one of the things I'll be doing during that time.

slowmx5 07-06-2009 12:41 PM

All,

I am going the Hall route on EMs advice. It turns out that the studs on the FM adjustable cam gears are stainless steel. What I need to do is replace one of the nuts with a mild steel version and, apart from mounting the sensor, I should be good to go.

I do require a little help though. The FM cam gears don't use metric studs. I think they are UNC, but can't be sure. Can anyone on the other side of the pond tell me or find out what thread they use so I can try and source the correct nut?

I'll post up the results once the engine is running. Should be done by the end of the week.

AbeFM 07-06-2009 01:21 PM

Hall? a true 'hall effect' sensor is a magnetic sensor, it looks for a voltage crossways to a current flow, and will be happy to ignore unmagnetized teeth, mild or otherwise.

The stock miata "hall" sensor is not a hall sensor, it's a VR sensor. Personally, I'd take that, grind off two teeth from a stock (or stock-compatible) cam gear, and you'd be done.

slowmx5 07-06-2009 04:26 PM


Originally Posted by AbeFM (Post 427328)
Hall? a true 'hall effect' sensor is a magnetic sensor, it looks for a voltage crossways to a current flow, and will be happy to ignore unmagnetized teeth, mild or otherwise.

The stock miata "hall" sensor is not a hall sensor, it's a VR sensor. Personally, I'd take that, grind off two teeth from a stock (or stock-compatible) cam gear, and you'd be done.

Yeah, I am not sure what the difference is. EM differentiate between a magnetic and hall effect sensor when you select the cam/crank sensor type. It is the only 2 options. Their suggestion is a hall effect sensor as they are less sensitive to noise. Mount the sensor, replace one nut with a mild steel version and I should be done. It should also maintain the balance of the cam gear.

Unfortunately I don't have a stock compatible cam gear to grind off any teeth. These are teeth on the stock intake cam gear?

AbeFM 07-06-2009 06:19 PM

Yes, the 99+ gears all have teeth on them, two on one end, a single on the other.

They are pretty much using utterly garbage terminology. :-) A hall sensor litterally looks for a magnetic field. Some sensors have a magnet inside, then when metal goes by (mild steel) it warps the field from it's own internal magnet and reads that. Then there are "VR", or 'variable reluctance' sensors, which due a similar trick, but don't use the Hall effect to read the signal.

In practice, people often say "hall" effect for a sensor which puts out a digital, or near digital (technically an "open collector output", which grounds a wire every time the sensor is sensing something) signal. Sometimes these are processed hall signals, sometimes processed VR signals, for that matter it could very well by optical.

As to the bolt, can't you just drill/tap the gear for any bolt you have handy?

If you want a stock '99 gear, with the teeth on it, I could mail you one for the cost of shipping, no problem, but you should be able to get a junkyard one much cheaper.
-Abe.

http://abefm.smugmug.com/photos/138625517_nk49P-L.jpg

Note the righthand gear (exhaust), there's a single tooth on bottom, and a double on the top.

slowmx5 07-07-2009 08:51 AM

Yes, I see the teeth on the cam gear now. I probably have one stuffed in a box somewhere as the stock gears were removed when the head was built.

Seeing as we are talking sensors, here is the sensor I will be using.

Whether I use a small magnet (6mm diameter button) countersunk into the gear (and epoxied) or change one of the stainless steel studs/nuts for a ferrous set will depend on where I can effectively mount the sensor. I hope to drill the plastic shroud and mount through that, otherwise I'll have to fabricate something out of aluminium to mount it in front of the cut off cam cover section. I favour the magnet idea at the moment.

AbeFM 07-07-2009 01:02 PM

Maybe put a stud in one and leave it longer? The sensor does look for ferrous metal, not a magnet. A magent would likely work, if the polarity is right.

DealExtreme: $2.36 Super-Strong Rare-Earth RE Magnets (8mm 20-Pack) Maybe there? They have lots of sizes, but it was the smallest I've seen.

BTW, I put a magnet into the head of a bolt on my car cause I got tires of dropping that bolt. It wasn't hard to do, just found a magnet which matched the bolt and put a drop of (probably unneeded) glue. It's the sort of http://www.mcmaster.com/param/images/cap/hexflange.gif like that.

McMaster-Carr I wonder if somethign like that would work. I've seen 'bungee nuts' which are just nuts with a tall metal top for hooking bungee cords on motorcycles. Anything like that might give you your pulse.

slowmx5 07-07-2009 02:20 PM

You know I never considered the magnets polarity. Actually how would one check it was correct?

I have ordered a few of these magnets. EM feel a magnet might be a little strong forcing me to run a large gap, so I may go back to the idea of replacing a stud and nut with ferrous items (I think I have found a machine screw and nut that fits, no idea what the thread actually is though).

AbeFM 07-07-2009 03:45 PM

So pull the screw out and check it? It really shouldn't be very hard - I'm assuming you have the cam gear?

Yes, with a magnet, you'd probably want a large gap. You might consider the deal extreme ones, they are handy to have around the house anyway. They are sold for making batteries fit in the wrong size devices, but I use them all over the place.

If it were me, I'd wave the magnet in front of the sensor, and see if you get a signal. :-)
-Abe.

slowmx5 07-07-2009 04:20 PM


Originally Posted by AbeFM (Post 427718)
So pull the screw out and check it? It really shouldn't be very hard - I'm assuming you have the cam gear?

If it were me, I'd wave the magnet in front of the sensor, and see if you get a signal. :-)
-Abe.

Yes, I have the stud/nut out. It's just that, not being metric, I'm having trouble matching it over here. I'm going to try a place I know tomorrow that always comes up trumps when I need unusual fixings etc. Hopefully that'll sort it.

If I wave a magnet in front of the sensor is that something that a DVM will read? I have a variable bench supply so checking it out shouldn't be hard. Actually I've always been tempted by one of these would be very useful for this type of thing.

AbeFM 07-08-2009 12:43 AM

Sure, I forget if it was two wire (it's likely 3) but you'll most likely see it floating, and short to ground when it's "on".

So, put a big resistor (1k?) on the "output" line to the supply voltage. Then read that output line, and when it's "on" it should drop to 0 volts, the rest of the time it should be at supply.


BTW, American threads are pretty easy - it's in threads per inch. Very likely it's a 4-40, 6-32, 8-32 or 1/4-20. The first numbers are just a size, you can look it up on any tap-drill chart, with metric equivalents. The 1/4 is a 1/4 inch, or 25.4/4 mm.

The second number is the number of threads per inch. So, measure out 25.4 mm, and count the threads. If you get ~32, it's 32. If you get ~40, it's 40. Etc etc, and it should be pretty obvious once you do it. Or send a pic of the bolt next to a ruler.

slowmx5 07-10-2009 12:48 PM

It's done. Tested the sensor using a bench supply off and then on the car before applying battery power and starting the engine. The whole thing looks very clean and neat, far better than having that Mk1 OEM CAS on the engine. Plenty of room at the back of the engine now.

For information the sensor picked up ferrous material up to about 4mm air gap, and up to about 11mm with the magnet (which I went with).

I'll put up pictures at some point soon.

Thanks to everyone for their help.

AbeFM 07-10-2009 02:11 PM

Would love to see pics.

Out of curiosity, did you get more sensitivity to the magnet with one polarity than the other?

slowmx5 07-10-2009 03:02 PM


Originally Posted by AbeFM (Post 428843)
Would love to see pics.

Out of curiosity, did you get more sensitivity to the magnet with one polarity than the other?

Yes, in fact the sensor only seemed to work properly with one polarity. The side with the dimple on it worked, the other did not.

JasonC SBB 07-10-2009 04:23 PM

Pls. summarize what you ended up doing for posterity.

slowmx5 07-10-2009 04:59 PM


Originally Posted by JasonC SBB (Post 428877)
Pls. summarize what you ended up doing for posterity.

Will do. I've taken photo's so given a few days I'll get them posted with a summary.

slowmx5 07-13-2009 05:45 PM

I drove the car on Saturday morning. The engine ran fine 99.9% of the time but every 2 or 3 minutes it would momentarily hesitate and buck. Every time it did this WinTEC4 flagged an intermittent CAS error. Disappointing and not something I could live with, so I had another think about it during the afternoon and made some changes on Sunday. I removed the magnet as I did not have time to play with it further. I do not know whether the Hall sensor did not like the magnet or whether it was the size of the air gap or that the magnet required better alignment (on the bench the sensor acted a little strangely at times if it was not passed directly over the magnet or if the magnet was orientated in reverse polarity - it occasionally remained pulled to ground). So I made the decision to go with a more conventional ferrous tooth that I fashioned out of a small section of iron bar. I mounted that, made a new mount out of aluminium for the sensor that allowed for adjusting the air gap to about 1.2mm (well within the 4mm tolerance I measured on the bench) and for some adjustment of alignment.

Once the cam cover etc was re-installed I started the engine and let it idle for 10 minutes in the garage. No "intermittent CAS errors". I've since driven the car about 20 miles and it has not missed a beat, so far so good.

Could the magnet have been made to work? Probably.

AbeFM 07-14-2009 04:05 AM

My guess is it overpowered what the sensor was meant to read. Another case of "use what you're supposed to use for what you're supposed to use it for". I think an actual, bare, simple, hall sensor and magnet would work great, but since you bought a ferrous metal sensor, that's what to use. Way to go, glad it worked. I had the same issues till I worked out my circuit, and it's a world of difference doing it right. :-) Still want pics.

slowmx5 07-18-2009 05:00 PM

Been rather busy this week but have managed a short summary of the Hall sensor installation. I'll try and do a proper job of it soon - when I do I'll update the link here. Anything that I have skipped over then ask and I'll add it to the summary.


All times are GMT -4. The time now is 08:40 AM.


© 2024 MH Sub I, LLC dba Internet Brands