VESC-controller

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

Re: VESC-controller

Post by marcos » Jul 07, 2017 6:28 am

Ratking wrote:Could this controller board do this, would I need a good mosfet layout and capacitors, or is more needed?
Sounds right. You would need this controller board plus a powerpass board with the gate drivers, power mosfets, dc link, and differential voltage/current sensing.

For voltage/current sensing I have an example circuit, its fully isolated. Maybe overkill for 80v, but it doesn,t hurt.

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

Re: VESC-controller

Post by marcos » Jul 07, 2017 7:20 am

For reference, this is what an interface board looks like.
interface board v0.1.png
On the top right-ish is the isolated phase voltage sensing for the 3 phases with differential outputs.
On the bottom is the same circuit for dc bus voltage sensing. These could be a simple resistor dividers but I don't endorse a non-isolated setup.
For current it just provides the mating connectors for a hall current sensor.
Bottom U V W connectors are gor the 3 gate drivers, which in this case are external.

If I had to do it again this interface board would be below the vesc-controller board. It would be much easier to work on it that way.

User avatar
ElectricGod
100 kW
100 kW
Posts: 1352
Joined: Nov 01, 2015 5:24 pm

Re: VESC-controller

Post by ElectricGod » Jul 11, 2017 12:43 pm

Hi,

This is cool. Can you post your schematics for the fully isolated design please? Also, I'm sure you have worked out what you need on the "power board". Mosfets, shunts, etc. Can you post that too?

Thanks.

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

Re: VESC-controller

Post by marcos » Jul 11, 2017 1:15 pm

ElectricGod wrote:Hi,
This is cool. Can you post your schematics for the fully isolated design please? Also, I'm sure you have worked out what you need on the "power board". Mosfets, shunts, etc. Can you post that too?
Thanks.
Here is the schematic of the adapter board for infineon mosfets modules with power integrations 2SP0115T2A gate drivers.
Power_Integrations_interface.pdf
(910.31 KiB) Downloaded 223 times
Take it only as a reference, and ask me if plan to take it serisouly so I can double check it. I remember it needed to cut a couple of traces but I don't remember fixing that in the design.

I plan to keep those interface boards as part of the controller repository, so you can find the design files for that power stage here and open them with kicad.
https://github.com/paltatech/VESC-contr ... 2SP0115T2A


And then there is the other power board that I'm building for this controller
https://endless-sphere.com/forums/viewt ... 30&t=84930

User avatar
ElectricGod
100 kW
100 kW
Posts: 1352
Joined: Nov 01, 2015 5:24 pm

Re: VESC-controller

Post by ElectricGod » Jul 13, 2017 10:33 am

Thanks! ARE you planning on making multiples of these and selling them?

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

Re: VESC-controller

Post by marcos » Jul 13, 2017 11:38 am

ElectricGod wrote:Thanks! ARE you planning on making multiples of these and selling them?
Sure. First I need to see a demand, if there is demand I have no problem about supplying boards for people or businesses. I would need to know if people is okay with this set of features, maybe I have to change the design. Calculate the fabrication cost, wait for the final release of the vesc tools, etc.

Lots of things to do if we want to sell boards. If someone needs one NOW I can hand assemble the last bare pcb I have, but the hand assembly is kind of expensive labor.

User avatar
ElectricGod
100 kW
100 kW
Posts: 1352
Joined: Nov 01, 2015 5:24 pm

Re: VESC-controller

Post by ElectricGod » Jul 14, 2017 1:48 pm

marcos wrote:
ElectricGod wrote:Thanks! ARE you planning on making multiples of these and selling them?
Sure. First I need to see a demand, if there is demand I have no problem about supplying boards for people or businesses. I would need to know if people is okay with this set of features, maybe I have to change the design. Calculate the fabrication cost, wait for the final release of the vesc tools, etc.

Lots of things to do if we want to sell boards. If someone needs one NOW I can hand assemble the last bare pcb I have, but the hand assembly is kind of expensive labor.
I didn't think that hand loading would even be an option. soldering all that SMT stuff would be a pain.

I was thinking more like completed, machine loaded boards.

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

Re: VESC-controller

Post by marcos » Jul 14, 2017 5:38 pm

I didn't think that hand loading would even be an option. soldering all that SMT stuff would be a pain.
Its not that bad, it looks like this
http://paltatech.com/files/VESC-controller_0001.jpg
To be accurate, its hand-placed, reflow soldered. So instead of a pick&place its me. You spend most of the time opening digikey bags and looking up where each component goes.

User avatar
ElectricGod
100 kW
100 kW
Posts: 1352
Joined: Nov 01, 2015 5:24 pm

Re: VESC-controller

Post by ElectricGod » Jul 18, 2017 3:51 pm

marcos wrote:
I didn't think that hand loading would even be an option. soldering all that SMT stuff would be a pain.
Its not that bad, it looks like this
http://paltatech.com/files/VESC-controller_0001.jpg
To be accurate, its hand-placed, reflow soldered. So instead of a pick&place its me. You spend most of the time opening digikey bags and looking up where each component goes.
OK...that's a significant advantage. Hand placing is effectively the same thing as machine placing...just done manually. You are among a few people with a reflow station for soldering. I have a nice Hakko solder station, but reflow soldering is a "whole nother level"! Most folks don't have a 100 pound bath of molten solder in their garages.

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

Re: VESC-controller

Post by marcos » Jul 18, 2017 5:00 pm

ElectricGod wrote:OK...that's a significant advantage. Hand placing is effectively the same thing as machine placing...just done manually. You are among a few people with a reflow station for soldering. I have a nice Hakko solder station, but reflow soldering is a "whole nother level"! Most folks don't have a 100 pound bath of molten solder in their garages.
Most folks should do what I did.

What I have here is a dirt cheap electric toaster oven that I bo at a local walmart for under $30. It served me well for ages, hundreds of boards went through it, and it was never a problem for small boards. With large boards the temperature is not even so some parts of the board are exposed to higher temps. Its a matter of knowing where are those hotspots and you can use it to your benefit, for example placing massive components (big inductors, connectors, alum caps) in the hotspot. I used to have a closed loop temp control but in the end I ditched it and now I just put the boards in there and watch until I see the reflow.

I don't miss a proper commercial reflow oven at all, but a pick&place would be nice. You can easily reflow a bga package in my oven, I did it many times, but the alignment process before the oven is awful and doesn't allow me to use stencils in the BGAs.

To give you an idea, its something like this, just aim for one with a high power/volume ratio
http://www.bestbuy.com/site/hamilton-be ... Id=8959617

The process with a bath of solder is called wave soldering, you can't use that with these fine pitch packages.

User avatar
ElectricGod
100 kW
100 kW
Posts: 1352
Joined: Nov 01, 2015 5:24 pm

Re: VESC-controller

Post by ElectricGod » Jul 18, 2017 10:08 pm

marcos wrote:
ElectricGod wrote:OK...that's a significant advantage. Hand placing is effectively the same thing as machine placing...just done manually. You are among a few people with a reflow station for soldering. I have a nice Hakko solder station, but reflow soldering is a "whole nother level"! Most folks don't have a 100 pound bath of molten solder in their garages.
Most folks should do what I did.

What I have here is a dirt cheap electric toaster oven that I bo at a local walmart for under $30. It served me well for ages, hundreds of boards went through it, and it was never a problem for small boards. With large boards the temperature is not even so some parts of the board are exposed to higher temps. Its a matter of knowing where are those hotspots and you can use it to your benefit, for example placing massive components (big inductors, connectors, alum caps) in the hotspot. I used to have a closed loop temp control but in the end I ditched it and now I just put the boards in there and watch until I see the reflow.

I don't miss a proper commercial reflow oven at all, but a pick&place would be nice. You can easily reflow a bga package in my oven, I did it many times, but the alignment process before the oven is awful and doesn't allow me to use stencils in the BGAs.

To give you an idea, its something like this, just aim for one with a high power/volume ratio
http://www.bestbuy.com/site/hamilton-be ... Id=8959617

The process with a bath of solder is called wave soldering, you can't use that with these fine pitch packages.
Ha! Yeah my mistake for thinking a wave solder set up is the same as a reflow set up.

I wonder if you could put an aluminum sheet down right over top of the heating elements if they would distribute heat more evenly. I have an aluminum cookie sheet that effectively does the same thing for making cookies. On a typical cookie sheet, they don't distribute heat very well so some cookies get over cooked and others turn out under cooked. I bet with an aluminum sheet over the heating elements would would do the same thing.

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

Re: VESC-controller

Post by marcos » Jul 18, 2017 11:40 pm

I tried and the extra thermal inertia makes the process a bit too long. Something I should try is a fan to move the air inside. Still air is an insulator so it should speed up the process.
Most of the heat is lost through the glass door but I need it look at the paste to know when the reflow is complete.

Also I should calculate the cost of this board..

User avatar
ElectricGod
100 kW
100 kW
Posts: 1352
Joined: Nov 01, 2015 5:24 pm

Re: VESC-controller

Post by ElectricGod » Jul 19, 2017 12:42 pm

marcos wrote:I tried and the extra thermal inertia makes the process a bit too long. Something I should try is a fan to move the air inside. Still air is an insulator so it should speed up the process.
Most of the heat is lost through the glass door but I need it look at the paste to know when the reflow is complete.

Also I should calculate the cost of this board..
A simple induction motor fan ought to do the job. It will be like a convection oven in there. I have one of those. A turkey will take about 30% less time cooking with convection on than off.

Regarding the glass door, Get some glass insulation panel and cut a rectangle the shape and size of your door. Set it in place via a couple of screws or posts for normal "cooking" and then it comes right off when you want to look in the window. It should hold up to the heat pretty well too. Or...go visit the local fire department. They always have worn out turnouts laying around. The knees in the pants wear out, they get torn, etc. You want the heavy outer coat or pants. The fabric is flame retardant to like 2000F. I've worn full turnouts in house fires before. It gets really HOT in there, but my turnouts were not damaged despite coming in contact with flames and lots of heat. If you've never done it, then a very errrr "cool" experience is to just sit on the floor of a burning house as it goes up in flames around you. Hollywood fires are completely unrealistic. It's nothing like that. Very intense, beautiful, dangerous and truly amazing. Sorry for the rabbit trail there, LOL, thinking about turnouts got me going.

If you figure out what you want for one of these boards, I may trade you 1's and 0's in your paypal account for one.

The board will drive mosfets or IGBT's right? I don't need but 200v and mosfets are still compelling in that voltage range. It looks like 3 of the 4 ADC pins possibly drive the mosfets or IGBT's. Is that correct? Can those pins also be DAC's? That's what is needed to drive a gate.

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

Re: VESC-controller

Post by marcos » Jul 19, 2017 2:56 pm

ElectricGod wrote:The board will drive mosfets or IGBT's right? I don't need but 200v and mosfets are still compelling in that voltage range. It looks like 3 of the 4 ADC pins possibly drive the mosfets or IGBT's. Is that correct? Can those pins also be DAC's? That's what is needed to drive a gate.
The board outputs 0-5v pwm, you can use that with mosfets or igbt, as long as the gate driver you choose is compatible with a 5v signal.

About the pinout, now I realize its not clear where are the 6 pwm located. See this image of the back of the board. Those 3 central connectors have the same pinout, so its one connector for each phase. It carries phase voltage, phase current, and gate driver signals. The signals on the edge of the board are free for the user to play with.
VESC-controller v0.2back2.jpg
Its easier to see in the schematic.

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

Re: VESC-controller

Post by marcos » Aug 10, 2017 6:35 pm

These days I've been studying the pros and cons of going fully digital here.

By fully digital I mean removing all the analog sensing in favour of using voltage and current sensors with digital outputs.

A sensor with such digital output, usually delta sigma, requires some digital filtering that can only be performed with dedicated hardware. Some microcontrollers, including a very close brother of this stm32f405 have this piece of silicon built in, but I don't want to change this MCU, its really hard to migrate these things.
Plan B is adding a small FPGA, it could even be a CPLD.

To have a quick glance at the difference between the actual analog sensing
VESC-controller v0.2.jpg
VESC-controller v0.2.jpg (78.49 KiB) Viewed 1535 times
And its digital counterpart
with fpga.jpg
with fpga.jpg (63.66 KiB) Viewed 1535 times
So 2 chips (fpga+flash) can replace a big chunk of this board bill of materials. I'd add a buffer to protect the fpga, but still, it looks like an upgrade.

Anyway its not about the cost, its about being able to get send digital sensor data instead of analog. Having 1000 Amps switching close to the sensors makes it difficult to arrange the wiring in a way that doesn't pick up much noise. Its MUCH easier if the data is digital, you have pretty much no noise picked up along the way. For example, false triggering a digital bit would take something like 0.6v or more. And a single bit error is just a least significant bit error. If it were an analog with 5v=1000A 0v=-1000A, it would be a 240 Amp glitch error.

Plus, all those opamps, resistors and capacitors have their tolerances, temp drift, etc. The fpga would have none of this.

I only know verilog to configure the fpga. Well, I used to know. I could get my hands on this little board to give it a try before commiting to this http://gnarlygrey.atspace.cc/development-platform.html
Its 8usd shipped.

So I would have to write a sinc3 filter in verilog and instantiate one filter per input (3 phase currents, 3 phase voltages and bus voltage)
According to the internet®, it would look something like this
verilog.png
verilog.png (139.8 KiB) Viewed 1535 times
It compiles, but I should set up a testbench to properly test it. TI suggests a 128 downsampling that is not present in this code.
The filtering takes very few logic gates, its tempting. The data would be send via SPI to the MCU via DMA.

Just some brainstorming that I wanted to get written down.

User avatar
tecnologic
1 mW
1 mW
Posts: 11
Joined: Mar 24, 2015 12:41 pm

Re: VESC-controller

Post by tecnologic » Aug 11, 2017 12:45 am

Hi marcos,

i really like the plan. Just some things u should take care of. The Line buffer for the FPGA for protection is good but consider serial terminating of the clock and data lines. And dont forget the line buffer on the AMC1304s side. At 21Ms my clock and data are more like a sine (no line buffers on my design, will add them in the next step) but the measuements are still working like a charm.

Why SPI between FPGA and STM consider using a parallel memory mapped inferface. But if the latencys are ok with spi then this may be to complicated.

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

Re: VESC-controller

Post by marcos » Aug 11, 2017 9:24 am

tecnologic wrote:i really like the plan. Just some things u should take care of. The Line buffer for the FPGA for protection is good but consider serial terminating of the clock and data lines. And dont forget the line buffer on the AMC1304s side. At 21Ms my clock and data are more like a sine (no line buffers on my design, will add them in the next step) but the measuements are still working like a charm.
Will do.
tecnologic wrote:Why SPI between FPGA and STM consider using a parallel memory mapped inferface. But if the latencys are ok with spi then this may be to complicated.
To maximize compatibility with the vanilla vesc project. I want to keep riding that train.
Performance-wise, the mcu ADC is triggered by PWM events. Instead of the internal ADC the trigger should assert a gpio line, probably using a timer, I need to check that. When that line is asserted the fpga would latch the measured value while the mcu fetches the data from spi. 10MHz spi should do but I should investigate further.

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

Re: VESC-controller

Post by marcos » Aug 15, 2017 10:14 pm

BOM updated.
https://github.com/paltatech/VESC-contr ... x?raw=true

If you don't need a resolver interface, this controller BOM costs around $70 for qty=1, $60 for qt=10, $50 for qty=100.
Add maybe 10usd for the pcb and the assembler cost, and you are ready to run.

This was first tested with x3 $150 IGBTs
http://www.mouser.com/search/ProductDet ... R07ME4_B11
And x3 2SP0115T gate drivers ($90)
https://octopart.com/search?q=2SP0115T&start=0

So you have around $850 + DC link + heatsinking for this 100kw system.

J0nathan
1 mW
1 mW
Posts: 11
Joined: May 06, 2013 5:46 pm
Location: Leicestershire, UK

Re: VESC-controller

Post by J0nathan » Aug 21, 2017 2:55 pm

Have you thought about just putting ADCs right next to current sensors of some description? That's how I did it in the pictured one, attached.

The design is here:
https://github.com/jonblissett/motor-hi ... nt-sensors

6 channels in total: 4 current, 1 high voltage, 1 spare e.g. for temperature. Sensing all 3-phase currents, not just two, as it aids fault protection.

It's a jot expensive - I went for optical fibers to the board, then differential signalling across the PCB to each ADC, just to try and be as sure as I could of signal integrity, but maybe it was OTT and you could just use the differential signalling. It's a bit tricky to interface without an FPGA - I've tied all the SPI clock and chip select together, so you send those and get back 3 data signals all at the same time.
Attachments
2016-07-28 21.56.26-2 (Large).jpg
2016-07-28 21.55.53-2 (Large).jpg

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

Re: VESC-controller

Post by marcos » Aug 22, 2017 8:47 am

J0nathan wrote:Have you thought about just putting ADCs right next to current sensors of some description? That's how I did it in the pictured one, attached.
Yes, actually the AMC1303 is an ADC that I'm planning to install directly on the bus bars
https://endless-sphere.com/forums/viewt ... 1#p1311961
Very low component count. The first prototype used diff signaling all the way from the sensors to the MCU ADC using a similar chip that happens to be an [ADC + isolated modulator + diff DAC] all in the same package. This iteration would remove the diff DAC in order to send raw digital data directly up the mcu.

Good to see some over the top setup, I've heard many times about fiber optic setups for high noise environments.

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

Re: VESC-controller

Post by marcos » Sep 11, 2017 9:41 pm


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

Re: VESC-controller

Post by casainho » Sep 13, 2017 3:25 am

marcos wrote:Featured on hackaday!!

https://hackaday.com/2017/09/11/open-so ... ontroller/
Yeah!! Congratulations!!
Developer of OpenSource firmware for EBike BMSBattery S/Kunteng KT motor controllers: https://opensourceebikefirmware.bitbucket.io/

Rube
100 W
100 W
Posts: 167
Joined: Jun 25, 2016 10:18 pm
Location: Brisbane, Australia

Re: VESC-controller

Post by Rube » Sep 13, 2017 4:24 am

Hi Marcos, super exciting that you are pursuing such a powerful and flexible design. Congratulations, so exciting to see the open source community developing great designs for the benefit of all. This makes me happy :D

larsrocket
1 µW
1 µW
Posts: 1
Joined: Jun 27, 2011 4:04 pm

Re: VESC-controller

Post by larsrocket » Sep 21, 2017 6:49 pm

Just stumbled upon this controller; http://www.hec-drives.nl/TI-4520_open_top.png
Seems to use similar or same igbt's and gate drivers, might be to interest.

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

Re: VESC-controller

Post by marcos » Sep 21, 2017 7:15 pm

larsrocket wrote:Just stumbled upon this controller; http://www.hec-drives.nl/TI-4520_open_top.png
Seems to use similar or same igbt's and gate drivers, might be to interest.
Yes,not the same but very similar gate drivers. IGBTs look like the same. Thats an expensive enclosure though. Still the first thing I notice is that they could have spent $8 in a twisted ribbon cable.

That build has the same defect as mine, HV+ on one side, HV- waaaay in the other side. Huge current loop, blame the DC link capacitor terminals. I guess its a 100kw inverter, right?

Post Reply