Is there any FOC Software available for STM32 Nucleo-64 G474RE board? - Page 1
Forum section: electronics / general

author: cadena
author_rank: Contributor
timestamp: March 25, 2020, 08:54:48 pm
content: Hi everyone,I have recently bought an STM32 Nucleo-64 G474RE. I want to use this MCU for Field-Oriented Control (FOC or Vector Control) with a BLDC motor. I have seen there are many libraries available and there is the ST Motor Control Workbench tool available. But I am confused as to which tool and/or library I should use with this board. I have never done FOC before but I know theory behind it and I would like to, at least, develop a program using the resources available. Please your help would be really appreciated. Also would the Motor Control Workbench be compatible with my MCU ? (I have no motor or powerboard at my disposal due to the quarentine). Your help would be really appreciated.

author: ploegmma
author_rank: Newbie
timestamp: October 04, 2020, 08:38:06 am
content: This (SwarmDrive) is an ESP32 based motor driver development board but maybe it could help you: swarmdrive.nickstick.nl

author: MosherIV
author_rank: Super Contributor
timestamp: October 04, 2020, 11:01:53 am
content: HiNot familiar with the term FOC. Not seen it in ST app notes before.Try looking for application notes on BLDC motors on ST web site.

author: Doctorandus_P
author_rank: Super Contributor
timestamp: October 04, 2020, 12:10:33 pm
content: ST has several evaluation boards with a BLDC driver on the PCB.Messing around with a generic evaluation board and a separate BLDC motor driver is a bit messy.Are you aware of products such as the STSPIN32F0?It is an STM32 chip, but it also has built in:* SMPS. Just add inductor and diode to step down from 45V to 3V3.* 600mA MOSfet drivers for 3-phase bridge.* 4 opampsAnd the whole chip is below EUR4 in low quantities.I had seen this chip before, but did not give it much attention untill I saw:https://hackaday.io/project/28512-bldc-motor-driver-for-roboticshttp://www.dizzy.ai/#controllerThe project has a PCB drawn in KiCad (available on github).Unfortunately the PCB is quite bad:* No bulk capactors.* Marginal decoupling.* Bad GND plane layout.* Opamps are not used. No current sensing.Software also seems to be the bare minimum just to get a motor rotating, but that can be an advantage too to start with, as the code size is small.The peripherals of all those STM32 variants are probably close enough to get any of the FOC examples to work on another STM32.If you search hackaday.io alone, you already find nearly 350 BLDC projects. On Github / Gitlab there are probably even more.Some of them are probably worked out in much more detail than the project I mentioned.https://hackaday.io/search?term=bldc&page=2This one uses an STM32G473. Is that close enough?https://hackaday.io/project/171721-custom-3-phase-foc-escDid you know that BLDC is very much the same as PMSM?From what I gather the BLDC is more optimised for efficiency or power density, while PMSM has more linear torque over a rotation.Torque ripple can be linearized in software though. Efficiency too of course (that is the main goal of FOC!, but the highest efficiency possible for a motor is fixed in the geometry of the motor.3-phase stepper motors are also very much the same as BLDC and PMSM. Main difference is that they tend to have more poles and are therefore better fit for higher torque at low rpm.

author: Harjit
author_rank: Regular Contributor
timestamp: October 04, 2020, 05:07:39 pm
content: This seems like a very interesting project:https://docs.simplefoc.com/

author: Warhawk
author_rank: Frequent Contributor
timestamp: October 04, 2020, 08:09:23 pm
content: You may want to like this video:https://training.ti.com/field-oriented-control-permanent-magnet-motorsThis is good for getting basics. I am not pushing you to change the MCU.

author: Cerebus
author_rank: Super Contributor
timestamp: October 05, 2020, 12:32:10 am
content: Quote from: MosherIV on October 04, 2020, 11:01:53 amField Oriented Control

author: Sal Ammoniac
author_rank: Super Contributor
timestamp: October 08, 2020, 08:56:22 pm
content: Write your own--it's not that hard, and maybe you'll learn something.

author: Microcheap
author_rank: Frequent Contributor
timestamp: October 08, 2020, 10:02:01 pm
content: When I was still in the University I had a professor who was finishing his Doctorate in the FOC field. Sorry, I can't remember the details but he was using a DPS from TI.I have a folder full of references about this subject, if you are interested, I can dig it up, there are some AN from Freescale, Texas, Microchip...I don't know if it can be of any help, you can probably find it all on the internet, but if you need it, just ask.

author: ralphrmartin
author_rank: Frequent Contributor
timestamp: October 09, 2020, 12:28:05 pm
content: Everyone knows that FOC means Free of Charge.

author: Doctorandus_P
author_rank: Super Contributor
timestamp: October 09, 2020, 04:02:27 pm
content: Choose your poison:FOC Full Operational Capability (US DoD acquisition term to depict when a specific activity reaches maturity)FOC Friends of the ConstitutionFOC Faculty of Commerce (various locations)FOC FocusFOC Fall of Cybertron (gaming)FOC Federation of ChurchesFOC Fiber Optic CenterFOC Fellowship of Christians (various organizations)FOC Free Of ChargeFOC Foreign Oil CompanyFOC Friend of the CourtFOC Facilitating Organizational ChangeFOC Fort Omaha Campus (Metropolitan Community College; Omaha, NE)FOC Freedom of Creation (3D printing; Amsterdam)FOC Federal Office of Culture (Switzerland)FOC Flux Oriented ControlFOC Forum of Conscience (human right group)FOC Freedom Online Coalition (intergovernmental coalition)FOC Franchise Offering CircularFOC Florentine Opera Company (Milwaukee, WI)FOC Field Oriented ControlFOC Fail over ClusterFOC Force Output CompareFOC First Options of Chicago (Chicago, IL)FOC Flag of ConvenienceFOC Family Outreach CenterFOC Foyer Occupationnel (French: Occupational Center)FOC Full and Open CompetitionFOC Fiber Optic CableFOC Flight of the Conchords (TV series)FOC Factory Outlet CenterFOC Free of CostFOC Faint Object Camera (Hubble Telescope)FOC Finance and Operations Committee (various organizations)FOC Freedom of ChoiceFOC Firm Order ConfirmationFOC Fisheries and Oceans CanadaFOC Fruit of the CrimeFOC Front of Center (archery)FOC First Order Condition (mathematics)FOC Ferrari Owners ClubFOC Final Operational CapabilityFOC Fujitsu Optical Components (Japan)FOC Fuji Oil Company, Ltd. (Japan)FOC Fiber Optic CommunicationsFOC Firm Order CommitmentFOC Fiscal Oversight Committee (various organizations)FOC Family of CompaniesFOC Flight Operation CenterFOC Fiber Optic ConnectorFOC Fixed Order Cycle (finance)FOC Flight Operations CenterFOC Fold Out Cover (vinyl record feature)FOC First Of ClassFOC Forward of Center (archery)FOC Fight of Characters (Warcraft III; computer game)FOC Foreign Operating CorporationFOC Fresh Out CrewFOC Follow-On ContractFOC Field Operations CenterFOC Friends of Carlotta (from movie 'Dead Men Don't Wear Plaid')FOC FEMA Operations CenterFOC Fiber Optic ComponentFOC Festival of CricketFOC Fear Of CommitmentFOC Fabrication d'Objets en Caoutchouc et Plastique (French: Manufacture of Rubber and Plastic Objects)FOC Father of ChildFOC Forward Only Conversion (radio control cars)FOC Future Operational CapabilityFOC Father of Chapel (senior trades union official SOGAT & NGA)FOC Federation Orientation Committee (University of Waterloo, California)FOC Force of ContractionFOC Fuzhou City (China)FOC Friends of ChristFOC Flex-on-CapFOC Follower of ChristFOC Face of CurbFOC Frontal-Occipital CircumferenceFOC Force Organization Chart (gaming)FOC Fell Off ChairFOC First Class CW Operator's Club (UK)FOC Flux Cutting (welding)FOC Full Operational ClearanceFOC Fact or CrapFOC Front-Of-CounterFOC Friends of Colombia (Peace Corps alumni)FOC Flat Over Crest (Rally Car Racing)FOC First Office Call (medical appointment)FOC FORSCOM Operations CenterFOC Financial Operations CenterFOC Fall Off ChairFOC Future Operating CapabilityFOC Facility Operations CenterFOC Farthest-On CircleFOC Factor of CooperationFOC Fall Out of ChairFOC Flight Operations Committee (IATA)FOC Festival of CelebrationFOC Fleet Operations CenterFOC Factory of Champions (San Antonio, TX)FOC Foreign Object CheckFOC Fear Of Controlling (air traffic control)FOC Friends of CryFOC Furthest-On CircleFOC Facilities Operations CommitteeFOC Firing Officer ConsoleFOC Full Of Choice (Malacca, Malaysia shop)FOC Foreign Operating CompaniesFOC Fiber Optical CharacterizationFOC Fin Opener Crank (missile assembly tool)FOC Fundamental Orders of ConnecticutFOC Friends of the Committee (various organizations)FOC Flash-on-Camera (photography)FOC Future Operations CellFOC Friends of the Carpenters (non-profit ministry)FOC Foundation for Orphaned Children (Kenya)FOC Fill or CancelFOC Free Organic CarbonSource:https://acronyms.thefreedictionary.com/FOC