Clockwise Hall effect 4/2 DSM/Miata/MX-5 pattern CAS

For discussing and developing different RPM/Position decoders using our superior modular architecture! One thread per pattern, please.
volvoguy
QFP80 - Contributor
Posts: 63
Joined: Sun Jan 22, 2012 10:52 pm
Location: Scotland

Re: Clockwise Hall effect 4/2 DSM/Miata/MX-5 pattern CAS

Post by volvoguy »

I happen to be rather envious of that particular vehicle! Though if I had it I'm not sure how long it would be before the cylinder head was swapped onto the Amazon.
Fred wrote:[...] how did you come up with the *relative* timings of the inner/outer sections without that or without spinning it and scoping it?
I wish I could say I scoped it, that would have been much cooler. I wired the CAS up, fixed a ~300mm dia cam/crank timing wheel to it, and rotated it very slowly.
Fred wrote:if you want to duplicate work for your own edification, look for the lines around 'correctEvent' and modify those if statements and contents thereof.
Thanks. I'll see if knowing where to look helps me out :)
User avatar
Fred
Moderator
Posts: 15431
Joined: Tue Jan 15, 2008 2:31 pm
Location: Home sweet home!
Contact:

Re: Clockwise Hall effect 4/2 DSM/Miata/MX-5 pattern CAS

Post by Fred »

OK, your method of figuring out the angles should be close enough at worst. I'll push my work up later today (probably, though very slow start, up at 1pm... sigh) and you can compare notes with what you did.

I got the bulk of it changed to be correct last night, but didn't suss out either the old or new variant of the blue tick. Maybe it was the wine. :-p
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
Fred
Moderator
Posts: 15431
Joined: Tue Jan 15, 2008 2:31 pm
Location: Home sweet home!
Contact:

Re: Clockwise Hall effect 4/2 DSM/Miata/MX-5 pattern CAS

Post by Fred »

Didn't happen, will try to get it done tonight. Sorry.
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!
volvoguy
QFP80 - Contributor
Posts: 63
Joined: Sun Jan 22, 2012 10:52 pm
Location: Scotland

Re: Clockwise Hall effect 4/2 DSM/Miata/MX-5 pattern CAS

Post by volvoguy »

No wozza mate.
User avatar
Fred
Moderator
Posts: 15431
Joined: Tue Jan 15, 2008 2:31 pm
Location: Home sweet home!
Contact:

Re: Clockwise Hall effect 4/2 DSM/Miata/MX-5 pattern CAS

Post by Fred »

Ended up writing some corner-case fixes for the tip in enrich code that someone was having some drama with. He can work around it with data changes, but I wanted to serialise my thoughts ASAP. And now it's midnight. Sorry again. Maybe Tuesday night is *your* night :-)
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
Fred
Moderator
Posts: 15431
Joined: Tue Jan 15, 2008 2:31 pm
Location: Home sweet home!
Contact:

Re: Clockwise Hall effect 4/2 DSM/Miata/MX-5 pattern CAS

Post by Fred »

Doing extra hours at work, and getting through chores at home, didn't touch any of the three software goals I had tonight. Maybe tomorrow will differ. Still waiting on your attempt, though :-)
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
Fred
Moderator
Posts: 15431
Joined: Tue Jan 15, 2008 2:31 pm
Location: Home sweet home!
Contact:

Re: Clockwise Hall effect 4/2 DSM/Miata/MX-5 pattern CAS

Post by Fred »

Code complete! But...

Your diagram is wrong. Tsk tsk tsk. Please leave the old diagram online, provide a new one with red whereever black/blue occur, and post it below this and I'll link your original as EDIT: Wrong: http... and replace the old one with the new one. Okay? :-)

Basically, the two sequences of unknowns are absolutely identical in sequential state, so it's not possible to determine sync from either of them except by recording primary unknowns seen and on the fourth declaring sync. BUT, that is of SUPER minor benefit as the next positive sync is just after it. I won't bother. Or will I? Not today, anyway. Proof:

Image





Code pushed! Notes:

Combined your two UI commits and gave them a decent comment, ish.
Fixed the logic up.
Added some infrastructure to allow easy build of it.
Tested build works okay on my box (it compiles, it must be okay... ;-))

do this:

git remote add fred-github git@github.com:fredcooke/freeems-vanilla.git
git fetch fred-github
git checkout mazda-backwards
profit

:-)

Sorry for the delay...
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!
volvoguy
QFP80 - Contributor
Posts: 63
Joined: Sun Jan 22, 2012 10:52 pm
Location: Scotland

Re: Clockwise Hall effect 4/2 DSM/Miata/MX-5 pattern CAS

Post by volvoguy »

That is the business. Thank you. And sorry for the false lead with the diagram. Is this how you mean to have red replacing wherever black/blue were?
Image
User avatar
Fred
Moderator
Posts: 15431
Joined: Tue Jan 15, 2008 2:31 pm
Location: Home sweet home!
Contact:

Re: Clockwise Hall effect 4/2 DSM/Miata/MX-5 pattern CAS

Post by Fred »

You're welcome, and no apology necessary at all. My pleasure. :-)

Keep that one there, and add another with either:

10, 0, 1 black and 2 blue

OR

10, 11, 0, 1 black, 2 blue

As technically that could happen and save a fraction of a second in starting time. I don't think checking 11 is necessary at all, hence the former, but you could maybe mark 11 grey to indicate optional/pointless usage slash being part of the sequence.

That leaves 4, (5), 6, 7 as a false sequence (red is fine) that will be counted up to and then overridden by 8 occurring first. Whereas the identical sequence as listed above for black/blue will end with the count reaching the blue one and syncing before 3.

Make sense?
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!
volvoguy
QFP80 - Contributor
Posts: 63
Joined: Sun Jan 22, 2012 10:52 pm
Location: Scotland

Re: Clockwise Hall effect 4/2 DSM/Miata/MX-5 pattern CAS

Post by volvoguy »

Grey either looked too washed out or like black at a glance so I fancied it up.
Image
Post Reply