Git Product home page Git Product logo

Comments (6)

askuric avatar askuric commented on September 12, 2024

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.

Wenuo avatar Wenuo commented on September 12, 2024

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.

askuric avatar askuric commented on September 12, 2024

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.

Wenuo avatar Wenuo commented on September 12, 2024

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.

askuric avatar askuric commented on September 12, 2024

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.

Wenuo avatar Wenuo commented on September 12, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.