Mini FOC based on VESC6

No need to remove allđŸ˜„
Keep some. Then connect an external electrolytic capacitor.

Finding the shorted caps is impossible without removing them all.
Since they’re the same cap I’m replacing them all cause if one fails, others might as well.

I’m replacing them with 4.7uF 100V X5R ceramics. They’re expensive as fuck so wont fill all pads but I’ll use 10 and one big 15uF 100V X7R 2220 ceramic. After that I’ll add the electrolyte 2200uF on the powerleads. Its the best I can do atm.

9 Likes

It’s crazy how much cheaper they are in China.

2 Likes

I see you’re a gambling man

11 Likes

Yeah, Im sure there are decent caps at a good price somewhere on ali, but it is indeed abit of a gamble.

The ones im about to use are taiyo yuden (which is japanese I think?). High values, high voltage in around 0805 package tend to cost alot on most reliable suppliers Ive looked at so far

2 Likes

Some progress pics for anyone intrested.

Cap at low voltage (without electrolyte)

Alive and well at 50V

20 Likes

This looks great! I’ve been looking for small VESC6 variants – does anyone know what the safe eRPM limit is for the super mini? (or @YUTW123 can you please confirm?) VESC4.xx I know is 60K and I’ve seen 150K mentioned in the VESC6 limit in the documentation but nothing really definitive.

Thank you!

1 Like

Hey Jeff-

I bumped your account so you can post and message freely.

Welcome!

While an actual hard limit hasn’t been shown (unless @Trampa has done testing) I think its accepted to stay below 100k erpm. I’m sure you’ll find it hard to reach this limit

1 Like

Did you up the voltage rating on those caps yet? :grimacing:

1 Like

No. 1 thing keeping me (and probably others) away from these is needing to source and solder on proper capacitors. I just want something that works right from the start.

3 Likes

In thier defence, I did not change the caps on the unit that didn’t die on the bench, just added one electrolyte.
Thinking I run them side by side and see if they hold up.

Been busy with other shit tho so they havn’t been abused properly yet. Planning on running em on 11S, cause I’m a hipster

7 Likes

I am trying to work out what value of cap to add to the Mini FOC and I have read all of the posts in this thread relating to adding electrolytics to the input leads but there are a lot of suggestions for different values that seem to vary quite wildly.

@linsus says “63V 500uF+ should suffice”
@Fatglottis says the designer of the ESC says “for peace of mind” add “680uF extra”
@YUTW123 says “A very small electrolytic capacitor will do. Although it is 33uf”
@linsus the says that he fitted a 2200uF and it still failed.

I have looked for 100v 2200uF electrolytics and the ones I have been able to find are huge (25x50mm) and much larger than the cap that @linsus has attached to the power leads. Was this a 63V used instead of 100V?

What would be a good value to go for please to add reliability but not excessive size?

Additionally is 13S usage regarded as possible if regen braking is not used? e.g. ebike applications?

Many thanks,
Oli.

you can calculate a more accurate value by meassuering the transient voltage delta and putting it into a nifty calculation.

Think I ended up with around 800uF when I did that many years ago.

63V rating is fine, 100V is better; https://www.mouser.se/Search/Refine?Keyword=100V+680uF

Dont run at 13S, unless you trying real hard for the darwin award.

3 Likes

Hi,

Thank you for the recommendation!!

I presume that if I try and measure the transient spike when I plug it in and the capacitance is too low and the spike goes >60v then by the time I have the measurement the ESC may well be toast! :joy:

I will start with 800uf and see how I go!

So no 13S even on a bike not using regen braking. That’s a shame.

Many thanks,
Oli.

Hello! I have one of the FOC Mini’s and am having some difficulty with it.

The motor is a relatively large e-bike motor (48V/1800W rated, 4400RPM, powered by a 1500W 48V PSU rather than a battery). I cannot get BLDC detection to work at all, and FOC detection seems to be all over the place. I have done a 4-wire resistance measurement on the motor, and the actual resistance of each phase is ~21mOhm. FOC detection will occasionally measure 16mOhm, 0uH and 10-20mWb. Other times it will measure 100-300mOhm, 50-80uH and 3-10mWb. I do not know what to make of this. The motor will only run when I manually enter ~16mOhm, with even 21mOhm being too much for it to run at all. Inductance and flux linkage values seem to matter a lot less. I’ve manually put in a FOC Kp=0.075 and Ki=0 which at least runs. Also, I am running sensorless since using the Hall sensors on the motor seems to make it run with extra vibration.

My desire is to run this with a 10kOhm potentiometer with the 3.3V line across it and the wiper going to ADC1, which will then be used in PID Speed mode. This does work, but not reliably. Sometimes the motor will not start as the potentiometer is turned, other times the motor will slow but not stop when the potentiometer is turned down to zero. Occasionally the motor will be locked and making cogging noises, or start to run backwards as well. All electrical connections are good and secure, so I am confident it is not related to that.

Is the ADC1 input just a straight trace to the MCU’s ADC input? If so, do you recommend that I build a small active filter/buffer to low-pass filter the analog signal and provide a controlled, low-impedance signal to the ADC input? I see a lot of noise on the 3.3V and 5V outputs, which (not surprisingly) is for the most part spikes occurring at 20kHz since that is the FOC switching frequency.

I have added 2 x 1000uF 63V capacitors onto the unit, with the leads soldered directly to the same pads on the board as the power wires. The wires between the Mini FOC and PSU are ~7cm long. From the Mini FOC to the motor, the wires are ~40cm.

Any help will be appreciated. The Mini FOC is a nice, compact device and I am really hoping that I can get it to work as desired! Just in case it helps, my application is actually a variable speed conversion for an old drill press, so I am mainly looking to get consistent RPM vs potentiometer position, and reliable starts when I want to turn the motor on and off (AC power to the PSU is constant, and I have a small switch that applies/cuts 3.3V to the potentiometer so that when it is “off” the ADC1 line just gets pulled to ground). That reminds me
when I cut the connection to 3.3V and if the potentiometer is set to a high value (>4kOhm), the motor will start spinning. It seems like there is some voltage build-up on the ADC1 line when impedance to ground is high. Again, maybe I need to have an active filter on there?

If ADCx inputs are not likely to be reliable, I can see about coding an Arduino sketch that can just send commands to the UART input, but I am hoping to keep the controls as simple as possible since this is just a drill press!

Thanks!

1 Like

I have run the mini foc+ with larger hub hub motor. No issue.

What Firmware are you using?

Only 5.1 seems to measure my large hub motors reliable. Earlier firmware gave me values all over the place like you describe and I could not run with those.

I updated it to 5.1 before trying to run it, so I am on a recent FW.

One other thing I have noticed
when using the Hall sensors, I can’t get the motor to start on its own. I need to start it “by hand”. In sensorless, it will usually start (sometimes it cogs and I have to try a few times, or rotate it a little by hand to get the phases aligned differently).

I don’t get the large phase resistance you have.
Could it be a FET that is not properly soldered?

I once had a bad current amplifier on a mini, could also be a cause for inacuracy. The current measurement in vesctool jumped up and down when i pressed on the IC. Swapped it and problem went away.

With any of the above I doubt the motor would run at all.

Regarding the hall sensors, I had hell to get a somewhat smooth transition from sensored to sensorless with my motor.
No start up issue though.
The Hallsensor detection run ok?