Little FOCer! 84V 5kW VESC-Based Controller

It has to do with the bad placement of the NRF module and a weak signal. This was highlighted on the old thread

5 Likes

A higher switching frequency seems to make me trigger my max current fault code. Should I just up the max from 170 amps?

2 Likes

How much of a higher freq? Have you tried reducing the observer gain value like @diavolescaCZ?

1 Like

30 then 40. Tried gains from 2-5. Gains seemed to have no noticeable effect so I left it at 3.

1 Like

Try backing down to 35kHz. Was there a particular reason for going to 40kHz?

1 Like

Just trying stuffs. 30 was still throwing over current fault codes so went back to 20. Works fine now just wanted to add my results. Unless, I should be doing it differently.

2 Likes

Nope youā€™re doing fine. Just trying to extract details

2 Likes

Sorry guys, donā€™t have the habit of checking this forum - it sounds like 30kHz switching frequency is the recommended setting for the LittleFOCer? Iā€™ll have to give that a try with my Funwheel hub, letā€™s see if that is compatible with the balance app, Iā€™ve been using 20kHz so far. The MCU has limited processing power, so doing 50% more motor calculations might not leave much room for 1kHz balancingā€¦ But the BalancePro/Floatwheel guys all use 25kHz so at least I know that should be safe. Will report back!

2 Likes

Good news for balance vehicle users: 30kHz appears to perform better than 20kHz. Didnā€™t do a full ride yet, but tested the basics: low speed/ high speed and transitioning to/from sensorless with and without high load (aka hill). It all behaves nicely and slightly better than with 20kHz. Also at very low speeds the noise is more subtle (maybe cause Iā€™m old, some young riders need to weigh in here). Overall itā€™s a keeper! Thanks @shaman

6 Likes

This is really good feedback! Thanks @surfdado!

3 Likes

The kind of feedback like that from @diavolescaCZ, @bj97301, and @surfdado are great for developing some documentation on tuning. The little FOCer can be fine tuned to fit your ride so you can squeeze out every bit of capability.

4 Likes

Speaking of parameters nobody ever seems to touch: Deadtime compensation - all the Funwheel/Floatwheel guys are using 0.12us. No idea how that value came about, but the help says: ā€œCompensation for dead time distortion. Makes some difference at low speedā€.
At very low speed my hub happens to be at its worst, so anyone got suggestions for how to tune this? Is it safe to play with this value a bit?

3 Likes

Well Iā€™m glad to help. Iā€™ll try to set up data logging and a motor temp sensor this weekend. Iā€™ve got a short maybe 200m long hill with a 15% grade to go up and down. Iā€™ll see how my motor does. It doesnā€™t have that much torque.

2 Likes

The compensation parameter is simply some math that adjusts certain values to compensate for the actual deadtime delay the hardware is using. You can try increasing or decreasing it in very small increments if you want. It does affect detected values though.

3 Likes

LOL, so I had my 11yr old try out 30kHz. He finds that noise more noticeable/annoying than with 20kHz. He has the same complaint about 25kHz. His comment: ā€œmaybe Iā€™ll like it better when Iā€™m olderā€ā€¦

5 Likes

So yeah that makes sense. The switching frequency of VESC based controllers is actually an ā€œeffectiveā€ switching frequency. Really the PWM switching frequency of each MOSFET is half that. Itā€™s just done in a clever way(too long to explain here) that functionally doubles that frequency.

But this means the audible frequencies are actually around half that of the FOC switching frequency. So when set to 20kHz(default), youā€™ll hear something around 10kHz and some of itā€™s harmonics. This is a mid-range frequency and can be heard by most. However increasing the FOC frequency to 30kHz causes an audible frequency of around 15kHz, which is higher pitch and could easily be perceived as more annoying.

So all your kid has to do is listen to Metallica at full blast for 10 years and then heā€™ll be fine with it.

9 Likes

Lol, that would work - or he just integrates a BT-speaker into his Funwheel (heā€™s been asking me to do that for a while now) which would also overpower any motor noise

2 Likes


An Advanced Degree in ESC photography

I fixed it (not)

12 Likes

Is like a small village with roads and buildings :slight_smile:

6 Likes

Nice pics man!

3 Likes