Miata Turbo Forum - Boost cars, acquire cats.

Miata Turbo Forum - Boost cars, acquire cats. (https://www.miataturbo.net/)
-   MEGAsquirt (https://www.miataturbo.net/megasquirt-18/)
-   -   Syncs on stim, not on car. 2001 miata. (https://www.miataturbo.net/megasquirt-18/syncs-stim-not-car-2001-miata-53904/)

y8s 11-28-2010 09:54 AM

Syncs on stim, not on car. 2001 miata.
 
(this is cross-posted to the msextra forums)

I'm finishing my MS3X and thought I got it all sorted out but something is wacky.

My crank and cam inputs are based on the MAX9926 reference circuit.
http://lh5.ggpht.com/_e2V9DRRikhU/TN...0/IMAG0439.jpg

The crank and cam signals go into the IN+. The IN- are grounded.

With the Stim set up to 99-00 miata and the MS trigger set up to same and rising edge, I get perfect sync.
http://y8spec.com/megasquirt/images/...-00_rising.png

If I change the trigger to falling edge, it still syncs but (and here's the crazy part) when I start the composite logger, it IMMEDIATELY loses sync. Stop the comp logger, it syncs right away.
http://y8spec.com/megasquirt/images/...00_falling.png

Now... when I put the thing in the car and hook it up to the actual sensors, I get varying results. First of all, I can't get a good composite log that looks anything like the above images unless I unground the IN- (I understand that leaving them floating enables auto threshold on the 9926?) and stick a pullup resistor on the raw input (2.2k to VCC before the 9926 1k input resistor).

But what's crazy is that while the signals look ok, I get no sync at all.
http://y8spec.com/megasquirt/images/...lup_no-gnd.png


So a few questions I was trying to answer for myself:
* does the crank and cam input need a pullup resistor?
* does the 9926 really automatically set the threshold when the IN- are floating?
* in TunerStudio, should the tooth spikes point up or down to be "right"?
* do any of the settings in Ignition Options/Wheel Decoder affect the ability to sync (other than spark mode or input capture)?

I searched a lot for some concrete answers to the 99-2005 miata triggers and only found 12 page threads arguing if the sensors were either broken or hall or VR or sticky. I'd like to avoid all those conversations again. I understand that the signals should be 5V on gaps and 0V on teeth and trigger on the RISING edge which is the 0-5V-going edge because that edge never "sticks" at various RPM and remains between adjacent crank teeth for the entire range over which the VVT works.


Thanks for the help.

Matt

Reverant 11-28-2010 12:02 PM

For your reference, the crank signal should be 12V (B+) high on gap and less than 10V on the trigger. The cam should be 5V pn gap and 0V on trigger.

y8s 11-28-2010 03:03 PM

I may have misread but I swear the fsm said 5 for both. I will check again for my sanity when I land.

Reverant 11-28-2010 03:20 PM

Forget what the FSM (and therefor, what the stock ECU needs). You need 12V on the primary (tacho) input on the MS.

y8s 11-28-2010 03:23 PM

Ahh so it is an ms requirement AFTER the 9926?

Reverant 11-28-2010 03:26 PM

Yes.

y8s 11-29-2010 11:30 PM

Dimitris, the guys at the msextra forums are telling me 12V on TSEL will fry something and that it is designed for a 0-5V signal.

Braineack 11-30-2010 08:59 AM

12v into the ms3 daughterboard WILL fry everything.

richyvrlimited 11-30-2010 09:11 AM

It's the sensor that requires 12v surely, not the ECU?

y8s 11-30-2010 09:40 AM

1 Attachment(s)
The wiring diagram shows that the cam and crank sensors both get power from "D" which is 12V from the main relay. It doesn't go back to the harness.

The other two connections are:
1. 4A "Device GND"
and
2. 3V and 3Y (cam and crank signal respectively).

Then later it shows how to inspect the signals...

Note the nice consistency of using 2V/Div for the cam (it is 2.5 squares high) and 1V/Div for the crank (it is 5 squares high) so both are normally 5V and a tooth brings them to 0. At least Mazda thought so in the FSM.

https://www.miataturbo.net/attachmen...1&d=1291127932

And these are measured at the ECU pins so they are straight out of the sensors. The only augmentation would be a 5V pullup to get full scale.

richyvrlimited 11-30-2010 09:46 AM


Originally Posted by y8s (Post 663339)

Note the nice consistency of using 2V/Div for the cam (it is 2.5 squares high) and 1V/Div for the crank (it is 5 squares high) so both are normally 5V and a tooth brings them to 0. At least Mazda thought so in the FSM.

EDIT:

Bleh bein a tard...

y8s 11-30-2010 09:48 AM


Originally Posted by richyvrlimited (Post 663340)
EDIT:

Bleh bein a tard...

no you're not, i posted it backwards and quickly fixed it.

Reverant 11-30-2010 10:56 AM

Obviously I have been building DIYPNPs for too long, the OP- there requires a 12V pullup. I need to check what I've done to my own MS3.

Ben 11-30-2010 11:00 AM

Matt,
Do you have pullups between the sensors and 9926? I'd think you'd need 470 ohm 5v pullups. I'd probably also try disconnecting IN- and let the chip auto threshold. If that doesn't work, I'd hook IN- to ~2.5V, but not to ground.

Sorry, don't have a lot of hands on with the 9926 yet.

Braineack 11-30-2010 11:04 AM

IIRC there's just a 5v and ground going into that chip. But the output is going directly from the chip to JS10. Matt, like Ben suggests, try a 5v pullup through a 470ohm to js10 as well.

But it looks like the outputs get a 5v pull-up through the two resistors with the 1001 stamped on them.

Ben 11-30-2010 11:11 AM

I'm actually looking for a pullup on the input side of the MAX9926.

Joe Perez 11-30-2010 11:31 AM

Yes, if you want to use a 9924 / 9926 with an OEM sensor, you need to leave the chip's (-) input floating (do not ground it), and apply a 5v pullup through a resistor (eg: 1k) to the (+) input. This will cause the threshold to auto-set at 2.5v. I've only personally run the 9924 with an actual VR sensor, however I'm taking this info from a conversation with Jean Bélanger here: http://www.msextra.com/forums/viewto...35149&start=20


Now, I'll admit that I know next to nothing about the composite logger (I'm still stuck in MS1 land, where it's fairly useless) but am I the only one who thinks that the first and third traces posted in the first post do not show similar-looking data? The first one (working on stim) shows me 4 CKPs per 1/2 cam revolution, whereas the last one (not working, on car) doesn't.


EDIT:

It also appears (in the last picture) that the yellow trace (which is labeled PriLevel) is depicting the cam sensor. Have you, by chance, accidentally wired CMP and CKP backwards?

Ben 11-30-2010 11:35 AM


Originally Posted by Joe Perez (Post 663399)
It also appears (in the last picture) that the yellow trace (which is labeled PriLevel) is depicting the cam sensor. Have you, by chance, accidentally wired CMP and CKP backwards?

Great catch Joe. Everyone else was looking at the trace like it was a composite log.

y8s 11-30-2010 11:16 PM

Wiring-wise, IN1 definitely comes from main harness pin 24 (crank) and out 1 goes to TSEL.

Similar for IN2/Cam/Out 2/JS10.

If the Stim can generate a sync-able signal via the 9926 circuit, then the output of the 9926 should not be the problem. The 9926 simply follows the input and generates the same output at full amplitude, right?

This leads me to believe the problem is somewhere between my crank and cam sensors and the 9926. Since I dont know what the stim is generating, I dont know what I dont have on the car that is present on the stim for sync to take place.

y8s 12-06-2010 03:42 PM

Here's the latest update (note there's more at my thread on msextra):

This is my lovely cam and crank signal (cam on top) during cranking. Note that I can't do a "real scope trace" while the car is running because this particular capture requires the trigger setting to be changed to "log crank & cam" instead of "miata 99-00".

http://y8spec.com/megasquirt/images/...ing_hilite.png

I reconstructed the signals based on lots of searching and photoshoppery:

http://y8spec.com/megasquirt/images/...king_fixed.png

Now I'm pretty sure I'm using the pink edges for my triggers. If it's not clear in the fucked up plot, they are the rising edges. And they appear to be in the right place in spite of the yellow falling edges (also known as "bonkers", "stuck" or whatever...).

My problem is that even with this set up properly with the proper edges, the car runs like shit. The timing (when set to fixed timing) is all over the place.

suggestions or comments?

JasonC SBB 12-06-2010 04:53 PM

Just remember you MUST SYNC on the CRANK RISING edge, never falling.
The falling edges go berserk during cranking. The rising edges don't.

y8s 12-06-2010 04:56 PM

Right... I do. It wont even start if I change to falling edges because they come so randomly.

(Incidentally, the MS3 has only one edge option that applies to both cam and crank--if you want rising on one and falling on the other, you have to invert one of them)



The question remains, why does it act funny when running?

muythaibxr 12-07-2010 11:06 AM

James and I are not clear on what it's actually doing wrong while running.

Braineack 12-07-2010 11:08 AM

it idles great.

Y8s, send him the composite log you took last night. there was a pattern of it losing sync. the same pattern of 5 error spikes showed up repetitively when he tried to revs the motor up.

y8s 12-07-2010 11:17 AM

I'll post it over at the squirt forums.

Ken, I have built the "standard 99-00 miata" input circuits that replicate the stock ECU's input circuitry in the VR area to compare and contrast. I still really like the idea of using the 9926 because of the tiny pcb I can slap on the backside of the V3 board.

Joe Perez 12-07-2010 11:28 AM


Originally Posted by JasonC SBB (Post 665730)
Just remember you MUST SYNC on the CRANK RISING edge, never falling.

Could you clarify something for me- since "rising" and "falling" vary with regard to where in the system one is observing it (before or after an inverting input circuit), are we referring to the LEADING or TRAILING edges? Until somebody installs an MS3 in a DeLorean, those are the only absolute points of reference.

y8s 12-07-2010 11:37 AM

Based on Jason's previous research, he's been scoping the raw signal between sensor and ECU. His "rising" edges are the trailing ones which I've shown in pink here:

http://y8spec.com/megasquirt/images/...ing_hilite.png

The problem becomes when the signal gets so jacked up that an observer assumes "the signal goes high on a tooth and the trailing edges are in fact falling" <--- this is not true.

I think we all agree that the output of the sensor goes to ground on a tooth.

Joe Perez 12-07-2010 12:01 PM

While I admit that I know little about the composite logger, the pink edges in that picture certainly look like leading edges to me, at least by the definition with which I am familiar.

http://img40.imagefra.me/i5c7/thradd..._817_u77ts.gif

Maybe I just have the polarity wrong, and this signal is depicted as active low?

You know what? This log still looks like somebody smeared runny cat feces on a scope to my eyes. I still can't figure out what the hell it's trying to tell me, and I'm used to reading binary on high-speed logic analyzers in realtime.

I really with this device would just show us actual port states in this view. They've got such a rich display for single-trigger mode...

y8s 12-07-2010 12:09 PM

Joe, remember my signals are not inverted. They follow the "rest at 5, tooth at 0" open collector of the sensor output.

here's a fixed graphic from a previous post:

http://y8spec.com/megasquirt/images/...king_fixed.png

Remember also that on the NB sensor, the "big" tooth comes first for pair of adjacent teeth.

muythaibxr 12-07-2010 02:43 PM

So Braineack: the engine idles fine, and it misfires etc.. when revved up corresponding to lost sync errors. Is that an accurate description of the problem?

I just keep seeing all the info about the edge you're triggering on and composite logs, etc... but no reference to the actual observed issue with the way the engine runs.

I was trying to figure out why you (y8s) thought you needed to be looking at the composite logs so I had a good idea of why I was looking at them!

Ken

Braineack 12-07-2010 02:57 PM

I came over last night, and he cranked it over for me and it idles very smoothly. but when given throttle, it went lean and then would misfire and seemed to run out of sync. When looking at the composite log of it, it kept losing sync in a constant pattern. I believe y8s uploaded it on his msextra.com thread.

Tonight he's going to try using the same input circuit that Peter is using on the '99 car he helped out with, and that I've used with success as well.

muythaibxr 12-07-2010 03:03 PM

OK thanks. I'll keep my eye on the thread to see how it goes.

IF/when you guys run out of ideas, I'll try to find some time to take a look in person myself.

Ken

y8s 12-07-2010 03:05 PM

OK lets see if I can break it down from a driver's perspective.

Initially I had problems getting sync on the car but I got fine sync on the stim.

After going over my cam and crank input circuit, I changed nothing (though maybe cleaning up joints helped?) and eventually got the car to run. I had some temporary issues with a pair of backwards diodes on the peak & hold board that made it run on 2 cylinders but Braineack spotted that and from then on I was firing on all four.

So now I can walk out and start the car just like normal and it fires right up (30F weather--not bad for no tuning) and idles relatively smoothly. I found out last night that my cheap and dirty alternator control method was bunk and causing wild swings in batt voltage so I turned the output off and the idle smoothness returned.

---

MY SYMPTOMS:
Aside from obvious fueling issues, when the car is idling and the timing is set to "Fixed Timing" (10°) the timing light doesn't show a steady timing mark. It jumps around a lot. It wont even stay in place long enough to know what my timing really is.

On top of that, when I rev the motor and hold the pedal at some nominal position, it cuts in and out (leanness at least) and doesn't hold a steady RPM with no engine load (guessing 40 kPa). The RPM just bobs around all over the place.

---

I'm currently in the process of building the following circuit into the VR area and building the alternator control circuit that was tested by JasonC SBB (and previously worked on my car).

http://westfieldmx5.devocht.com/star...ut_circuit.gif

This circuit is pretty well accepted to a) be inside the stock ECU and b) work with the MS. I figure it's worth a shot to see if my 9926 implementation is part of the problem. No big deal, I had the parts on hand.

I figure that and the alternator control circuit will rule out some of the variables so I can move on and find out why the upper revs are so nutso.


....


I've been using the composite logger because it's the only way I know how to verify what the megasquirt is seeing from the cam and crank sensors. Sorta. Should I ignore it?

muythaibxr 12-07-2010 04:12 PM

if you're getting sync loss, it's good to use the composite longer, although you might want to consider using the sync error logger, which will allow us to actually see definitively why you lost sync.

Ken

y8s 12-07-2010 04:52 PM

who knew. I will try that tonight if there are not icicles on my car.

muythaibxr 12-08-2010 04:43 PM

Actually check out your thread on msextra:

http://www.msextra.com/forums/viewto...268226#p268226

James found some problems with your signal.

Ken

y8s 12-08-2010 10:16 PM

Abe's input circuit does indeed have more awesomeness than my own. Car seems to run very well.

But F ME it's cold outside. "Feels like" 18F.

Oh also the alternator circuit works great too. I had to tweak the set point but now it's a very solid 14.3V.

shuiend 12-08-2010 10:20 PM

So Abe's circuit works and the max996 or whatever does not?

y8s 12-08-2010 10:58 PM

there may be some issue with my implementation--i dont know for sure.

y8s 12-12-2010 10:48 AM

Some follow-up:

I built the Abe circuit and it works. I managed to fit it in the VR area as per Frank's Implementation.

The alternator circuit helped smooth out some of the crazy voltage swings that my ridimentary generic output was causing--that helped the idle oscillation. Scott had a wrong value cap instead of the 100uF so I swapped that out of his kit and tuned the circuit to 14.3V set point and it works very well. For those of you who have had problems with this circuit, it is a tuning issue and you may need to tweak the 1% resistor values to get the right set point. I'm thinking the revised version might be nice with a 47k resistor and maybe a 5k 20-turn potentiometer in series. But only if the pot doesn't drift.

So in the meantime, I discovered that running the composite logger while using Miata 99-00 triggering caused the megasquirt to lose sync and kill the engine. James hit me up with some revised firmware and it fixed that issue.

So then the topic of VVT came up. And with the composite logger working, I was able to do this:

http://www.y8spec.com/megasquirt/images/vvt_range.png

That's basically what I discussed in the vvt current vs. advance thread. I just set a PWM output (at 78Hz--the highest I can select) with the advance region at 80% duty and the megasquirt happily complied followed by cooperation of the spool valve and cam.

So dead stupid open loop control is not a big deal. The car doesn't lose sync because the edges Abe's input circuit requries are the ones that don't cross over the crank pulses.

Joe Perez 12-12-2010 12:21 PM

Fuckin-a, Bubba!

:bigtu:


So, the 9926 circuit just didn't cut it for you, then?

Man, I'd really love to get in there with an actual oscilloscope on one and figure out what was going wrong. So far, I've just been deliriously happy with that chip.

y8s 12-12-2010 12:58 PM

I dont know exactly what is the issue with the 9926. I haven't given up on it yet but I dont have an o-scope.

But for now it works so....

Ben 12-13-2010 10:39 AM


Originally Posted by Joe Perez (Post 668009)
So, the 9926 circuit just didn't cut it for you, then?

Man, I'd really love to get in there with an actual oscilloscope on one and figure out what was going wrong.

Me too.

Braineack 12-13-2010 10:41 AM

Maybe the Y8s should send his little 9926 board over to the Ben?

y8s 12-13-2010 10:46 AM

that shit's installed. I'd rather just make another one.

Braineack 12-13-2010 10:48 AM

oh you left it on the mainboard?

y8s 12-13-2010 10:49 AM

yeah it's still there for future expansion. wired only to power. how un-green of me.

Ben 12-13-2010 11:36 AM


Originally Posted by y8s (Post 668263)
yeah it's still there for future expansion. wired only to power. how un-green of me.

That extra load on the alternator is going to kill your economy man.

We should have one of Jean's 9926 boards around here. We've also got a new sequencer to test out. The hardest part will probably be the fabrication of a live sensor test rig.

y8s 12-13-2010 12:23 PM

I used kday's 9926 reference circuit. super low component count.

Reverant 03-16-2011 12:34 PM

Matt, did you connect the VSS to the MS3? If so, what settings did you use?

y8s 03-16-2011 03:39 PM

1 Attachment(s)
Yes, I ran VSS in to the xpander CAM input without any extra circuitry. I first tried PT4 but there was no pullup. It'd probably work on any of the inputs with a pullup.

http://www.msextra.com/doc/general/m...hems.html#ms3x
(for reference for the cam input)

edit: oh you said "settings"...


https://www.miataturbo.net/attachmen...1&d=1300304481

redrider706 07-11-2011 11:42 AM

Matt,

Did you get the max9926 based input circuit working on the car?

-Raj

Braineack 07-11-2011 11:51 AM

he never did, he went with Abe's circuit.

Honestly, you dont even have to build that... should work on regular Opto input and the MS3x cam in.

y8s 07-11-2011 11:53 AM

Nope, never did get the 9926 input working.

If anyone wants the circuit to try, I can mail it to you for a buck or two to cover postage.

Ben 07-11-2011 12:33 PM


Originally Posted by Braineack (Post 747661)
he never did, he went with Abe's circuit.

Honestly, you dont even have to build that... should work on regular Opto input and the MS3x cam in.

I recommend using the VR input with a pullup. Works fine and is easy.

Put a MAX9926 on a Toyota last week, worked fine. Haven't tried one on a Miata yet.

redrider706 07-11-2011 01:32 PM


Originally Posted by y8s (Post 747662)
Nope, never did get the 9926 input working.

If anyone wants the circuit to try, I can mail it to you for a buck or two to cover postage.

Hell yeah. I would love to play around with it. What is your paypal id?

Thanks.
-Raj

redrider706 07-11-2011 01:35 PM


Originally Posted by Braineack (Post 747661)
he never did, he went with Abe's circuit.

Honestly, you dont even have to build that... should work on regular Opto input and the MS3x cam in.


Originally Posted by Ben (Post 747680)
I recommend using the VR input with a pullup. Works fine and is easy.

Put a MAX9926 on a Toyota last week, worked fine. Haven't tried one on a Miata yet.


Thanks for the info guys. I have Abe's circuit running as part of his pnp board. I was just looking at options for getting rid of that board.

-Raj

y8s 07-11-2011 03:47 PM


Originally Posted by redrider706 (Post 747711)
Hell yeah. I would love to play around with it. What is your paypal id?

Thanks.
-Raj

when I say "someone" I mean someone with at least an EE degree and an oscilloscope that can figure out why it doesn't work consistently with the NB sensors.

is that you?

redrider706 07-11-2011 03:56 PM

Well, background is chemical engineering/Physical chemistry and I have done a lot of instrument computer interfacing. I can give it a shot and see if I can figure it out.

-Raj


All times are GMT -4. The time now is 02:07 AM.


© 2024 MH Sub I, LLC dba Internet Brands