Odrive remote cold booting

Hi,
I always appreciate this community and its developers.
Today I have another problem.

I’m currently using a 5047p SPI encoder.

Some errors occur while Odrive is driving the motor.

Even if this problem happens very infrequently, I have to deal with it remotely.

I would like to know if there is any way to solve this remotely.

Many errors can be resolved from the console through the odrv0.clear_errors or odrv0.reboot commands.

However, errors related to SPI encoders are not being resolved remotely.

In the case of errors specified by ERROR_ENCODER_FAILED, the command cannot recover.
This case can only be solved by physically shutting off the current.

For me, this is a problem that needs to be resolved remotely. Human cannot be manipulated.

I need a solution to reset or reboot the Odrive using remote means.

Now, when I operate the reset jumper, a spi error occurs, so I have to turn the power off and then on.

That is, with the reset jumper, an SPI error occurs in Odrive and Odrive does not operate again.

What I want to know is:

First, how to cold boot odrive remotely

Second, how to remotely operate the odrive jumper so that spi error does not occur even after rebooting

If there is no good way, sadly I have to operate the relay 24v through the Arduino relay 5v switch.
I’ve searched a lot of documentation, but I haven’t been able to find any documentation that addresses this issue exactly.
I need help.
thank you.

Hi,
you can simply comment out the error flag check:
((rawVal >> 14) & 1)
in encoder.cpp. I’ve been doing this for quite a while now and had no problems with that. In case the encoder actually fails, one of the other checks will usually catch that (current violation or speed violation).

best regards

So, in This Thread I have found that the AS5047p gets into a ‘sulk state’ where it will not respond at all anymore. It isn’t the ODrive that needs resetting, but the 3.3v supply to the encoder. If I unplugged the encoder and plugged it back in, the error is gone.
Maybe instead of resetting the power you could reset the encoder supply somehow, perhaps with a transistor driven off a GPIO.

Also, the ferrite rings helped a huge amount in avoiding this encoder issue, as did powering from 3.3v instead of 5v, and using 50R series resistors on the MOSI/MISO/SCK wires.

Hi,
Thanks for your kindness.
Unfortunately, I don’t know how to do this. I can use python only so.
The ‘encoder.cpp’ means firmware?
I’ve found this on the github Bu, I couldn’t handle this.
I’d appreciate it if you could tell me something like a keyword to search for.

Best regards,
Gregory.

P.S I’m sorry to late feedback. it’s hard to solve.

Hi,
towen.
I am always grateful to you
I’ve tried your solution since 2 weeks ago.
I haven’t been successful yet. But there seems to be a place where it could be.
I disconnected the middle of the encoder’s 3.3v wire and connected it to a circuit breaker controlled by another board. This method works about 1 in 5 times.
Can the 50R resistor be connected in series with the wiring of sck? or entire MOSI/MISO/SCK wiring?
thanks.

I mean like this:

ODrive   |    Encoder
3v3 ----------> 3v3
GND ----------> GND
SCK -- 50R ---> SCK
MOSI - 50R ---> MOSI
MISO - 50R ---> MISO
GPIO - 50R ---> CS

I’ve got this!
Thanks a lot!

1 Like