Loresamp

Nissan Leaf/e-NV200 drive stack topics
Post Reply
Oskar
Posts: 21
Joined: Mon Aug 19, 2019 5:46 pm
Location: Sweden

Loresamp

Post by Oskar »

Hi,
I'm trying to get my gen 2 motor to show a sign of life with no luck. The only error I get now is the loresamp. Wiring seems to be ok but I need some guidance to continue troubleshooting. I need to know which pins and what to measure and also if there is some parameters to check.

4.65.R-sine
Rev 3 board
24V
User avatar
johu
Site Admin
Posts: 5684
Joined: Thu Nov 08, 2018 10:52 pm
Location: Kassel/Germany
Has thanked: 153 times
Been thanked: 960 times
Contact:

Re: Loresamp

Post by johu »

You should use the recent FOC firmware: https://github.com/jsphuebner/stm32-sin ... ses/latest (stm32_foc.bin)
LOWRESAMP means the resolver signal amplitude is too low.
Please check the resistors:
R40=510 Ohm
R41=10k
R42=R44 = 3k3
Support R/D and forum on Patreon: https://patreon.com/openinverter - Subscribe on odysee: https://odysee.com/@openinverter:9
Oskar
Posts: 21
Joined: Mon Aug 19, 2019 5:46 pm
Location: Sweden

Re: Loresamp

Post by Oskar »

R40 = 4k7
R41 = 4k7
R42 = 3k3
R43 = 10k
R44 = 1k2

Well 1 out of 5 is correct 🤔
User avatar
johu
Site Admin
Posts: 5684
Joined: Thu Nov 08, 2018 10:52 pm
Location: Kassel/Germany
Has thanked: 153 times
Been thanked: 960 times
Contact:

Re: Loresamp

Post by johu »

Ok, R40 and R41 is just added. So 4k7+4k7 is close to 10k+0.5k. R43 has nothing to to with excitation. R44 should indeed be 3k3.
Did you run the latest software and parameters from wiki?
https://openinverter.org/wiki/Configura ... Leaf_Motor
Support R/D and forum on Patreon: https://patreon.com/openinverter - Subscribe on odysee: https://odysee.com/@openinverter:9
Oskar
Posts: 21
Joined: Mon Aug 19, 2019 5:46 pm
Location: Sweden

Re: Loresamp

Post by Oskar »

I checked again to be sure and the R44 is 1k2. Do I need to replace this then?

Now I'm running latest software (FOC) and parameters but as soon as I start the inverter I get the WARN - LORESAMP error. If I start without connecting the resolver there's no errors and of course nothing happens when I engage the throttle. Like I said I've only connected 24V now for testing but it should work anyway right?
User avatar
johu
Site Admin
Posts: 5684
Joined: Thu Nov 08, 2018 10:52 pm
Location: Kassel/Germany
Has thanked: 153 times
Been thanked: 960 times
Contact:

Re: Loresamp

Post by johu »

Yes replace it. 24V is ok for testing and certainly won't cause that error
Support R/D and forum on Patreon: https://patreon.com/openinverter - Subscribe on odysee: https://odysee.com/@openinverter:9
Oskar
Posts: 21
Joined: Mon Aug 19, 2019 5:46 pm
Location: Sweden

Re: Loresamp

Post by Oskar »

Resistor is replaced but I still get loresamp. But now at least the motor is trying to spin.
Seems I can't upload leaf parameters to 4.76 FOC firmware for some reason.
damian.lo
Posts: 123
Joined: Sat Dec 22, 2018 12:46 pm
Location: Poland

Re: Loresamp

Post by damian.lo »

If You are trying to load parameters from wiki configuration files look at last parameter if looks in Your file like:
"tripmode": 0,
}
It should be without last comma.
Oskar
Posts: 21
Joined: Mon Aug 19, 2019 5:46 pm
Location: Sweden

Re: Loresamp

Post by Oskar »

Thanks Damian. Fresh parameters and software now loaded but unfortunately error still remains.
When engaging the throttle motor makes sounds and tries to spin, but it's like it doesn't know which direction to spin at. I've tried both fwd and rev.
User avatar
johu
Site Admin
Posts: 5684
Joined: Thu Nov 08, 2018 10:52 pm
Location: Kassel/Germany
Has thanked: 153 times
Been thanked: 960 times
Contact:

Re: Loresamp

Post by johu »

Are you getting valid angle feedback, i.e. angle running from 0-360 as you spin the shaft by hand? Will have to set the plot to 1000 samples
Support R/D and forum on Patreon: https://patreon.com/openinverter - Subscribe on odysee: https://odysee.com/@openinverter:9
Oskar
Posts: 21
Joined: Mon Aug 19, 2019 5:46 pm
Location: Sweden

Re: Loresamp

Post by Oskar »

No feedback from resolver :( I've checked wiring again and it's all good. I also checked resistance from resolver to main connector and everything was in range according to a document I got from Langoo. Any suggestions what to check next?

RES_R1 - GND = 13 ohm
RES_S2 - RES_S4S1 = 29 ohm
RES_S4S1 - RES_S3 = 29 ohm
These are the results measuring from pins on the mainboard.
Oskar
Posts: 21
Joined: Mon Aug 19, 2019 5:46 pm
Location: Sweden

Re: Loresamp

Post by Oskar »

Voltage between R1 or GND and S4S1, S2, S4 is 1.5V
arber333
Posts: 3241
Joined: Mon Dec 24, 2018 1:37 pm
Location: Slovenia
Has thanked: 74 times
Been thanked: 223 times
Contact:

Re: Loresamp

Post by arber333 »

Oskar wrote: Sun Mar 01, 2020 9:53 am Thanks Damian. Fresh parameters and software now loaded but unfortunately error still remains.
When engaging the throttle motor makes sounds and tries to spin, but it's like it doesn't know which direction to spin at. I've tried both fwd and rev.
I have the same effect when i try to start my motor. It tries to spin in one way, but decides it is not correct and goes to the other side. It happens in like 25°of an arc give or take.
I have good resolver reporting from 0 to 360. Tested with wifi dial.
I noticed resolver position jumps by a +/-2°.
My resolver S2 and S3 signal has more than 5V peak to peak, but i can stil get good reporting from the dial.

I measured and i get:
R1-R2 = 54R
S1-S3 = 45R
S2-S4 = 45R
It does seem that exciter winding has more turns than Sin/Cos.
I think resolver has some signal boost on sin/cos.

EDIT
Hm... i added 10K pulldown resistors to S2 and S3 lines to step down voltage from sensor and it is no better.
I tried to follow the procedure on wiki and when i went higher than 30A in "manualid" i also got "LORESAMP" warning.
Inverer was still pumping current into motor but error led was lit.
User avatar
johu
Site Admin
Posts: 5684
Joined: Thu Nov 08, 2018 10:52 pm
Location: Kassel/Germany
Has thanked: 153 times
Been thanked: 960 times
Contact:

Re: Loresamp

Post by johu »

Just checked the resolver code:

Code: Select all

   int sin = adc_read_injected(ADC1, sinChan);
   int cos = adc_read_injected(ADC1, cosChan);

   minSin = MIN(sin, minSin);
   maxSin = MAX(sin, maxSin);

   //Wait for signal to reach usable amplitude
   if ((maxSin - minSin) > MIN_RES_AMP)
   {
      if (invert)
         return SineCore::Atan2(-sin, -cos);
      return SineCore::Atan2(sin, cos);
   }
   else
   {
      if (0 == startupDelay)
      {
         ErrorMessage::Post(ERR_LORESAMP);
      }
      return 0;
   }
 
So it records the minimum and maximum amplitude of the the sin signal. But if the motor is stationary (which it usually is after startup) and happens to be in a position where the sin-amplitude is low, it will assert the LORESAMP warning for no reason. Gotta work on that...
Support R/D and forum on Patreon: https://patreon.com/openinverter - Subscribe on odysee: https://odysee.com/@openinverter:9
User avatar
jerrykco
Posts: 120
Joined: Thu Dec 12, 2019 5:32 pm
Location: United States, Colorado
Has thanked: 10 times
Been thanked: 8 times
Contact:

Re: Loresamp

Post by jerrykco »

johu wrote: Wed Apr 08, 2020 7:05 am Just checked the resolver code:
So it records the minimum and maximum amplitude of the the sin signal. But if the motor is stationary (which it usually is after startup) and happens to be in a position where the sin-amplitude is low, it will assert the LORESAMP warning for no reason. Gotta work on that...
Tonight I will start the inverter rotating the motor shaft for different positions when the Inverter is powered on to take readings of sin-amplitude measurement noting min and max amplitude of sin.
Jerry Kauffman
jerryk48 at gmail dot com
User avatar
jerrykco
Posts: 120
Joined: Thu Dec 12, 2019 5:32 pm
Location: United States, Colorado
Has thanked: 10 times
Been thanked: 8 times
Contact:

Re: Loresamp

Post by jerrykco »

johu wrote: Wed Apr 08, 2020 7:05 am Just checked the resolver code:
So it records the minimum and maximum amplitude of the the sin signal. But if the motor is stationary (which it usually is after startup) and happens to be in a position where the sin-amplitude is low, it will assert the LORESAMP warning for no reason. Gotta work on that...
Here are the plots for sin. I rotated the the rotor and tonight when O powered up the inverter, and manually started the inverter via WiFi, I got no errors.
So connected the scope and watched as I rotated the rotor. I captured the high and low.
BTW, because of the Magnets, the rotor has positions it comes to rest at. of those positions, one has a sin voltage of almost nil.
HIGH - 3.325V
Scope-Sin-Max.jpg
LOW - 201.5mV
Scope-Sin-Min.jpg
COS HiGH (Didn't do low. But watched it as I suun the rotor. Goes close to nil like the Sine.
Scope-COS-Max.jpg
Jerry Kauffman
jerryk48 at gmail dot com
Oskar
Posts: 21
Joined: Mon Aug 19, 2019 5:46 pm
Location: Sweden

Re: Loresamp

Post by Oskar »

I need to get my hands on a scope to check if my resolver is bad.
Motor is spinning and shaking almost like a original VW air-cooled engine that runs on 2-3 cylinders. Maybe I should be happy with it as the way it is and call it "vintage feeling" ;)

https://gofile.io/?c=uB7tSy
User avatar
jerrykco
Posts: 120
Joined: Thu Dec 12, 2019 5:32 pm
Location: United States, Colorado
Has thanked: 10 times
Been thanked: 8 times
Contact:

Re: Loresamp

Post by jerrykco »

Oskar wrote: Fri May 01, 2020 11:14 am I need to get my hands on a scope to check if my resolver is bad.
Motor is spinning and shaking
Watched your movie, mine is currently on the bench too and when I finally got all the connections right and followed the instructions and hints, I was able to spin it up. Started slow but then it rocked once when the motor torqued up and it went to 10,000 RPM on the bench as I scrambled to cut power.... Scared the crap out of me.

Because I had the Inverter laying on the bench, upside down and sideways, I had to label the 3 phase connections between the Inverter and the Motor.
20200417_200720.jpg
I also triple checked the Resolver connections. And had to by some shielded twisted pair wires for those connections.
Jerry Kauffman
jerryk48 at gmail dot com
Oskar
Posts: 21
Joined: Mon Aug 19, 2019 5:46 pm
Location: Sweden

Re: Loresamp

Post by Oskar »

jerrykco wrote: Fri May 01, 2020 12:01 pm
Oskar wrote: Fri May 01, 2020 11:14 am I need to get my hands on a scope to check if my resolver is bad.
Motor is spinning and shaking
Watched your movie, mine is currently on the bench too and when I finally got all the connections right and followed the instructions and hints, I was able to spin it up. Started slow but then it rocked once when the motor torqued up and it went to 10,000 RPM on the bench as I scrambled to cut power.... Scared the crap out of me.

Because I had the Inverter laying on the bench, upside down and sideways, I had to label the 3 phase connections between the Inverter and the Motor.
20200417_200720.jpg
I also triple checked the Resolver connections. And had to by some shielded twisted pair wires for those connections.
Wow! It's funny how one can be prepared that things could get out of control, but when it happens brain goes instantly offline for a moment. In case motor would rush for some reason while driving I really hope brain doesn't freeze for too long to push in that emergency button.

I have everything connected 1:1 as original so phase and resolver connections should be right. Also the resistance seems to be in specs. I still have a lot to learn so it might take a while to finish up my project.
User avatar
jerrykco
Posts: 120
Joined: Thu Dec 12, 2019 5:32 pm
Location: United States, Colorado
Has thanked: 10 times
Been thanked: 8 times
Contact:

Re: Loresamp

Post by jerrykco »

Oskar wrote: Sun May 03, 2020 4:51 pm
Wow! It's funny how one can be prepared that things could get out of control, but when it happens brain goes instantly offline for a moment. In case motor would rush for some reason while driving I really hope brain doesn't freeze for too long to push in that emergency button.

I have everything connected 1:1 as original so phase and resolver connections should be right. Also the resistance seems to be in specs. I still have a lot to learn so it might take a while to finish up my project.
Oskar, I was not using the throttle. I was doing this in Manual mode using manualid to 1 and then set manualiq to 3. No spin. Then manualiq to 10 and away it went. There is another thread you should read through if you haven't seen it yet.
See viewtopic.php?f=3&t=683
Jerry Kauffman
jerryk48 at gmail dot com
User avatar
DarkwingDuck
Posts: 27
Joined: Sun Mar 01, 2020 7:41 am
Location: Stockholm, Sweden
Has thanked: 1 time
Been thanked: 1 time

Re: Loresamp

Post by DarkwingDuck »

Hello Oskar!

Are you based in the Stockholm area? In that case I could probably swing by and have a look. Maybe we could collaborate? I have my Leaf motor turning since yesterday (but with errors, probably from parameter settings/using only 60v test pack voltage)

/David
User avatar
jerrykco
Posts: 120
Joined: Thu Dec 12, 2019 5:32 pm
Location: United States, Colorado
Has thanked: 10 times
Been thanked: 8 times
Contact:

Re: Loresamp

Post by jerrykco »

Oskar and David,
Have you seen this post from Johannes?
"If you're having start problems, please read here"
viewtopic.php?f=10&t=738&p=10465#p10405
I am about to try to integrate the Prius Throttle, and will be trying this new version.
Jerry Kauffman
jerryk48 at gmail dot com
User avatar
DarkwingDuck
Posts: 27
Joined: Sun Mar 01, 2020 7:41 am
Location: Stockholm, Sweden
Has thanked: 1 time
Been thanked: 1 time

Re: Loresamp

Post by DarkwingDuck »

I just got it all working, default motor settings were WAY off. I thought the Leaf board came with nissan motor settings pre-flashed. Assumption is the mother of all fuck-ups. Changed to Leaf settings from wiki and its revs silky smooth without errors

Thanks for the heads up, will install update!
Oskar
Posts: 21
Joined: Mon Aug 19, 2019 5:46 pm
Location: Sweden

Re: Loresamp

Post by Oskar »

DarkwingDuck wrote: Wed May 06, 2020 11:25 pm I just got it all working, default motor settings were WAY off. I thought the Leaf board came with nissan motor settings pre-flashed. Assumption is the mother of all fuck-ups. Changed to Leaf settings from wiki and its revs silky smooth without errors

Thanks for the heads up, will install update!
I finally got it running. Yesterday my new scope arrived and when I was playing around setting it up and connecting the resolver it suddenly came alive. Even though I triple checked all connections before it must have been a bad one somewhere.

https://gofile.io/d/yBmlIB
Post Reply