How can I avoid calibration but i need to use the driver with encoder
Are you okay with some limited movement during startup or does your application require the motor to stay completely still during startup?
If you just want to avoid calibration you can use any encoder and save the motor + encoder calibration data after performing an initial calibration. If you require the motor be completely still you’ll need to use an absolute encoder.
Hope that helps!
I don’t want any movement. I have an inbuilt encoder so I am facing issues. Your post suggests other encoders. I have an absolute encoder without index signal. Anyway I can work around it?
An absolute encoder doesn’t use an index pulse, it just outputs its current angle directly.
If you have an absolute encoder you can calibrate once, when you first set up your system, then every time after that you can immediately go into closed-loop control.
The ODrive supports absolute encoders, but currently only a few models are implemented.
From my post I linked to previously:
To set up the encoder, follow the instructions at the bottom of the page here ( Under AS5047/AS5048 Encoders)
Using this encoder (or another supported absolute encoder), you can get rid of movement on startup. No index pulse is needed.
I’m using AMT102-V encoder with odrive, and I have tried the steps to how to do a one time calibration, but that does not seem to work. It is stated that the one time calibration would only work if the encoder has an index signal, which AMT102-V has as per the datasheet. when i check:
i get false.
Hi Kedvall ,
Odrive comes with only one SPI right? So if I want to use AS5047P absolute encoder , I can only use for one BLDC . How about for the second BLDC motor ,there are no more MISO ,MOSI pins .
Right, there is only one SPI bus. However, you can use two different chip select (CS) pins to use the same bus with two different devices.
There should be a setting called abs_spi_cs_gpio_pin (or something similar) under the encoder settings. You can set this to whichever pins you have free, for example Pin 3 and Pin 4.
- MISO, MOSI, CLK, VCC, and GND to both encoders
- Pin3 to encoder 1 CS
- Pin4 to encoder 2 CS
That should be work
Thank you for your reply. I am using an encoder with index, however even with 22nF-47nF capacitor .
my motor does not return to the same position each time after index_search.
Do you experience any encoder noise with AS5047 SPI ?
Hmm I think there is some confusion here. The AS5047 supports two modes: Absolute (over SPI), and Incremental (with ABI lines).
If you’re using SPI mode you won’t have an index pulse and don’t need a capacitor on the lines. You should only be using MOSI, MISO, CLK, and CS (plus VCC and GND). In this mode you can actually check the error rate (I think it’s .spi_error_rate but can’t quite remember).
Anyways no, I haven’t seen much noise on the SPI lines and mine are decently long (30+cm).
Are you perhaps still using the encoder’s incremental mode? You have to change the ODrive’s encoder mode to SPI or it will still try to use incremental.
Sorry, for the confusion . I am currently using E6B2CWZ6C OMRON Rotary Encoder with index . (no SPI) Even adding capacitor ,still there is noise.
However after AXIS_STATE_CLOSED_LOOP_CONTROL , everything is fine ,working good ,but i am concern that since the search for index does not give the same value each time i perform odrv0.axis0.requested_state = AXIS_STATE_ENCODER_INDEX_SEARCH. I may have problems later .
I have never use AS5047 before. I am considering using it.
Ah I see that makes sense. I also haven’t had a problem with noise on the ABI interface but haven’t used that as extensively. Have you tried looking at the index signal with a scope to see what kind of noise you’re getting? I’m not familiar with that encoder but if your signal lines are a reasonable length I think you should be able to get almost no noise…
I would try to seperate the problem if you can. Test the encoder with something else (or just a scope) and try another encoder with the ODrive (if you have one).
Hope that helps, good luck!
If possible please share with us a picture of your mounting of AS5047P encoder to the motor. Also what wires you used? (shield or twist).Thank you.
I have similar problems - you can take a look at: