Page 1 of 2

Nissan Leaf Resolver offsets

Posted: Fri Apr 12, 2019 10:07 am
by johu
So it turns out the Leaf motors are marked with a resolver calibration value that needed to be entered into the inverter whenever a mechanic swapped either motor or inverter. So on this thread I wanted to collect some of these numbers to find the system. They can be found on the bottom of the motor. Here are some:

Somehow I think it's a group of 3 2 digit hex numbers and 1 digit on Gen 1 motors?:
  • 8A00000000 (Gen 1)
  • 8E00000000 (Gen 1)
  • 9400000000 (Gen 1)
  • 8600490054
  • 8500070057
  • 8400650056
  • 84007D005F
  • 8200DF005D - syncofs = 1000 (where 360°=65536). So 0x4 if 360°= 256
  • 800044004A
  • 7F0036005D
  • 7F0055005D
  • 7500C1004E
  • 7E001B005A
So all the first and the last number are sort of close together. The middle one doesn't follow that scheme. The Gen 1 motor seems to have only the first number set.

If it is really 3 and why, I don't know. Maybe for forward and reverse but what is the 3rd?

EDIT: many numbers now. Since I've pretty much tuned syncofs for my motor others can start doing so. Maybe add the numbers to their original post in bold so I can see it. Or we might just transfer it to a wiki page.
I can say for sure that syncofs 1000 +- 500 seemed the point for my motor were it would not spin on ID current. 1000 means 1000*360/65536=5.5°. If we assume 360° is 256 in Nissans world then syncofs_256=1000*256/65536 = 0x4. If we further assume that they phase shift their calibration by 180° for some reason then 0x2 would be perfect for my motor since 0x2 + 0x80 = 0x82.
In this case to convert the first digit to an openinverter-syncofs you would calculate syncofs = ((digit + 0x80) mod 256)*256
Lets get this confirmed.

Maybe I should add this here: To find syncofs you set throtid=1, throtiq=0.05. Now find a syncofs where the motor won't move at all, even at full throttle. Careful, the motor can spin up uncontrolled! I think disabling regen actually helps. Jacking up the wheels instead of neutral gear to be able to use the cars brake certainly helps.

Re: Nissan Leaf Resolver offsets

Posted: Fri Apr 12, 2019 2:01 pm
by D@F
do you have a photo of them, i will check mine this evening.

Re: Nissan Leaf Resolver offsets

Posted: Fri Apr 12, 2019 4:16 pm
by D@F
2158F4C8-3D8D-4DF2-BE3B-D8CC7AF3EC83.jpeg
Is it that?

Re: Nissan Leaf Resolver offsets

Posted: Fri Apr 12, 2019 5:03 pm
by johu
Yes, so 8100650056 it seems?

Re: Nissan Leaf Resolver offsets

Posted: Fri Apr 12, 2019 6:31 pm
by D@F
81 or 84 i have to confirm tomorow morning

Re: Nissan Leaf Resolver offsets

Posted: Sat Apr 13, 2019 9:18 am
by D@F
I Check it and is 84.
884026CF-6EAC-416C-B6FE-886D5641D674.jpeg

Re: Nissan Leaf Resolver offsets

Posted: Sat Apr 13, 2019 2:21 pm
by Jack Bauer
Here is mine. Gen 1 leaf.

Re: Nissan Leaf Resolver offsets

Posted: Mon Apr 15, 2019 2:15 am
by dima
Maybe the rotor "wiggly" cuts with 3 error offsets?
Some heavy math reading. https://patentimages.storage.googleapis ... 030532.pdf

Resolver SinglSyn TS2208? https://www.tamagawa-seiki.com/products ... glsyn.html
Chip AU6805? https://www.tamagawa-seiki.com/products ... coder.html ...the 3 ERRCD are suspicious (Manual)

Image

Re: Nissan Leaf Resolver offsets

Posted: Wed Apr 17, 2019 12:39 pm
by nailgg
Mine: 7F 00 36 00 5D

Re: Nissan Leaf Resolver offsets

Posted: Sat Apr 20, 2019 3:37 pm
by arber333
I have a motor Gen1 EM61 with offset code
8E00000000

Re: Nissan Leaf Resolver offsets

Posted: Fri Apr 26, 2019 8:35 pm
by nailgg
While looking at the Ebay link @Kevin Sharpe posted in the "auctions of interests" topic, found this: 800055005D

With this one, 3 out of 5 non-Gen1 motors have 5D in the last portion.

Here: https://www.ebay.co.uk/itm/MOTOR-ASSY-T ... 2997840962

Re: Nissan Leaf Resolver offsets

Posted: Wed May 22, 2019 7:53 am
by purplespark
A bit late but here's mine ,gen2 ,

84 00 7D 00 5F

Re: Nissan Leaf Resolver offsets

Posted: Sat Jul 13, 2019 5:50 pm
by zippy500
I have a faulty inverter, its just not possible then just to get anyone just to fit then,

Does anyone know how to reprogram the offset on a different inverter ?

Re: Nissan Leaf Resolver offsets

Posted: Sun Jul 14, 2019 3:05 am
by celeron55
I've dumped the eeprom in my gen2 inverter, and the resolver offsets were there, so desoldering the eeprom and writing them there is a possibility. Not sure about checksums.

Here's the eeprom dump: https://gist.github.com/celeron55/e052f ... 2838cb1235

The value found in there is 78 0073 0058.

Re: Nissan Leaf Resolver offsets

Posted: Sun Jul 14, 2019 7:11 am
by johu
Nice work!
So once I have the FOC software done you could find the syncofs value and we can match it against what is printed on the motor. I basically set iq=0 and looked for the offset where the motor wouldn't move

Re: Nissan Leaf Resolver offsets

Posted: Fri Jul 19, 2019 8:55 pm
by Cookie6000
My recent purchase is from a Gen1 EM61 - offset code
9400000000
20190719_211527.jpg

Re: Nissan Leaf Resolver offsets

Posted: Mon Jul 29, 2019 6:30 pm
by mcgousha
My Gen 2 EM57 from a 2014 Leaf:

80 00 44 00 4A

Re: Nissan Leaf Resolver offsets

Posted: Mon Jul 29, 2019 7:47 pm
by doobedoobedo
8500070057

Re: Nissan Leaf Resolver offsets

Posted: Mon Jul 29, 2019 9:15 pm
by johu
many numbers now. Since I've pretty much tuned syncofs for my motor others can start doing so. Maybe add the numbers to their original post in bold so I can see it. Or we might just transfer it to a wiki page.
I can say for sure that syncofs 1000 +- 500 seemed the point for my motor were it would not spin on ID current. 1000 means 1000*360/65536=5.5°. If we assume 360° is 256 in Nissans world then syncofs_256=1000*256/65536 = 0x4. If we further assume that they phase shift their calibration by 180° for some reason then 0x2 would be perfect for my motor since 0x2 + 0x80 = 0x82.
In this case to convert the first digit to an openinverter-syncofs you would calculate syncofs = ((digit + 0x80) mod 256)*256
Lets get this confirmed.

Re: Nissan Leaf Resolver offsets

Posted: Sun Aug 04, 2019 5:31 pm
by doobedoobedo
I may be being dim, but I'm trying to work out what you mean.

Working your example:
syncofs = ((digit + 0x80) mod 256)*256

1000 = ((0x84 + 0x80) mod 256) * 256 --> actually 1024

where does 0x84 come from? Your example nissan code (first post) starts 0x82.

Re: Nissan Leaf Resolver offsets

Posted: Wed Aug 07, 2019 12:15 am
by dima
I there a missing *2 in formula?

javascript code would look like this:

Code: Select all

var a = ((0x82 + 0x80) * 2 % 256) * 256;
a = Math.round(a/1000)*1000;
var b = a*360/65536;
b = Math.round(b*10)/10;
console.log(a + " @ " + b + "°");

Re: Nissan Leaf Resolver offsets

Posted: Sat Aug 17, 2019 3:36 pm
by doobedoobedo
OK so I've just done my syncofs: 500

The plate on the motor says 8500070057 which using Dima's formula would give me a syncofs of 2560 - motor spins fine with this setting (60V no load), but it's obviously not correct.

Re: Nissan Leaf Resolver offsets

Posted: Mon Sep 30, 2019 9:10 am
by PoloLbricolo
My gen2 leaf motor says 86000D 0057
I don't really understand the formula to calculate the offset.
To do the experimental method, how do you set throtid=1, throtiq=0.05 from the web interface ?

Paul

Re: Nissan Leaf Resolver offsets

Posted: Mon Sep 30, 2019 10:53 am
by johu
Hm maybe the formula can be simplified. If v is the first value, so v=0x86 in your case
then syncofs = (v - 0x80) * 256
So (0x86 - 0x80) = 6
syncofs = 6 * 256 = 1536

But as this is speculative, experimental is better. With the new software its also easier.
Find the parameter throdiq in web interface and type 0. Find throtid and set to -1 . Put car in first gear and change syncofs until you feel no more force.

Re: Nissan Leaf Resolver offsets

Posted: Tue Oct 01, 2019 3:23 pm
by PoloLbricolo
Thanks a lot !
I've done the experiment and between 600 and 1000 same behaviour, the car didn't move at all. i've put 768 (1536/2) and it works well.