# Tom's inverter adventures



## Tomdb (Jan 28, 2013)

Update 1:

I have completed all the soldering, its was pain in the butt. My 48watt iron is a little on the big side for components like these. If i were to make an smd version, i would spend less time soldering and more time coding.



Total overview, the mainboard is 8 by 10 cm about palm size. 



The main board close up, i will probally start to design my own soon, few features i need. If you have any ideas or suggestions let me know.



Drivers, these were the biggest pain to solder, yet the board is so simple its going to be hard to improve on the design.



As metioned in Jhuebner's thread, the sensors are mounted bottom side, i mounted the components on top, this will make the install i have in mind easier.

After dinner im going to see if i didn't mess up big time. Time for power up 

Update:

Its working, tomorrow im going to hook it up to the computer to do the flashing of the code and the first tests.


----------



## Tony Bogs (Apr 12, 2014)

Hi, I'm an E-IT engineer. Power electronics and microcontrollers/DSPs are some of my areas of expertise. 

The hardware works. Great!
I am also going to build a controller based on Huebner's open source design. With some mods. 
For instance:


like you, I prefer SMD
I'd like to add desaturation protection (ACPL-332J in stead of HCPL-3120)
Maybe porting software to Atmel SAM3X.
 I plan on using fast 300A/600V PT (punch through) IXYS IGBTs with low Vce,sat and fast soft recovery diodes in a parallel configuration. These fast switching IGBTs do require quite large LCR output filters for EMI and short circuit dI/dt reduction. 





> If you have any ideas or suggestions let me know


 There might be some electrical design issues. One example: 
The LM339 quad comparator on the sensor board has been around for a very long time. The original LM339 has a limited operating temperature range of 0 to 70 °C. The datasheet on ti.com has been revised in 2013 and still shows the same temp range. Since you have plans to design a SMD version, you might want to pick a equivalent SMD part with a extended temp range. 

Other suggestion:
Semikron advises against directly connecting a TVS to the gate and emitter terminals. High risk of serial LC ringing when the TVS enters the low ohmic zener region. Always use a damping R in series. It is also my experience when using a zener/TVS in a snubber network.

Good luck on bringing the boards alive tomorrow!


----------



## dcb (Dec 5, 2009)

Ho Tom, I'm right behind you it seems  looks like an ac24something motor (i have one too), do you know what you are going to put it in?

The chip should have been pre-programmed, FYI, so you don't need to do anything. I haven't entirely sorted out how to compile the source/toolchain yet though to tweak it.


----------



## Tomdb (Jan 28, 2013)

The main board works, i can communicate with it through a terminal program. It took me 10 minutes to realise, that the speed setting was wrong. Changed it and it works flawlessly.

I was going to solder the wires to hook-up the sensorboard, but it turns out the mechanic took the soldering iron and solder to a repair job, i will have to wait for him to return. 

SMD version, right now im compiling a list of i/o's I want/need and then im looking for usable IC's so im keeping your suggestions in mind Tony, thanks. 

DCB, yeah its pre programmed. The motor is a prototype from LSis, but i have an Think City motor here and a car to try it out in. So i will have a rolling test bench. My main goal however is to build a modulair inverter system opensource, the gained knowledge will be of value for me and the company i work at.


----------



## Tony Bogs (Apr 12, 2014)

Attached to this post is a schematic of the gate driver I am going to use for my parallel IXYS IGBTs. It's pretty much the recommended circuit in Avago's 332J datasheet. The target motor is the Siemens motor in JackBauer's posts in Huebner's topic.


----------



## Tony Bogs (Apr 12, 2014)

Suggestion for reading:  
Constant slip control is a efficient and robust way of controlling a EV motor with its high inertial load when using a fixed gear or automatic transmission. You can set a optimal absolute frequency difference to closely match the high efficiency regions of motor and controller as described in http://www.freescale.com/files/microcontrollers/doc/ref_manual/DRM115.pdf. It's only two pages of background information on ACIM constant slip control. Very comprehensive and easy to follow without complex formula's. Freescale adresses all operating areas: open loop startup, up to base speed, above base speed and regen.  

 I'm not sure if Huebner's software uses a absolute frequency difference. I haven't gone through the details yet, but I remember reading about a slip percentage in one of the top layer files.

I've done the math for my power stage. Don't worry, I won't post the full ten pages, just the important results: the controller parameters PWM dead time, minimum on time, phase current limits and so on. As reference values for comparison.


----------



## Tomdb (Jan 28, 2013)

Had some more time to setup my test rig. My goals is to spin the motor, so a single motor is enough for now.



The way the rig is setup, the alumnium slab i mounted the parts to is the cooling plate from the think inverter. 

However i ran in to trouble today, the IL1 and IL2 is jumping all over the place, i'm going to swap out the flatcable with twisted pairs tomorrow and see if that fixes the issue. If not, i will dive into my soldering/circuitry to check if i haven't made any mistakes.



The first candidate im taking for a spin. ACIM motor, lets hope this guy wont give me too much trouble.


----------



## Tomdb (Jan 28, 2013)

Found out i had the wrong caps on the filters for the current measurement, took them off, now the values are stable when the inverter is off. 

The inverter will nog even go to past "start 2" and make a lil buzzing noise. even the command "set fslipspnt 10" takes effect, but as soon as i go to the next command it shuts down. I guess ill have to source some correct caps to filter the current signals to prevent premature shutdowns, to get the motor to turn.

If im lucky i have some suitable caps at home, if not ill have to wait another week before it get things turning.


----------



## Tomdb (Jan 28, 2013)

got the current sensor working alot better now that i have mounted some improvised caps. It starts into manual mode and even starts to draw current and sing. 

The problem now is that i don't have snubber caps (the inverter which i cannibalized had one broken snubber). The motor is juttering but not turning, anyone have a clue how to get it turning? does it need a helping hand or should i try tweaking variables, or is there another fix?


----------



## Tony Bogs (Apr 12, 2014)

I'd think there's not enough start up torque. Looks like one phase blew out. 

You may want to read chapters 4 and 5 of the Fuji IGBT modules application manual. Trouble shooting and protection. 
It seems that two current sensors on the inverter outputs do not provide real overcurrent protection as described in chapter 5.


----------



## Tony Bogs (Apr 12, 2014)

From posts on this site it seems that the Siemens motor has a very low stator leakage inductance. The PWM frequency needs to be much higher than 5 kHz. Otherwise huge series inductors are needed on the inverter outputs.

I've done a redesign of the power stage for 16.625 kHz with 2,5A/°C current derating above 20°C in the short period peak power region. 
Now three 110mmØ x 150mm iron powder cores will do.

 Microcontroller: I've got a Due Arduino left over from another project. Very easy to program: just right for a project on a DIY forum.


----------



## Tomdb (Jan 28, 2013)

i will take my inverter power stage apart to check my igbts. But my biggest geuss is that the start up torque is too low, the rotor is quite heavy, the motor it self is quite heavy. Maybe if i just raise the voltage i might get it to spin, but ill try raising the frequency first.

While pondering about my issues with this controller i decided to do some mind numbing work on creating BMS slaves based on the LTC6804-1, ofcourse this chip wasnt in eagle or designspark so i made my own eagle one, schematic done now just the pcb.


----------



## jhuebner (Apr 30, 2010)

Hi Tom,

I hadn't subscribed to the thread.

So have you checked that all three phases are working with a scope? All 6 drivers need to PWM at +-15V and the IGBTs must output 0-DC input voltage.

Only then you're really ready to connect any load.

What voltage is your input to the inverter and what is the motor voltage at base speed? Maybe your V/f ratio is too low or parameter "fweak" too high respectively.

Next you might need to tweak the startup boost voltage. It is 1700 digits by default. Here you must know that 37813 means maximum voltage. So 1700 digits is about 5%.

As long as your motor cables run through the current sensors the over current protection will keep the magic smoke within.

Speaking of which: 2-sensor over current protection does not protect against shorts from the unprotected phase to DC+ or DC-. It only protects from excessive motor current. Which is the most common error during testing.


----------



## John Metric (Feb 26, 2009)

Subscribing,
building my own as we speak. I am at the "check the pwm with an oscilloscope" part.
Don't have an oscilloscope yet.
Got one on order.

Metric


----------



## Tomdb (Jan 28, 2013)

Working at a small company you quickly realize how good you had it as a student in a big university with access to all the equipment you could dream of. 

My co-worker is getting an old scope from his parents next week for me to try and figure out, otherwise ill just have to fork out 100-200 euro's for a good decent second hand one. 

I geuss ill spend my free time today working on getting parts of Johannes's schematics setup for smd boards. Ill start with the sense board and the drivers.


----------



## jhuebner (Apr 30, 2010)

I developed the inverter with a 30 year old 10MHz scope that I got for 70€ off ebay.
Sometimes it would have been helpful to have the fancy sample memory of modern scopes but as you see I got along 

That said I'd consider a scope an essential for any power electronic projects.


----------



## jhuebner (Apr 30, 2010)

Tony Bogs said:


> There might be some electrical design issues. One example:
> The LM339 quad comparator on the sensor board has been around for a very long time. The original LM339 has a limited operating temperature range of 0 to 70 °C. The datasheet on ti.com has been revised in 2013 and still shows the same temp range. Since you have plans to design a SMD version, you might want to pick a equivalent SMD part with a extended temp range.



Ok I wasn't aware of that. I'll look over the temperature ranges for the next batch.




Tony Bogs said:


> Other suggestion:
> Semikron advises against directly connecting a TVS to the gate and emitter terminals. High risk of serial LC ringing when the TVS enters the low ohmic zener region. Always use a damping R in series. It is also my experience when using a zener/TVS in a snubber network.
> 
> Good luck on bringing the boards alive tomorrow!


I want to get back to this.
In this app note Semikron clearly places the TVS directly at the gate
http://www.semikron.com/skcompub/de...Gate_Drivers_to_IGBT_and_Controller_rev00.pdf

In a Semicube (1600A) that I took apart the TVS diodes were right at the gate as well. So it can't be that critical?
Where did you read that you shouldn't?


----------



## Jaesin (Mar 6, 2011)

http://www.rigolna.com/products/digital-oscilloscopes/ds1000z/

I've been using the DS1104Z because my DS1074Z-S was backordered. I received an email that my DS1074Z-S has shipped so they should be available now. 

I'de say, for a cheap storage scope these have to be the best value. A new DS1074Z should be around $530 USD before VAT.

I'll sell this barely used DS1104Z once my Z-S (Has a function generator) arrives. I just have to make sure the 70 Mhz resolution of the DS1074Z-S is good enough for me.

@John. Which scope did you order?


----------



## Madmac (Mar 14, 2008)

Originally Posted by *Tony Bogs*  
_There might be some electrical design issues. One example: 
The LM339 quad comparator on the sensor board has been around for a very long time. The original LM339 has a limited operating temperature range of 0 to 70 °C. The datasheet on ti.com has been revised in 2013 and still shows the same temp range. Since you have plans to design a SMD version, you might want to pick a equivalent SMD part with a extended temp range.
_

The LM339 dates from the time when the different temperature range parts were given different part numbers by National Semiconductor (now part of TI). 

LM339 was spec'd for 0 to 70 C
LM239 -40 to 85 C
LM139 -55 to 125 C

The LM139 also had tighter spec on a number of parameters like input bias current and was generally supplied in a ceramic package. Not checked to see if it is still available in SM packages
​


----------



## Tony Bogs (Apr 12, 2014)

> Quote:
> Originally Posted by *Tony Bogs*
> _Other suggestion:
> Semikron advises against directly connecting a TVS to the gate and emitter terminals. High risk of serial LC ringing when the TVS enters the low ohmic zener region. Always use a damping R in series. It is also my experience when using a zener/TVS in a snubber network.
> ...


Sorry for the late response. I'd had more urgent things to do. 

No, the gate circuit design is critical. Ringing is a big design issue in power electronics. 


Semikron's got it right. The TVS should be placed as close as possible to the gate – emitter. You really don't want to use long wires in the gate circuit.


A resistor in series dampens the ringing of the TVR (basic LCR circuit design). That's the point I tried to make. Directly connecting meant: without counter measures against ringing. Hope this clarifies things.


----------



## Tomdb (Jan 28, 2013)

I found some time after my switching of jobs to finally spend on this project again.

Now I have a less cluttered mind i decided to troubleshoot.
-My gate drivers were damaged, by my lack of a quality soldering iron when putting them together. They now all read -15.5V

-Got snubbers and a HV cap for my HV side

-Block of aluminium is waiting to become my watercooled heatsink this weekend

-Busbars and Plastic for mounting the logica hardware is arriving tomorrow

-And i got a functioning scope

This means I can start to make strides on this inverter.
One issue popped up after fixing the drivers, it wont go into Opmode 2. This means I stuck in inverter in halt mode. This will be the first issue that needs addressing.


----------



## Tomdb (Jan 28, 2013)

Okay, issue solved  got my first neat -15 +15v square wave. 
This means my electrical gremlins are gone, now the real testing and setup begins.


----------



## Tomdb (Jan 28, 2013)

Built the high voltage section for my controller. The heatsink is just a solid chunk of aluminium which I will mill on a later date. 

Now i have to find a test motor to make any further testing possible.

According to the igbt specs and cap limit, it should take 400V and 400A (160kw).

I wonder how close i can get to this figure.

Next on the list is mounting the logic hardware.


----------



## Tomdb (Jan 28, 2013)

It goes around and around. 

https://www.youtube.com/Y7_Zeq-lusg



This is some good news, i just need to get on with mounting my logic hardware so i can easily test it in my garage. 

Biggest issue I am having right now is that my scope freaks out because its plugged into a ungrounded socket.

The other issue im going to run into soon is that i need a capable power source for testing. So i better get looking for a suitable test pack.

(youtube linking is hard)


----------



## Tomdb (Jan 28, 2013)

Some more progress, not as much as i would have hoped. 

Got my hardware mounted on a abs board which will help make my inverter a nice compact unit for later testing. 

Issue right now is getting an encoder setup and working with the inverter. Got my desired opto-sensor working, now just to get the mechanical bits sorted, anyone got an idea where to get a cheap encoder wheel, with a mounting hub that can be adapted to a 19mm shaft?

Also got some progress on a side project, which involved designing and etching pcbs, got to love learning new things.


----------



## dcb (Dec 5, 2009)

maybe you can design a .stl file for a custom encoder wheel and find someone at https://www.3dhubs.com/ or somewhere to print it in high resolution in a suitable material?

You might also consider drilling out a wheel like this, not sure about mounting or if there is enough room (maybe 7.5mm) for the led after drilling.


----------



## MPaulHolmes (Feb 23, 2008)

I know powerex puts 2 zeners back to back right at gate to emitter on their BG2A development board. I've used that for 10's of thousands of hours on an inverter and also on a MPPT charger, DC controller that has driven 600amp igbts to 550Amp each, and also on a 3 phase inverter. Is it specifically a TVS that causes problems, or is there a problem with zeners too? Otmar had told me to specifically put them right at the gate to emitter tabs, but didn't mention a series resistor. Zeners have a series resistance anyway. I wonder if that's enough to prevent problems.


----------



## Tomdb (Jan 28, 2013)

Made some progress

Working on a simple bms system for test pack i am building. I etched my first own designed pcb. First of many im sure. 

Got my hardware in for the encoder setup, got it wired up and it checks out with reasonable values. Maxed it out at about 800 rpm at 31 volts.

Question to the others running this kit, when i got to the step of connecting the "speed sensor" other wise known as an encoder, i do the setup and then start the inverter via "start 2", the motor needs a nudge to get going. Why is this, is it because the fslipspnt might be set too low? 

However, tomorrow im wiring up an "throttle" simple potmeter with a handle for testing sake. When I get my motor responding to the throttle ill look into hooking up a permanent connector and fitting a case for some real load testing.

However in order to do any further testing I will need a suitable power supply, this is why I am doing a little side project on building a spot welder.


----------



## Tomdb (Jan 28, 2013)

Good news everyone, it spins in response to my "throttle" input.

Setup an encoder setup, this is quite prone to damage. Now i have proven this works, its time to create a permanent mount with shielding for the wheel and sensor. 

I cant get the motor to stop when running from the power supply, I think this has something to do with the low voltage and the in ability to feed current back into it. This means i can get going with building a test rig with batteries for the next stage in development.


----------



## onegreenev (May 18, 2012)

Video? That would be cool. Nice job. Get some batteries on that sucker.


----------



## Tomdb (Jan 28, 2013)

Tomorrow im going to post a video once i got my "start" button hooked up.


----------



## Tomdb (Jan 28, 2013)

I have been working on getting an enclosure together, however i want to get my inverter working properly before fitting it all inside. 

Attached is a scope image of the encoder signal, this seems to be working fine. My speed does indeed vary with the actual motor speed and this signal looks clean.

However the most peculiar thing happens. I decided to start the motor in opmode 2, manual Fslipspnt angle input.

the motor spins slowly at Fsplipspnt =10 when going down the following happens

Fslipspnt 5 -> 550 rpm
Fslipspnt 4 -> 605 rpm
Fslipspnt 3 -> 700 rpm
Fslipspnt 2 -> 760 rpm
Fslipspnt 1 -> 830 rpm

This behavior is also present when im in OPmode 1, throttle input. 

Checking the fslipspnt set by the software the same thing happens. Now the wierdest part is i cannot get the motor to stop spinning by getting the value Potnom (throttle indication) or Fslispnt to return as 0. There is also no regen.

I might be entering my values of my motor incorrectly.
Motor specs:
F=50hz
Speed = 2800RPM
COSP = 0.80
Winding in delta = 220V
Winding in Y = 380V

I set my Fweak at 5.8 however coming to think of it, the motor might be currently set to Y, this would mean an fweak of 2.89, however I dont think this variable will be causing all the problems.

I tried setting the polepairs to 2 or 4 this made no difference except for the motor speed. I am hoping some of you guys might be of help.

Must confess that a side project is eating quite some of my time, i am building my own micro-controlled spot welder for building battery packs.


----------



## jhuebner (Apr 30, 2010)

You have a 1-pole pair motor so polepairs must be 1.
Is numimp set correctly?


----------



## Tomdb (Jan 28, 2013)

After some researching I drew the same conclusion. Forget with my first calculations that my machine was in Y mode instead of delta. So the 1 pole is correct.

I counted 26 teeth on my homemade encoder wheel. so its 27 pulses right?


----------



## jhuebner (Apr 30, 2010)

26 pulses it is


----------



## Tomdb (Jan 28, 2013)

oh ok, it triggers on the up slope then? (due to inversion because you pull to ground when the sensor gives 5V, thus a gap)


----------



## Tomdb (Jan 28, 2013)

After thinking about it and getting input from Johannes it does indeed seem that the motor contains only one polepair. After changing the polepairs to one it works flawlessly. Guess i can start to cram this puppy into a box and fit a general IO connector.

https://youtu.be/Hkmf01rS6E0

Sorry for the crappy quality, my phone is acting up and wont make a video and my true video camera needs to be setup with windows 7 before i can use that one.


----------



## jhuebner (Apr 30, 2010)

Tomdb said:


> oh ok, it triggers on the up slope then? (due to inversion because you pull to ground when the sensor gives 5V, thus a gap)


I'd be surprised to hear you have more down than upslopes  Even if you invert it once more the number of slopes per turn won't change.

Running looks good, congratulations  
Don't kill your power supply with the regen.


----------



## Tomdb (Jan 28, 2013)

The regen throws the powersupply off balance, however the motor never draws alot of current, so when stopping most likely It wont be drawing allot more. I also found out the throttle for my "test vehicle" will work on 3,3V.

However, got to get on with building my damned batteries, hope to finish my spotwelder next weekend.


----------



## Tomdb (Jan 28, 2013)

Got my self abour 12 kwh of A123 cells to get me started on a test pack, I can vary the voltage from 50 to 500v depending on how many modules I decided to add in series. This will become my test pack. 

This weekend will be used to get my inverter built into a case and running as would be in a vehicle. This means adding an output connector and wiring it all up to a test panel.


----------



## Tomdb (Jan 28, 2013)

I am in the process of balancing and charging the modules. 

Lucky this can be done with some occasional monitoring, which will allow me to work on the inverter while this is going on. 

Specs I have sorted out so far;
Configuration: not 16s but 17s
Weight: below 9kg
Size: 125x165x235mm (excluding connection posts.
Nominal voltage: 56.1V
Max voltage: 62.1 V
Energy: 1.1 KwH roughly

So I am very pleased with these modules so far


----------



## Tomdb (Jan 28, 2013)

The batteries are going to take some work in adapting their tiny 1.27mm spacing connectors to 2,54mm headers for my cellog 8s "isolation board". This means more pcb design with the possibility of outsourcing due to the size. 

Right now i am spending most of my effort on getting the inverter mechanically finished. This means cutting holes in my fiberglass case and painting it. Also milling the base plate with cooling slots.

I had a little delay with this, the webshop was out of stock on the required tap, this was only listed on the invoice with the other parts in the box. This means another week wait before i can finish the base plate. 

However progress maybe slow but I am enjoying designing and improving my skills in the field of ; mechanical design, electrical design and software.


----------



## Tomdb (Jan 28, 2013)

Getting closer to having the inverter "finished". Mechanically that is ready for testing.

Added a 25 pole connector, one the clamps onto a flatband. No more messing with those tiny wires.  I will also be mounting a connector to hook up the serial port of the micro controller for ease of read out. Maybe ill just mount the usb to serial converter in the casing for the ease of it.

Once the inverter is back on the heatsink i can make a testing harness for some bench test with all the additional funcions.

All i have to do mechanicaly is mount the back plate to the heatsink and seal it up and she is ready for assembly.


----------



## arber333 (Dec 13, 2010)

Tomdb said:


> Getting closer to having the inverter "finished". Mechanically that is ready for testing.
> 
> Added a 25 pole connector, one the clamps onto a flatband. No more messing with those tiny wires.  I will also be mounting a connector to hook up the serial port of the micro controller for ease of read out. Maybe ill just mount the usb to serial converter in the casing for the ease of it.
> 
> ...


Regarding the main board connector et me add my 2c. 
I was a little awed by the tiny wires also but i guess i went ahead and i put wires to one 24 pole aviation type connector plug. I took great care to solder wires to pins and then add shrinkwrap to isolate them... Didnt work! Some wires developed paths in connector and i burned some transistors and LM regulator. In the process of repair i damaged tracks on mainboard. I had to ask Johannes to send me another board. Man i was angry...
This time though i made a mount and put 2x 12pole terminal strips on and connect the little wires there. Then i prepared 25wire 0,75mm2 cable and put it there. I use 25th wire as GND equiliser. 


Since then i dont have a problem anymore . Its not that i would move controller from the car a lot...


----------



## Tomdb (Jan 28, 2013)

Some more mechanical progress. This week I can finally try it all out again.

1st order of business was leak testing; passed.
2. clean igbts and heatsink then mount with thermal compound
3. Hack up my nice box so i can actually mount everything, this is the reason for the two interface plates with glands.
4. assemble, this needed some tweaking to get it all to fit. All is in now and snug
5. Connect the 25pin flatband connector to the flatband.

Next thing to do is get an usb port wired up for the serial converter. Then wire the input connector so i can test the inverter and upgrade the firmware.

Besides this I am busy working on my own bms boards.


----------



## Tomdb (Jan 28, 2013)

small deviation. Working on my bms slaves.

Got code running between arduino uno and ltc6804. Proves my wiring schematic works and my 0.5mm soldering worked. Now to finish my pcb design and assemble it.


----------



## Tomdb (Jan 28, 2013)

Not realy update on the inverter side. I have been getting too many ideas/projects lately. 
However these all have to do with getting the inverter into an actual test situation with a load and vehicle.

I am busy designing a bms slave board based on a ltc6804 with canbus communication. Also i got my spotwelder dialed in and got some test welds done on recycled cells.


----------



## Tony Bogs (Apr 12, 2014)

The LTC6804. Took a quick look. Great device for battery cell voltage measurement. With Linduino software, great for DIY. Really like it.
I did see SPI, love that too, but I couldn't find CAN. Am I correct to think that the CAN stack is in the the Linduino INO package?


----------



## Tomdb (Jan 28, 2013)

Im using an mcp2515 on the spi bus also, so using the ltc6804 software will be used as starting point.


----------



## Tony Bogs (Apr 12, 2014)

48 pins SSOP soldering, that takes a steady hand. 
Great CAN <> ISP chip, the 2515. I first misread it for 2505 (also stand alone CAN controller).
I guess you'll be using an universal serial to CAN on the Arduino side?


----------



## Tomdb (Jan 28, 2013)

here is my board schematic. and layout


----------



## Tomdb (Jan 28, 2013)

got my PCB's in today. Very happy they look like what I designed.

Now just got to test them and build me reflow oven. 

Then its time to finish my smd main board for the controller.


----------

