VESC-controller

Electric Motors and Controllers
marcos
100 W
100 W
Posts: 153
Joined: Nov 19, 2016 11:38 pm

VESC-controller

Post by marcos » Jun 22, 2017 3:27 pm

Hi folks,
For some months I've been working on a fork of VESC thanks to resources of pymco.fr and paltatech.com The original VESC is an open source inverter for up to 50v and around 3-5kw motors, and Benjamin (vesc creator) helped me adding firmware support to this new hardware.

This one decouples the control logic from the gate drivers, so we can use an external gate driver for high power applications. The first prototype is working with 600V 600A IGBT modules and +/-460A current sensors.

Its worth noting that the schematic follows closely HighHope's controller regarding protection features and general schematic.

Image(click to enlarge)

Image

For a quick glance at the schematic, here it is
https://eyrie.io/board/6f397be723754f03 ... =schematic
And layout is here
https://eyrie.io/board/6f397be723754f03 ... ive=layout

Design files are in the github repo http://www.github.com/paltatech/VESC-controller

This board is made with kicad, an open source EDA. Head to http://www.kicad.org for more info about that.

Screenshot of the user interface, its very well done.
Image(click to enlarge)

And a quick video to show it spinning a motor. Its not a big motor, its not a good video either and needs some finer tuning, but that will happen on the real motor.





These are general VESC features:

* The hardware and software is open source.
* Plenty of CPU-resources left.
* STM32F4 microcontroller.
* Sensored and sensorless FOC wich auto-detection of all motor parameters
* Firmware based on ChibiOS/RT, a real time operating system.
* PCB size: 160mm x 90mm.
* Current and voltage measurement on all phases.
* Regenerative braking.
* DC motors are also supported.
* A GUI that is easy on the eyes.
* Adaptive PWM frequency to get as good ADC measurements as possible.
* Good start-up torque in the sensorless mode (and obviously in the sensored mode as well).
* The motor is used as a tachometer, which is good for odometry on modified RC cars.
* Duty-cycle control, speed control or current control.
* Seamless 4-quadrant operation.
* Interface to control the motor: PPM signal (RC servo), analog, UART, I2C, USB or CAN-bus.
* Consumed and regenerated amp-hour and watt-hour counting.
* Optional PPM signal output. Useful when e.g. controlling an RC car from a raspberry pi or an android device.
* The USB port uses the modem profile, so an Android device can be connected to the motor controller without rooting. Because of the servo output, the odometry and the extra ADC inputs (that can be used for sensors), this is perfect for modifying an RC car to be controlled from Android (or raspberry pi).
* Adjustable protection against
Low input voltage
High input voltage
High motor current
High input current
High regenerative braking current (separate limits for the motor and the input)
Rapid duty cycle changes (ramping)
High RPM (separate limits for each direction).
* When the current limits are hit, a soft back-off strategy is used while the motor keeps running. If the current becomes way too high, the motor is switched off completely.
* The RPM limit also has a soft back-off strategy.

Added features in this board:
* Hardware overcurrent protection
* Hardware pwm overlap elimination for preventing shoot-troughs
* Differential analog measurements for better noise immunity on all motor inputs (3 phase voltages, 3 currents, and dc bus voltage)
* Temperature input for each half bridge
* Isolated CAN bus for proper control
* Resolver interface (no firmware support yet)
* 9v to 30v supply voltage
* Integrated power supply for gate drivers. 15v or 24v output

This not yet a proven product, but a placeholder so if anyone wants to develop an inverter like this its possible to build upon it rather than start from scratch. I'll be making some changes in the layout and modifying bits of the design.

And if thats not enough, here is a kitten. I can get you an unicorn if you want.
Image


Just remember the main difference between the original VESC and this: This one can kill you.

--
Marcos
Last edited by marcos on Jun 29, 2017 8:37 am, edited 2 times in total.

marcos
100 W
100 W
Posts: 153
Joined: Nov 19, 2016 11:38 pm

Re: VESC-controller

Post by marcos » Jun 22, 2017 3:39 pm

Oh, and here is a photo of one of the first protoypes, in very high resolution.

http://paltatech.com/files/VESC-controller_0001.jpg
This first proto had a wrong footprint that I need to fix for the next revision.
Last edited by marcos on Jun 26, 2017 10:51 am, edited 1 time in total.

coleasterling
10 W
10 W
Posts: 98
Joined: Sep 21, 2010 3:37 am

Re: VESC-controller

Post by coleasterling » Jun 22, 2017 11:36 pm

This looks really exciting!! Are you having more boards made?

marcos
100 W
100 W
Posts: 153
Joined: Nov 19, 2016 11:38 pm

Re: VESC-controller

Post by marcos » Jun 23, 2017 6:44 am

coleasterling wrote:This looks really exciting!! Are you having more boards made?
It needs a second prototype before sending boards to pcba to be sure there are no bugs left. The first was assembled in our lab and I reckon I'll hand assemble the second prototype as well, and then we can send it to a pcba house.

This inverter uses infineon igbts and power integration's gate drivers, in the repo there is a directory with the interface board that provides the connections to the high power stuff. I guess people should use an interface board like that.

casainho
10 kW
10 kW
Posts: 947
Joined: Feb 14, 2011 2:43 pm

Re: VESC-controller

Post by casainho » Jun 23, 2017 10:06 am

Great!! I would like to use an OpenSource motor controller and I did read VESC firmware a few times. In fact I did simplified FOC for electric unicycles with a more limited STM32.

The only thing I don't like VESC is the high price. Can you please tell which is the estimated final price??
Developer of OpenSource firmware for EBike BMSBattery S/Kunteng KT motor controllers: https://opensourceebikefirmware.bitbucket.io/

User avatar
cal3thousand
10 GW
10 GW
Posts: 4044
Joined: Mar 26, 2012 4:47 pm
Location: California

Re: VESC-controller

Post by cal3thousand » Jun 23, 2017 11:51 am

This is exciting. I don't know a ton about controllers, but would love to learn how to implement this in future builds. Subscribed.
Get a Cycle Analyst and a Multimeter, you're still a noob if you don't have at least one of each.

Planning on posting questions or buying anything on this site? Put up your country (at minimum) on your profile. This is a worldwide forum and we haven't reached clairvoyance.

marcos
100 W
100 W
Posts: 153
Joined: Nov 19, 2016 11:38 pm

Re: VESC-controller

Post by marcos » Jun 23, 2017 1:06 pm

If you're concerned about price you might be in the wrong state of mind to build a 150kw motor controller :-)

This board has some $ spent in protecting the powerpass ($$$$). I also tend to care a lot about not dying, so every safety feature is welcome.

The small VESC is not meant to be cheap, its meant to be limitless, and this fork is about that.

Having said that, its not particularly expensive to build. This batch was expensive because it took me 5 hours to assemble and test each board.

casainho
10 kW
10 kW
Posts: 947
Joined: Feb 14, 2011 2:43 pm

Re: VESC-controller

Post by casainho » Jun 23, 2017 1:20 pm

marcos wrote:If you're concerned about price you might be in the wrong state of mind to build a 150kw motor controller :-)
Thanks I understand now. Would like to find an OpenSource and relative cheap controller with 2 phases current sensors and with ARM cortex M3 or M4 for doing FOC and for lower power motors like 500W or a bit more. The cheap Kunteng controllers have only 1 phase sensor and STM8 8 bits and with that can't do FOC...
Need to keep finding other alternatives.
Developer of OpenSource firmware for EBike BMSBattery S/Kunteng KT motor controllers: https://opensourceebikefirmware.bitbucket.io/

marcos
100 W
100 W
Posts: 153
Joined: Nov 19, 2016 11:38 pm

Re: VESC-controller

Post by marcos » Jun 23, 2017 1:42 pm

casainho wrote:Would like to find an OpenSource and relative cheap controller with 2 phases current sensors and with ARM cortex M3 or M4 for doing FOC and for lower power motors like 500W or a bit more.
I've seen VESC boards for $50 on aliexpress, and they are certainly capable of 500W. Maybe not the best assembly quality, but I was surprised how cheap they are. VESC 4.xx has only 2 phase current sensors. Its not ideal but it can get you running. For around the same price someday VESC6 will be available in china and those who know the firmware will be one step ahead.

casainho
10 kW
10 kW
Posts: 947
Joined: Feb 14, 2011 2:43 pm

Re: VESC-controller

Post by casainho » Jun 23, 2017 3:08 pm

Never saw a less than 100€ VESC board which is a lot!! A Chinese ebike controller costs 30€ with a protective metal case that is water resistant.
A think VESC is to much expensive, even for Chinese prices. I think I am stuck with cheap Chinese controllers until they decide to move to FOC ones -- current controllers would just need a more expensive microcontroller like STM32F103 and another phase current sensor... Maybe more 4€ in the boom that could translate to more 20€ on the final price...
Developer of OpenSource firmware for EBike BMSBattery S/Kunteng KT motor controllers: https://opensourceebikefirmware.bitbucket.io/

User avatar
cal3thousand
10 GW
10 GW
Posts: 4044
Joined: Mar 26, 2012 4:47 pm
Location: California

Re: VESC-controller

Post by cal3thousand » Jun 23, 2017 5:23 pm

casainho wrote:Never saw a less than 100€ VESC board which is a lot!! A Chinese ebike controller costs 30€ with a protective metal case that is water resistant.
A think VESC is to much expensive, even for Chinese prices. I think I am stuck with cheap Chinese controllers until they decide to move to FOC ones -- current controllers would just need a more expensive microcontroller like STM32F103 and another phase current sensor... Maybe more 4€ in the boom that could translate to more 20€ on the final price...
I think that this fork is onto a different section of the good/fast/cheap triangle than you'd like to hang out.
Get a Cycle Analyst and a Multimeter, you're still a noob if you don't have at least one of each.

Planning on posting questions or buying anything on this site? Put up your country (at minimum) on your profile. This is a worldwide forum and we haven't reached clairvoyance.

User avatar
Ecyclist
100 W
100 W
Posts: 242
Joined: Apr 01, 2016 10:53 pm
Location: San Diego, California

Re: VESC-controller

Post by Ecyclist » Jun 24, 2017 12:45 am

Your board size 160x90 mm is kind of big. Too big for an ebike IMHO. I like VESC-X size. The case is 64x64x22mm. Perfect fit with 18650 cells.

Ohbse
10 kW
10 kW
Posts: 746
Joined: Dec 26, 2013 5:15 pm
Location: Auckland, New Zealand

Re: VESC-controller

Post by Ohbse » Jun 24, 2017 2:11 am

Ecyclist wrote:Your board size 160x90 mm is kind of big. Too big for an ebike IMHO. I like VESC-X size. The case is 64x64x22mm. Perfect fit with 18650 cells.
This isn't for ebikes. Buy a VESC-X

marcos
100 W
100 W
Posts: 153
Joined: Nov 19, 2016 11:38 pm

Re: VESC-controller

Post by marcos » Jun 24, 2017 8:57 am

Yeah, you don't want this on a bike.

Image

The image still misses the beefy DC link capacitor.

It could be useful if you are interested into motor control though, its easy to measure things and develop custom algorithms given its open sourceness.
Attachments
assembly.png
(105.26 KiB) Downloaded 7 times

User avatar
Ecyclist
100 W
100 W
Posts: 242
Joined: Apr 01, 2016 10:53 pm
Location: San Diego, California

Re: VESC-controller

Post by Ecyclist » Jun 24, 2017 9:46 am

Ohbse wrote:
Ecyclist wrote:Your board size 160x90 mm is kind of big. Too big for an ebike IMHO. I like VESC-X size. The case is 64x64x22mm. Perfect fit with 18650 cells.
This isn't for ebikes. Buy a VESC-X
I did, but it would be nice to buy controller that can handle more power. VESC-X can only go up to 60A and 10S (recommended).

User avatar
Ecyclist
100 W
100 W
Posts: 242
Joined: Apr 01, 2016 10:53 pm
Location: San Diego, California

Re: VESC-controller

Post by Ecyclist » Jun 24, 2017 9:56 am

600V and 600A, maybe Tesla can use that. Cool stuff but kind of scary in the same time.

marcos
100 W
100 W
Posts: 153
Joined: Nov 19, 2016 11:38 pm

Re: VESC-controller

Post by marcos » Jun 24, 2017 12:03 pm

Ecyclist wrote:600V and 600A, maybe Tesla can use that. Cool stuff but kind of scary in the same time.
Tesla is way ahead, they have their own IGBTs by now, and they figured out this control part years ago.

User avatar
Vanarian
10 kW
10 kW
Posts: 583
Joined: Nov 26, 2014 12:24 pm
Location: France!

Re: VESC-controller

Post by Vanarian » Jun 27, 2017 8:57 am

Ecyclist wrote:
Ohbse wrote:
Ecyclist wrote:Your board size 160x90 mm is kind of big. Too big for an ebike IMHO. I like VESC-X size. The case is 64x64x22mm. Perfect fit with 18650 cells.
This isn't for ebikes. Buy a VESC-X
I did, but it would be nice to buy controller that can handle more power. VESC-X can only go up to 60A and 10S (recommended).
Off topic : How much power do you seek?

On topic : This is still very acceptable size to put on a monster bike. Few years ago I had 36 FET monster controllers (which I forget the name, who did design it again ? ) good for 30Kw continuous, never built my bike and went on skates instead. My point is : it was as big as 300x150x50mm.

This little fella can manage lot more through external driver gates, and control board itself is only 160x90mm. Given the performance it is very good price indeed.

For an e-bike it is maybe too much but for an e-motorcycle it nails it. Also for a DIY car conversion, like Arlo's build, it will make great !
I needed to turn Air Gear stuff into reality so I am making this!
-+Electric inline skates - no remote control - weight / angle sensor - hub motors - one frame for all wheels sizes between 80/125mm - from 3.2 to 12 KW :mrgreen:

Rollo Ergo Sum!

marcos
100 W
100 W
Posts: 153
Joined: Nov 19, 2016 11:38 pm

Re: VESC-controller

Post by marcos » Jun 27, 2017 6:43 pm

Vanarian wrote:Off topic : How much power do you seek?
Um, car-worthy?
Its basic dimensions were laid out based on this thread
https://endless-sphere.com/forums/viewt ... 0#p1283214

The idea is mostly to unleash the vesc project so its not bound by its original 60v limit.
Vanarian wrote:On topic : This is still very acceptable size to put on a monster bike. Few years ago I had 36 FET monster controllers (which I forget the name, who did design it again ? ) good for 30Kw continuous, never built my bike and went on skates instead. My point is : it was as big as 300x150x50mm.

This little fella can manage lot more through external driver gates, and control board itself is only 160x90mm. Given the performance it is very good price indeed.

For an e-bike it is maybe too much but for an e-motorcycle it nails it. Also for a DIY car conversion, like Arlo's build, it will make great !
Yes, I got driven away by the low cost ebike comments, but if you aim for high power, its not an unreasonable controller given how much space the power pass and cooling takes. Just keep in mind that 5kw is vesc vanillla territory, >30kw and you get into this controller territory. There are already some neat apps for a vesc bike https://www.youtube.com/watch?v=BYhBEbIxGFo

User avatar
Ecyclist
100 W
100 W
Posts: 242
Joined: Apr 01, 2016 10:53 pm
Location: San Diego, California

Re: VESC-controller

Post by Ecyclist » Jun 27, 2017 9:01 pm

I'm sorry about my comment. I didn't read the thread from the beginning to the end and was exited about possibility of getting VESC with a little more kick.
Obviously you build something special. No doubt in my mind. Good luck and have fun with your project.

marcos
100 W
100 W
Posts: 153
Joined: Nov 19, 2016 11:38 pm

Re: VESC-controller

Post by marcos » Jun 29, 2017 8:12 am

Ecyclist wrote:I'm sorry about my comment. I didn't read the thread from the beginning to the end and was exited about possibility of getting VESC with a little more kick.
Obviously you build something special. No doubt in my mind. Good luck and have fun with your project.
No worries :)

This is how a motor start from 0 rpm limited to 40A looks like.
startup with 1.4usec DT.png
Its cleaner than the oscilloscope capture because its sampled in sync with pwm.

Its configured for 1.4us deadtime. it could be a bit less though. I wrote a quick C code that generate the required register bits to acheve X nsec of deadtime, hopefully it will be integrated to the firmware in the future. That register is a pain to setup, very nonlinear so having code that does if for you helps a bit.

casainho
10 kW
10 kW
Posts: 947
Joined: Feb 14, 2011 2:43 pm

Re: VESC-controller

Post by casainho » Jun 29, 2017 8:18 am

Great!!!
Developer of OpenSource firmware for EBike BMSBattery S/Kunteng KT motor controllers: https://opensourceebikefirmware.bitbucket.io/

marcos
100 W
100 W
Posts: 153
Joined: Nov 19, 2016 11:38 pm

Re: VESC-controller

Post by marcos » Jul 03, 2017 6:37 pm

Sensorless startup at 17% of the available current for this setup.
startup with 1.4usec DT 80A.jpeg
Can't go further until I set up a proper mechanical load.

And a quick load test at 50A. Heatsink only, no fans or watercooling, just running an openloop 50amp FOC.
img_thermal_1497133271852.jpg
Hottest point are the gate resistors.

marcos
100 W
100 W
Posts: 153
Joined: Nov 19, 2016 11:38 pm

Re: VESC-controller

Post by marcos » Jul 05, 2017 8:47 pm

Bumped version to 0.2, updated schematic, layout and 3d so its ready to prototype. I won't send it to mfg right away, the changes are very minor so I'll keep using the first version but I wanted to keep things ready just in case.
VESC-controller v0.2 - Schematic.pdf
(828.24 KiB) Downloaded 139 times
VESC-controller v0.2.jpg
VESC-controller v0.2.jpg (78.49 KiB) Viewed 4491 times

User avatar
Ratking
10 kW
10 kW
Posts: 519
Joined: May 20, 2010 5:27 am
Location: Norway

Re: VESC-controller

Post by Ratking » Jul 07, 2017 4:47 am

marcos wrote:Bumped version to 0.2, updated schematic, layout and 3d so its ready to prototype. I won't send it to mfg right away, the changes are very minor so I'll keep using the first version but I wanted to keep things ready just in case.
VESC-controller v0.2 - Schematic.pdf
VESC-controller v0.2.jpg

-Dumb question alert-

I need a controller in the 20kw segment, but there is no good option for what I need.

Optimal controller:

80v max
275A semi continuously(15kw continuously, 22kw peak, for climbing)
Sensorless(linear load, propeller in air, should not have any startup problems)
Lightweight
Aircooled


Could this controller board do this, would I need a good mosfet layout and capacitors, or is more needed?

Thank you

Post Reply