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

Slowing down the switching won't hurt much if you don't use very high switching freq like 25+kHz. High end VESCs often switch at 25 or 30khz because the observer works better with more sampling per second, but you can halve that by sampling on both V4 and V7.

Its important to take a look at the gates voltages to make sure miller capacitance is not turning ON your mosfet due to high dV/dt.
With high power stuff its not a problem because gate driver OFF is like -8V, you are far away from a turn on (Vth=3V for example).
But cheap gate drivers turn OFF with 0V, and with an Rg!=0 so they kind of suck holding the gate OFF. Small fets can turn on at only 2.5V so its worth taking a look. If it fully turns ON you get a shoot through!

The 50A waveform looks great!
 
Thanks @marcos!

Yeah these little TO-220 FETs can turn on at a minimum of 2V. I'll check out the gate voltage waveform to see whats going on and I'll post that. I figure I can increase the gate drive resistors a bit and also add a small capacitor from gate to source if need to be if the gate drive signal is noisy.
 
Very nice waveforms, indeed!
The overshoot (spike) at turn-off is absolutely normal, because the current changes from 50A to 0 during that time and the overshoot voltage above the DCbus is L*di/dt. L is the output loop inductance that is an inherent attribute of the circuit.
In fact the area under the overshoot (between the 2 dashed lines) is the flux in that inductance (=L*I), that is always the same for the same current. If you reduce the overshoot by half then its duration would normally be twice as long, so it's a trade-off.

Which FETs are you using on this board?
 
During double pulse test you want to look at the gate that is kept always off. Here you can see how the gate turn on looks like.

Also, when you make RgOFF larger (slower turn off, less overshoot) you are making miller turn on worse because driver loses strength to keep the gate at 0V, so its not a single knob tuning.
 
peters said:
Which FETs are you using on this board?

I'm using the CSD18536KCS. I looked at the wrong datasheet earlier. The minimum turn on threshold is 1.8V
http://www.ti.com/product/CSD18536KCS

I also want to test with the NCEP60T20. It's a cheap FET that seems like it could work decent enough
https://lcsc.com/product-detail/MOSFET_Wuxi-NCE-Power-Semiconductor-NCEP60T20_C284868.html

@marcos
I'll be looking at the consequences of everything I try. I figure increasing the rise time to anything under 200ns would be ok. I'll keep an eye on the gate voltage waveform.
 
shaman said:
peters said:
Which FETs are you using on this board?

I'm using the CSD18536KCS. I looked at the wrong datasheet earlier. The minimum turn on threshold is 1.8V
http://www.ti.com/product/CSD18536KCS

I also want to test with the NCEP60T20. It's a cheap FET that seems like it could work decent enough
https://lcsc.com/product-detail/MOSFET_Wuxi-NCE-Power-Semiconductor-NCEP60T20_C284868.html

I'll be interested to see what your results are. Based on my math, both FETs should be able to handle close to (or even over) 100A phase with good heatsinking, assuming you don't spike over 60V of course. Here's hoping you might achieve something close to that.
 
SRFirefox said:
I'll be interested to see what your results are. Based on my math, both FETs should be able to handle close to (or even over) 100A phase with good heatsinking, assuming you don't spike over 60V of course. Here's hoping you might achieve something close to that.

In one of my own thermal tests I found the max limit in near optimal conditions is about 40W of waste heat from a TO-220 package. That's a TO-220 with NO INSULATOR, a super thin layer of thermal paste on a copper heat sink from an old Xeon processor with a high flow fan. This was for steady state operation where the case temp did not exceed 80C in a 26C environment.

With an insulator it's more like 25W of waste heat the package can withstand before thermal runaway.

Your mileage may vary.
 
zombiess said:
In one of my own thermal tests I found the max limit in near optimal conditions is about 40W of waste heat from a TO-220 package. [..]
With an insulator it's more like 25W of waste heat the package can withstand before thermal runaway.

Do you have dissipation numbers for the TO-264 package? I wonder how easy they'd be to add to this form factor.
 
CFOC2 side.jpg
FOCer sammich. Shows the way I mounted the FOCer to the heatsink. M3 screws, 4.5mm 3D printed spacers, and 0.5mm silicone thermal pad.

CFOC2 5V.jpg
Auxiliary 5V for fan goodness. Yes the connectors on the PCB are burnt/melted (don’t ask). You can also see the springy thing I made and soldered to the PCB for low-inductance measurements of the switching waveforms I posted earlier.

CFOC2 fan.jpg
50mm 5V fan and aluminum heatsink from AliExpress. Fan mounts with M3 screws with screws self-threading between heatsink fins just right.

Ok so now I finally mounted a heatsink to this thing and collected some thermal data. It was a crude test and my test setup is ery limited but the numbers seem decent

20A FOC with fan
Start 20C. Leveled off at 28C

20A FOC without fan
Start 25C. Increased to and leveled off at 38C in 10 minutes. Stopped cause I got bored

50A FOC without fan
25C to 50C 2 minutes. Stopped cause motor was getting hot

50A FOC with fan
25 to 49C in 3 minutes. Creeping at 0.1C per 5s. stopped cause motor got hot

Ambient temp was about 20C. This isn’t great data but its something for now. I’d say the heatsink and fan do a decent job.
 
Very cool. Those numbers look pretty darn good too. You could dunk your motor in a tub of water to keep the heat down for the 50A test. 25 to 50C in 3 minutes with some good airflow is some pretty good numbers for general bike usage.
 
SRFirefox said:
You could dunk your motor in a tub of water to keep the heat down for the 50A test.

I don't know man. How do I know everything is waterproof up in that motor?
 
I think I'm going to bypass potential issues with water and submerge in mineral oil instead. I have a different thread where I'm discussing that in more detail.
 
Distilled water is orders of magnitude less conductive than tap water. If a powerful fan doesnt cut it, or if the dyno doesnt fit in a fridge I would give pure water a try. Mineral oil isn't as great moving heat away, and its messy.

Maybe rub a bit the motor with alcohol to make it extra clean so it doesnt contamine the water. If you are adding ice it should be from pure water as well.
Or just use tap water and rely on the protection mechanisms of the controller.

Either case, watch out for cavitation at high rpm, the bubbles collapsing can do some damage over long times, and air pockets aren't good moving heat away.
 
@marcos thanks for the tips here. My fear is of the water becoming contaminated over time in a garage environment and becoming more conductive. I’ve thought about having the motors in a metal tub submerged in mineral oil. Then having that tub placed in a larger tub that is filled with ice water for enhanced cooling. Maybe my fears with water contamination isn’t justified but I can’t help but think that will eventually have problems
 
Somewhere in Vedder's testing videos he has pictures of a turnigy outrunner testing underwater. Distilled and deionized water is inexpensive from the grocery store, so it wouldn't be difficult to swap out water. And as Marcos pointed out, it's not terribly conductive anyway. Best way to remove the water from the motor would be to keep running it after unsubmerging it and letting the heat bake the water out. I do this with medium voltages and power resistors when I don't feel like buying more resistors or it's expensive to actually get the appropriate dissipation for the test load.
 
CFOC2 betas.jpg
Beta batch in progress

CFOC2 betas 2.jpg
2 beta units. One with phase cables soldered in from the underside

Working on it.
 
Cheap FOCer 2 order.JPG

Still working on the beta units but I've also ordered a prototype of the latest revision. The latest revision has an IMU, minor improvements to the gate drive, optional pullup/pulldown resistors on the ADC channels, and a wider PCB now at 60mm. The wider PCB fits the intended heat sink nicely with the mounting holes now aligning in between the fins. This way drilling is easier and the screws will fit nicely in between the fins.
 
Beta unit batch.jpeg

Almost done with the beta units.

Also the newest rev should be in today. It should functionally the same plus the IMU capability.
 
cheap focer 2 new rev .jpeg

New rev arrived. Will assemble this and put a scope to it like the other. I made some small gate drive improvements so I want to see if that made a difference. I also want to optimize dead time. Dead time can be set with hardware or firmware. My controller switches a bit slower (on/off rise/fall times) than the original VESC 6 so I figure a bit more dead time is needed.
 
GitHub repo created and under review. It's private for now until after the review is done. This most recent rev has been working fine in my ebike with 70A motor current. Still making some firmware tweaks before release.
 
https://github.com/shamansystems/Cheap-FOCer-2

I’m happy to finally announce the v0.9 release of the Cheap FOCer 2! Special thanks to @bj97301, @NuRxG, and @Davewesh at the esk8 builders forum for formatting the repo into something truly outstanding, much better organized, and readable by humans.

Remember that this is still being beta tested (although successful so far). Myself and the other contributors to this project will be making tweaks as we go and as we receive feedback from the community. I hope this community enjoys having this open source hardware available to build, use, sell, modify, and improve.
 
so excited!!
amazing work, thank you shaman!!!
I already ordered 5 assembled PCBs, but the mosfets are already out of stock at lcsc, hahah damn. have 10 of them already lying around here but that will be only one controller... hope lcsc restocks soon!!

edit: now I just ordered the alternative mosfets, as already well-knowing recommended on your github. awesome documentation!
 
:bigthumb: absolutely support your endeavors; really hoping that our students might be capable of building to your designs in due course. Thank you for your enthusiasm!!
 
Back
Top