A build with a feminine touch?

Are you sure about this in the general sense? FOC requires a better position sensing than 6-step afaik and that accuracy could drive a need for better hardware and a better hardware layout.

1 Like

FOC requires an estimate of the rotor angle, which can be had from an encoder or through back EMF. You are right that if the back EMF is noisy, the noise passes through to the output easier with FOC than with 6-step. However, it’s their own ESC, and I would expect that if an electrical engineer is capable of making an ESC, they would also be able to add reasonable filters if needed. The layout plays a part, but even bad layouts can often be made to work. My point was focused on microcontroller and board resources in general, FOC doesn’t require extra pins on the MCU or extra controllers and such on the PCB to work, unless their board is actually based on a ready made 6-step motor drive chip.

The reason why we cannot use FOC is that we don’t have a sensor on the motor. We drive two poles and we read the back emf on the third one to have an idea of the position.

Oops, I wrote the answer before reading jkoljo’s answer.

Code and design is from scratch. (we had PC board printed but otherwise everything else is homemade. Charlie is very proud of it)

Yes, Charlie now has a new challenge! Reduce the noise of his ESC. In the meantime, I’ll keep working on my steampunk remote, to match the overall look of the project:
Screen Shot 2023-05-31 at 7.33.17 AM

2 Likes

Hmm, I don’t really understand how you drive a 3-phase motor with just two phases. Can you share your schematic?

Anyway, modifying the design to run 3 phases + BEMF sensing on all half bridges will get you significantly smoother operation since it will enable not only proper 6-step but also FOC operation. :slight_smile:

Maybe also take a look at STM32G4 + some of their dev kits, such as the B-G431B-ESC1 or Nucleo G474 + IHM08M1. Their EVSPIN32 also has some nice things in it.

Yes, we’ll be glad to share the whole ESC design, hardware and software (but not support it…)

I meant we rotate the current between the pairs of phases, but in order to adjust the timing, we read the back emf on the phase that is not current-ly being driven.

Thanks for your suggestions, I’ll pass them to Charlie, as this is beyond my level of incompetence…

1 Like

Ah, that’s more understandable and sounds more like a basic BLDC (or 6-step) design. Since you have voltage sampling on each phase and you can drive all phases, there might be a chance to get FOC working as well. The code is much more complex unfortunately. And as discussed earlier, with FOC the back-EMF sensing needs to be clean since the 6-step function pretty much only cares about the which segment you are in, but for FOC the rotor angle in degrees also matters. ST and VESC motor control projects have examples on how to observe rotor angle from bemf. BTW for development purposes it’s easier to get started with an encoder if you have the spare inputs.

Does that qualify as very noisy? It sure is compared to the Fliteboard eFoil.

1 Like

Yeah, that’s extremely noisy :grinning_face_with_smiling_eyes:

2 Likes

I thought so… We’ll try some hardware and software modifications today.

I’m not sure on budget limitations, but an option may be to get a vesc and run it to compare against your own design. That way you have something to work towards/beat.

1 Like

:grinning: That’s the spirit! I will transmit to Charlie. He likes challenges.
[…]
His response is, we already beat it, promised. :thinking:

And/Or join the SimplFOC community Forum, an open-source project

with intention to demystify the Field Oriented Control (FOC) algorithm for BLDC / Stepper motors and the SimpleFOClibrary for the hobby community

Direct application of @jkoljo recommendations with the B-G431B-ESC1:

I don’t think they have designed a 6kw ESC yet but Charlie would obviously feel “at home” there :wink:

See also : Is it possible to run VESC software on a STM32G431? | VESC Project

2 Likes

Thank you all for the suggestions and information.
Here is a little background on Charlie’s ESC (CSESC for short :wink:) current implementation in his own words:

Early in the development, I was going to switch to the Thompson controllers, but I “discovered” that the ESP32 had two complete BLDC driver hardware built in. The documentation on the feature is, one might say, sparse. There are also numerous inaccuracies. Nonetheless the hardware works flawlessly. At least flawlessly before I burned my way through a sack of MOSFETs trying to figure it all out.

In my design, there is no provision for measuring current in the three h-bridges, so FOC is out for now. The ESP32 couldn’t do it directly, so I would need to add shunts and some analog amplifiers.

The current design produces a quite clean well controlled waveform.

Waveform

Schematic of the power section of the CSESC below.

2 Likes