simplefoc-rs
An attempt at re-writing the SimpleFOC library in rust.
Science Score: 44.0%
This score indicates how likely this project is to be science-related based on various indicators:
-
✓CITATION.cff file
Found CITATION.cff file -
✓codemeta.json file
Found codemeta.json file -
✓.zenodo.json file
Found .zenodo.json file -
○DOI references
-
○Academic publication links
-
○Academic email domains
-
○Institutional organization owner
-
○JOSS paper metadata
-
○Scientific vocabulary similarity
Low similarity (12.3%) to scientific vocabulary
Repository
An attempt at re-writing the SimpleFOC library in rust.
Basic Info
- Host: GitHub
- Owner: Ben-PH
- License: mit
- Language: Rust
- Default Branch: main
- Size: 182 KB
Statistics
- Stars: 19
- Watchers: 3
- Forks: 2
- Open Issues: 3
- Releases: 0
Metadata Files
README.md
Simple FOC, but with Rust.
Still a heavy WIP. Getting close to a very basic const-voltage implementation for esp32.
One motivation is the prospect of, sometime down the line, there being a Rust option in which to explore the Simple FOC playground. To that end, some design principals that I try to think about:
- No suprises when moving between Arduino and Rust: Moving between the two should bring a sense of familiarity. It should feel like applying the same concepts, in familiar patterns, just using idioms that change with the language being used.
- Simplicity, Accesibility, and Educational Enjoyment: Simple FOC delliberately makes design and implementation decisions that prioritises ease of use and enjoyment, and I aim to follow their lead. This will often imply that in order to make using this library simple, the underlying code must bear the burden of managing complexity.
- Advanced usage: Though not a primary aim, a bonus acheivement would include suitability for more advanced and nuanced use, such as 3d printer firmware. For emphasis: this goal is secondary to the first two.
With respect to licence and assigning credit for work:
This project started as a direct rewrite of the Simple FOC library. This has changed a touch, as Rust idioms and C++ Arduino idoms are at times in conflict. With that said, the project has gotten to its current state with a lot of direct input from the SFOC people, and this project continues to draw heavily from the original works of the SFOC Arduino library.
At time of writing, this is a re-write of Simple FOC library. "We stand on the shoulders of giants" couldn't apply more here. Please refer to the Citations file, and the OG library here
Simple demo
cargo run --expample spinny each second, prints out the duty cycles to make a slowly rotating magnetic field
Supported platforms
None yet, but esp32 and esp32s3 are in the works
How to use this library.
Still working out that story, but here is where we are right now:
cargo make checkto check the code basecargo buildin any of the projects inplatformsto build for a platform
This is, essentially, the goal:
- fork and clone this repo
cd platforms <your-chip>- trivially-easy task to assign gpio pins for motor control and motor feedback pins
cargo runto run a default, slow-spinning motor- plug in functions/modules/features/etc. to make your program less trivial
- ???
- profit
Owner
- Name: Ben
- Login: Ben-PH
- Kind: user
- Location: Cornus, France
- Repositories: 2
- Profile: https://github.com/Ben-PH
A budding developer coming into early middle ages, a career change and new passions is what drives me.
Citation (CITATION.cff)
cff-version: 1.0.0
message: "This is a re-write of Simple FOC. Below is the citation instructions of original work at time of writing this message"
authors:
- family-names: "Skuric"
given-names: "Antun"
orcid: "https://orcid.org/0000-0002-3323-4482"
- family-names: "Bank"
given-names: "Hasan Sinan"
orcid: "https://orcid.org/0000-0002-0626-2664"
- family-names: "Unger"
given-names: "Richard"
- family-names: "Williams"
given-names: "Owen"
- family-names: "González-Reyes"
given-names: "David"
orcid: "https://orcid.org/0000-0002-1535-3007"
title: "SimpleFOC: A Field Oriented Control (FOC) Library for Controlling Brushless Direct Current (BLDC) and Stepper Motors"
version: 2.2.2
doi: 10.21105/joss.04232
date-released: 2022-06-26
url: "https://github.com/simplefoc/Arduino-FOC"
preferred-citation:
type: article
authors:
- family-names: "Skuric"
given-names: "Antun"
orcid: "https://orcid.org/0000-0002-3323-4482"
- family-names: "Bank"
given-names: "Hasan Sinan"
orcid: "https://orcid.org/0000-0002-0626-2664"
- family-names: "Unger"
given-names: "Richard"
- family-names: "Williams"
given-names: "Owen"
- family-names: "González-Reyes"
given-names: "David"
orcid: "https://orcid.org/0000-0002-1535-3007"
doi: "10.21105/joss.04232"
journal: "Journal of Open Source Software"
url: "https://doi.org/10.21105/joss.04232"
month: 6
start: 4232 # First page number
end: 4232 # Last page number
title: "SimpleFOC: A Field Oriented Control (FOC) Library for Controlling Brushless Direct Current (BLDC) and Stepper Motors"
volume: 7
issue: 74
year: 2022
GitHub Events
Total
- Create event: 3
- Issues event: 3
- Watch event: 12
- Delete event: 1
- Member event: 1
- Issue comment event: 1
- Push event: 34
- Pull request review comment event: 3
- Pull request review event: 5
- Pull request event: 17
- Fork event: 2
Last Year
- Create event: 3
- Issues event: 3
- Watch event: 12
- Delete event: 1
- Member event: 1
- Issue comment event: 1
- Push event: 34
- Pull request review comment event: 3
- Pull request review event: 5
- Pull request event: 17
- Fork event: 2
Issues and Pull Requests
Last synced: over 1 year ago
All Time
- Total issues: 5
- Total pull requests: 2
- Average time to close issues: N/A
- Average time to close pull requests: less than a minute
- Total issue authors: 3
- Total pull request authors: 1
- Average comments per issue: 0.4
- Average comments per pull request: 0.0
- Merged pull requests: 2
- Bot issues: 0
- Bot pull requests: 0
Past Year
- Issues: 5
- Pull requests: 2
- Average time to close issues: N/A
- Average time to close pull requests: less than a minute
- Issue authors: 3
- Pull request authors: 1
- Average comments per issue: 0.4
- Average comments per pull request: 0.0
- Merged pull requests: 2
- Bot issues: 0
- Bot pull requests: 0
Top Authors
Issue Authors
- Ben-PH (2)
- Copper280z (2)
- ivajon (1)
Pull Request Authors
- Ben-PH (8)
- crabdancing (1)
Top Labels
Issue Labels
Pull Request Labels
Dependencies
- autocfg 1.3.0
- embedded-hal 1.0.0
- embedded-time 0.12.1
- fugit 0.3.7
- gcd 2.3.0
- log 0.4.21
- micromath 2.1.0
- num 0.3.1
- num-complex 0.3.1
- num-integer 0.1.46
- num-iter 0.1.45
- num-rational 0.3.2
- num-traits 0.2.19
- pid 4.0.0
- typenum 1.17.0
- 104 dependencies