Volt inverter interface

Isaac96
Posts: 656
Joined: Sat Oct 05, 2019 6:50 pm
Location: Northern California, USA
Been thanked: 1 time
Contact:

Re: Volt inverter interface

Post by Isaac96 »

arber333 wrote: Tue May 26, 2020 4:51 am

Nice job! Did i send you the 3D printing file for a cover spacer? I think i added it to github anyway.
I like how you solved the connection for voltage sense. I only recommend you twist the wires to make twisted pair connection. There will be 360Vdc in those wires.

Another consideration maybe? You need to connect the board to GND plane of inverter. Since you use a plastic spacer i would add one cable from GND on each board to the alu shelf and fit it with original screws.

Also take care to connect motor and inverter together with a braid or other kind of thick cable so potential is shared. I felt quite a jolt when i touched them unconnected.
Yup, the stl file is on github. I don't have a printer so I might just 2d print the file and make a spacer by hand.

I'll be sure to twist the wires. Rather forgot about that part. I ran out of red wire hence the blue :(

After getting a jolt from the inverter the other day I grounded everything to the frame of the car. Motor is already strapped to frame, now the inverter is along with phase cable shields.
I actually have the adapter board grounded to the aluminum shelf, with the original screws. (I do need some slightly longer ones, board is a bit squished).

Since my ESP8266 stopped behaving at all (won't grab info from the board anymore) I'm back to the USB-TTL converter. It's much nicer having a direct connection that doesn't depend on the chances of wifi and is protected from EMI.

Everything is looking good!

-Isaac
Isaac96
Posts: 656
Joined: Sat Oct 05, 2019 6:50 pm
Location: Northern California, USA
Been thanked: 1 time
Contact:

Re: Volt inverter interface

Post by Isaac96 »

OPA344 just arrived and I soldered it in after finishing my reconstructive surgery. I can confirm that it works now. Voltage readings are correct and they scale in the right direction. I had previously also failed to solder the gullwing SI8920 properly because I'm terrible at soldering. Oh well.
I should get the STM32 boards tomorrow and with luck I can complete the testing.
So close!
-Isaac
Isaac96
Posts: 656
Joined: Sat Oct 05, 2019 6:50 pm
Location: Northern California, USA
Been thanked: 1 time
Contact:

Re: Volt inverter interface

Post by Isaac96 »

STM32 has arrived, I flashed firmware and the motor is working in manual mode now without encoder. Spins perfectly.
With the encoder connected it starts shaking really violently - not nice at all, I'll scope and see if there is noise coming in.

In regular pedal control mode I can't get potnom to change from 0 at all... I remember having this problem before and I can't remember how I fixed it. I've got both throttle channels hooked together, should I use the SingleRegen or DualThrottle potmode?

Also I keep getting the "currentlimit- derate" error, but only most of the time and it doesn't change whether it works or not. No other errors are firing.

If I can fix these problems I'll go for a drive tonight and do some tuning.
-Isaac

EDIT I had udcmin set to 500 for some reason, changed that and it's working nicely now. I'm tuning boost at the moment in pedal control mode; wheels are still off the ground. With luck I'll be driving in an hour!
Isaac96
Posts: 656
Joined: Sat Oct 05, 2019 6:50 pm
Location: Northern California, USA
Been thanked: 1 time
Contact:

Re: Volt inverter interface

Post by Isaac96 »

Okay tuning is hard. I've got the wheels off the ground; will it work better if the car is down and moving its own weight?
The encoder is definitely working since manual mode w/encoder is good (though as the motor spins up it hits OC; probably too much boost??).
So far Volt inverter is doing great! It's getting a little warm since ambient is 100 degF (37C) but great otherwise!
-Isaac
arber333
Posts: 3261
Joined: Mon Dec 24, 2018 1:37 pm
Location: Slovenia
Has thanked: 80 times
Been thanked: 232 times
Contact:

Re: Volt inverter interface

Post by arber333 »

Isaac96 wrote: Fri May 29, 2020 2:38 am Okay tuning is hard. I've got the wheels off the ground; will it work better if the car is down and moving its own weight?
The encoder is definitely working since manual mode w/encoder is good (though as the motor spins up it hits OC; probably too much boost??).
So far Volt inverter is doing great! It's getting a little warm since ambient is 100 degF (37C) but great otherwise!
-Isaac
Is your inverter tripping OC limit or is this your Fault pin? When i had too much boost AND when i used 4Khz my DIY power section would throw desat at me. Maybe you want to use 8kHz PWM?

Do you have scope with which you could inspect Rev2 mainboard pwm enable pins? PB12, PA0, PA1, PA3 and PC7? They need to be high for the PWM to work.

Also you need to inspect your current input one the mainboard side. You may have a leftower resistance on your main board that creates incorrect voltage result directly to Olimex pins. Olimex pins have to see 1.6V when at idle. If the value is too far away your detection gain may be different.
What if you set OClimit at 1000A?
Isaac96
Posts: 656
Joined: Sat Oct 05, 2019 6:50 pm
Location: Northern California, USA
Been thanked: 1 time
Contact:

Re: Volt inverter interface

Post by Isaac96 »

Inverter is tripping OC, not other errors. I've got it back at 8khz per your advice.
I think I checked the current sensor voltages at the Olimex just because of all the trouble I had previously, but I will look again.

I was having some nasty interference on my 12v line due to cheap BLDC water pumps so I'm going to run tests again without the pumps.

The OC I'm getting in manual mode happens as the motor spins up with the encoder. I'm thinking it's caused by too much boost which is feeding more voltage than necessary at a low frequency.

With fslipspnt set at 10 should I be setting ampnom to 100? I've been able to get it to move at ~40, I just realized that that is probably a sign of very excessive boost... I must finish an exam today then I have the summer to work.
-Isaac
arber333
Posts: 3261
Joined: Mon Dec 24, 2018 1:37 pm
Location: Slovenia
Has thanked: 80 times
Been thanked: 232 times
Contact:

Re: Volt inverter interface

Post by arber333 »

Let me help a little with advice from tuning guide...
You need to start like you would from 0, since your power section has changed, so motor response is different.

You want to find a flat surface - a parking lot etc. so you can drive and stop without checking traffic. Change only one parameter at a time and save settings that work or write them down! Do not use regen when testing it will only interfere with you initially.

1. set fslipmin so that you feel car taking off smoothly and try to change it by +/-0,1Hz and check differences in starting. Save when satisfied.
2. lower boost value in 100 point until motor jitters at start. Then return it to last good value.
3. try lowering ampmin in 0,1 increments and observe throttle travel. When throttle is not just smooth but becomes sluggish return some previous increments until throttle reaction is acceptable.
4. change fweak value in +/-10Hz increments from starting point and observe torque in starting. This value is very dependent on battery voltage and is subjective. You should decide on it according to your feel of the motor acceleration. If motor jumps too much, then increase this, or if it is too sluggish decrease it. However this will affect your high end torque.

This here implies you are satisfied with your motor takeoff performance.
Now you find a hill or ramp and set car on it. You want to hold car in position on slope just using throttle pedal. If parameters are not good motor will jump or will feel sluggish or jittery
1. add boost if motor is oscillating if it is smooth reduce it in 100 point increments until you get oscillation. Then return to last good value
2. reduce/increase ampmin in 0,25 increments untill you get oscilation in motor and return last good value
When you are satisfied with your hill hold torque set the car into a hill to set fslipmax. Warning full throttle will be used. Be sure there is no other traffic!
Set fslipmax to chosen value (guess it at 2xfslipmin if you have no other way) and try to take off with full throttle.

If car feels sluggish with full throttle you have to add more max slip.
If motor starts to jitter there is too much maxslip. Try to reduce it in 0.1Hz increments.

When you feel satisfied with settings save them and go on setting regen and braking effect.
Isaac96
Posts: 656
Joined: Sat Oct 05, 2019 6:50 pm
Location: Northern California, USA
Been thanked: 1 time
Contact:

Re: Volt inverter interface

Post by Isaac96 »

Yes I've been following this guide :)
I'm starting over in manual mode without the interference of the coolant pumps - somehow I need to eliminate it altogether. I am now done with school for the year so I can spend the next week on it.

Current sensors are reading 2.5v at the sensor and 1.493 at the op-amp. I think this is all right, though it is supposed to be 1.65 to be perfect.
Isaac96
Posts: 656
Joined: Sat Oct 05, 2019 6:50 pm
Location: Northern California, USA
Been thanked: 1 time
Contact:

Re: Volt inverter interface

Post by Isaac96 »

Okay looks like I put the wrong resistors in - I did 2k2 and 3k3 instead of the 3k3 and 6k8 which you said. Also the 4k7 pulldown (R28) didn't actually connect to ground - the plane which it goes to is connected to nothing else. This might be adding some noise. I'm going to fix the dividers and recalibrate current sensors. What are your il1gain and il2gain at?
-Isaac
arber333
Posts: 3261
Joined: Mon Dec 24, 2018 1:37 pm
Location: Slovenia
Has thanked: 80 times
Been thanked: 232 times
Contact:

Re: Volt inverter interface

Post by arber333 »

Isaac96 wrote: Fri May 29, 2020 7:56 pm Okay looks like I put the wrong resistors in - I did 2k2 and 3k3 instead of the 3k3 and 6k8 which you said. Also the 4k7 pulldown (R28) didn't actually connect to ground - the plane which it goes to is connected to nothing else. This might be adding some noise. I'm going to fix the dividers and recalibrate current sensors. What are your il1gain and il2gain at?
-Isaac
Yes probably you saw the resistor values before i corrected them in PCB drawing. Thanks for the heads up on the 4K7 pulldown. This one is really important. Without it Tom and I had troubles starting Lebowski Volt controler. So my Johannes inverter simply inherited it. It makes a world of difference with signal. Also if you look closely to original master board you will notice it also has 4K7 pulldowns on current sensors.
You can connect it to GND by extending the leg of a nearby cap.

EDIT: I corrected my github with version 2.4 where i added 6K8 pulldowns on the PWM signals and connect the stranded GND plane.
Isaac96
Posts: 656
Joined: Sat Oct 05, 2019 6:50 pm
Location: Northern California, USA
Been thanked: 1 time
Contact:

Re: Volt inverter interface

Post by Isaac96 »

I have corrected my circuit and that part is working well.

But my encoder is experiencing spikes - it's open collector, and a high signal is spiking low when I turn ampnom over 10 or so (without motor movement). I'll see if I can figure out how to shield the cable better, I'm not sure if the shield is grounded at the motor end. This is probably a large part of the shaking and overcurrent events that are occurring. I'll start by removing the cable and checking the shielding.

-Isaac
Isaac96
Posts: 656
Joined: Sat Oct 05, 2019 6:50 pm
Location: Northern California, USA
Been thanked: 1 time
Contact:

Re: Volt inverter interface

Post by Isaac96 »

I checked the shielding, all is good. It's grounded at the motor end and the motor has a big strap to ground.

Here's the signal when the motor is not moving and motor current is 0:
IMG_0058[1].JPG
Stays at a steady 5V from the board pullup.

And when spinning the motor by hand:
IMG_0062[1].JPG
(sorry about the image quality, I don't have tons of light in the garage, also it went upside down somehow)
A good swing from 0-5V.

Now here's what it looks like when fslipspnt = 10 and ampnom = 1:
IMG_0060[1].JPG
(also upside down... silly smartphone. So those spikes are towards negative.)


Not only is there noise that spikes below 0V (i'm scared to damage yet another STM32) but the encoder does not respond to the motor being spun!

The supply voltage remains at 4.98v throughout.

I changed the PWM frequency and the space between the spikes increased.

Of course this is some sort of noise from the motor.
But why won't the encoder send the output low when the motor moves? I've tried both 12v and 5v, same results; the encoder outputs stay at 5v with noise around that point.
Isaac96
Posts: 656
Joined: Sat Oct 05, 2019 6:50 pm
Location: Northern California, USA
Been thanked: 1 time
Contact:

Re: Volt inverter interface

Post by Isaac96 »

Okay I've just got ungodly amounts of noise in the 5V line, of course right in line with the PWM output. I've got a rather long wire run for the pedal 5v; maybe I should just split that off and use a different power supply, I'm not even using the pedal for now.
arber333
Posts: 3261
Joined: Mon Dec 24, 2018 1:37 pm
Location: Slovenia
Has thanked: 80 times
Been thanked: 232 times
Contact:

Re: Volt inverter interface

Post by arber333 »

Did you actually connect motor and inverter with another strap? This has characteristics of a capacitive buildup. It needs to be discharged ot level the potential.
Did you measure voltage from motor and inverter case to GND? I got 200V and a good jolt last time...
Isaac96
Posts: 656
Joined: Sat Oct 05, 2019 6:50 pm
Location: Northern California, USA
Been thanked: 1 time
Contact:

Re: Volt inverter interface

Post by Isaac96 »

Yeah I got my jolts already (I think it was ~100v) so motor and inverter are both grounded. They are not directly connected though, I will do that.
Do I need a big strap? I might have a piece of 2/0 around, if not maybe 8ga will do.

The 5v power supply has noise in it. With encoder disconnected there is still the noise in the 5v supply (only with power going to motor). So I'm thinking that the encoder is not liking the noise and so it won't pull the outputs low. I'm also thinking about using a different 5v power supply or even a battery?
arber333
Posts: 3261
Joined: Mon Dec 24, 2018 1:37 pm
Location: Slovenia
Has thanked: 80 times
Been thanked: 232 times
Contact:

Re: Volt inverter interface

Post by arber333 »

I think you should use a stable 12V supply for encoder. Is it open collector type? Then it may be in the brownout with 5V. Give it more voltage and it may assert signals better.
If you have push pull outputs however that is not the case.
Isaac96
Posts: 656
Joined: Sat Oct 05, 2019 6:50 pm
Location: Northern California, USA
Been thanked: 1 time
Contact:

Re: Volt inverter interface

Post by Isaac96 »

SUCCESS!!!
I grounded the inverter with a giant strap and it works great now!
I also spun it up to 100mph in first... Equals way too many rpm. (15,000 or more... wow)

So driving tests tomorrow!

Thank you SO MUCH Arber! I'd be nowhere without you, your designs, and your advice!!!

-Isaac

EDIT It's not behaving perfectly with the settings as they are... what a surprise, I don't even know what they are (tons of messing with them in the last couple days). But starts are okay, fslipmax is probably too high for now. I'll try sane settings tomorrow and also redo the grounding properly.
Isaac96
Posts: 656
Joined: Sat Oct 05, 2019 6:50 pm
Location: Northern California, USA
Been thanked: 1 time
Contact:

Re: Volt inverter interface

Post by Isaac96 »

I've been driving around with the Volt inverter for quite some time. In general, performance is good -- I've burnt rubber in first gear and reached 93mph in third (on the highway, didn't want to go faster). Temperatures are also fairly low, with the inverter hitting a maximum of 70 celsius while moving (I hit TMPHSMAX once or twice after lots of 0-20 runs while testing boost and fslipmax). I just realized that pwm was set to 4.4 and moving to 8.8 improved smoothness a bit but increased inverter temperature. It's set to 8.8 now.

However, I am not able to use high boost levels.

With boost at 2800 I can start well in first and second at full throttle with minimal shaking, but third just jumps and dies unless I feather the throttle very carefully. And at low RPMs there is still shaking (for example when pulling up the driveway).

Boost up at 3200 works a little better, but then sometimes hits overcurrent in first or second when pulling away from start. Third works well but is still shaky at low speeds.

Boost at 3600 lets third start better but then first and second die at start.
Ocurlim is set to 800, iacmin is at the same level.

I'm inclined to blame this on the high deadtime required by the Volt inverter and its IGBTs. From reviewing its datasheet, it seems that the IGBTs alone require 1.5us of deadtime, without even considering the propagation delay of the drivers (which could well be significant).

Also I feel like my motor's inductance is fairly low. Since Damien was able to use it at boost=3600 with deadtime=50 (config file from wiki), but I cannot reach that boost with a much higher deadtime, I feel like the motor current is rising too swiftly and thus hitting overcurrent.

What is the absolute minimum deadtime that I can safely use? (Or unsafely). If the power stage blows it blows, I have the other half to use anyways. If I can't get the Ampera/Siemens drivetrain working properly I will look at other options (seriously considering Tesla SDU, they are available nearby for excellent prices).

-Isaac
arber333
Posts: 3261
Joined: Mon Dec 24, 2018 1:37 pm
Location: Slovenia
Has thanked: 80 times
Been thanked: 232 times
Contact:

Re: Volt inverter interface

Post by arber333 »

Hm...
I have noticed the same with my low inductance motor. I can use boost up to 7000 with my fslipmin of 3Hz and not a dial more.
Also if i use 3rd i need to be carefull with throttle if i am at standstill, not so if my wheels are turning a bit.
I use unusually high fslipmin of 3.0Hz. But it works great with my motor. Fslipmax is at 7.2Hz but i have reduction of power implemented, because my battery cant take more than 250A max.
Such high slip caused clutch disk to desintegrate springs, but now that i use Lovejoy coupling i can drive and shift normally.

With such a low inductance motor i would recommend you try higher fslipmin and boost to get better start.
With ACIM motor i found out searching for ideal settings is a lifelong process of black magic and blood sacrifice :twisted:. I stopped trying to make them excelent, mainly comfortable to drive.
With PMSM when you find the correct settings they just work...

Edit: what i describe here is NOT Volt inverter but rather my DIY power section with official Skyper 32R drivers which also use dead time in the 3uS range. However when i swapped my DIY inverter for a Volt and i used the same Olimex chip i got a consistent response though with a little faster power advance on start.
Isaac96
Posts: 656
Joined: Sat Oct 05, 2019 6:50 pm
Location: Northern California, USA
Been thanked: 1 time
Contact:

Re: Volt inverter interface

Post by Isaac96 »

arber333 wrote: Tue Jul 07, 2020 6:02 am Hm...
I have noticed the same with my low inductance motor. I can use boost up to 7000 with my fslipmin of 3Hz and not a dial more.
Also if i use 3rd i need to be carefull with throttle if i am at standstill, not so if my wheels are turning a bit.


With such a low inductance motor i would recommend you try higher fslipmin and boost to get better start.
With ACIM motor i found out searching for ideal settings is a lifelong process of black magic and blood sacrifice :twisted:
Yes that's exactly the behavior I have at startup! Although there is lots of shaking at certain speeds...

I will try the higher boost and fslipmin tomorrow. I just find it a little weird because Damien has run the same motor with similar settings to what I have, and the Ford Ranger crew (Joromy and others) are using similar motors and use more 'normal' settings.

Any idea about the deadtime limits? The datasheet dictates at least 1.5uS from tdOFF and tdON. Should I just keep lowering it and trust to the desat to protect the IGBT?
arber333
Posts: 3261
Joined: Mon Dec 24, 2018 1:37 pm
Location: Slovenia
Has thanked: 80 times
Been thanked: 232 times
Contact:

Re: Volt inverter interface

Post by arber333 »

Isaac96 wrote: Tue Jul 07, 2020 6:15 am Any idea about the deadtime limits? The datasheet dictates at least 1.5uS from tdOFF and tdON. Should I just keep lowering it and trust to the desat to protect the IGBT?
I wouldnt trust desat with this more than a couple of times. Its stress on the IGBTs. I managed to kill both sides of Volt inverter by simply resetting the Olimex with 360Vdc. Bootloader took all of the PWM channels ON and they were toast before i realised the springy sound was not a normal event. Dont forget we only have datasheet for the IGBTs, drivers are proprietary data as far as i have seen. Fuji Electric Fi009.
https://www.fujielectric.com/company/te ... 6-2009.pdf

So if you have a diff probe you can observe what PWM channels are doing when you stress them. In any case you should avoid the tail of closing IGBT gate connecting the rising edge of opening gate IGBT.
I think higher boost causes the tail to elongate (complete switchoff time is longer) and top and bottom IGBTs meet = desat event.
I got this in my tuning sessions with old drivers. Then this would show as a very loud whine on startup. And with short deadtime IGBTs were toast before the year was over. Every time. I suggest 180pt or 185pt because it works without damages. You maybe can get away with 160pt. I wouldnt try less than 2.5us... My assumption was a bit on the lean side. I would take at least 800ns for one driver response time now. With some safety i would add a 1us then. It is just a blank time, it doesnt hurt anyone, whereas with tailstrike you can kill IGBT overtime...
https://endless-sphere.com/forums/viewt ... 5#p1461257
https://www.diyelectriccar.com/threads/ ... 922/page-5


Gradually i found out my car drives off best with 3Hz minimal slip, which seemed too much at first. But if i used 1.8Hz car would jump and then loose power like rubber band and i had to advance throttle to get it rolling further. Not a good way to drive in slow traffic.
Ampmin also plays a role here, because when boost is over and motor is rolling this value is powering this rotation with whatever voltage it reaches by then. If it is too much i noticed excessive drain when driving on straight road with motor overheating.

When i tuned out my new Skyper 32R drivers i got desat with too small a boost as well as too high. So i tried to use boost between 5000 and 7000. Smoothest start was with boost 7000 and 3Hz slip. Ampmin is at 21%. Also there is more regen energy with those settings...

Maybe you would install newest firmware first?
Isaac96
Posts: 656
Joined: Sat Oct 05, 2019 6:50 pm
Location: Northern California, USA
Been thanked: 1 time
Contact:

Re: Volt inverter interface

Post by Isaac96 »

I will try with newest firmware. My ESP8266 may or may not be functional so I may need to learn how to use the python updater script....
Comparing 4.76 to later versions looks similar. I am going to download the source code and compile with a modification--I need to change the limits of dirchrpm for use with my clutch pedal.

I haven't tried very high ampmin levels (been staying between 5 and 12) so I will give that a shot.

-Isaac
Isaac96
Posts: 656
Joined: Sat Oct 05, 2019 6:50 pm
Location: Northern California, USA
Been thanked: 1 time
Contact:

Re: Volt inverter interface

Post by Isaac96 »

Still haven't updated firmware, didn't have a lot of time today. I did spend some time trying lower deadtime levels and even using 180 instead of 185 gave OC either at start or at ~12mph (with full throttle). So I messed with ampmin and fslipmin and have improved low speed performance :)
But my start switch sorta died on me (or maybe the diode attached to it died). So the car is around the block and I will go fix it in the morning. Such is life....

-Isaac
Post Reply