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

If anyone in the US is looking for a CFOC2 I will make an exemption to my Canada only policy if you order a set of two.

3 Likes

Anyone in the states (Florida) with a CFOC ready to go? I want it preferably this week.

This may have been asked before, but I couldn’t find it: the resistors of ADC1 and ADC2 on my boards aren’t populated (R72, R73(?), R68, R40). I couldn’t find the types & values in the bom.csv. What resistors do I need? Or don’t I need them to begin with?

On one of my cheap focers the USB port is dead. The vesc tool can’t connect. I can however connect to it via canbus and program it that way, without loosing any functionality. How can i fix this? The USB was soldered on when I got the board. I am good at soldering but I can’t desolder stuff to replace it.

1 Like

The resistors for ADC1 and ADC2 are “do not populate” by default. If you wish to modify the firmware to take advantage of those ADC channels, you can populate two of the four resistors for either pull-up or pull-down. The schematic recommends 10K resistors, but I’m pretty sure that value isn’t very critical.

1 Like

you can take it off with hot air or even a soldering iron. Usually I just snip the connector in half carefully, then the leftover bits are easy to remove with a soldering iron. Just be very gentle, you don’t want to pull off the tracer from the PCB.

You could also solder on a scrap female USB cable to the broken one, it’s just 4 connections. Then plug in your normal cable into it for programming.

I have one question regarding usage Cheap FOCer 2 with power supply instead of battery. Application I am planning to use is not a scooter or any kind of transportation device. In my case, I will just use ~1kW brushless with CFOC and potentiometer to adjust speed. 36V PSU will be used. However, I would like to make emergency switch to shut down motor (or VESC). Initially I though of shortening those two pins that switch off CFOC. However, I am not really sure from electronics point of view, what happens, when suddenly VESC is swithced off, but motor is still spinning and slowing down. I will set zero regeneration current in VESC tool, but still where will that energy from the motor (regeneration) will go? Will that zero regeneration current simply cut-off motor and it will spin freely? If not, is there a chance to damage power supply due to excessive voltage increase due to regeneration? My goal is to stop the motor with a push of a button safely.

Thanks.

1 Like

When switched off, the MOSFETs will go high-impedance (open circuit) but power can still conduct through their body diodes. A little bit of power can still flow from the motor, through the controller, and back into the power source if allowed. This is why one can spin a motor while connected to an unpowered controller and the controller might turn on.

For emergency shutoff, I would build in a low-side breaker or switch between the controller’s DC negative and the power source’s negative. The switch will have to be able to handle the max expected DC amperage though.

1 Like

https://www.amazon.com/dp/B07V5YYWFV/ref=sspa_dk_detail_1?psc=1&pd_rd_i=B07V5YYWFV&pd_rd_w=O4nYF&pf_rd_p=7d37a48b-2b1a-4373-8c1a-bdcc5da66be9&pd_rd_wg=FcY55&pf_rd_r=QJ0TB6JFNGZZ1FQM68SN&pd_rd_r=cdefd108-d0e6-474d-91ca-28f9ebddb4b3&spLa=ZW5jcnlwdGVkUXVhbGlmaWVyPUEzMzFDUzZVTFM0QTM0JmVuY3J5cHRlZElkPUEwMjM4MTYyMkdVN0hRMUZRVUhFUyZlbmNyeXB0ZWRBZElkPUEwMTQ4NTUzMlhSNzNRNThRRElOTyZ3aWRnZXROYW1lPXNwX2RldGFpbCZhY3Rpb249Y2xpY2tSZWRpcmVjdCZkb05vdExvZ0NsaWNrPXRydWU=

Good ole knife switch might do the trick for a stationary application.

https://www.amazon.com/Cllena-Battery-Disconnect-Isolator-Caravan/dp/B072WW6FPC/ref=sr_1_1?dchild=1&keywords=cut+off+switch+50a&qid=1604932881&sr=8-1

Or even this marine battery switch

1 Like

Thank you, Shaman. Yes, I was also thinking of cutting negative as a plan B. I got one of these switches as you suggested as well. So I will just go for that negative cut off.

Really appreciate you help mate.

1 Like

By the way, I was also thinking of implementing shutdown according to sensor data, like if ambient temp is reached then motor is switched off. Do you think, arduino can toggle short of those two pins and stop functioning of the motor? This would be like soft stop, but arduino itself would not control duty cycle as potentiometer would be connected to VESC only.

1 Like

Yeah a digital device should be able to shut down the CFOC2 through the ON/OFF pins but not directly. I would do it through a small N-channel MOSFET though. The MOSFET should be rated 60V or better. Use the Arduino to control the gate of the MOSFET and have the MOSFET be the one to bridge the Switch pin to ground. Make sure the mosfet can sufficiently be turned on by 5V or whatever the Arduino would be putting out.

1 Like

Also If the motor doesn’t have a temp sensor, then you could use the motor temp input for the ambient temp measurement. Then the controller itself can manage based on that input.

2 Likes

I thought of using relay for this purpose. I have quite a few of them (5V relays). I now use this setup (with relays) on my scooter. So far it seems to be doing good work.

Anyway, really appreciate your quick answers and help.

1 Like

Updated my listing with US prices.

2 Likes

@shaman Hey, I thought I would share my experience after connecting VESC with 36V power supply and mushroom-type emergency button. I connected that button in series on ground, i.e. ground was cut by emergency button. After I turned on everything, tried to spin the motor (I turned it just slowly, all OK), everything worked fine. When I pushed the button, everything turned off as it was supposed to. But when I released the button, my 36V power supply blew… the fuse blew. I checked now, but at least FETs and diode bridge are cooked… Not really sure what happened. I used this power supply https://www.aliexpress.com/item/4000781489664.html
I think that PS might have been damaged after it was switched OFF and when I turned on it just blew due to the damage made… I set regeneration current to 0 on VESC. It is so frustrating… every time I got into something with motors… it usually ends up like that. The only difference here is that I use power supply instead of battery. Do you have any ideas, what is wrong and how to manage that stopping? Now I am afraid of any stopping (even with two swich-off pins on FOC’er) as I am afraid of any kind of damage…

1 Like

First off, I’m sorry everything ended in destruction. That’s not a fun situation to deal with…but let’s investigate.

I’ll need as much detail as possible here in order to understand the scenario and I have some questions.

  1. After the emergency turnoff event(button push), was the power supply still turned on? If so, then the releasing the emergency switch(completing the power circuit) would have caused a massive transient that wreaked the havoc you experienced. The better sequence here would have been to engage the emergency cutoff, then disconnect or turn off the power supply, then release the emergency cutoff.
    The initial emergency cutoff could have also caused a massive inductive kickback(voltage spike) that might have damaged something.

  2. Is it possible to relocate the emergency cutoff to the AC input of the power supply?

Thank you for quick response. Here is additional info.

  1. Yes, power supply was still on after switch was pressed (that cut off power to FOCer). When I released the button it has not been switched off and then on. Do you think FOCer could have also been damaged? I have not tested that yet as I do not have PSU now. I am planning to get one, but this time for like hundred euros as I do not have time to wait for another month from aliexpress. Moreover, those fets that burned cost like 8.5e each and with diode bridge (and perhaps something more) that might reach easily >20-25e alone.

  2. It might be possible, but That would require me to move 220V cables to that point, where that emergency switch is. It is quite far away from PSU and that part with motor actually moves, thus having 220V cables that are flexed all the time makes me worry… 36V cables can be flexed… they will not kill anyone…

Moreover, what could have happened if I had used two pins of VESC for this emergency switch off? Would have been the same result here?

Thank you.

It’s possible

The controller would have just powered off and the high-current power loop (supply positive -> controller power stage --> motor phase --> supply ground) would not have been opened.

Do you think that installing button on positive side would have changed something? So do you suggest installing that emergency to FOC’er two pins instead?

Thanks