You are here

Current runaway

6 posts / 0 new
Last post
gregoryk@veriqu...
Offline
Last seen: 1 year 3 months ago
Joined: 2023-01-05 02:56
Posts: 1
Current runaway

We are trying to catch a bug in our custom VESC hardware. As soon as duty cycle goes just a little higher than 1% or 2%, we get current running away to crazy values - and then overcurrent protection goes off.

What can be hardware reasons for such behavior?

Posting imaged doesn't work, please check out here:

https://ctrl.vi/i/9yiopt90K

 

vadicus
Offline
Last seen: 1 hour 6 min ago
VESC Free
Joined: 2018-08-17 07:26
Posts: 427

You mean a current spike when you start the motor? Does it pass detection though? Any schematics and/or pcb layout, fw configuration settings?

Without any detail about the hardware or firmware configuration, can only be a wild guess. Just some of the possibilities:

incorrect current sensor design and/or filtering, incorrect gate driver design, a shoot-through in a mosfet half-bridge due to wrong configuration values such as deadtime for example.

 

 

NextGen FOC High voltage 144v/34s, 30kw (https://vesc-project.com/node/1477)

Tim_M
Offline
Last seen: 8 months 3 weeks ago
Joined: 2022-03-21 12:44
Posts: 2

Hello everyone,

It's the first time I post on this forum.

I also made a custom hardware based on this project : https://vesc-project.com/node/3434.

I meet a similar problem and I was wondering if someone found a solution or where it came from.

On my setup, the problem happens when I try to run the detection. As soon as I try RL measurements, there's a big current spike and my battery BMS goes into protection and shutdown. I know it doesn't come from the motor because it works with another VESC.

I tried with another motor with a higher electrical resistance and the RL measurement works if I set a low current limit. But the result for the inductance is totally wrong, around 2200uH! Then, when I tried to measure the Flux Linkage, the motor just jiggles a lot and draw a lot of current.

Can it be a hardware problem or firmware problem?

Thanks a lot

Schematic_Ebike_controller_16S_60A_2023-02-05.pdf

PCB_Ebike_controller_16S_60A_2023-02-05.pdf

Ebike_3D.PNGEbike_3D_bot.PNG

vadicus
Offline
Last seen: 1 hour 6 min ago
VESC Free
Joined: 2018-08-17 07:26
Posts: 427

I would start with setting the controller in DC mode and run a small amount of current like 10A via the A and C and measure the actual current on the phases. Then see if it corresponds to the what you are sending via the vesc tool. That would test that you current measurements are set correctly.

 

 

NextGen FOC High voltage 144v/34s, 30kw (https://vesc-project.com/node/1477)

Tim_M
Offline
Last seen: 8 months 3 weeks ago
Joined: 2022-03-21 12:44
Posts: 2

Hello Vadicus, thanks a lot for your help.

For the test, I used a 10S battery, the voltage was around 40V.

I set the controller in DC mode and run at 10% duty cycle without plugging anything first. The voltage measured between phase A and phase C is 10% the supply voltage so it seems correct I think.
Then, I connected a power resistor 2.2 Ohm (2.4Ohm measured between the two terminals), run the same 10% duty cycle test. I measured a current of around +1.6A with my multimeter.

For the second test, I run the current control with only 1A setting and the duty cycle just goes to 100%, I measured around 14~15A with the multimeter but in the Realtime Data plot, the current appears as negativ. I think the current was limited because of the voltage drop in the resistance, it's close to 40V/2.4Ohm and the battery voltage must have dropped a little because of the load.

So it looks like the current feedback is reverse so the current controller can't work correctly. I don't really know where it comes from because I checked again the schematic and the datasheet of the current sense amplifier and the connections don't seem reversed.

 

Thank you for your help

VESC_Tool_Test.png

Edit : I solved the problem by adding "#define INVERTED_SHUNT_POLARITY" in the hw_xxxx.h file.
Now, I will play with the PID and others parameters to get a smooth running.

Thanks a lot again.

vadicus
Offline
Last seen: 1 hour 6 min ago
VESC Free
Joined: 2018-08-17 07:26
Posts: 427

Yep, inverted shunts is a common pitfall to look out for with new designs. I have them inverted on my controller as well.

 

 

NextGen FOC High voltage 144v/34s, 30kw (https://vesc-project.com/node/1477)