Comments (3)
Ah, nice!
So the mcpwm_init() now sets the pwm frequency?
This would remove the need for the fancy calculation of prescalers and the periods.
I'll look into it and if it works it will simplify the code quiet a bit!
from arduino-foc.
Hey @jkirsons
I've tested the mcpwm_init()
frequency setting feature and the good news is that it works.
The bad news is that they used a fixed prescale and therefore lose a lot of precision for higher frequencies.
For example if you set 30kHz, mcpwm_init()
will set 33kHz
If you set 40kHz, it will set 45kHz
This is not a huge deal but for now I'd leave our implementatio as is, regarding the frequency setting but hwever we'll add the line as you suggested it to avoid the zero division errors:
pwm_config.frequency = 2*pwm_frequency;
from arduino-foc.
Thanks! It may save others some time figuring out what is wrong.
mcpwm looks like it changes a bit in IDF 4 versions, so there may be further changes when new ESP32 Arduino versions are released.
from arduino-foc.
Related Issues (20)
- [FEATURE] Two issues with MagneticSensorPWM HOT 3
- [FEATURE] Performance of setting the PWM duty cycles HOT 8
- [FEATURE] Add library.json to set libArchive? HOT 2
- [BUG] BLDCDriver6PWM issue with STM Nucleo HOT 14
- [BUG] OpenOCD init failed while using specific pin HOT 6
- Update KV estimation example to match new code
- [FEATURE] Allowing to choose SPI pins HOT 1
- Can't change PWM frequency - 550hz [BUG] HOT 8
- [BUG] Monitor downsampling cannot be disabled HOT 2
- 20bit magnetic encoder support
- [BUG] ESP32 current sensing readings not synced with PWM - Not reproducible HOT 2
- [BUG] Error in doc: initFOC() cannot be used in open loop mode HOT 1
- driverAlign() ignores gain sign, always "MOT: Success: 3" HOT 3
- [BUG] PlatformIO adding SimpleFOC requires to specify SPI and WIRE lib_deps to prevent compile errors HOT 5
- Support for the new ESP32 LEDC library API HOT 3
- Is this FOC suppot high speed BLDC(5000rpm)?[FEATURE] HOT 2
- MagneticSensorI2C uses incorrect bit mask calculation HOT 4
- [BUG] Passing a new target to move() is sometimes ignored HOT 4
- [FEATURE] Support for arduino-esp32 v3.0.1
- [FEATURE] Current sensing for stepper motors - FOC current control
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from arduino-foc.