[WIP] 1965 Ford Mustang

Tell us about the project you do with the open inverter
User avatar
chrskly
Posts: 145
Joined: Fri Feb 21, 2020 5:04 pm
Location: Dublin, Ireland
Has thanked: 39 times
Been thanked: 28 times
Contact:

Re: 1965 Ford Mustang

Post by chrskly »

I've been trying to get this motor spinning, at the very least in open loop mode. But no luck so far.

I have the three phases from the MG2 stage of my Yaris inverter connected up to MG2 motor in the GS300 CVT. I'm not sure which way is the right way to connect them, but there are only 6 possible ways, so, I'm not too concerned about that for now.

I have a 30V/5A power supply providing my 'high' voltage DC input - just for this initial test. It looks like this is probably not enough to actually turn the motor based on seeing other people using something similar in other threads, but it's something to get started with.

I have a precharge resistor connected straight from the power supply. So, when I turn the power supply on, it starts precharging. I then have a kilovac contactor to bypass the resistor and allow the full current through. I manually activate this contactor by connecting it to a 12V car battery. The 12V battery also powers openinverter board and holds MG2_FORWARD pin high (not sure if I need this for manual spin).

First problem I see is that the heatsink temperature immediately shoots to around 84 degrees from cold. This triggers a 'DERATE - TMPHSMAX'. I'm presuming this can't be right and that I have the wrong setting for the temperature sensor type. I just set tmphsmax to 100 for now as the temperature is stable a 84. It's not climbing or anything. So, I can fix that later.

I set udcmin and udcsw to 15V as my supply is only 30V.

I set encmode to AB, fslipspnt to 10, and ampnom to 100. I hit start manual.
yaris-overcurrent-error-plot.png
Volts are on the left, amps are on the right. il1 shoots to around 480 amps and then I get an OVERCURRENT.

From searching around this forum, I saw Damien suggesting that you could get overcurrent errors like this from some bad connections on your 50way connector. So, I took everything apart again. I opened up the PCB schematic from Github and then went pin by pin, testing the continuity from the copper pin on the inside of the 50-way connector and the next-nearest component. I found two bad solder joints. One was the pin going to R88 and the other was one going to TMP. I fixed both of these and put it all back together again. I tested briefly last night and I thought the overcurrent error was fixed, but now this morning I'm seeing it again. So, back to the drawing board.

So, I'll open it back up and check again.

One other thing to note is that with the DC input disconnected, I'm still seeing the overcurrent error.

I'll check the joints on the MG1/MG2 current sensor ports as well. The MG1 current sensor definitely points notch out, right?
B8AFC74F-4018-45BC-BF1A-1817B50D5001_1_105_c.jpeg
Note : I have not done the DC/DC resistor swap on this inverter yet. Someone let me know if I need to do this to spin this motor. I'm presuming not for now.
User avatar
Jack Bauer
Posts: 3563
Joined: Wed Dec 12, 2018 5:24 pm
Location: Ireland
Has thanked: 1 time
Been thanked: 87 times
Contact:

Re: 1965 Ford Mustang

Post by Jack Bauer »

Start by loading a set of good working Prius inverter parameters. The prius inverter needs certain things set to work like switching frequency, deadtime etc.
I'm going to need a hacksaw
User avatar
chrskly
Posts: 145
Joined: Fri Feb 21, 2020 5:04 pm
Location: Dublin, Ireland
Has thanked: 39 times
Been thanked: 28 times
Contact:

Re: 1965 Ford Mustang

Post by chrskly »

Thanks Damien, I assumed the defaults would be good enough for an open loop spin. I scoured the forum looking for params files and put a config together.

And the good news? I got it spinning!



I'm very excited to have this first big milestone complete. Without this it's very easy to think you just have a big inert lump of metal sitting beside you. Great to see it actually spin.

I managed to drain my car battery just by running the open inverter board. I guess it didn't have much charge to begin with. So, I ended up using a PC power supply to give me the 12V I needed there. I'm using a 30V/5A bench supply for high voltage input to the inverter. That worked just fine. It only used 1A or so to do the above spin.

So, next steps. I've got a few of the sumitomo connectors for the resolvers. I'm going to pin one up with some outdoor cat6 I have. Then I'll hook that up to the inverter.

I'll get my BMW battery pack up on the bench. I'll need to start building something resembling a contractor box. Maybe just a sheet of wood that I screw the contactors/fuses/etc down to. Then I'll link it in to the inverter.

The CVT needs to be gasket-ed and re-filled with ATF fluid. I had it open so I could probe its innards. Initially, I thought the coolant input/output lines were for water. I assumed this since they have rubber hoses. But looking at some of the Lexus docs, I'm now thinking that these are actually oil lines. So, I'll need to see about either blocking these up (if I can), or getting myself a little oil cooler radiator.

Then it's time to install the FOC firmware and start dealing it in.
slow67
Posts: 151
Joined: Thu Jan 30, 2020 6:52 pm
Location: Texas
Been thanked: 1 time

Re: 1965 Ford Mustang

Post by slow67 »

chrskly wrote: Thu Oct 29, 2020 9:35 pm So, I'll need to see about either blocking these up (if I can)
Don’t block them. If no cooler, loop them. A lot of transmissions rely on it for lubrication flow (unless you checked the fluid path and verified that).
User avatar
chrskly
Posts: 145
Joined: Fri Feb 21, 2020 5:04 pm
Location: Dublin, Ireland
Has thanked: 39 times
Been thanked: 28 times
Contact:

Re: 1965 Ford Mustang

Post by chrskly »

No update in quite a while. The day job went a bit crazy there for a bit, so I've not had a lot of time. In any case, most of what I've been doing is stripping paint and rust, which is a little less relevant to this forum.
IMG_6131.jpeg
This evening I've been trying to see where some of the components are going to fit - mostly the batteries and charger.

First I cut the top off the fuel tank. It had some pretty foul sludge in the bottom. It's also pretty banged up. If I'm going to use it I'll have to hammer some of that out.
IMG_6166.jpeg
IMG_6169.jpeg
IMG_6170.jpeg
So, first idea for the batteries - can I fit all 6 in the fuel tank?
IMG_6171.jpeg
Unfortunately no. The opening that the fuel tank sits down into it big enough for all 6 modules from the BMW pack I'm using, but the curves of the fuel tank make the usable space smaller. One alternative here would be to make a battery box that's more square-shaped that goes down into the space where the fuel tank would fit. Putting that idea to one side for now, but may come back to it.

Next idea - put the batteries in a 3-over-3 configuration over the rear axle.
IMG_6172.jpeg
Nope, no good either. The modules are too long, even with the BMS on the top instead of at the end.

Third idea - put all 6 modules over the rear axle, but longwise. I think I can, just about, squeeze all 6 in. But then I start thinking about future expansion, and possibly fitting another 6 modules in here. Can I fit them in a 6-over-6 configuration? Not quite. I need some clearance at the top for the boot hinges. But I could have 5-over-5 above the axle and put the other two modules in the fuel tank. I'd have some space left over for a rear high voltage junction box, a bms and so on in the fuel tank. The battery box would even overhang the fuel tank so I could run cables through the bottom of the battery box down into the fuel tank and it would all be out of sight.
IMG_6178.jpeg
Next question, where does the Tesla charger go?
IMG_6177.jpeg
It's begging to go into the wing here. From reading other threads on this forum, I would need to be sure to get all of the air out of the cooling loop when using it in this 'vertical' orientation, but it could work. In thinking about it a little further, I think I would mount it so the 'bottom' of the charger was facing out. This would make it much easier to bolt in as the mounting points would be on the outside then. Not sure where to put the radiator. It feels like it should be outside, but then wouldn't the fan just get gunked up with dirt from the road? Seems pointless to have a fan on a radiator in the boot, it would just push air around the boot.

I'd really rather have a lot of the battery weight down the back, but, if I wanted to put batteries up front, the best place is really right up the front of the car.
IMG_6180.jpeg
I could fit up to twelve batteries here (three layers of 4). But it would be putting 150kg right up in the nose of the car. Granted, these cars usually have a lot of weight in the engine bay, but if I can avoid it, I would rather avoid it.

I've ordered a type 2 port with the DC pins from Ali Express. I want to have just one charge port. I'm not planning to implement chademo. I'll have AC charging at home with the Tesla gen 2. And in the future, I'd like to have the option of adding some form of DC fast charging for longer journeys. I've ordered one of the LIM modules from the BMW i3 that is being discussed elsewhere. Later on I'll see if I can figure that out.

My original plan to use the original fuel filler location might not work out. The type 2 port is about 105mm tall, but that part of the car is only around 140mm tall. There might not be enough room for a flap/cover there.
IMG_6181.jpeg
The next best alternative would be to put the charge port behind the front grill - but that's another days puzzling.
User avatar
chrskly
Posts: 145
Joined: Fri Feb 21, 2020 5:04 pm
Location: Dublin, Ireland
Has thanked: 39 times
Been thanked: 28 times
Contact:

Re: 1965 Ford Mustang

Post by chrskly »

I could put the charge port in horizontally and then I'd only need 70mm of height. This would leave 35mm top and bottom. Which is more workable.
Greenbeast
Posts: 115
Joined: Sat Dec 26, 2020 5:44 pm

Re: 1965 Ford Mustang

Post by Greenbeast »

chrskly wrote: Wed Jan 20, 2021 10:54 pm I could put the charge port in horizontally and then I'd only need 70mm of height. This would leave 35mm top and bottom. Which is more workable.
Then you have to think about the weight of the cable pulling it 'sideways' don't you?
User avatar
chrskly
Posts: 145
Joined: Fri Feb 21, 2020 5:04 pm
Location: Dublin, Ireland
Has thanked: 39 times
Been thanked: 28 times
Contact:

Re: 1965 Ford Mustang

Post by chrskly »

Greenbeast wrote: Thu Jan 21, 2021 7:21 am
chrskly wrote: Wed Jan 20, 2021 10:54 pm I could put the charge port in horizontally and then I'd only need 70mm of height. This would leave 35mm top and bottom. Which is more workable.
Then you have to think about the weight of the cable pulling it 'sideways' don't you?
hmm, yeah, good point. I wonder, are these ports designed with the assumption that the strain is going to 'vertical' rather than 'horizontal'? I had a quick search for images of charge ports and I've not been able to find one in the 'horizontal' orientation.
Greenbeast
Posts: 115
Joined: Sat Dec 26, 2020 5:44 pm

Re: 1965 Ford Mustang

Post by Greenbeast »

chrskly wrote: Thu Jan 21, 2021 3:28 pm
Greenbeast wrote: Thu Jan 21, 2021 7:21 am
chrskly wrote: Wed Jan 20, 2021 10:54 pm I could put the charge port in horizontally and then I'd only need 70mm of height. This would leave 35mm top and bottom. Which is more workable.
Then you have to think about the weight of the cable pulling it 'sideways' don't you?
hmm, yeah, good point. I wonder, are these ports designed with the assumption that the strain is going to 'vertical' rather than 'horizontal'? I had a quick search for images of charge ports and I've not been able to find one in the 'horizontal' orientation.
This came up recently, Jack Bauer has one horizontal but it is where the exhaust was, so really low to the ground. I'm not sure I'd be comfortable with it horizontal at waist height
User avatar
muehlpower
Posts: 570
Joined: Fri Oct 11, 2019 10:51 am
Location: Germany Fürstenfeldbruck
Has thanked: 12 times
Been thanked: 96 times

Re: 1965 Ford Mustang

Post by muehlpower »

In these instructions you can see how phoenix wants her socket installed.
packb_charx_t2hbi__109675_ia_01.pdf
(6.46 MiB) Downloaded 171 times
At my one from DUOSIDA, the water drainage is designed for a vertical position. I will place it horizontally in the bumper behind the license plate and I drill a new water drain.
User avatar
chrskly
Posts: 145
Joined: Fri Feb 21, 2020 5:04 pm
Location: Dublin, Ireland
Has thanked: 39 times
Been thanked: 28 times
Contact:

Re: 1965 Ford Mustang

Post by chrskly »

Greenbeast wrote: Thu Jan 21, 2021 4:35 pm
chrskly wrote: Thu Jan 21, 2021 3:28 pm
Greenbeast wrote: Thu Jan 21, 2021 7:21 am

Then you have to think about the weight of the cable pulling it 'sideways' don't you?
hmm, yeah, good point. I wonder, are these ports designed with the assumption that the strain is going to 'vertical' rather than 'horizontal'? I had a quick search for images of charge ports and I've not been able to find one in the 'horizontal' orientation.
This came up recently, Jack Bauer has one horizontal but it is where the exhaust was, so really low to the ground. I'm not sure I'd be comfortable with it horizontal at waist height
Thanks Greenbeast, I'll check this out.
User avatar
chrskly
Posts: 145
Joined: Fri Feb 21, 2020 5:04 pm
Location: Dublin, Ireland
Has thanked: 39 times
Been thanked: 28 times
Contact:

Re: 1965 Ford Mustang

Post by chrskly »

muehlpower wrote: Sat Jan 23, 2021 5:52 pm In these instructions you can see how phoenix wants her socket installed. packb_charx_t2hbi__109675_ia_01.pdf

At my one from DUOSIDA, the water drainage is designed for a vertical position. I will place it horizontally in the bumper behind the license plate and I drill a new water drain.
Thanks for this. Yeah, the one I've ordered is a DUOSIDA as well. It kind of looks like they're OK with you mounting it so that the socket faces the ground. That's getting me thinking about whether there's some overhang where I can put it. hmmm.... :)
User avatar
chrskly
Posts: 145
Joined: Fri Feb 21, 2020 5:04 pm
Location: Dublin, Ireland
Has thanked: 39 times
Been thanked: 28 times
Contact:

Re: 1965 Ford Mustang

Post by chrskly »

I now have a high voltage junction box (more or less).
IMG_6346.jpeg
I somehow managed to burn out this precharge resistor, so I ended up swapping in the one from the BMW s-box. It came with the battery pack, so, it's probably better to use it anyway.

I did have an issue with one of the contactors not closing. A little percussive maintenance and it started working again. Bit worrying, but will keep an eye on it. I've ordered a couple more just in case.

With a HVJB I can start testing with my full pack. So, one of my two BMW PHEV packs went up on the bench. I'm just using 20A cable (normal domestic 2.5mm2 cable) for initial basic testing - on the AC side and on the DC side. I have a 20A MCB to prevent any serious accidents. I confirmed that contactor control is working, then connected up the full pack to the inverter.

My UDC still seems to be reading wrong, so I'm going to have to do some investigation there. udcgain is 5 (as per wiki), but udc reads around 200V when nothing is connected and sometimes seems to read the right voltage when the battery is connected.

A bit of fiddling with params in the sine firmware and I have the MG2 powerstage spinning the MG2 motor and the MG1 powerstage spinning the MG1 motor in open loop.



I was initially using a yaris inverter, but have switched to a gen 3 prius with Damien's dual motor board. So, I'll be able to use both motors in the L210 CVT when driving the car.

After the open loop spin comes FOC tuning...

I've had some difficulty flashing the firmware onto the dual-motor board. It looks like the firmware uploads OK, then it starts applying it, I might see a few percent tick by, but it's like it's drawing too much power and it resets. If I take out the wifi module for the other brain and try flashing again, it works. So, perhaps too much current draw during flashing maybe. Not had a chance to dig much deeper, but something to come back to.

I have some outdoor cat5 which I'm using, at least initially, to connect to the resolvers on the L210 CVT. I've pinned them up with the right plugs for the resolvers. I then went through the procedure for figuring out the resolver wiring from Damien/Johannes FOC tuning video. I found the three pairs and measured their resistances. Two pairs had around the same resistance and one had a lower resistance - as expected. Connected up the exciter pair to ground and MG2 exciter (ampseal pin 20). Then systematically tried the 4 combinations of the remaining wires (polarity swapping them). I was seeing more or less what I expected, only I was getting *crazy* amounts of jitter.
resolver-noise.png
I tried moving the resolver cables around to see if some external source of noise was causing the problem. I tried disconnecting everything and connecting it all again multiple times, thinking I made a mistake somewhere, but I was stuck with 50 to 100 degrees of jitter. The jitter was so regular, I figured I must be introducing noise somewhere accidentally - it was very uniform. After lots of fiddling around, I tried taking my ampseal plug out of the equation and, sure enough, my jitter went away. I was using the ampseal board from my yaris inverter. I had cut some traces and put in some bodge wires to turn it into a dual motor ampseal board. But I must have screwed up somewhere with those modifications.

Check out this sweet sub-one-degree jitter 8-)
teeny-jitter.png
I've ordered a few dual-motor ampseal boards from jlc, so that should fix that problem more permanently.

So, next steps from here ... Based on the FOC tuning video, I'm going to need to push more current into the motors when I'm trying to find the right value for syncoffset. That means heavier cables. I'll need to modify the inverter ends of the cables that came with the CVT so they fit. The spacing of the terminals is the same, so mostly it will be chopping off the little brackets that clamp the cables to the side of the inverter to get them out of the way.

I'll also need to make up a couple of short lengths of 100A+ cable to go from the HVJB to the inverter on the bench.

I'll need to fill up the CVT with oil again - it's still empty after its disassembly. And I'll need to hook up the little oil rad I've got so it doesn't just immediately dump all that oil out on the floor of my garage as soon as I run the motor.
User avatar
Cookie6000
Posts: 246
Joined: Wed May 08, 2019 9:27 am
Location: Wicklow, IRL
Has thanked: 12 times
Been thanked: 32 times
Contact:

Re: 1965 Ford Mustang

Post by Cookie6000 »

Looking good Christian.
Do we frequent in the same HVJB shop? :lol: Looks very tidy ;)
I remember I had all sorts of problems with flaky contactor control. Absolutely killed me for days trying to figure out what the issue was, why the sequence was out sometimes and work the next. I'm sure I waffled about it on here back when I was diagnosing it. Anyway, ended up being noise induced on the USB i/p on the Leaf VCU. Once I removed these from the 12 way molex, the issue disappeared. Plain sailing ever since. Look forward to being able to spin up the road in the Audi and see the Mustang and yourself in person when we are all allowed :)
Home of the #Audi8e - https://twitter.com/FiachraCooke
User avatar
chrskly
Posts: 145
Joined: Fri Feb 21, 2020 5:04 pm
Location: Dublin, Ireland
Has thanked: 39 times
Been thanked: 28 times
Contact:

Re: 1965 Ford Mustang

Post by chrskly »

Cookie6000 wrote: Thu Apr 08, 2021 9:43 pm Looking good Christian.
Do we frequent in the same HVJB shop? :lol: Looks very tidy ;)
Thanks! Haha, yeah, I think we might be shopping in the same places ;)
Cookie6000 wrote: Thu Apr 08, 2021 9:43 pm I remember I had all sorts of problems with flaky contactor control. Absolutely killed me for days trying to figure out what the issue was, why the sequence was out sometimes and work the next. I'm sure I waffled about it on here back when I was diagnosing it. Anyway, ended up being noise induced on the USB i/p on the Leaf VCU. Once I removed these from the 12 way molex, the issue disappeared. Plain sailing ever since. Look forward to being able to spin up the road in the Audi and see the Mustang and yourself in person when we are all allowed :)
Yeah, thanks for that. I'll check it out. I've watched a couple of your videos, have been meaning to check out the rest.

And yeah, deffo look forward to things opening up and being able to meet up with some folks for a chat.
User avatar
chrskly
Posts: 145
Joined: Fri Feb 21, 2020 5:04 pm
Location: Dublin, Ireland
Has thanked: 39 times
Been thanked: 28 times
Contact:

Re: 1965 Ford Mustang

Post by chrskly »

Going to try and do updates a bit more frequently because I'll do a few things and then totally forget what I've done ;P

I was working on doing the FOC tuning. I think that I have the resolver wiring correct. I was getting a plot for angle that looks right to me at least.

I'm still not sure what the setting for polepairs and resolverpolepairs should be. So, if anyone knows what the settings are for the GS450 (I'm guessing this is a good place to start), or if anyone knows a good method to systematically work these out, please let me know. I know the ratio between the output shaft and the motors, so I guess I could try testing different values for resolvepolepairs and see which one lines up with the angle plot (adjusting for the ratio between output shaft and motor).

I made a bit of a boo boo. I was working on doing the FOC tuning. I was at the very start of the process of trying to find the right syncoffset value. I had syncoffset at zero. I applied a little current, the motor would whine and vibrate a little, but not turn. If I turned it with my hand a little it might roll forward, but then stop again. So, I figured I had missed something in the initial setup. I went back to Damien/Johannes's FOC video and went through it again. However, I made the mistake of changing pinswap from 8 (correct value) to 5. The inverter of course tried to dump a load of energy into the motor in one go (as Damien warns). BUT, it just took one big jump (for about half a second), and then stopped dead.

After a change of underwear, I realised my pinswap mistake, but couldn't figure out why it had stopped on its own. I turned everything off/on again and noticed there was no voltage at the battery terminal on the inverter. After a little puzzling I pieced it together. The main contactor wasn't closing. So, the inverter tried to suck loads of energy out of the battery, but only the precharge contactor was closing. So it pulled it all through the precharge resistor. The precharge resistor blew out really quickly and saved by butt.

The lesson : always use the safety plank whenever you make a change!

So why wasn't the main contactor closing? Well, I checked and re-checked the wiring from the idc connector all the way to the contactor, all good. I tested the contactor (again) by manually connecting the ground wire (using a short wire to connect to the precharge ground signal), all good.

Looking at the pcb schematic, the mg2 microcontroller has a line running to IC1 which controls the contactor, and that's it. So I think, OK, maybe IC1 is bad. So I ordered a few NCV4802ASTT1G to swap it out. But OF COURSE, I managed to pull off some of the pads on the board when removing the old IC1. I have the new IC1 in.
IMG_6523.jpg
Still no good. So, will have to do a little more investigation/thinking on this one.

Another issue I was having is that the UDC value wasn't reading right. I was always getting around 250V or 300V. I had been planning to use a Prius Gen 3 in the car. But I also have a Yaris inverter. So, I swapped the board into the Yaris inverter, and now it's reading the right voltage again. So, I guess there's something wrong with my Prius inverter. I'll just use the Yaris inverter for now and see how I get on.
User avatar
chrskly
Posts: 145
Joined: Fri Feb 21, 2020 5:04 pm
Location: Dublin, Ireland
Has thanked: 39 times
Been thanked: 28 times
Contact:

Re: 1965 Ford Mustang

Post by chrskly »

Debugging the issue I'm having with my main contractor not closing a little more.

I looked at the PCB diagram to trace the precharge and main contactor control lines back to the stm32f.

Precharge is IDC pin 26. It goes through IC3 and there's a little test pad in-between C52 and R67.

Main contactor is IDC pin 25. It goes through IC1 and there's a little test pad next to X3.

With the inverter lid off, I powered up. I hear the negative contractor close, shortly followed by the precharge contactor. Nothing from the main contactor, as I've been seeing. UDCSW is zero and there are no errors. So, it looks like the STM32F thinks that it's closing the main contactor.

I measure the voltage at the two test pads above. I'm seeing 3.5V coming from the precharge line out the stm32f but I'm only seeing 0.2V coming from the main contractor line out of the stm32f.
main-contactor-issue.png
Could I have a problem with my stm32f?
User avatar
chrskly
Posts: 145
Joined: Fri Feb 21, 2020 5:04 pm
Location: Dublin, Ireland
Has thanked: 39 times
Been thanked: 28 times
Contact:

Re: 1965 Ford Mustang

Post by chrskly »

Alright, long overdue for an update.

I'm a dummy and I misunderstood the difference between manualrun and a normal run. Main contactor doesn't close on manualrun. Before I figured that out I managed to damage my board by trying to replace some components. So, I'm on board #2 now.

Jitter looks good.
2021-08-09-foc-tuning-jitter.png
I'm pretty sure I have my resolver wiring set right. I need to turn the output shaft really, really slowly to be able see the angle go through the full 360, but it looks OK to me.
2021-08-09-foc-tuning-angle.png
I don't know the right settings for polepairs and resolvepairs. But I've started out with 4 for polepairs. I'm basing this on the fact that the gs450 has 8 poles - from the OSTI document.

Here is me trying to get started FOC tuning. syncofs=0. I'm in manual run. I'm adding 1amp, 5amp, then 20amps of manualid. You can see that it doesn't spin up from a dead stop, but if I turn it with my hand it will start. It's quite jiggly at 1amp. My expectation from watching other peoples videos is that is should spin up and up when on the wrong syncofs. It's not doing this though. It's running at a fixed rpm.



I guess I have the polepairs/resolvepairs set wrong. Is there a way to systematically determine this (apart from opening the motor)? I tried going through all the permutations up to 8 polepairs/resolvepairs and I didn't find the right setting. But perhaps I missed it.
User avatar
chrskly
Posts: 145
Joined: Fri Feb 21, 2020 5:04 pm
Location: Dublin, Ireland
Has thanked: 39 times
Been thanked: 28 times
Contact:

Re: 1965 Ford Mustang

Post by chrskly »

The motor is not spinning up from a dead stop. I can give it a little push and it will start to spin, but it stutters and makes some pretty unpleasant noises. One setting that I know that I don't know is the motor pole pairs and the resolver pole pairs. I've been guessing at 4 for the motor pole pairs based on the fact that this motors older brother the gs450h has 4 motor pole pairs. But this could be wrong.

I took the CVT apart, so I know that the ratio between the MG2 motor and the output shaft is 3.3333. So, working backwards, the output shaft should move 108 degrees (360 / 3.3333) for every one rotation of MG2.

I bolted a bit of wood to the output flange to act as a 'clock hand'. I then blocked the hand so that it could only move approximately 108 degrees. Not very accurate, but close enough. I then watched a plot of rotor angle as I slowly swept the arm through one motor revolution. I recorded how many revolutions the firmware thought the motor did with that combination of motor/resolver pole pairs. I repeated the procedure with different combinations of polepairs and resolverpolepairs.
IMG_6877.jpeg
2021-08-12-poles-vs-turns.png
As you can see, I didn't try every combination, but enough to see a trend. At best, I was getting two turns for every sweep. I am expecting to see only one. Here's what a plot would typically look like for any of the 1:1 polepair/resolverpair settings (e.g. 4 pole pairs and 4 resolver pairs, or 2 polepairs and 2 resolver pairs).
2021-08-12-typical-sweep.jpg
Based on my table I would expect having double the resolver pairs of the motor pairs would get me closer to the right configuration, but the OpenInverter firmware doesn't seem to like that. It just always gives me zero degrees when I try to set resolver pole pairs > motor pole pairs.

So, I thought, OK, time to backtrack. Maybe I don't have the correct resolver wiring. There are only four possible permutations of the four sin, cos, enc 1, and enc 2 cables. And that's when things got weird. The three wrong wiring combinations should give me an angle that jumps around. But that's not what I saw. I need to go back and verify this, but it looked like every resolver wiring combination was giving me the same two motor turns per 108 degree sweep. Which doesn't make any sense.
User avatar
chrskly
Posts: 145
Joined: Fri Feb 21, 2020 5:04 pm
Location: Dublin, Ireland
Has thanked: 39 times
Been thanked: 28 times
Contact:

Re: 1965 Ford Mustang

Post by chrskly »

Still trying to figure out what the right polepairs/resolverpairs settings are for this motor. I went back to check each of the four possible resolver wiring combinations to verify the weird behaviour I was seeing last time.
IMG_6894.jpg
grw-gr-orw-or-2-2.jpg
grw-gr-or-orw-2-2.jpg
gr-grw-orw-or-2-2.jpg
gr-grw-or-orw-2-2.jpg
What I’m expecting to see is only one of the resolver wiring combinations to give me sensible angle readings. I.e., as I turn the motor the angle should increase steadily to 360, then immediately drop to zero, then resume climbing. The other three ‘wrong’ resolver wiring combinations should give me erratic angle readings. However, all four wiring combinations seem to be giving consistent output. For some of them the graph is reversed (the angle falls instead of rises), but the angle moves consistently from 0 to 360 or vice versa.

So, I can’t tell what resolver wiring is the correct one or if I’m doing something else wrong.

I'm also still seeing two rotations when I expect to see one. I'm turning the output shaft 108 degress, with a gear ratio of 3.333 that should be one turn of the MG2 motor.
LeonB
Posts: 55
Joined: Fri Mar 26, 2021 12:19 am
Location: Germany

Re: 1965 Ford Mustang

Post by LeonB »

I have done the same procedure with a Prius Gen 3 motor/inverter a while ago. Although I don‘t know if my approach makes sense or I just got lucky, I got the motor to spin and wanted to share my experience:

I also did not get 1 rotation in the angle plot for each „real“ motor rotation. Multipole resolvers have multiple electric rotations for a single motor rotation. I think each pole pair results in one rotation, so your observations match the expectations for a 2 pole pair resolver

In the FOC tuning video, the angle plot moves from 360° downwards to 0° and then jumps back to 360°, so I would just choose one of the two wiring combinations that results in this behavior and proceed with the syncofs tuning. I don‘t know which difference there may be between the two combinations, but in my case the first one I tried gave me the results I wanted: A motor which reacts accordingly to the throttle input.
User avatar
chrskly
Posts: 145
Joined: Fri Feb 21, 2020 5:04 pm
Location: Dublin, Ireland
Has thanked: 39 times
Been thanked: 28 times
Contact:

Re: 1965 Ford Mustang

Post by chrskly »

LeonB wrote: Wed Aug 18, 2021 12:38 am I have done the same procedure with a Prius Gen 3 motor/inverter a while ago. Although I don‘t know if my approach makes sense or I just got lucky, I got the motor to spin and wanted to share my experience:

I also did not get 1 rotation in the angle plot for each „real“ motor rotation. Multipole resolvers have multiple electric rotations for a single motor rotation. I think each pole pair results in one rotation, so your observations match the expectations for a 2 pole pair resolver

In the FOC tuning video, the angle plot moves from 360° downwards to 0° and then jumps back to 360°, so I would just choose one of the two wiring combinations that results in this behavior and proceed with the syncofs tuning. I don‘t know which difference there may be between the two combinations, but in my case the first one I tried gave me the results I wanted: A motor which reacts accordingly to the throttle input.
Hi LeonB, thanks for the input, very much appreciate it.

Right, I see, the angle in the plot is the notional resolver angle, not the actual physical angle of the rotor. Makes sense.

I think I'm just going to have to go through each combination of polepairs, respolepairs, and resolver wirings. It's only 544 combinations :P

I've gone through each polepair/respolepair combination for one resolver wiring already - one of the descending angle ones. I have not found a smooth spinning combination yet, but I did notice that when polepairs was twice respolepairs I could get the motor to spin - very clunkily, but it would spin a bit. So there might be a hint in that.

I'll try some further combinations tomorrow. But I think I need to get the a smooth spin before I can start changing syncofs.
kiwifiat
Posts: 99
Joined: Sat Dec 22, 2018 9:39 pm
Location: Vancouver, Canada
Been thanked: 10 times

Re: 1965 Ford Mustang

Post by kiwifiat »

chrskly wrote: Thu Aug 19, 2021 9:53 pm
Right, I see, the angle in the plot is the notional resolver angle, not the actual physical angle of the rotor. Makes sense.

I think I'm just going to have to go through each combination of polepairs, respolepairs, and resolver wirings. It's only 544 combinations :P

I've gone through each polepair/respolepair combination for one resolver wiring already - one of the descending angle ones. I have not found a smooth spinning combination yet, but I did notice that when polepairs was twice respolepairs I could get the motor to spin - very clunkily, but it would spin a bit. So there might be a hint in that.

I'll try some further combinations tomorrow. But I think I need to get the a smooth spin before I can start changing syncofs.
polepairs is 4, respolepairs is 2. You should get four 0-360 degree periods for each mechanical turn of the motor. Johu posted a video on how the STM32 measures the rotor angle, it is worth a watch. Also if you own an oscilloscope or can borrow one it is a good idea to scope the driver signal and the feedback sin/cos signals to ensure the inverter is getting clean signals.
User avatar
chrskly
Posts: 145
Joined: Fri Feb 21, 2020 5:04 pm
Location: Dublin, Ireland
Has thanked: 39 times
Been thanked: 28 times
Contact:

Re: 1965 Ford Mustang

Post by chrskly »

kiwifiat wrote: Fri Aug 20, 2021 12:55 am
chrskly wrote: Thu Aug 19, 2021 9:53 pm
Right, I see, the angle in the plot is the notional resolver angle, not the actual physical angle of the rotor. Makes sense.

I think I'm just going to have to go through each combination of polepairs, respolepairs, and resolver wirings. It's only 544 combinations :P

I've gone through each polepair/respolepair combination for one resolver wiring already - one of the descending angle ones. I have not found a smooth spinning combination yet, but I did notice that when polepairs was twice respolepairs I could get the motor to spin - very clunkily, but it would spin a bit. So there might be a hint in that.

I'll try some further combinations tomorrow. But I think I need to get the a smooth spin before I can start changing syncofs.
polepairs is 4, respolepairs is 2. You should get four 0-360 degree periods for each mechanical turn of the motor. Johu posted a video on how the STM32 measures the rotor angle, it is worth a watch. Also if you own an oscilloscope or can borrow one it is a good idea to scope the driver signal and the feedback sin/cos signals to ensure the inverter is getting clean signals.
Thanks kiwifiat. I've tried 4+2 for each of the four possible resolver wiring combinations. But still no joy.

None of them will start the motor from a stop. For the two combinations where the angle goes down, if I give the output shaft a bit of a push it will spin. But it seems noisy and shaky, see video. Also it spins at a constant rpm. In the Johannes/Damien FOC tuning video it looks like it should spin up faster and faster.

For the two resolver combinations where the angle goes up, the motor won't spin at all.

I've tried a few syncofs values as well just in case the proper syncofs was near zero.

Open to any and all suggestions.

User avatar
chrskly
Posts: 145
Joined: Fri Feb 21, 2020 5:04 pm
Location: Dublin, Ireland
Has thanked: 39 times
Been thanked: 28 times
Contact:

Re: 1965 Ford Mustang

Post by chrskly »

I figured it out! I had the three phase cables on the wrong way around.

So delighted to be over that hurdle.

Will post a video tomorrow.
Post Reply