# Open-Hardware 260KW FOC Controller Project



## cmcnall (Aug 12, 2015)

HI All,
I've been following the forums for some time and wanted to share an open hardware FOC controller project I have been working on. It's for an ebike with a ME0913 PMAC motor running off 96-or 44DC Chevy Volt cells. The IGBT is rated for 650v 400A so it would be a great versatile platform.

Currently I have the schematic in Altiums circuit maker software(not the greatest, but free and collaborative) Any and all feedback on the design would be greatly appreciated. Link Here: https://workspace.circuitmaker.com/Projects/FBEE46C0-75CD-4550-9BC7-74B7579F33DE

The design is basically adapting the TI Piccolo C2000 F28027F instaspin controller with a Huge 3 phase IGBT for hybrid cars. add some IGBT drivers, bluetooth and Current sensors and hopefully I saved 5k on a controller.
This was largely inspired by Pauls 200kw controller project but with the intent of consolidating IGBTs into one module and using the instaspin platform so I don't reinvent the wheel. I have already got the platform working with a smaller BLDC driver and throttle, my hope is this become a door opener for a lot of people as the grunt work of the programming is done and TI has nice GUIs and documentation on the platform.

Hardware:
IGBT- Infineon FS400R07A1E3
Controller- TI Piccolo C2000 F28027F
IGBT Driver- Fairchild FOD8316
DC/DC gate voltage Converter - CUI VQA-S15-915-SIP
Current Sensors - LEM HASS 200-S
Capacitor - Kemet C4DEFPQ6380A8TK
Contactor - GX11BAB
Bluetooth Module - DC06

Hopefully with some good feedback I can get a few boards spun and get others testing it out. Thanks


----------



## BWA (Mar 14, 2015)

Cool. 

Would the High side of this unit be compatible with Johannes AC controller???


----------



## cmcnall (Aug 12, 2015)

The IGBT would interface to it for sure. One could wire the outputs from his IGBT gate drivers directly to the IGBT I planned on using. You would just need to keep the signal leads as short as possible.

His design and the one i'm planning on are both very similar. I hoping to gain some more flexibility in the control options as TI is supporting it. Also I hope to have the footprint of my board match the IGBT module so as to be very compact with a waterblock for heat dissipation. 

Similar features:
Battery current and voltage monitoring
Motor Current Monitoring
Motor and IGBT temp monitoring
Solid state relay dry contacts for precharge and contactors
USB programmable

in addition I should have:
Bluetooth(I plan on writing a simple app to display all readings)
TI instaspin auto-tuning through GUI

There are a couple of I/O left that could be broken out to header for some other stuff too I suppose.

I'm going to have my EE co-worker check the schematic this week and then I'll start doing board layout. The nice thing about circuit maker is it allows others to fork the revisions and make alternate versions. If they think they can design it better. I am all for that. If they want to spin boards and sell them that's cool too.


----------



## dima (Dec 1, 2015)

Why start another project? Contribute to Johannes design. Unless it is a completely 360*°* redesign.


----------



## cmcnall (Aug 12, 2015)

I could but unfortunately I am a little stubborn.
I am trying to fit the controller in a motorcycle so I could use his main board but then I would need to make an adapter to my high side. I would rather not add the complexity. My hope is to get the total package to be about a third of his. If I was building a car with lots of space I would probably just scrap my plans and just run with his. 

I think I will take the time to sit down and fully re-read his thread though.
It would probably help me catch a few errors I am making and not waste peoples time.


----------



## dima (Dec 1, 2015)

Interesting ....what about using my skinny alignment idea http://www.diyelectriccar.com/forums/showpost.php?p=753922&postcount=1166


----------



## cmcnall (Aug 12, 2015)

dima said:


> Interesting ....what about using my skinny alignment idea http://www.diyelectriccar.com/forums/showpost.php?p=753922&postcount=1166


Ha, I love the raw material!
I'm sure i'll end up going that route once I start trying to jam all the driver components into a 6"x9" board and realize it can't be done.


----------



## WolfTronix (Feb 8, 2016)

dima said:


> Interesting ....what about using my skinny alignment idea http://www.diyelectriccar.com/forums/showpost.php?p=753922&postcount=1166


You mean like a circa 1993-94 Brusa AMC motor controller:
http://www.wolftronix.com/amc230_514/index.html

;D


----------



## dima (Dec 1, 2015)

"All new is forgotten old" too funny


----------



## WolfTronix (Feb 8, 2016)

dima said:


> "All new is forgotten old" too funny


You might want to also install a piece of bare FR4 (or other insulator) in the gap between the bus bars (extending above and below) to increase the creepage distance.


----------



## coleasterling (Feb 29, 2012)

I am not at all an electrical guy, but do you have enough capacitance for 260kW?


----------



## cmcnall (Aug 12, 2015)

coleasterling said:


> I am not at all an electrical guy, but do you have enough capacitance for 260kW?


That's a good point. It would be dependent on what Cap the user would want to use/ pay for.
The Cap I planned on using was C4DEFPQ6380A8TK.
400V 380uF 5700I Ap 

But I only plan on running in the 10-30kw range.
I would imagine I would need much more capacitance to fully utilize the IGBTs capabilities.


----------



## WolfTronix (Feb 8, 2016)

General calculation for input bulk capacitance:

C = (Iout * DC * (1 - DC) * 1000) / (Fsw * Vpp)

Where:
C = capacitor in uF.
Iout = worst case current.
DC = Vout / (Vin * eff).
eff = converter efficiency, typically 80-95%.
Vpp = max ripple voltage allowed.
Fsw = switching frequency in kHz.

Given:
Vin = 360 V
Vout = 150 V
Iout = 250 A
eff = 90%
Fsw = 20 kHz
DC = 0.46
Vpp = 1V

C = 3105uF

Vpp is determined by how much power (ripple current^2 * ESR) the electrolytic capacitor can dissipate with out over heating.

Enjoy.


----------



## cmcnall (Aug 12, 2015)

I have since abandoned this project(the controller, not the motorcycle), :-( I'll keep the thread open for the information shared above. Thanks.


----------



## richcj10 (Aug 22, 2016)

Any reason why? Can I help?


----------



## cmcnall (Aug 12, 2015)

Probably the largest reason(excuse) is my wife started school full time so between the kids and work my free time has tanked.
All the files I had are online, if you are so inclined to design a board I'll send you the TI controller and IGBT I have to test it.


----------



## richcj10 (Aug 22, 2016)

Sure, I will grab the files and take a look. It may not be as powerful on the first Rev but let's see where this can go. I have some FAE friends at TI and have seen the motor control demo. Do you want to be involved at all?


----------



## cmcnall (Aug 12, 2015)

It would be nice to stay in the loop so I can see the progression. I don't mind donating what parts I have to the project. Reviewing designs or helping out in other ways. I just don't have time to be doing a lot of board layout. 

I have additional files I need to upload such as example code for the controller, spec sheets and a BOM.


----------



## MPaulHolmes (Feb 23, 2008)

WolfTronix said:


> General calculation for input bulk capacitance:
> 
> C = (Iout * DC * (1 - DC) * 1000) / (Fsw * Vpp)
> 
> ...


I'm not getting 3105uF. I'm getting 3.105uF?? Oh I think you meant C is capacitance in milliFarad?


----------



## cmcnall (Aug 12, 2015)

I noticed there are now 2 forks on the project  maybe someone will get some inspiration. I still have the TI kit I can mail out to anyone who wants to play around with this. I however no longer have the IGBT, but they are pretty cheap on ebay.


----------



## cmcnall (Aug 12, 2015)

I just uploaded all the files i had to the project page.
Code for the TI board is on there also.


----------



## moritz_n (Dec 14, 2019)

cmcnall said:


> I just uploaded all the files i had to the project page.
> Code for the TI board is on there also.



Hi, 
accidentally I have found your project, which unfortunately you could not finish as you have said. I am planning to do a Mild Hybrid Conversion with my car. Mild Hybrid is a fairly new technology in the automotive industry. The starter and alternator are replaced by a big electromotor which is called belt starter generator. 

https://www.continental-automotive..../48-V-Belt-Starter-Generator-(Liquid-Cooled) 

That’s the motor. I could buy it on eBay for a little less than 200 bucks. That is the reason why I am doing this mild hybrid conversion and not a full ev conversion. It is much cheaper and I am only an undergrad student. 

Because I can not communicate with the motorcontroller from Continental which communicates via CAN (I don’t know the CAN messages. I would have to have a 
CAN Protocol from a car in which this technology is installed. If someone has an idea how I can do it otherwise I am open minded)Thus I need an open source motorcontroller.

Now I’ve found out that the TI Instaspin boards represent a viable solution for my application because it supports FOC. But I’ve a few question and would be grateful if someone can answer them. 

The motor turns at about 20k rpms. Therefore the motorcontroller has to be capable of switching a PWM Signal this fast. Am I right? And I don’t know If the TI instaspin is capable of doing it. Furthermore can I use FOC to control the motor at these high rpms?

If you want to know more details about my project or photos just ask and I will provide them.

Moritz


----------



## arber333 (Dec 13, 2010)

moritz_n said:


> Hi,
> accidentally I have found your project, which unfortunately you could not finish as you have said. I am planning to do a Mild Hybrid Conversion with my car. Mild Hybrid is a fairly new technology in the automotive industry. The starter and alternator are replaced by a big electromotor which is called belt starter generator.
> 
> https://www.continental-automotive..../48-V-Belt-Starter-Generator-(Liquid-Cooled)
> ...


Do you have a PN for that motor generator? Or similar 3phase machine in 10kW range. I need something available for my sons kart project...

tnx


----------



## Nuts&Volts (Dec 20, 2011)

Arber look at these guys. 

http://isopack.blogspot.com/p/electric-shifter-kart.html?m=1


https://rover.ebay.com/rover/0/0/0?mpre=https://www.ebay.com/ulk/itm/274217152815


https://rover.ebay.com/rover/0/0/0?mpre=https://www.ebay.com/ulk/itm/123984760175


Sent from my iPhone using Tapatalk


----------



## arber333 (Dec 13, 2010)

Nice!

I just found this puppy 
https://endless-sphere.com/forums/viewtopic.php?f=30&t=85514&hilit=starter+generator
It is more expensive, but easier to make using Johannes brain .

But in the EU it is unobtanium. Maybe Sonata gen would be better.

TNX


----------



## jlcortex (Nov 29, 2012)

Doing similar project, also with instaspin.


----------



## moritz_n (Dec 14, 2019)

jlcortex said:


> Doing similar project, also with instaspin.


Hi, I am interested. Maybe you can tell us more about your project.


----------



## jlcortex (Nov 29, 2012)

Yes, I should to open a new thread.

It is similar to Axiom 100kw ESC, but InstaSPIN instead VESC firmware.
The VESC has many advantages over INSTASPIN, it has a great GUI, very easy to use but in terms of performance InstaSPIN works much better, In my experience the sensorless estimator works better and it allows much more current for the same motor.
In my projects I use small motors with a lot of power and InstaSPIN do it better

It is made for Power Integrations IGBT drives and infineon FF600R06ME3 IGBTs


----------



## moritz_n (Dec 14, 2019)

Well now I want to know moreI also considered it to use INSTASPIN but it is hard for me to get into the hard and software because i can't find any tutorials or guides.


----------



## arber333 (Dec 13, 2010)

Hm... can you provide main controller schematic for this instaspin? 
I have much work invested in Volt inverter hardware and know its control mechanism inside out. I would be interested in trying another variation of control. 

tnx

A


----------



## hoppyumr (Feb 21, 2020)

JLCortex, I was curious about people using this platform after this thread sparked some curiosity for me. Since you seem to have a decent start on it, any possibility of sharing where you are or even files/code? Also, what is the larger green board under the LaunchXL boarnd, and the other three identical green boards sitting over the IGBTs?


----------

