Resolver Excitation with V2 mainboard

User avatar
johu
Site Admin
Posts: 5684
Joined: Thu Nov 08, 2018 10:52 pm
Location: Kassel/Germany
Has thanked: 154 times
Been thanked: 960 times
Contact:

Resolver Excitation with V2 mainboard

Post by johu »

Just repeating the post on the old forum here
On the main board PD2 has to be routed to JP5.4 directly by replacing R6 with a wire bridge and removing R4.
The mentioned 10k/1n low pass filter is already standard on the main board. R1 and R3 have to be removed from the main board.
R1, R2 and R3 on the exciter board are dimensioned for 8.8kHz PWM (4.4kHz resolver excitation). For 17.6kHz (I'd recommend that with the Leaf inverter) R2=R3=1k2. Excitation frequency is now always 4.4kHz regardless of PWM frequency starting from version 4.64.R
Attachments
resolverprototype.jpg
resolver interface.png
resolver interface.png (5.73 KiB) Viewed 4786 times
Support R/D and forum on Patreon: https://patreon.com/openinverter - Subscribe on odysee: https://odysee.com/@openinverter:9
zippy500
Posts: 181
Joined: Fri Jan 04, 2019 8:42 am
Location: United Kingdom
Has thanked: 29 times
Been thanked: 3 times

Re: Resolver Excitation with V2 mainboard

Post by zippy500 »

Hello,

I want to build this I'm NOT a EE :? but have some basic knowledge with the components,

Is it possible to explain how this actually connects to the resolver wiring from the motor (Ex, Sin, Cos )

would be possible to see a reverse side of circuit pref borad in the pic

could someone design a PCB we could download, I know this may be a simple circuit some people but..... :?

Thanks
User avatar
johu
Site Admin
Posts: 5684
Joined: Thu Nov 08, 2018 10:52 pm
Location: Kassel/Germany
Has thanked: 154 times
Been thanked: 960 times
Contact:

Re: Resolver Excitation with V2 mainboard

Post by johu »

The back of the PCB is just vertical horizontal copper lanes. The RED cable is connected to GND, GREEN is R1 (amplifier output), WHITE and BLUE are -sin and -cos and tied to 1.6V, PINK and BLACK are sin and cos and go straight to JP5.1 and JP5.3

I'm not planning to make a PCB as an easier solution is available with the Rev3 brain board
Support R/D and forum on Patreon: https://patreon.com/openinverter - Subscribe on odysee: https://odysee.com/@openinverter:9
User avatar
dima
Posts: 157
Joined: Sun Dec 09, 2018 9:35 pm
Location: Canada

Re: Resolver Excitation with V2 mainboard

Post by dima »

(attached) Eagle schematic with auto-route ...maybe someone can improve on this.
Attachments
resolver-0.1.zip
(76.31 KiB) Downloaded 142 times
User avatar
johu
Site Admin
Posts: 5684
Joined: Thu Nov 08, 2018 10:52 pm
Location: Kassel/Germany
Has thanked: 154 times
Been thanked: 960 times
Contact:

Re: Resolver Excitation with V2 mainboard

Post by johu »

Hi Dima,

thanks for that. There was a non-obvious mistake in schematic, basically C9 was shorted.
Attachments
resolver.zip
(64.6 KiB) Downloaded 144 times
Support R/D and forum on Patreon: https://patreon.com/openinverter - Subscribe on odysee: https://odysee.com/@openinverter:9
arber333
Posts: 3241
Joined: Mon Dec 24, 2018 1:37 pm
Location: Slovenia
Has thanked: 74 times
Been thanked: 223 times
Contact:

Re: Resolver Excitation with V2 mainboard

Post by arber333 »

Wow thanks Dima and Johu. I may try one with rev. 2 board soon.
damian.lo
Posts: 123
Joined: Sat Dec 22, 2018 12:46 pm
Location: Poland

Re: Resolver Excitation with V2 mainboard

Post by damian.lo »

Hello,

Arber, in fact I have already done enc-resolver interface on prototype board, but I don't like how it looks :) What do You think (and maybe someone more) to order more for us - only pcbs to solder at home? Johannes - can we use Your idea?
User avatar
johu
Site Admin
Posts: 5684
Joined: Thu Nov 08, 2018 10:52 pm
Location: Kassel/Germany
Has thanked: 154 times
Been thanked: 960 times
Contact:

Re: Resolver Excitation with V2 mainboard

Post by johu »

Yes please use it and feel free to sell it etc.
BTW you can change the values of R4/R5 if you don't have 3V3 available. The goal is to make about 1.6V. E.g. you can make R4=510 and feed in 5V.
Support R/D and forum on Patreon: https://patreon.com/openinverter - Subscribe on odysee: https://odysee.com/@openinverter:9
arber333
Posts: 3241
Joined: Mon Dec 24, 2018 1:37 pm
Location: Slovenia
Has thanked: 74 times
Been thanked: 223 times
Contact:

Re: Resolver Excitation with V2 mainboard

Post by arber333 »

damian.lo wrote: Thu Jan 17, 2019 2:32 pm Hello,

Arber, in fact I have already done enc-resolver interface on prototype board, but I don't like how it looks :) What do You think (and maybe someone more) to order more for us - only pcbs to solder at home? Johannes - can we use Your idea?
Very well i can send some boards to production soon. I will notify you when they arrive.
So you are confident the latest eagle board from your post is correct Johannes? Or should i correct something?
damian.lo
Posts: 123
Joined: Sat Dec 22, 2018 12:46 pm
Location: Poland

Re: Resolver Excitation with V2 mainboard

Post by damian.lo »

Hi,

My small interface looks like on picture. On new design I see, that are 3 ARC input and 3 output connectors. Like You see I have 6, because I think it is easier to connect directly 6 wires from resolver from one side and put them (rest) thru board. What do You think?
IMG_0901.JPG
User avatar
dima
Posts: 157
Joined: Sun Dec 09, 2018 9:35 pm
Location: Canada

Re: Resolver Excitation with V2 mainboard

Post by dima »

Download EagleCAD it is easy! https://www.autodesk.com/products/eagle/free-download move some things around and re-upload :D
D@F
Posts: 59
Joined: Mon Dec 24, 2018 1:12 pm
Has thanked: 1 time

Re: Resolver Excitation with V2 mainboard

Post by D@F »

hi i'm interrested in resolver card too
damian.lo
Posts: 123
Joined: Sat Dec 22, 2018 12:46 pm
Location: Poland

Re: Resolver Excitation with V2 mainboard

Post by damian.lo »

Thx Dima, even I have already installed from maybe year Eagle, buf for me till now it was only a viewer :)
I prefered to let this job to persons who, better knows this software. But You have right - maybe I will try to use it also like editor ;)
arber333
Posts: 3241
Joined: Mon Dec 24, 2018 1:37 pm
Location: Slovenia
Has thanked: 74 times
Been thanked: 223 times
Contact:

Re: Resolver Excitation with V2 mainboard

Post by arber333 »

I am now drawing brd for resolver card and making one proof of concept alongside.
I would like to know from those who had done it already, is it better if i install one 12V regulator to have precise 12V or is 12.8Vdc good enough from the car?
I can get one small 5V to 12V stepup from china and i can prepare board to accept 5V from mainboard and make 12V from that. What is your recommendation?

Also i will be using LM386N DIP variant. I see it is not different, maybe just easier to assemble.

A
User avatar
johu
Site Admin
Posts: 5684
Joined: Thu Nov 08, 2018 10:52 pm
Location: Kassel/Germany
Has thanked: 154 times
Been thanked: 960 times
Contact:

Re: Resolver Excitation with V2 mainboard

Post by johu »

12.8V is fine. On the Rev3 board I used a boost regulator to make the input voltage range broader.
The LM386N DIP is different in that it allows 18V Vcc and 1W of power dissipation. So certainly easier to use.
Support R/D and forum on Patreon: https://patreon.com/openinverter - Subscribe on odysee: https://odysee.com/@openinverter:9
arber333
Posts: 3241
Joined: Mon Dec 24, 2018 1:37 pm
Location: Slovenia
Has thanked: 74 times
Been thanked: 223 times
Contact:

Re: Resolver Excitation with V2 mainboard

Post by arber333 »

I have assembled a universal driving station, so i can connect any inverter i have built and test it outside a car. Providing i can connect it to my type of connector.

I have tried to run Leaf motor with it.
1. When i connected new Ampera inverter i had some trouble with connecting 5V to resolver. I replaced high resistor 220R with 510R so i get 1.55V. Is that enough to work? I can replace it with 470R if you think it absolutely needs 1.65V.

2. I setup parameters like you sent me, with exception of voltage and current sensors gain. I have it at 4pole pair motor and 4pole pair resolver.
Boost is at 7000 since i have 50Vdc. Is that correct?

3. When i ran it first i received a start for a eight of a turn and then it wouldnt turn anymore. I tried to move rotor with a tool and it jumped by 1/8th again.
It remained unmoved regardless of offset setting. I tried to set it by 1000pt.
Interestingly i observed wires when applying throttle. Two of the phase wires were moving and heating up but third not.... It didnt even show current flow.
Then i took a small 3ph motor and run it manually and it turned good at 1hz or 10hz...
What is happening here?

tnx
Attachments
complete assembly
complete assembly
Control station
Control station
Resolver board protoboard
Resolver board protoboard
Ampera inverter
Ampera inverter
User avatar
johu
Site Admin
Posts: 5684
Joined: Thu Nov 08, 2018 10:52 pm
Location: Kassel/Germany
Has thanked: 154 times
Been thanked: 960 times
Contact:

Re: Resolver Excitation with V2 mainboard

Post by johu »

1. I think 1.55V is fine also. You just need to see a good sine wave with no saturation.

2. Boost is likely to vary with different inverter and motor. But I think you can leave it like that for now

3. This happens when sine/cosine are swapped. Try changing it. I assume at the phase angle where the motor is locked there is little current on one of the phases and thats what you observe.
Support R/D and forum on Patreon: https://patreon.com/openinverter - Subscribe on odysee: https://odysee.com/@openinverter:9
arber333
Posts: 3241
Joined: Mon Dec 24, 2018 1:37 pm
Location: Slovenia
Has thanked: 74 times
Been thanked: 223 times
Contact:

Re: Resolver Excitation with V2 mainboard

Post by arber333 »

johu wrote: Sat Mar 02, 2019 5:31 pm 1. I think 1.55V is fine also. You just need to see a good sine wave with no saturation.

2. Boost is likely to vary with different inverter and motor. But I think you can leave it like that for now

3. This happens when sine/cosine are swapped. Try changing it. I assume at the phase angle where the motor is locked there is little current on one of the phases and thats what you observe.
Ok i found out i had the colour code wrong for nissan. I switched some wires and it seems i got good wiring.
I started inverter and set parameters correctly. I started it and got immediate rotation! I never applied any throttle and motor spun CCW and inverter immediately threw OC limit!!
Spinning sounds quite smooth...
Any thoughts on why it starts all by itself? Is excitation wrong maybe?

EDIT: I found out i had left fslipmin at 1hz and i had the idle set up. When i put slim to 0 and set idle on cruise inverter follows my thgrottle. I checked parameters and i see that at everything stopped brain is showing cca 60rpm.
It also shows ampnom somewhere at 20% without throttle applied.
I also switched S1 and S3 inputs (channel A and B) and at best a got 1/8th turn the other way.
Motor still wont start. Is my resolver circuit wrong?
User avatar
johu
Site Admin
Posts: 5684
Joined: Thu Nov 08, 2018 10:52 pm
Location: Kassel/Germany
Has thanked: 154 times
Been thanked: 960 times
Contact:

Re: Resolver Excitation with V2 mainboard

Post by johu »

Well operation with sync motors is not as obvious as async. With async positive slip means spin up, negative slip means spin down. With sync motors voltage above BEMF means spin up, below spin down. So obviously something in your setup commanded a higher voltage. Can you attach your parameters here?
But after all did it do rotations or not? It's not quite obvious from your post.
Idle controller will interfere but slip settings certainly will not.
Support R/D and forum on Patreon: https://patreon.com/openinverter - Subscribe on odysee: https://odysee.com/@openinverter:9
arber333
Posts: 3241
Joined: Mon Dec 24, 2018 1:37 pm
Location: Slovenia
Has thanked: 74 times
Been thanked: 223 times
Contact:

Re: Resolver Excitation with V2 mainboard

Post by arber333 »

Before when I had idle on motor started rotation immediately after start button. After a revolution or two it tripped OClimit depending on the boost setting.
If I have idle off I get nothing on startup and nothing if I apply throttle, well except amps heating up two phases.

I will now rotate motor with one ebike sensorless controller and observe S3 and S4 on scope. Can you send me a photo of what I should see if resolver is working good?

DOH! I don't get any sine or cos from the board when rotor is turning. Both S1 and S2 give 1.3V on scope but R1/R2 do not show any excitation. Does that mean LM chip is bad?

UPDATE:
I had to rebuild resolver board. Now I get square pulses on enc Z. I get sine weave on R1 and I get sine cos response from S lines to enc A and B. However motor won't budge and two cables keep heating up.
I connected the scope and rotated motor by ebike inverter. All this from 48V. I can see sine cos response but it's quite covered by hash. When I reach 200rpm a bulge forms on the scope. Is that good?
arber333
Posts: 3241
Joined: Mon Dec 24, 2018 1:37 pm
Location: Slovenia
Has thanked: 74 times
Been thanked: 223 times
Contact:

Re: Resolver Excitation with V2 mainboard

Post by arber333 »

Its alive!

I installed the latest firmware rev 4.12R and it meant worlds!
It turns out it is very important how the phases are connected. I went through couple variations. I even had to change wires on resolver cos to get rotation. But finally motor spun at 600rpm.
Well it spun also at 300rpm etc... it all depended on how i setup fweak. It seems fweak with udcnom will adapt max voltage and motor will spin up faster if i vary them. Tomorrow i will try with 360Vdc. But i have to make some 16mm2 cables because my test cables are in poor condition :).
Attached is parameters file for the latest and best option.
params (7).json
(1.25 KiB) Downloaded 108 times
My motor seems to have an offset at 26000. I got it down to 1000. Johannes can you let me know how to pinpoint the offset more precisely?
Also attached some photos of signal from resolver.
Did you connect shield on all cables together and then to GND? I still havent, i think i will have to do that for 360Vdc test.
Next tests to be done:
1. testing of Forward - Reverse function
2. Testing of Cruise mode
3. Test at 360Vdc with same settings save boost
4. Test of max RPM with 360Vdc
5. Put inverter back in a car and drive :)

A
Attachments
IMG_20190303_232756.jpg
IMG_20190303_222938.jpg
IMG_20190303_222841.jpg
IMG_20190303_222832.jpg
zippy500
Posts: 181
Joined: Fri Jan 04, 2019 8:42 am
Location: United Kingdom
Has thanked: 29 times
Been thanked: 3 times

Re: Resolver Excitation with V2 mainboard

Post by zippy500 »

nice work.

look forward to your results
arber333
Posts: 3241
Joined: Mon Dec 24, 2018 1:37 pm
Location: Slovenia
Has thanked: 74 times
Been thanked: 223 times
Contact:

Re: Resolver Excitation with V2 mainboard

Post by arber333 »

Well i ve done it! Leaf is turning at 360Vdc and behaving at that. I had some problems with boost. Your setting of 400 is not enough. I used 1600 and this gets the motor turning. BUT it is not absolutely smooth at high speed. I can hear some rattle in there. How do you think i could better determine offset? I can get motor running from 24000 to 32000.
Should i measure phase currents?

I have tested:
1. Testing of Cruise mode works.
2. Test at 360Vdc with same settings save boost, works very good. I will keep settings.
3. Test of max RPM with 360Vdc. I got to 5000 RPM indicated at 360V nominal with freq 600Hz and weakening at 800Hz. Reading moves a lot at high speeds.
There is rough running beyond 3000rpm. In some cases inverter throws - error? This means unknown? I am not sure if this are EMI or is offset not quite right. What do you think?

I still have to test reverse function....
User avatar
johu
Site Admin
Posts: 5684
Joined: Thu Nov 08, 2018 10:52 pm
Location: Kassel/Germany
Has thanked: 154 times
Been thanked: 960 times
Contact:

Re: Resolver Excitation with V2 mainboard

Post by johu »

Hi Arber,

thats absolutely remarkable, now you're quite far ahead of me :)
I think fweak is too high at 800, I was expecting more like 450. But then, what do I know... At least you should at least reach fweak in terms of rpm.
I don't think EMI is the problem, that would show at low rpm.
The instability in speed reading and strange noises are probably what is holding you back now.

Questions:
1. Are you using udcnom setting?
2. Which PWM frequency are you running?
3. Does the resolver feedback saturate, i.e. drop below 0V or above 3.3V? Can you plot it at various speeds?
Support R/D and forum on Patreon: https://patreon.com/openinverter - Subscribe on odysee: https://odysee.com/@openinverter:9
arber333
Posts: 3241
Joined: Mon Dec 24, 2018 1:37 pm
Location: Slovenia
Has thanked: 74 times
Been thanked: 223 times
Contact:

Re: Resolver Excitation with V2 mainboard

Post by arber333 »

Hm, if I use fweak 400 inverter accelerates so quickly it trips OClimit. Or is resolver skipping a beat?
1. I use 360V udcnom setting. Since motor is 8pole we should use fq up to 800hz to reach the speeds.
2. I use 8khz since it is Rev 2 board.
3. I am not sure about resolver I will measure tomorrow. My scope should be able to record functions. At 5k motor is generating some scary noises though and skipping at that.

I don't have resolver cable shields connected to gnd. Maybe I should do it first.

Edit: I found out I used ampmin setting 20 which I use with my Mazda inverter at much higher dead time. I think I would have to lower this to like 5 or 8. That should slow the voltage rise with throttle.
Post Reply