You are here

150KW VESC

40 posts / 0 new
Last post
paltatech
Offline
Last seen: 6 days 13 hours ago
VESC Free
Joined: 2017-09-10 22:50
Posts: 31
150KW VESC

Here is a build of a really powerful VESC. It uses 600V 600A IGBTs for the powerstage and its compatible with the latest vesc 6 firmware and vesc tool.

 

Quick video:

Forum discussion: https://endless-sphere.com/forums/viewtopic.php?f=30&t=89056

Design files: https://github.com/paltatech/VESC-controller

So if someone is interested in high power this thread is a good place to start.

--

Marcos

 

 

 

E-Toxx
Offline
Last seen: 1 month 2 days ago
VESC Original
Joined: 2017-06-17 13:23
Posts: 23

HOLY SHIT

 

Pimousse
Offline
Last seen: 1 day 15 hours ago
VESC Original
Joined: 2017-05-24 12:15
Posts: 74

Wow ! Nice project !

What purpose this VESC has been designed for ?

lizardmech
Offline
Last seen: 3 months 3 weeks ago
VESC Original
Joined: 2017-06-02 19:21
Posts: 80

Did you have to adjust the deadtime to deal with the IGBT switching at lower speeds?

paltatech
Offline
Last seen: 6 days 13 hours ago
VESC Free
Joined: 2017-09-10 22:50
Posts: 31

What purpose this VESC has been designed for ?

Can't tell., but I hope it can also run a car

Pimousse
Offline
Last seen: 1 day 15 hours ago
VESC Original
Joined: 2017-05-24 12:15
Posts: 74

Wonderful idea !

I'd love to build a DIY car.

Joke apart, be careful with the trademark now.

paltatech
Offline
Last seen: 6 days 13 hours ago
VESC Free
Joined: 2017-09-10 22:50
Posts: 31

Did you have to adjust the deadtime to deal with the IGBT switching at lower speeds?

Yes, I calculated 1.2us but its running 1.4us. The original vesc is something like 70ns.

Benjamin exposed the deadtime setting, line 204 of the configuration file of this board

https://github.com/vedderb/bldc/blob/master/hwconf/hw_palta.h

I wrote a .c code to calculate the actual register value, its not a simple calculation and a wrong dt setting can blow the inverter, so I sent it to benjamin a while ago, hopefully he can integrate the code in the GUI. Ping me if you need that code.

This board also has some hardware fault protections in case anything goes wrong, so it also needed some custom code to unlatch the protections if they are triggered

 

paltatech
Offline
Last seen: 6 days 13 hours ago
VESC Free
Joined: 2017-09-10 22:50
Posts: 31

Joke apart, be careful with the trademark now.

Yes, no problem on my side if vesc requires me to change the name, I had to build this with an impossible deadline so the name was the least of my concerns at that time. However, I do wish this is as official and vanilla as possible, I spent a lot of time doing things the right way so the hardware is fully supported by a vanilla code.

I mostly provide engineering support, this niche stuff doesn't sell in quantities.

paltatech
Offline
Last seen: 6 days 13 hours ago
VESC Free
Joined: 2017-09-10 22:50
Posts: 31

How do you receive email notifications from this forum?

ThierryGTLTS
Offline
Last seen: 9 months 1 week ago
Joined: 2017-09-06 14:18
Posts: 120

I have only notification for Private Message.

Have a Nice Day.

Thierry

paltatech
Offline
Last seen: 6 days 13 hours ago
VESC Free
Joined: 2017-09-10 22:50
Posts: 31
lizardmech
Offline
Last seen: 3 months 3 weeks ago
VESC Original
Joined: 2017-06-02 19:21
Posts: 80

Which MCUs were you looking at with sigma delta support? I would be interested in a VESC port to a MCU with sigmadelta and high res PWM, even if we needed to pay someone to help with coding I would be willing to donate some funds. The only problem I always run into is trying to find anyone with chibiOS experience to work on anything VESC related.

ThierryGTLTS
Offline
Last seen: 9 months 1 week ago
Joined: 2017-09-06 14:18
Posts: 120

lizardmech said:

"The only problem I always run into is trying to find anyone with chibiOS experience to work on anything VESC related."

 

Same problem for me.

Have a Nice Day.

Thierry

paltatech
Offline
Last seen: 6 days 13 hours ago
VESC Free
Joined: 2017-09-10 22:50
Posts: 31

I found ChibiOS quite easy to deal with. What is HARD is the motor control part of the code, I barely had the courage to tweak minor things in benjamin's code to suit my needs. A single misplaced C code line can wreak havoc and destroy a very expensive system.

Having said so, I'd encourage you to stay away (far, far away) from a MCU port. Your code base will branch away from benjamin's and you won't be able to keep up with his changes and improvements. Its not easy to get it running to begin with, but maintaining and keeping track of benjamin will become impossible.

Thats why my only chance to approach a digital sigma delta is using an external FPGA, thus avoiding MCU changes, and integrating security and fault tolerance into the FPGA. Such an expensive drive unit can't blow up with a firmare bug, thats why the FPGA.

Therry asked for the code, I'll post it here when I get home.

 

paltatech
Offline
Last seen: 6 days 13 hours ago
VESC Free
Joined: 2017-09-10 22:50
Posts: 31

Here it is, you set the  deadtime_ns variable to your needs. VESC operates by default at 168mhz.

It will print the register value you need to set in the firmware

#include <stdio.h>
#include <stdint.h>

int main()
{

float deadtime_ns = 1400;
float clock_freq_mhz = 168;
uint8_t DTG = 0;
float timebase = 1/clock_freq_mhz*1000;

printf ("timebase_ns = %.4f\n", timebase);


if (deadtime_ns <= (timebase * 127) )
    DTG = deadtime_ns / timebase;
else
{
    if (deadtime_ns <= ((63+64)*2*timebase) )
    {
        DTG = deadtime_ns / (2*timebase) - 64;
        DTG |= 0x80;
    }
    else
    {
        if (deadtime_ns <= ((31+32)*8*timebase) )
        {
            DTG = deadtime_ns / (8*timebase) - 32;
            DTG |= 0xC0;
        }
        else
        {
            if (deadtime_ns <= ((31+32)*16*timebase) )
            {
                DTG = deadtime_ns / (16*timebase) - 32;
                DTG |= 0xE0;
            }
            else
            {
                printf("Cannot represent this deadtime setting");
            }
        }
    }
}

printf ("DTS[7:0] = %d \n", DTG);
printf ("Or... 0x%0x\n\n",DTG);
}

 

ThierryGTLTS
Offline
Last seen: 9 months 1 week ago
Joined: 2017-09-06 14:18
Posts: 120

Thanks for that quick answer!

Have a Nice Day.

Thierry

frank
Offline
Last seen: 8 hours 42 min ago
VESC BronzeVESC GoldVESC OriginalVESC Silver
Joined: 2016-12-27 20:19
Posts: 226
I want to drive a VESCed Sportscar in 2018! Frank
antonchromjak
Offline
Last seen: 1 month 1 day ago
VESC Free
Joined: 2017-09-05 13:47
Posts: 50

I am interested in making VESC6 firmware work with something like AMC1303. But to get 12 bit accuracy you need sample 8us. How current looks trough one pwm period on phase shunt. Is there a lot of change?

paltatech
Offline
Last seen: 6 days 13 hours ago
VESC Free
Joined: 2017-09-10 22:50
Posts: 31

I want to drive a VESCed Sportscar in 2018! Frank

Me too!

I am interested in making VESC6 firmware work with something like AMC1303. But to get 12 bit accuracy you need sample 8us. How current looks trough one pwm period on phase shunt. Is there a lot of change?

Besides accuracy you need FAST response times. You either use the AMC1301 and convert from differential to single ended like I did on this build, or you convert the delta sigma to voltage using analog filters, or you design a digital filter to get a useful adc value. I don't think the STM32F405 alone would be able to compute that delta sigma at 20MHz clock.

antonchromjak
Offline
Last seen: 1 month 1 day ago
VESC Free
Joined: 2017-09-05 13:47
Posts: 50

I was thinking about using STM32L496 or similar. It should behave same as STM32F405. It have regular and injected channels.

paltatech
Offline
Last seen: 6 days 13 hours ago
VESC Free
Joined: 2017-09-10 22:50
Posts: 31

In the first paragraph of its description it says 80MHz cpu. Are you willing to cut your clock frecuency by a bit less than half, reconfigure *every* clock (timers, prescalers, deadtime, usb, pll, etc)?

Who knows what else is not compatible with vesc firmware, and even if chibios supports it. Usb libraries are a nightmare on their own, even when chibi's are one of the best written out there.

In my case I want full sigma delta signals, so I need 7 filters and those MCU have only 4. I think an fpga is the best choice.

 

antonchromjak
Offline
Last seen: 1 month 1 day ago
VESC Free
Joined: 2017-09-05 13:47
Posts: 50

Good point, I got one FPGA board from school times so maybe I'l give it a try.

paltatech
Offline
Last seen: 6 days 13 hours ago
VESC Free
Joined: 2017-09-10 22:50
Posts: 31

Good point, I got one FPGA board from school times so maybe I'l give it a try.

Here I posted what I think it needs to be configured in the fpga. Let me know how it goes, when I get some idling time I want to try that verilog code.

https://endless-sphere.com/forums/viewtopic.php?f=30&t=89056&start=25#p1...

antonchromjak
Offline
Last seen: 1 month 1 day ago
VESC Free
Joined: 2017-09-05 13:47
Posts: 50

Wouldn't be easier putting STM32L476 and use it only for filters? It has 8 inputs and 4 filters. Or maybe two of them.

paltatech
Offline
Last seen: 6 days 13 hours ago
VESC Free
Joined: 2017-09-10 22:50
Posts: 31

Wouldn't be easier putting STM32L476 and use it only for filters? 

In the first paragraph of its description it says 80MHz cpu. Are you willing to cut your clock frecuency by a bit less than half, reconfigure *every* clock (timers, prescalers, deadtime, usb, pll, etc)?

Who knows what else is not compatible with vesc firmware, and even if chibios supports it

antonchromjak
Offline
Last seen: 1 month 1 day ago
VESC Free
Joined: 2017-09-05 13:47
Posts: 50

You want use STM32f405 + FPGA for filters. I am talking about using STM32F405 + STM32L476 for filters. 

paltatech
Offline
Last seen: 6 days 13 hours ago
VESC Free
Joined: 2017-09-10 22:50
Posts: 31

You want use STM32f405 + FPGA for filters. I am talking about using STM32F405 + STM32L476 for filters. 

Oh, sorry, and sorry if that came out rude, I'm lazy writing on the phone.

 

That is a doable approach for sure and would require minimal changes to the vanilla firmware. Its especially good if you never used an FPGA, they have quite a learning curve and its more common to know how to program a mcu.

I'd still go for the FPGA/CPLD because I can process all 4 voltages, 3 currents, and monitor for PWM shoot through and several fault conditions using HARDWARE. Firmware is often not considered rugged/reliable enough for some applications. You would develop a simple and reliable HDL that makes sure nothing blows up by standing in the middle of the PWM itself (cant do that with an MCU), and it makes your main mcu firmware testing easier. Without this a single-line firmware error can destroy your build, which I suffered last year.

Tampaesk8er
Tampaesk8er's picture
Offline
Last seen: 2 weeks 6 hours ago
VESC Free
Joined: 2017-10-18 22:03
Posts: 4

Airbus A380. LoL.

 

Tampaesk8er
Tampaesk8er's picture
Offline
Last seen: 2 weeks 6 hours ago
VESC Free
Joined: 2017-10-18 22:03
Posts: 4

Amazing work, great job. 👍

 

shaharov
Offline
Last seen: 3 weeks 2 days ago
VESC Free
Joined: 2017-11-10 10:19
Posts: 1

I tried pulling the design of github.  Everything seems to be ok but I did encounter 2 problems (and they may be related).  The system can't find the library "/home/marcos/paltatech/tools/paltatech.lib" and was wondering if I could get a copy to relink into the design.  Also when I add the netlist there are 339 missing footprints, which may be from the library file that's missing.

Thanks for your help in this.

O_Shovah
Offline
Last seen: 1 year 1 month ago
Joined: 2017-10-05 10:07
Posts: 3
Hello Everybody,
I want to thank you, paltatech for this stunning project.
Browsing the Github files was a real inspiration for some ideas
in filtering the sensor information and such.
Although Im aware that porting and maintaining the Vedder firmware
on another hardware is huge, but I am tempted to give it a spin for the filters.
Theres still my Artix 7 board floating arround :)
offtopic//
Is there a notification if you recieve a PM ?
@antonchromjak  any chance you revieve any PMs from my side ?
//offtopic
regards
Jens
 
paltatech
Offline
Last seen: 6 days 13 hours ago
VESC Free
Joined: 2017-09-10 22:50
Posts: 31

Hi Jens, PM me anytime, its the only chance I get a notification. By sheer luck and curiosity I checked the forum, its been like 2 weeks since I polled this thread.

Do you want to add an fpga or remove the STM32 and implement *everything* in the fpga? One is a month away, the other is more like a year away ;-) 

 

parasole
Offline
Last seen: 2 months 1 week ago
Joined: 2017-11-08 09:50
Posts: 4

Hi Jens,

antonchromjak answered in his thread on older forum:

http://vedder.se/forums/viewtopic.php?f=9&t=1513&sid=9633275bc6cf7e3712c...

O_Shovah
Offline
Last seen: 1 year 1 month ago
Joined: 2017-10-05 10:07
Posts: 3

@Palatech, thank you  i will point a pm yout way.

@parasole  Thanks i am back to the old thread. Would be nice to get the mini one working.

 

antonchromjak
Offline
Last seen: 1 month 1 day ago
VESC Free
Joined: 2017-09-05 13:47
Posts: 50

isn't 3us delay of AMC1301 problem? wouldn't be better to use hall sensor? they have similar delay.

paltatech
Offline
Last seen: 6 days 13 hours ago
VESC Free
Joined: 2017-09-10 22:50
Posts: 31

The benefit of the AMC isolator is the differential signaling, which provides higher noise immunity and the option to use digital signaling (changing part#).

Other than that, yes, its just a current->voltage transducer like any other.

paltatech
Offline
Last seen: 6 days 13 hours ago
VESC Free
Joined: 2017-09-10 22:50
Posts: 31

I'll leave this here and walk away

 

Danny Bokma
Offline
Last seen: 1 week 6 days ago
VESC Original
Joined: 2017-05-24 12:11
Posts: 51

STOP TEASING US AND GIVE US MORE! (please)

antonchromjak
Offline
Last seen: 1 month 1 day ago
VESC Free
Joined: 2017-09-05 13:47
Posts: 50

how you solved that there is no power for AMC 1301 at start until some of lower fets is conducting?

paltatech
Offline
Last seen: 6 days 13 hours ago
VESC Free
Joined: 2017-09-10 22:50
Posts: 31

Sorry, I dont understand. In my boards the AMC1301 has its own isolated dc/dc converter that is always powered. You sound like using bootstrapping, I'd avoid that for >10kw.