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

@Fatglottis @shaman Ok loaded the firmware from the 5.01 folder and it seems to detect now, so going to give it a few bench tests and check if everything else is fine

image

@drdrs before updating the firmware one of my FOCers was doing something similar during detection, where the red LED would flash a bit, but afterwards it would shutdown so couldn’t check the error code… Not sure if it’s worth trying earlier versions to see if it helps or not, I’m still a bit skeptical about the latest FW to be honest

3 Likes

I have an old 4.10 hw somewhere with 18 red blinks at start up. I couldn’t find what the blinks ment either. I remember it was working ok though.

I’m getting similar detection issues on the 5.01 and 3.62 binaries in the repo and the firmware as compiled by the makefile in master in the repo (after updating the CFOC2 lines).

I suspect a soldering issue on the DRV even though it looks ok with a triplet magnifier. I have a USB microscope arriving tomorrow to get a better look.

Hey sorry for the delay in getting back to this. Looks like you found the correct firmware from the repo. Things look better now. Let me know how bench testing goes!

2 Likes

Playing around with my batch of CF2s and got a few spinning and burned out a few DRVs (nothing I can’t fix). Has anyone had issues with the DRVs throwing all faults at higher currents? Almost every time when I get above 40 phase amps and occasionally before that I’ll have a controller fault out and throw all the faults in the VESC terminal. This has led to one VESC throwing a handful of phase faults continuously that I consider dead until I replace the DRV, and just general confusion.

My testing set-up is with a six phase scooter hub motor, using one set of leads as a dyno load. However, sometimes this even happens when I attempt to do a hard start with the motor unloaded and it throws an over current error even if the measured current doesn’t seem unreasonable.

Any thoughts?

1 Like

A longshot…
Seems to have been problems above 40A if the DRV8301 Overcurrent protection is active. I believe it was deactivated as default though.

1 Like

I see someone has strayed from the endless sphere!

So yeah make sure the DRV8301 OC protection is disabled in the VESC tool. 40A is exactly where that kicks in if its on. Otherwise. going up to 70 to 80A is possible with a well tuned CFOC2.

There is a possibility that if a fault happens at high current, the DRV loses it’s memory (SPI register values). This causes all the registers to revert to default which means the current sense amp gain is wrong. Unfortunately it requires power cycling the controller to fix this.

In v1.0, I made it to where the hardware just plays nice with the DRV’s default settings so this issue won’t happen.

5 Likes

Okay, cool. I thought I had the OC protection off, but maybe the DRV is losing its mind. I’ll dig through the datasheet later, but is there any way to modify the v0.9 to play nice default as well? I assume it’s just the current amplifier hardware and ADC gains in the FW but…

And yeah, esk8 seemed like the cool place to be, so I wandered over here as well!

1 Like

So you can mod the hardware a little and get it to work withe default values. It’s the current sense amp gain values in the DRV are what is important. The DRV takes care of sensing 2 out of the 3 phase currents. The other one is handled by the op amp. the gain for all 3 sensors is set to 20.

Default gain for the DRV is 10. You can change R64 and R65 from 20k resistors to 10k resistors and change the line of code in the firmware that writes initial values to the DRV to be a gain of 10 instead of 20. This should take care of it.

1 Like

Sounds good. The motor has 65ish uH of inductance, so I’m hoping I might get good performance with 60 or 70A phase. It almost seems worth it to do a design revision and take the DRV out of the current sensing loop so it can’t get in the way like this. Based on your knowledge of the layout, what do you think the feasibility of that is? I think the VESC6 does that, but so it can use phase shunts instead of low-side shunts.

1 Like

Using the integrated current sense amp of the DRV was a decision to lower cost, board size, and BOM. Using low-side current sensing rather than phase current sensing is also a decision to lower cost. Keeping the Cheap FOCer cheap

2 Likes

Makes sense to me!

1 Like

@Fatglottis see point 5:

This only affects the focers from Batch 1.

I’m now running 2 of the FOCers at 85 motor amps, so far no trouble.

6 Likes

My apologies, should’ve read more thoroughly :flushed:

85A!.. awesome! :clap:t2:

3 Likes

Any known negative effects when doing this? There would probably still be cutouts when the DRV fails but no reset necessary.

Welp, just blew up my first FOCer.

Out of the 10 boards I got from JLCPCB, 3 tested good so I assembled those today.
Flashing the boot loader went fine, no problems there
Took the risk of powering one on directly on battery voltage since it tested good and I don’t have a lab bench power supply at the moment. The moment I hit my antispark the FOCer turned on and smoke came out of D1, the SMF05C surge protector. :man_facepalming:
Checked the 5v output and its somewhere around 7.8V, fuck…

I’m hoping the “bad” foccers are actually good and I have 7 good ones, but I wont be putting power on any till I have a regulated power supply. Most likely going to put new drv’s on the other 9 and just scrap the one with the burned diode array.

Now its time for a beer to drink the tears away, cheers :beers:

What’s the lot number on that drv?

1 Like

88ASYCTG4 Like everyone else having issues, all 10 are from that batch.
JLCPCB gave me a full refund, just waiting for them to restock the DRV8301.

1 Like

I had thought they mentioned to someone else that they weren’t planning on restocking the 8301

Yeah, me :frowning:

LCSC has new stock coming in, so I hope that counts for JLCPCB as well.

2 Likes