Cheap FOCer 2 (Open-source, Low-cost, VESC 6 based ESC) (v0.9 Release. Beta testing ongoing)

It’s the little things that slip by

11 Likes

Good to hear you figured the issue out :ok_hand::+1:

1 Like

So this controller doesn’t have a built in IMU for balancing vehicles like the onewheel. However, there are GPIO pins routed to a header that you can plug a IMU eval board to. One like the BMI160 you can find cheap.

8 Likes

For the slow folks here - OC mode?

4 Likes

Over Current

2 Likes

This setting in the VESC Tool

2 Likes

#defineNerdTime


Rising edge (turn off) waveform FOC 50A at 50V


Falling edge (turn on) waveform FOC 50A at 50V

Ok so those that have been with me since the Cheap FOCer 1 has seen something like this before. These are the scope shots that show the turn on and turn off of the MOSFETs at each PWM pulse. The peak of the turn off waveform is the voltage spike that the controller experiences. You can see the spike is 58.8V when the battery voltage is about 50V(12s). This spike gets worse when current gets higher. This doesn’t leave much room at all to hit the 60V ceiling.

Now this isn’t bad in my opinion (only a 8V spike and very little oscillation) but there are some tricks I can do to calm that spike a bit. I’ll post some waveforms after I conduct said tricks to show the difference.

20 Likes

You plan to share those tricks with us if they work? I’m sure some are curious what the magic is.

2 Likes

Of course i will! It’s nothing too crazy. Just increasing the gate resistor value and adding a wee bit of capacitance between the gate and source of the MOSFET. Standard gate drive tuning stuff that I’ll show yall

10 Likes

This is interesting, have you ever tested it on a FOCBOX? Since a lot of people run 13S I imagine that the peak should be smaller

2 Likes

The FOCBOX and VESC proper use the SMD FETs which have low inductance characteristics. The low inductance then means potentially lower spikes assuming the layout is good. I’ve thought about doing a variant of Cheap FOCer with SMD FETs. These SMD FETs would be available straight from JLCPCB so they could be soldered by their SMT assembly service.

14 Likes

So I have been following your Cheap FOCer build and I must say very impressive work.
I am Mohammad from the Youtube channel Fungineers. I started building DIY Onewheels on the channel and I am using homemade VESC4.12s for it. I am very interested in reducing cost, and providing an inbuilt MPU on the vesc itself.
For some reason I cannot personal message you. If you have time, could you please message me to talk about this.

14 Likes

Hi Mohammad, and welcome. I bumped your account level (new users get sandboxed), so you can message and post freely. Good to have you here!

12 Likes

sick! thanks @BillGordon

1 Like

So in these experiments with the Cheap FOCer 2 I’ve noticed that newer firmware leads to inaccurate FOC motor detection. The motor inductance and resistance can read 10uH/10mOhm higher than what it should. FW3.62 is fine. FW3.66 or newer has this problem. Has anyone experienced something like this?

3 Likes

@Gamer43

1 Like

I’ve found the VESC’S R and L measurements to always be wrong regardless of firmware version. I have a VESC 6 from TRAMPA and its resistance measurement is 16miliohm when it should be 19.5 to 21miliohm.

Says inductance is 13uH when it should be 19uH. (Was even lower on previous firmware versions).

Ironically enough the flipsky 6.6 gets close with the resistance measurement but off on the inductance measurement.

I took the actual measurements using a fluke RCL meter and with a separate power stage.

5 Likes

Interesting to hear. I would’ve figured there would be more complaints about this. I do find that my case is Firmware dependent.

2 Likes

Most people dont even realize that the measurements are wrong. It spins up a motor, but as I and other have noticed, the torque generation is poor below around 40% duty cycle.

There have been firmware updates that seemingly make it more accurate, but they are still pretty far off.

4 Likes


Turn off. 50A/50V FOC. Gate Resistor @ 20ohm


Turn on. 50A/50V FOC. Gate Resistor @ 20ohm


Gate waveform. Gate Resistor @ 20ohm

So I increased the gate resistor to 20ohm from 10ohm. It causes the rise time to slow down about 30ns and only slightly decrease the spike. Not the most gains in benefit but its a little bit. Still though even taking it up to 60A/50V FOC I never see spikes above what you see here. I’d say this is good enough for an open source design.

10 Likes