You are here

Cannot start motor - huge current spikes through motor

31 posts / 0 new
Last post
TechAUmNu
Offline
Last seen: 5 days 3 hours ago
VESC Free
Joined: 2017-09-22 01:27
Posts: 541
Cannot start motor - huge current spikes through motor

I am working on a higher power vesc for about 200A. I have probed all my phases and gate voltages and everything looks good.

 

With no motor connected this is what the phases look like at 50% duty cycle

 

Once I connect a motor if I try to start it, it starts for a fraction of a second, with maybe 1-4 commutation steps before the abs over current fault occurs

For the initial commutations it looks reasonable. Until it stops. 

 

This shows what happens on the phases when the abs over current fault happens

A closer look at the end, this looks like it rapidly increases the duty cycle or switching speed for some reason, until it is almost 100%, which would explain the huge spike in current shown in VESC tool.

What I don't understand is why it is doing this? The BEMF screen shows me a decent set of traces and I have checked that the current readings are correct too.

This is what is shown in VESC tool, my understanding is that since the current shunts are measuring the current it has to be passing through the motor. Which means this is not a shoot through problem. (I also have the deadtime on the pwm output set to the maximum)

 

Any help would be greatly appreciated, I have been looking at this for the last few days and haven't made any progress.

 

The main things on this board are,

  • 6x Mosfets per phase - FDBL86361_F085
  • 1x Gate driver per phase - UCC27211DDAR
  • 18x 4u7 ceramic caps on other side of board from fets (Can increase to 10u if needed)
  • 2x 1000uF electrolytic caps very close
  • 3x phase shunts (configured to only use two at the moment)

Motor is a Turnigy Rotomax 1.2 (https://hobbyking.com/en_us/turnigy-rotomax-1-20-brushless-outrunner-mot...)

which has 27mOhm resistance. 

 

Some pics so you can see how it is laid out.

 

Danny Bokma
Offline
Last seen: 18 hours 59 min ago
VESC FreeVESC Original
Joined: 2017-05-24 12:11
Posts: 53

Do you have the schematic available? (it could be that your shunt current direction is wrong or measured on the wrong phase)

How does the current plot look when you apply a brake current and turn the motor manually?

TechAUmNu
Offline
Last seen: 5 days 3 hours ago
VESC Free
Joined: 2017-09-22 01:27
Posts: 541

I just looked through my schematic and comparing it to the vesc 4, yes the current shunts are on different phases. 

So it works out as

Phase 3 gnd shunt -> Phase 1 shunt

Phase 1 gnd shunt -> Phase 2 shunt

                                   Phase 3 shunt

 

Which might explain the issue, I will try playing around with the shunts tomorrow!

 

(Sent you the schematic as a pm)

Danny Bokma
Offline
Last seen: 18 hours 59 min ago
VESC FreeVESC Original
Joined: 2017-05-24 12:11
Posts: 53

You probably mean that you compared it to the vesc6 schematic right, since you seem to have in phase shunts instead of gnd shunts. OK ill look!

TechAUmNu
Offline
Last seen: 5 days 3 hours ago
VESC Free
Joined: 2017-09-22 01:27
Posts: 541

I haven't seen a vesc 6 schematic so I had to guess how it would be wired to the cpu. I am running with latest firmware 3.xx compiled for hw410 with the phase shunts turned on (So its configured as two phase shunts only), maybe I should just get round to making a config file for my hardware lol.

ThierryGTLTS
Offline
Last seen: 3 years 1 week ago
Joined: 2017-09-06 14:18
Posts: 116

A schematic would help us to understand what does not work.

If you read the Ethos tab on the website, you'll see you need to publish your work, because it is an Open Source Project http://www.vesc-project.com/Ethos

We will be pleased to help you.

Have a Nice Day.

Thierry

TechAUmNu
Offline
Last seen: 5 days 3 hours ago
VESC Free
Joined: 2017-09-22 01:27
Posts: 541

Here is a link to the schematic, once I actually finish I will put everything up properly.

https://drive.google.com/file/d/1xGmyxEPWCfDgoS6peYjiLcLgE6CP4VTV/view?u...

 

So a few things I have found, 

  • Phase shunt 3 is connected to PB2 which doesn't connect to any ADC inputs
    • The input lines to the cpu will need to be changed for the next rev.
    • Because one phase shunts 1 and 2 are connected I think they actually cancel each other out, which makes it think the total current is 0?!
    • I tried switching round the two connected shunts, but it didn't make any difference.
  • The drive voltage on the high side fets is not consistently at Vin+12v, I think I should increase the bootstrap cap from 0.1uF to 4.7uF since I have some of those already.
  • If I set brake current to 5A and spin the motor with a drill, I see a nice BEMF plot and current plot although they might not be right and I forgot to take a picture :( . The current measured goes up to the max motor current though when I run it fast and does not stop at 5A like I would expect. (This could be because my max regen current is 0 since I am running from a power supply).
    • The low side fets seem to be perfectly fine and were happy running the 60A for a good 3-4min with only 30oC rise. (I currently only have 1 of the 3 fets gate connected on each phase so this will be much better with 3)
  • Since only fet is actually connected to the driver and the other two have their gate floating it might be possible that they are switching on by themselves)

I also managed to now break my current board with a dead short lol, so will solder up another one.

ThierryGTLTS
Offline
Last seen: 3 years 1 week ago
Joined: 2017-09-06 14:18
Posts: 116

You use very good MOSFETs, but the 22 ohms in the gate is so large that it'll slow the switching too much.

In the datasheet they use less than 2 ohms resistors!!!

That could be the problem.

Have a Nice Day.

Thierry

TechAUmNu
Offline
Last seen: 5 days 3 hours ago
VESC Free
Joined: 2017-09-22 01:27
Posts: 541

I originally planned for 1 ohm resistors, and switched to 22 ohm to reduce ringing, the 22 ohm will have less authority over the gate voltage so I will probably switch back.

Thanks

TechAUmNu
Offline
Last seen: 5 days 3 hours ago
VESC Free
Joined: 2017-09-22 01:27
Posts: 541

I can't find anything in the datasheet that says under 2 ohms? Only bit I see is the Switching Characteristics which says 6ohm.

ThierryGTLTS
Offline
Last seen: 3 years 1 week ago
Joined: 2017-09-06 14:18
Posts: 116

Look at:  Note / Test Condition, Table 5,  page 5 of the datasheet IPT020N10N3 Rev. 2.0, 2014-02-17, you'll see Rg.ext=1.6 ohms.

So, for me you can use 3.3 ohms resistors because your driver can deliver up to 4A.

And you have 3 MOSFETs to drive.

Have a Nice Day.

Thierry

TechAUmNu
Offline
Last seen: 5 days 3 hours ago
VESC Free
Joined: 2017-09-22 01:27
Posts: 541

Didn't notice the schematic has the wrong mosfet on it, oops. The correct one is this: http://www.onsemi.com/pub/Collateral/FDBL86361_F085-D.PDF 

 

ThierryGTLTS
Offline
Last seen: 3 years 1 week ago
Joined: 2017-09-06 14:18
Posts: 116

In that datasheet they use 6 ohms and they have an internal resistance of  2.6 ohms = total 8.6 ohms.

Your driver is able to drive the current required with less than 6 ohms, so why not have a trial with 3.9 or 4.7ohms for example.

Even the DRV8302 is able to deliver that current.

Have a Nice Day.

Thierry

TechAUmNu
Offline
Last seen: 5 days 3 hours ago
VESC Free
Joined: 2017-09-22 01:27
Posts: 541

Thanks for pointing that out :) I completely overlooked the internal gate resistance.

So I will use 4.7 ohms gate resistors (12v, 4.5A max, 2.7ohms iR mosfet, 0.9ohms iR gate driver)

Which gives 1.5A gate current per mosfet.

 

I also used this calculator (https://www.silabs.com/tools/Pages/bootstrap-calculator.aspx) to work out that my bootstrap capacitor is way too small (0.1uF 100v), so I will increase it to 4.7uF 100v in the next version.

 

Is there a VESC6 schematic available so I can wire everything up to the correct pins on the micro? The only schematic I have that is close is the paltatech one. 

TheFallen
Offline
Last seen: 3 months 3 weeks ago
VESC FreeVESC Original
Joined: 2017-09-11 11:46
Posts: 222

There is the work in progress reference hardware schematic: http://vesc-project.com/comment/972#comment-972

TechAUmNu
Offline
Last seen: 5 days 3 hours ago
VESC Free
Joined: 2017-09-22 01:27
Posts: 541

So I got a new board made which has the same pinout on the mcu as the vesc 6, put in my settings and it *almost* works.

Kinda jitters around spinning quite slowly, but doesn't spin up properly. If I spin the motor with a drill and look at BEMF sampling then it looks correct, with 3 sine waves correctly aligned. However when I look at the RPM graph, it alternates between positive and negative rpm every half second or so?!

TechAUmNu
Offline
Last seen: 5 days 3 hours ago
VESC Free
Joined: 2017-09-22 01:27
Posts: 541
TechAUmNu
Offline
Last seen: 5 days 3 hours ago
VESC Free
Joined: 2017-09-22 01:27
Posts: 541

Ok have got the motor spinning properly with FOC now. Works fine with both current control and duty cycle on the full range. 

 

I have one problem though, its not tracking the position of the motor when it is not powered. Which causes it to brake very hard whenever it starts again. 

Here is a video showing what I mean.

 

I think this is why BLDC does not work, meaning I cannot use the detection to find the motor settings.

 

I think this might have something to do with it. This was measured while spinning the motor with a drill. 

 

I am quite confused now and don't really know what to try next. Any pointers?

 

 

TechAUmNu
Offline
Last seen: 5 days 3 hours ago
VESC Free
Joined: 2017-09-22 01:27
Posts: 541

So from futher experimentation, it seems that the FOC phase is directly tracking the Phase 3 voltage, as the rpm increases the range that the Phase oscillates between gets smaller and smaller. 

lizardmech
Offline
Last seen: 4 months 2 weeks ago
VESC Original
Joined: 2017-06-02 19:21
Posts: 81

FOC doesn't use phase voltage sense to track the position, the only exception is when the motor is coasting, it uses the BEMF then. Everything looks normal in your screenshot though.

arvidb
Offline
Last seen: 2 years 2 months ago
Joined: 2018-01-16 23:09
Posts: 77

@lizardmech: Looking at the code (mcpwm_foc.c, observer_update()), it looks like the observer uses the Clarke-transformed phase voltages to track position for FOC. Did I miss something?

TechAUmNu
Offline
Last seen: 5 days 3 hours ago
VESC Free
Joined: 2017-09-22 01:27
Posts: 541

@lizardmech it tracks the motor fine when it is actually applying power, but will not track when coasting. 

I have now pulled out all the FOC code for tracking the motor into a pc program and tried various generated BEMF inputs, it looks like the only things that matter when coasting are the BEMF voltages, Flux linkage and Observer gain. 

Also saw that having voltage offsets on the BEMF voltages caused some issues. I tried a few changes in the code but none really did anything to help.

I found that it will track the motor at much lower speed up to about 2000 erpm before it loses the plot and starts oscillating. I wonder if because the voltages are so small they don't have enough resolution to track after a certain point because they don't resemble a proper sine wave anymore. So I might try reducing the voltage divider R1 and see if that helps.

TechAUmNu
Offline
Last seen: 5 days 3 hours ago
VESC Free
Joined: 2017-09-22 01:27
Posts: 541

I am using 68k-2k2 dividers, VESC6 uses 39k-2k2. So for a 1v p-p signal I get 40 adc steps and VESC6 gets 70.

realised my simulation setup doesn't account for the ADC steps when generating the BEMF waveform, will see what difference that makes.

TechAUmNu
Offline
Last seen: 5 days 3 hours ago
VESC Free
Joined: 2017-09-22 01:27
Posts: 541

Did a lot of testing in the simulation, the only thing that I changed that seemed to make it track was the dt value based on sample rate that is passed to the observer. Not sure if I want to change that on the actual hardware though.

e-biker
Offline
Last seen: 6 months 3 weeks ago
VESC Free
Joined: 2017-09-11 10:16
Posts: 51

Hi TechAUmNu,

I had similar problem when accidently placed different resistors on phase voltage tracking and Vin measurement. 

Martin.

TechAUmNu
Offline
Last seen: 5 days 3 hours ago
VESC Free
Joined: 2017-09-22 01:27
Posts: 541

@Martin Thanks for the pointer, I will try changing them tonight.

TechAUmNu
Offline
Last seen: 5 days 3 hours ago
VESC Free
Joined: 2017-09-22 01:27
Posts: 541

I tried changing the resistor dividers to 34k-2.2k and it makes zero difference. So after a bit more messing around I can get it to track my motor up to 15000 erpm. But only if I set the Flux Linkage to 0.2 (from 1.5) and observer gain to 20000 (from 100). So there is clearly something wrong somewhere...

Benjamin can you shine any light on this?

e-biker
Offline
Last seen: 6 months 3 weeks ago
VESC Free
Joined: 2017-09-11 10:16
Posts: 51

Try removing 2.2uF capacitors from phase voltage sense. That should help solve your problem.

Martin.

TechAUmNu
Offline
Last seen: 5 days 3 hours ago
VESC Free
Joined: 2017-09-22 01:27
Posts: 541

Oh... well I have no idea where those came from, looking back at the vesc 4 and 6, neither have them. So I must have copied it from the supply input on vesc 4 and changed the capacitor value.

Thanks for the spot! I will try removing them tonight :D

 

TechAUmNu
Offline
Last seen: 5 days 3 hours ago
VESC Free
Joined: 2017-09-22 01:27
Posts: 541

It works! Thanks Martin!

e-biker
Offline
Last seen: 6 months 3 weeks ago
VESC Free
Joined: 2017-09-11 10:16
Posts: 51

You're welcome! Glad to hear it helped.