Comments (6)
Hey @Wenuo !
Can you dump your monitoring output of the motor init?
Also are you sure you have the index enabled?
I worked a bit with as5047 sensors and I am not sure if the index pin was enabled by default.
You're using an ODrive board, you've managed to get it to work?
from arduino-foc.
Thank you for your reply!
@askuric
odrive runs simplefoc perfectly!(just use abi interface except i interface,Because I only have this encoder).
I use the
Encoder encoder = Encoder(PB4, PB5, 1000, PC9);
void doIndex(){encoder.handleIndex();}
encoder.enableInterrupts(doA, doB, doIndex);
When calibrating the encoder, the motor jumps in the second half circle.
from arduino-foc.
Hey @Wenuo,
I think that your Intex pin is not enabled and that is why you are having the issues.
Here is the AS5047P datasheet: https://ams.com/documents/20143/36005/AS5047P_DS000324_2-00.pdf
Check the page 18.
Is it possible that you your ABI_UVW is set to 1 and that you have some PWM signal on you I pin instead of the index pin?
Can you try to read the I pin on its own and see if it turns on only one time per revolution?
You could do something like
void doIndex(){
encoder.handleIndex();
Serial.println("index interrupt");
}
from arduino-foc.
Hey @askuric ,
I decided I don’t need to index the pins anymore,and i have been finished double motor position open loop and Speed open loop,In the future, I will continue to complete the torque closed loop of the dual motor and position close loop and soon on.Can I upload my code samples to here, and contribute to simplefoc.
Looking forward to your reply!Thanks! : )
from arduino-foc.
Hey @Wenuo,
Did you manage to get to the bottom of your problem, was it the AS5047 sensor not configured issue?
What kinds of code samples do you wish to upload?
Do you think it makes sense to push it to this issue?
If not I'd suggest you to go to our community forum and make a short post and upload the necessary code there. The forum posts are a bit easier to read and follow and they tend to be a good starting point for a lot of people :D
Let me know what do you think!
from arduino-foc.
hey @askuric
as5047p does not need to be indexed,Wait for me to sort out the code and upload it to the community :D
Thanks!
from arduino-foc.
Related Issues (20)
- 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 4
- [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 4
- 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 5
- [FEATURE] Support for arduino-esp32 v3.0.1 HOT 1
- [FEATURE] Current sensing for stepper motors - FOC current control HOT 1
- [BUG] Trap 150 potential miscalculation
- [BUG] sin/cos integer overflow on 16-bit CPUs HOT 3
- [FEATURE] Possibility to run FOC from interrupt HOT 3
- [FEATURE] Hall sensor without interrupt HOT 5
- [FEATURE] Always run current sense and persist current values
- [BUG] Copy/paste error in stm32g4 current sense HOT 1
- Standalone library usage without Arduino HOT 9
- [BUG] Cannot compile with esp32-c3 HOT 3
- [BUG]Noise Issue in open loop velocity Sample with ESP32S3 and DRV8311H HOT 5
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.