You are here

FOC braking problem (FAULT_CODE_DRV)

30 posts / 0 new
Last post
iscle
Offline
Last seen: 4 years 10 months ago
Joined: 2018-05-02 17:32
Posts: 18
FOC braking problem (FAULT_CODE_DRV)

Hi there,
today I tried my first VESC build, and I´m starting to get the hang of it except a problem I have when braking.
I´ve tried everything to solve it, but nothing has worked. The VESC is a MAYTECH VESC v4.12, and it throws an error when braking.

The error is the following:

The following faults were registered since start:

Fault            : FAULT_CODE_DRV
Current          : 0.8
Current filtered : -32.3
Voltage          : 39.36
Duty             : 0.000
RPM              : 5603.9
Tacho            : 151545
Cycles running   : 6018
TIM duty         : 0
TIM val samp     : 2
TIM current samp : 4200
TIM top          : 8400
Comm step        : 0
Temperature      : 36.05
 
Fault            : FAULT_CODE_DRV
Current          : -12.4
Current filtered : -25.2
Voltage          : 39.34
Duty             : 0.000
RPM              : 4953.0
Tacho            : 152086
Cycles running   : 2857

To be more precise, what happens is that it cuts out and then starts braking again, and it usually only happens when braking close to 100%…

If needed I can post all my VESC parameters, I’m also using HUB motors and FOC mode in a 10s setup. I’m also using Current control.

Has anyone else faced this problem? And if so, how did you fix it?

Also, I should say that it's a dual motor setup.

Thanks,
Iscle.

josh
josh's picture
Offline
Last seen: 2 years 3 months ago
VESC Original
Joined: 2017-05-24 12:15
Posts: 92

It might be a voltage spike on the DRV. There is a capacitor you can double up on to help with it. See here: http://vedder.se/forums/viewtopic.php?f=5&t=68  Additionally, you could look at reducing your braking current (battery and or motor regen current) by about 20%. If this keeps happening, you'll probably kill the DRV chip.

Cheers!

iscle
Offline
Last seen: 4 years 10 months ago
Joined: 2018-05-02 17:32
Posts: 18

Hi Josh,

 

Thanks for your answer.  I've reduced my battery regen to 4A now, because my battery specs say that it supports only 8A charging, so in a dual motor setup that's the right value. However, the issue still exists. 

 

I had seen the capacitor mod, but theoretically it's already applied in v4.12 of the VESC right? I took a look at it and there is another capacitor in parallel with C18... Maybe it's the wrong value so I will try adding more capacitance.

 

I will report back the results when I try adding another capacitor... 

 

Thanks!

TechAUmNu
Offline
Last seen: 2 days 58 min ago
VESC Free
Joined: 2017-09-22 01:27
Posts: 575

You can never have too much capacitance. :D

josh
josh's picture
Offline
Last seen: 2 years 3 months ago
VESC Original
Joined: 2017-05-24 12:15
Posts: 92

Try that and see if it helps. What is your motor regen current set to?

 

iscle
Offline
Last seen: 4 years 10 months ago
Joined: 2018-05-02 17:32
Posts: 18

My max motor regen is at 60A now, the stock value...

The motor maximum amperage by the manufacturer is 22A, however I don't think short spikes of 60A regen are going to do any harm... Also, I've ridden it today for 30 min and brakes were quite good until you pulled the trigger too hard and the error occurred again... 

A friend of mine has the same motors on a Meepo Board and that thing breaks wonderfully, so I think they are pushing the motors hard too...

Should I lower the motor regen amperage?

 

Thanks and have a good day!

TechAUmNu
Offline
Last seen: 2 days 58 min ago
VESC Free
Joined: 2017-09-22 01:27
Posts: 575

That sounds too high, it will probably try to brake that much and with the limit on the regen to the battery so low, the voltage will go up quickly and go over voltage. Try setting the brake current to the same or half the motor current.

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

TechAUmNu: It will only brake enough to reach either the motor or the battery current limit. It isn't like it's done in two steps: first regeneration from the motor and then "conversion" to the battery. The flow of energy from the motor to the battery is a one-step process, so to speak.

But a problem with that high a motor current might be stator saturation, which can make the observer lose track of the rotor. So I think a good idea might be to limit the motor regen current to the specced value (22 A).

iscle
Offline
Last seen: 4 years 10 months ago
Joined: 2018-05-02 17:32
Posts: 18

It´s a sensored setup, with hall sensors, so it shouldn´t loose track...

Anyway, I will try to lower the current to 22A if the capacitor mod doesn´t work!

 

Thanks for all the help!

Roger Wolff
Offline
Last seen: 1 year 9 months ago
VESC Original
Joined: 2017-05-24 12:27
Posts: 202

The sensors give an approximate rotor position. This helps getting started at 0 RPM, but the feedback from the motor is more accurate once you have some speed. So the VESC will switch to using the rotor feedback instead of the sensors above a certain RPM... 

TechAUmNu
Offline
Last seen: 2 days 58 min ago
VESC Free
Joined: 2017-09-22 01:27
Posts: 575

If you have high inductance to the battery the voltage would spike when you start regen. 

josh
josh's picture
Offline
Last seen: 2 years 3 months ago
VESC Original
Joined: 2017-05-24 12:15
Posts: 92

Yeah if your motor is rated for 22A max, I would not push it much past 30A. Look at getting a larger motor if you need more power. Like arvidb said, stator saturation may be contributing to the issue. Does the fault occur at high or low speeds?

iscle
Offline
Last seen: 4 years 10 months ago
Joined: 2018-05-02 17:32
Posts: 18

I've lowered the regen to 22A and the issue still happens, both at high and low speeds... Battery cables are a running from one side to the other of the board, but I don't think they are too long... I will try adding a capacitor in parallel with c18 today or tomorrow.

 

BTW, if both VESC are connected via CAN, if one VESC has a fault, does the other stop working too? I haven't tried using only 1 VESC! 

iscle
Offline
Last seen: 4 years 10 months ago
Joined: 2018-05-02 17:32
Posts: 18

UPDATE: I'm now using the latest version of ACKMANIAC's firmware, this time it works fine. Breaks have improved a little bit (maybe it's just a sensation more than a thing), and I have to say that hand brake now works like it should, it holds the wheel pulling the amps you tell it to.

Sealight333
Offline
Last seen: 2 years 9 months ago
Joined: 2018-05-06 12:43
Posts: 8

Iscle: I faced with the same problem could you please share with me the ACKMANIAC's firmware link what is helped for you?

 

iscle
Offline
Last seen: 4 years 10 months ago
Joined: 2018-05-02 17:32
Posts: 18

I did it with ACKMANIAC's' 3.102 Tool and the firmware that comes with it. Hope it helps! But the issue is still not completely solved.

 

What motors and vesc vendor do you have?

Sealight333
Offline
Last seen: 2 years 9 months ago
Joined: 2018-05-06 12:43
Posts: 8

VESC:

Maytech MTVESC50A

http://www.maytech.cn/en/mtvesc50a/10331.html

 

Motor1:

http://www.maytech.cn/en/mto6355-250-ha/10337.html

 

Motor 2:

https://hobbyking.com/en_us/turnigy-aerodrive-sk3-6364-190kv-brushless-o...

 

With both motor I have the same behaviour with correct setup.

I try to use Current mode, and Current no reverse with brake and both setup the FOC break cause DRV error messages.

 

What motor are you using?

iscle
Offline
Last seen: 4 years 10 months ago
Joined: 2018-05-02 17:32
Posts: 18

I'm using GF055 motors, the same that are on the Meepo Board.

What do you use to control the VESC? UART, PPM,...?

Sealight333
Offline
Last seen: 2 years 9 months ago
Joined: 2018-05-06 12:43
Posts: 8

I am using PPM in a skateboard and ADC on electric scooter same behaviour.

iscle
Offline
Last seen: 4 years 10 months ago
Joined: 2018-05-02 17:32
Posts: 18

I'm driving it via UART and I had a suspicion that it might have been my library that wasn't well implemented, but seeing that you have the same fault on other modes then I will discard that.

 

What about your wiring, are your wires thick and short, long, etc? Mine are quite long, about 1 meter, a bit less maybe. Let's try to see if we have something in common in our setup that might be causing the issue! Right now we both have Maytech VESCs... I'm starting to think that we have a bad batch or something...

iscle
Offline
Last seen: 4 years 10 months ago
Joined: 2018-05-02 17:32
Posts: 18

Okay, I've added a 10uF capacitor in parallel to C18 and the issue is gone. In total I have arround 13uF capacitance now.

josh
josh's picture
Offline
Last seen: 2 years 3 months ago
VESC Original
Joined: 2017-05-24 12:15
Posts: 92

Awesome! I would probably stay with the original VESC firmware if you can. There could be unforeseen issues with other unofficial releases. Glad to hear the capacitor fix worked!

Cheers!

iscle
Offline
Last seen: 4 years 10 months ago
Joined: 2018-05-02 17:32
Posts: 18

It happened with the original firmware too! Right now i'm in ack's firmware and it works perfectly!

Sealight333
Offline
Last seen: 2 years 9 months ago
Joined: 2018-05-06 12:43
Posts: 8

Hi Iscle,

I am very happy to hear that just an additional capacitor solve this issue! :)

I tried the Ackmaniac software, but for me doesn't help at all.

I will try it soon the capacitor and I also feedback on the results.

 

Sealight333
Offline
Last seen: 2 years 9 months ago
Joined: 2018-05-06 12:43
Posts: 8

Hi Iscle,

It works!!!! :) 

Many thanks for the help and sharing your findings!

I put all together around 22uF just in case... I don't want to disassembly again my electric scooter I was a pain...

 

 

iscle
Offline
Last seen: 4 years 10 months ago
Joined: 2018-05-02 17:32
Posts: 18

Cool! It seems like Maytech will need to update their BOM to higher capacity capacitors... 

 

Are you running on the stock VESC firmware?

Sealight333
Offline
Last seen: 2 years 9 months ago
Joined: 2018-05-06 12:43
Posts: 8

I tried both firmware (Original, from this webpage and ACKMANIAC's) and both are working fine with the added capacitors.

valamilamasag
Offline
Last seen: 2 years 11 months ago
Joined: 2018-03-10 20:22
Posts: 1

I had the exact same issue with Maytech clones I purchased in early 2018 and were sitting on the shelf since then.
Thanks to this thread I was able to solve it by adding 2x10uF caps in parallel to C18 and C26!
Funny that in BLDC mode even 70A braking currents are fine, but in FOC with 5A it was immediately throw a fault code, even when I was not riding the board, just rolling it on the ground and braking. Now 70A works in FOC too!

Chewy
Offline
Last seen: 2 years 10 months ago
Joined: 2021-05-26 16:34
Posts: 1

Hi guys,

Just stumbled  upon this thread as I am also having the same issue with my Maytech 50A SUPERFOC6.8 vesc where the brake stops working at full brake.

Is there anything in particular that i need to take note of when buying a 2x10uF capacitor? like the size or shape of the capacitor to be soldered to C18 and C26? 

Or do i need to the vesc existing capacitor first? Would be helpful if someone could refer me a photo on how it looks like after the capacitor fix as i am just a bit worried of messing it up.

Thanks guys

 

Zanooon97
Offline
Last seen: 11 months 1 week ago
Joined: 2023-03-03 18:00
Posts: 2

Hi, where is the capacitor to double the link is not working.

I have the flipsky 75100