Page 5 of 7

Re: IPM Motor - Auto-setup

Posted: Tue Jun 06, 2023 7:18 pm
by Pete9008
Romale wrote: Tue Jun 06, 2023 7:01 pm I ran all the recent tests in the old way with the button at the very top of the interface
Could you post your latest JSON parameter file?

Edit - Also are you still getting the ERR_LORESAMP error reported? If so the sin/cos setup may need adjusting. Noticed a comment in the code

Code: Select all

else //SINCOS
   {
      //Offset assumed 3.3V/2 - 2048
      //on my hardware, min is 0.465V, max is 2.510v, so offset is 1.4875v, or 1846
      //this should be a parameter?
      adc_set_injected_offset(ADC1, 2, sincosoffs);
      adc_set_injected_offset(ADC1, 3, sincosoffs);
   }
The fixed sincosoffs may be wrong for your hardware - worth checking? If it is wrong let me know and I'll add a parameter so that it can be adjusted.

Re: IPM Motor - Auto-setup

Posted: Tue Jun 06, 2023 7:48 pm
by Romale
Pete9008 wrote: Tue Jun 06, 2023 7:18 pm Could you post your latest JSON parameter file?
I've done this a few posts before

Re: IPM Motor - Auto-setup

Posted: Tue Jun 06, 2023 7:52 pm
by Romale
Pete9008 wrote: Tue Jun 06, 2023 7:18 pm Also are you still getting the ERR_LORESAMP error reported?
The fixed sincosoffs may be wrong for your hardware - worth checking? If it is wrong let me know and I'll add a parameter so that it can be adjusted.
yes. my sincosoffs are not equal to the ones that are by default. after all, I have a chip and not a resolver, and there is a different value of the upper and lower thresholds of the sine wave

Re: IPM Motor - Auto-setup

Posted: Tue Jun 06, 2023 8:11 pm
by Pete9008
Romale wrote: Tue Jun 06, 2023 7:48 pm I've done this a few posts before
Found it, all looks fine.

Can't think of anything else to try at the moment but will let you know if I do.

Re: IPM Motor - Auto-setup

Posted: Thu Jun 15, 2023 6:35 pm
by Bigpie
Screenshot 2023-06-15 at 7.32.11 pm.png
Resolver Check working for me in auto tune. Turns out, it helps to set the inverter to use a resolver.

Will hook up some some voltage next

Re: IPM Motor - Auto-setup

Posted: Fri Jun 16, 2023 9:50 am
by Pete9008
Bigpie wrote: Thu Jun 15, 2023 6:35 pm Resolver Check working for me in auto tune.
That's great! :D
Bigpie wrote: Thu Jun 15, 2023 6:35 pm Will hook up some some voltage next
Look forward to hearing how you get on (let me know if there is anything I can do to help).

Re: IPM Motor - Auto-setup

Posted: Mon Jun 26, 2023 5:25 pm
by Bigpie
Pretty sure I've got a dead inverter, not getting any output, with known working firmware, though getting PWM at the transistors. Bought another so will test when that arrives in a few days.

Re: IPM Motor - Auto-setup

Posted: Thu Jul 13, 2023 10:51 am
by Ev8
A little late to the party i know, just got round to trying this out and fall at the first hurdle, manual run doesn’t engage any contactors so even though bus voltage is nice and high because it was pre charged at inverter startup the second you select a test mode and engage manual run rather than engage the main contactor then test it tries to test and throws error messages

Re: IPM Motor - Auto-setup

Posted: Thu Jul 13, 2023 10:57 am
by Ev8
:Original manual run mode never used to engage the main contactor either if I remember, I always had to bypass it with a jump lead! Unfortunately that contactor is no longer so easy to access!

Re: IPM Motor - Auto-setup

Posted: Thu Jul 13, 2023 11:02 am
by Bigpie
if you start normally, then go to manual mode, that used to work

Re: IPM Motor - Auto-setup

Posted: Thu Jul 13, 2023 11:32 am
by Pete9008
You're right, there appears to be no way to get the contactors to close in manual mode, sorry about that! I've just got leds on my test rig and hadn't noticed what they were doing in manual mode.

I'll have a look through the code to see what the options are, probably add a new command, but afraid it probably won't be till the weekend :(

Re: IPM Motor - Auto-setup

Posted: Thu Jul 13, 2023 1:09 pm
by Ev8
Bigpie wrote: Thu Jul 13, 2023 11:02 am if you start normally, then go to manual mode, that used to work
That used to work because if left the precharge relay on so you had to be careful about drawing much current as it would all be through the precharge resistor hence me bridging with a jump lead,

I did try all combinations of trying to go from run mode to manual I didn’t find anything that helped

Re: IPM Motor - Auto-setup

Posted: Thu Jul 13, 2023 1:10 pm
by Ev8
Pete9008 wrote: Thu Jul 13, 2023 11:32 am You're right, there appears to be no way to get the contactors to close in manual mode, sorry about that! I've just got leds on my test rig and hadn't noticed what they were doing in manual mode.

I'll have a look through the code to see what the options are, probably add a new command, but afraid it probably won't be till the weekend :(
No problem, sorry it took me so long to getting round to trying it out!

Re: IPM Motor - Auto-setup

Posted: Fri Jul 14, 2023 8:24 am
by RetroZero
Good this has come up in the thread. On one side, it's good that in manual run the precharge acts like a fuse (been there, blown it) . On the other, when trying to find syncoffs and you hone in on the point of 0 offset (Max amps) in manual run, a jumper cable has to be used. So in the world of "I wish for all the bells and whistles", is there a way to add a submenu in manual run to allow for contactors to close AND have a drop down menu allowing for max amp setting??

Re: IPM Motor - Auto-setup

Posted: Fri Jul 14, 2023 12:52 pm
by Pete9008
RetroZero wrote: Fri Jul 14, 2023 8:24 am Good this has come up in the thread. On one side, it's good that in manual run the precharge acts like a fuse (been there, blown it) . On the other, when trying to find syncoffs and you hone in on the point of 0 offset (Max amps) in manual run, a jumper cable has to be used. So in the world of "I wish for all the bells and whistles", is there a way to add a submenu in manual run to allow for contactors to close AND have a drop down menu allowing for max amp setting??
A current limit is already there in the test mode, if the current on any phase exceeds the value of the maxtesti parameter then the test is aborted and the PWM is shutdown. :)

@Bigpie - not sure whether it helps at all but I've now almost got all the dev software setup on a laptop (soo much easier with an up to date version of Linux, all the stuff that caused problems last time with the gcc, openocd and codeblocks installs just works now!) so could potentially call over sometime and help debug it?

Not had a look at the contactor stuff yet but hope to over the weekend.

Re: IPM Motor - Auto-setup

Posted: Fri Jul 14, 2023 12:55 pm
by Bigpie
You're welcome to call over any time you're free. Not had chance to get back to it yet, maybe this weekend, I'll adjust the gain to get the correct voltage.

Re: IPM Motor - Auto-setup

Posted: Fri Jul 14, 2023 1:33 pm
by Pete9008
Makes sense, see how you get on with the udc mod first. If it looks like the auto setup code still needs work we can sort something out then.

Re: IPM Motor - Auto-setup

Posted: Fri Jul 14, 2023 1:51 pm
by Bigpie
Screenshot 2023-07-14 at 2.47.31 pm.png
Motor doesn't spin in forward test mode though.
Screenshot 2023-07-14 at 2.49.16 pm.png

Re: IPM Motor - Auto-setup

Posted: Fri Jul 14, 2023 2:00 pm
by Pete9008
:D

Try giving it a bit of positive manualid, say 10-20A?

Edit - that was quick, thought you might get to it over the weekend!

Re: IPM Motor - Auto-setup

Posted: Fri Jul 14, 2023 2:04 pm
by Bigpie
While in forward test?

I got a bit curious and took a break from work

Re: IPM Motor - Auto-setup

Posted: Fri Jul 14, 2023 2:08 pm
by Pete9008
Yep, the manualid value is used in both the forward and bidir tests (seemed the simplest way to allow it to be adjusted to suit the motor, a free motor should be happy with fairly low current but if there is a gearbox on it it will need a lot more to cope with the extra drag).
Bigpie wrote: Fri Jul 14, 2023 2:04 pm I got a bit curious
You and me both!

Re: IPM Motor - Auto-setup

Posted: Fri Jul 14, 2023 3:37 pm
by Bigpie

Works, ish, but is jerky. Am I supposed to get the offset output?

Re: IPM Motor - Auto-setup

Posted: Fri Jul 14, 2023 4:15 pm
by Pete9008
Looking good, that's pretty much exactly what I'd expect :D

Afraid at the moment the actual process for working out syncofs is still manual, see viewtopic.php?p=56418#p56418. It should be possible to automate it in the future if it gives a good enough results though.

It will be a bit jerky, particularly at lower currents, as it's just running on id so will be very susceptible to cogging. Worth plotting the two angles and seeing if it improves at higher currents. With the HSG 20A was plenty, on your motor you might benefit from a bit more.

Once again, thanks for giving it a try :)

Edit - Actually thinking about it it should be fairly simple to calculate it. When I have a look at the contactor stuff I'll add another spot value, syncerror, that is updated when running the bidir test and contains the calculated syncofs error.

Re: IPM Motor - Auto-setup

Posted: Fri Jul 14, 2023 5:57 pm
by Bigpie
This is cool, thanks by the way.

My testangle doesn't seem to be working
Screenshot 2023-07-14 at 6.52.59 pm.png
Screenshot 2023-07-14 at 6.54.06 pm.png
Also, my UDC gain sometimes needs to be 6.15 (roughly what id expect), some times 24. only change is powering off and back on :s

Re: IPM Motor - Auto-setup

Posted: Fri Jul 14, 2023 6:06 pm
by Pete9008
Am I reading that right, testangle looks fine, its angle from the resolver that doesn't seem to be working?

Is the 2nd plot in bidir mode?

Might be worth playing with the burst lengths to see if you can get rid of some of the steps in the plot?

Edit - udc sounds like a software rather than hardware issue but not sure what it could be, do all the other analogue inputs work?