High Power VESC

Discuss hardware related to the VESC such as the NRF nunchuk.
TheFallen
Posts: 34
Joined: 26 Oct 2016, 10:49
Location: UK

Re: High Power VESC

Postby TheFallen » 17 Dec 2016, 21:14

rew wrote:The gate resistance needs to be close to the fet. So I would recommend taking a few leaded resistors and solder them inline.

Unfortunately I've already plumbed in 4R7s on the PCB. We'll see how that goes and play with it once I've had a chance to see what happens.

I'm currently waiting on the bus capacitance, I'm going to be using 3x 22uF 100Vdc polymer film capacitors. The idea for these is taken from this post and in particular this paper referenced in the post.

arvidb
Posts: 171
Joined: 26 Dec 2015, 14:38
Location: Sweden, Stockholm

Re: High Power VESC

Postby arvidb » 18 Dec 2016, 11:39

That paper (Selecting Film Bus Link Capacitors For High Performance Inverter Applications) can be found here in PDF format, for free.

TheFallen
Posts: 34
Joined: 26 Oct 2016, 10:49
Location: UK

Re: High Power VESC

Postby TheFallen » 22 Dec 2016, 10:35

The capacitors arrived: Image

They are B32524Q1226K from EPCOS, 22uF 100Vdc Polyester Film Capacitor. Bananas for scale as the capacitors are large, 14.0mm × 24.5mm × 31.5mm so fitting them into my enclosure was proving difficult.

Image

But eventually I found an arrangement that would work. I know it's not the optimal arrangement but it will suffice for version 1.

Image

Frustratingly while I was trying to get it all packaged up one of the wires broke off of one of my ACSxxx current sensors.

Image

I'm off travelling for the holidays so won't be able to fix the pin or start powering it up, that will have to wait for early next year. In the mean time I'm planning version 2 of the power and logic boards as well as getting the code changed and re-compiled.

Merry Christmas!

TheFallen
Posts: 34
Joined: 26 Oct 2016, 10:49
Location: UK

Re: High Power VESC

Postby TheFallen » 09 Jan 2017, 23:25

Back for Christmas/New Years.

Desoldered the ACSxxx from the bus bars, wow, 100W soldering irons are great! Soldered the new one one fairly easily too!
Image

And then added the wires:
Image

Going to try and be more careful this time with the wires to avoid this happening. As I don't have a carrier PCB for the ACSxxxs this is always a danger.

It took me the whole of Sunday to install Eclipse, Cygwin, GCC/GBD/G++ and get them all playing nicely together but it can compile the VESC git repo now. I just have to make my changes (invert current gain, increase the dead time) re-compile and upload.

Of course considering that this is quite an investment of time, effort and money I'm rather weary of switching it on. I'll try and build up the necessary courage soon!

Now this design, Issue A, is only a prototype, a way of proving that the DRV8302 is not required and with suitable gate drivers much larger MOSFETs capable of handling greater power can be controlled. Hopefully once this is proved I can move on to Issue B which will be designed to be more robust and easier to manufacture. A CAD of it is below:
Image

As before the logic is on a separate, standard 2 layer 1oz PCB while the power stage is on a 2 layer >2oz PCB with added copper bus bars. This should help keep costs down.

arvidb
Posts: 171
Joined: 26 Dec 2015, 14:38
Location: Sweden, Stockholm

Re: High Power VESC

Postby arvidb » 10 Jan 2017, 20:24

Very interesting with the Polyester Film Capacitors. What's your design targets (switching frequency, phase load inductance, bus link capacitor ripple voltage percentage)?

I feel your pain with the ACS broken leg. :( Good thing that you had that 100 W iron! :)

TheFallen
Posts: 34
Joined: 26 Oct 2016, 10:49
Location: UK

Re: High Power VESC

Postby TheFallen » 10 Jan 2017, 23:44

arvidb wrote:Very interesting with the Polyester Film Capacitors. What's your design targets (switching frequency, phase load inductance, bus link capacitor ripple voltage percentage)?


Ah, well, I just copied the quantity and type from a blog post by someone building a much larger ESC. I figure that they should be over kill enough to make up for the fact I've not done the exact calculations. I think the VESC switches at 20kHz, and I'm not too sure how to calculate the phase load inductance or the ripple voltage percentage.

After battling with Eclipse, ARM-GCC and a complete lack of authoritative documentation I believe I've managed to get the firmware to compile with my modifications. It's worth noting that I've placed bidirectional current sensors, the ACS758-200B on the low side legs of phases A and C, this means that not only are they backwards but I'm losing some accuracy in being able to measure negative currents that will never happen. Adjusting the firmware to fix this is not pretty. However it is done so I'm now slowly starting to try and get it powered up for testing with a motor.

lizardmech
Posts: 183
Joined: 19 Jan 2016, 10:54
Location: Australia

Re: High Power VESC

Postby lizardmech » 11 Jan 2017, 04:53

Interested to see if this works, having drivers located away from the fets goes against ever application note and datasheet I have read, but that is for PCBs I haven't seen anything on using twisted wire pairs. I don't know about the ACS sensors, when I built my board without a drv8302 I tried them on the first few designs but never got it working until I switched back to shunt based sensing.

Where is the current sense code located? I keep looking for it but can't make much sense of it.

TheFallen
Posts: 34
Joined: 26 Oct 2016, 10:49
Location: UK

Re: High Power VESC

Postby TheFallen » 11 Jan 2017, 08:53

The current sense code is here, as identified by pf26:

pf26 wrote:The CURRENT_AMP_GAIN is only used in mcpwm_foc.c there :

Code: Select all

   float ia = ADC_curr_norm_value[0] * (V_REG / 4095.0) / (CURRENT_SHUNT_RES * CURRENT_AMP_GAIN);
   float ib = ADC_curr_norm_value[1] * (V_REG / 4095.0) / (CURRENT_SHUNT_RES * CURRENT_AMP_GAIN);

and in mcpwm.c (bldc mode) :

Code: Select all

   last_current_sample = curr_tot_sample * (V_REG / 4095.0) / (CURRENT_SHUNT_RES * CURRENT_AMP_GAIN);


You'll find V_REG, CURRENT_SHUNT_RES and CURRENT_AMP_GAIN in the relevant hardware configuration file, 'hw_410.h' for v4.12 hardware.

Basically

Code: Select all

(V_REG/4095.0)
converts the ADC value, in divisions into a floating point number of volts.

And

Code: Select all

(CURRENT_SHUNT_RES * CURRENT_AMP_GAIN)
gives you a milliVolts per Amp number

Dividing these values returns a floating point number with the current in Amps, and this is stored in 'ia', 'ib' or 'last_current_sample'

lizardmech
Posts: 183
Joined: 19 Jan 2016, 10:54
Location: Australia

Re: High Power VESC

Postby lizardmech » 11 Jan 2017, 11:37

Do you know how

Code: Select all

ADC_curr_norm_value[0]
is linked to the ADC? It should be easy enough to add the third current sense if I could work out how it determines which pin it reads from.

The only other strange thing is it considers the current sensors to be phase a and b but physically they're a + c. So I'm not sure if other things are swapped around.

rew
Posts: 601
Joined: 25 Mar 2016, 12:29
Location: Delft, Netherlands.

Re: High Power VESC

Postby rew » 13 Jan 2017, 11:50

TheFallen wrote: It's worth noting that I've placed bidirectional current sensors, the ACS758-200B on the low side legs of phases A and C, this means that not only are they backwards but I'm losing some accuracy in being able to measure negative currents that will never happen.
Where did you get that funny idea that the current will only be going one direction? :-) You need a bidirectional current sensor even when it's in the low-side-fet-return-path.

When the motor current happens to be flowing INTO the A motor lead (A-high is on more than A-low) that current will CONTINUE to flow during the time that the A-low FET is on and channeling that current through your sensor.


Return to “Related Hardware”

Who is online

Users browsing this forum: No registered users and 1 guest