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

shaman

1 kW
Joined
Dec 10, 2018
Messages
343
Location
Fort Worth, TX, USA
View attachment 1
Back.png



UPDATED SUMMARY
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.

Capabilities
35A continuous and 70A peak with good heat sinking. These are real values. Not marketing numbers

  • Up to 50.4V(12s) safe operating voltage. For 20s version take a look at these FOCers.

  • Compatible with the VESC Tool for configuration

  • Open source enclosure design to come

  • “Living” LCSC BOM to come. BOM document to be continuously updated with compatible and stocked components from LCSC

Advantages over VESC 6
  • Significantly lower build and BOM cost

  • TO-220 FETs allow for big heat sink attachment for better thermal performance

  • 2-layer PCB that enables low-cost manufacturing from JLCPCB

  • Designed with JLCPCB’s SMT assembly service in mind

  • Added optional ON/OFF connector to turn off control circuitry when controller is not in use

  • CAN connector changed to 2-pin to avoid improper connections that can cause damage

  • ESD protected I/O

  • Hardware open sourced

  • Designed with direct meme integration

Advantages over Cheap FOCer 1
  • VESC 6 based instead of VESC 4.12

  • Significantly improved layout to reduce current loops and facilitate low-noise operation of both the power stage and control circuitry for more stable operation

  • Has IMU for balancing applications

  • Lower profile

  • Handles lower inductance motors much better

  • All components on the top side except MOSFETs

  • Addition of JST connectors to replace pin headers for Servo, CAN, COMM, ect.

  • Addition of header for unused GPIO pins

  • Micro USB

Disadvantages (that I know of)
  • Larger than original VESC 6. Cheap FOCer 2 is about 60mm x 100mm x 14mm without enclosure/heat sink

  • Uses custom firmware that’s not currently supported in the VESC project. Will make firmware available on GitHub until Cheap FOCer 2 is added to and supported by the official VESC project.

All this wouldn’t be possible without Benjamin Vedder’s hard work to build on. Please consider supporting him for his efforts through the link below.

https://vesc-project.com/donations

Funding for essential materials has been achieved but I’m not stopping anyone from helping out. Anything you toss my way helps with unexpected costs and/or helps get this project to completion

https://www.paypal.me/shamansystems?locale.x=en_US
 
Funding acquired. Will be ordering materials for test units today or tomorrow
 
You've come a long way since the Cheap FOCer 1! Great work!

Do you have an expected BOM cost for the CF2?

guancio said:
May I ask why 12s? Will it work with 13s without regen?

The DRV used for the VESC6 and by extension the CF2 is good to 60V. 10V of buffer at 12S is already giving the DRV a small 16% safety factor, pushing to 13S gives basically no room for switching overshoot, which happens on even the best designs. A max of 10 or 11s is safer, but unrealistic to expect anyone to hold to on a 60V absolute max system.
 
BOM, PCBs, and hardware are looking to be about $250 for a batch of 15. You'll really get the most bang for your buck making these in batches. The minimum you can make with JLCPCB is 5 along with their SMT assembly service.

Thanks for the donation btw!
 
@guancio 12S is the safe number as previously mentioned. Some people have pushed VESC controllers to 13S with success but your margin of error is pretty much nothing. You would have to have conservative current limits and regen brake strength to try and not blow something.

On a related note, I have tweaked the firmware to have the DRV8301 use a lower gate drive strength. The default strength is overkill and would contribute to voltage spikes/ringing. Lowering it like I did helps prevent spikes/ringing.
 
Congratulations!!

I think it is really important to have a version specific for ehikes.

I bought and I can buy more VESC boards from China at about 45 Euros (shopping and taxes included). Once the Chinese adopted the VESC hardware and started to sell it, we got a very good opportunity to have accessible hardware, which is very important -- so I think is hard to justify your hardware compared to original VESC costing 45 Euros.

Another thing is the voltage limitation. I and being developing OpenSource firmware for the popular and cheap Chinese motor controllers and displays and they are popular for up to 14S!! Being 13S the most popular.

Seems almost no one is doing VESC based hardware capable of doing higher voltages like 13 or 14S.
 
casainho said:
Seems almost no one is doing VESC based hardware capable of doing higher voltages like 13 or 14S.

I am. Check out my other thread. Controllers designed for up to 20s operation. Beta units being built.

https://endless-sphere.com/forums/viewtopic.php?f=30&t=99152&start=150
 
casainho said:
so I think is hard to justify your hardware compared to original VESC costing 45 Euros

Why again? I missed it. Also what original VESC 6 can be found for 45 euros?
 
shaman said:
casainho said:
so I think is hard to justify your hardware compared to original VESC costing 45 Euros

Why again? I missed it. Also what original VESC 6 can be found for 45 euros?

It is the smaller VESC hardware based on 4.12 that I bought and that I think is good enough for ebike application.

So, can anyone provide better value than this ones: price VS functionality of based VESC OpenSource firmware and hardware??

Screenshot-from-2019-12-02-10-12-34.png


You can buy on their online shop (https://flipsky.net/) or on ebay, aliexpress, etc:

Screenshot-from-2019-12-02-10-15-33.png


And sure they also sell the VESC based on 6, but is more expensive as expected:

Screenshot-from-2019-12-02-10-19-39.png
 
@casainho I see. Yes the VESC 4.12 based hw can be found cheap. But to actually assign a cost to creating my CFOC2 hardware...how about $250USD for a batch of 15? No VESC 6 out there is $17USD a pop.

The value here is that one can make their own. Plus my design provides access to the unused GPIO pins of the MCU for further development opportunity. I agree that more work needs to be done on the VESC firmware to be more ebike friendly, but the VESC code is easy enough to modify. I simply don't have the time to do so...yet.
 
shaman said:
@casainho I see. Yes the VESC 4.12 based hw can be found cheap. But to actually assign a cost to creating my CFOC2 hardware...how about $250USD for a batch of 15? No VESC 6 out there is $17USD a pop.
They sell VESC 6 for $99 USD, assembled, tested, with all the metal e cables. I think is simple impossible in DIY mode, out of China.

What I mean is that is very hard for a hardware project adoption, unless boards are provided assembled and tested, at a good price. Chinese are unbeatable on that. We are luck to have access all the technology around us at the Chinese prices, like every product of Apple and so on are assembled there.
For ebikes, they sell motors controllers of $20 USD, at unit, for final user. This motor controllers, other than the board, also has big piece of metal and cables, all for $20.
I think we are luck if they adopt more OpenSource hardware and provide us for this very cheap prices.
 
Of course I won't be able to out China China. But i bet you that those $20 motor controller don't have near the performance of mine. Who knows...maybe some Chinese manufacturer will adopt the CFOC2 design and crank them out extra cheap like for the original VESCs. The CFOC2 could be cranked out really cheap in volume if someone tried.

Until then, those interested in a DIY approach have this as it is now...or at least will be once I release the design files after testing. One can enjoy the flexibility of design and make modifications as seen fit.
 
shaman said:
Of course I won't be able to out China China.

You can totally out China, China. Just take someones money, send them a defective product, or the wrong product, or even better an incorrect defective product! Then when they ask for a refund, tell them sorry, but you'll provide them credit on their next purchase.
Change the name of your business, but keep selling the same crappy product, maybe slightly alter it.

Remember, the key is to forget about quality and focus on selling mass quantity of possibly functional stuff.
 
@zombiess seems like I'd be a lousy at that kind of business with my focus on good quality to cost ratio, advertising real numbers, and being transparent. Guess I'll have to pack it in and just be honest...or something.
 
how do you access the TO-220 screws once they are soldered to the PCB? i don't see any holes in the PCB for that

or will it not be possible to remove the FETs from the heat sink once assembled?

zombiess said:
shaman said:
Of course I won't be able to out China China.

You can totally out China, China. Just take someones money, send them a defective product, or the wrong product, or even better an incorrect defective product! Then when they ask for a refund, tell them sorry, but you'll provide them credit on their next purchase.
Change the name of your business, but keep selling the same crappy product, maybe slightly alter it.

Remember, the key is to forget about quality and focus on selling mass quantity of possibly functional stuff.

LOL
 
@nieles the mounting scheme doesn't actually use the holes in the TO-220 tabs. The 4 holes in the PCB around the FETs allow for screws and standoffs to compress them to the heatsink. I'll be showing a picture of this sometime this week.
 
image (1).jpg

Good news is that everything has come in!

Bad news is that I have leave on a business trip for 1.5 weeks starting next Monday and I won’t be able put these bad boys together until I’m back…

In the mean time, check out what JLCPCB’s SMT service can do by itself. They were able to knock out a good deal of the soldering leaving me with just a few of the larger SMT components and then of course all the through-hole stuff. Not bad in my opinion.
 
Good luck on your business trip! I would assemble and test some for you if that meant getting to beta testing faster, but I will settle for drooling over the images of mostly assembled CF2s!

What wattage and size are the 1mOhm current sense resistors?
 
They're 2W 2512 0.001ohm resistors. 2 of them in parallel give you 4W which should more than enough to accommodate the max current for this controller. This is a cheap approach to getting a large enough sense resistor at the sacrifice of a bit of accuracy.
 
image (1).png
50A motor phase current at 50V

50A.JPG
50A FOC current waveforms

Finally got around to testing under load properly. I now have a neat test rig. Two motors mounted and coupled at the shaft(giggity). Each motor has it’s own controller. One motor provides braking torque(load). The other is run like in normal operation. Behold the the test data!

So I do have an embarrassing story. For the life of me I couldn’t figure out why the controller behaved badly right at 40A. I attacked this issue for weeks. I thought it was the Op Amp I was using as the 3rd phase current sensor. This issue had me nearly crying in the corner before I realized the damn DRV8301 OC mode setting was the culprit. Disabled that and then bam…50A FOC at 50V!

So 50V (12s) is operating the controller pretty close to its absolute max of 60V. Running 42V(10s) is the safer but there are many that operate the VESC 6 at 12s.
 
I want to finally mount the heatsink and gauge it's thermal performance with the intended heatsink both in still air and with a 5V 50mm fan that fits perfectly to the heatsink. I also want to get scope shots of the switching waveforms to see rise/fall times and the severity of the spikes. I still have room to tune the gate drive resistance/capacitance if I see bad spikes or oscillations. Being that it did 50A @ 50V without blowing anything up I suspect it won't be too bad.
 
turn off.jpg
Rising edge (turn off) waveform FOC 50A at 50V

turn on.jpg
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. Yes I'm using good measurement techniques with a calibrated probe and using the little spring thingy for low-inductance measurement.

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.
 
Back
Top