Not showing up as USB device

Ok, so I’ve had it working without problems. Connected it via step and direction and all is good.

until this lunchtime…

connected to odrive tool, ran
odrv0.axis0.requested_state = AXIS_STATE_FULL_CALIBRATION_SEQUENCE

all good, drives does it thing

next:

odrv0.axis0.requested_state = AXIS_STATE_CLOSED_LOOP_CONTROL

again no complaints.

However, ever since then its refused to connect as a usb device (I’ve checked in linux and windows, tried different usb cables etc).

the power light is on (18v supply to match the motor) but no showing up as a device at all.

any ideas?? It just seems to have stopped working. I’ve tried multiple times, rebooted pc, raspi etc etc but it seems dead…

Can you check DFU mode? Flip the little switch on the board

Still not showing up :frowning:

So to be a bit more clear: try turning off the 18V, flip the switch to DFU, then apply 18V again. Then check if it shows up as STM BOOTLOADER in Device Manager on Windows, or lsusb on Linux.

Yes, Its showing up as STM BOOTLOADER in windows…

Whats the next step?

Now you can flash the device using one of several methods: https://docs.odriverobotics.com/odrivetool#device-firmware-update

Ok, so reflashed the firmware, connected via Odrive tool, entered all the parameters for the motor and all was going really well until:

odrv0.axis0.requested_state = AXIS_STATE_CLOSED_LOOP_CONTROL

Oh no odrv0 disappeared

for some reason it doesn’t like going into closed loop mode

But I can turn it off and reconnect again so its not as bad as last time

You have the classic noise issue. Make sure your grounding is good, wiring is clean, and consider braiding the motor wires or - best option - using ferrite rings (available on the shop)

Ok, The ferrite ring solved the problem.

Next problem (this is starting to get really painful now!!):

In [21]: odrv0.config.enable_step_dir = True

AttributeError Traceback (most recent call last)
/usr/local/lib/python3.7/dist-packages/fibre/shell.py in
----> 1 odrv0.config.enable_step_dir = True

/usr/local/lib/python3.7/dist-packages/fibre/remote_object.py in setattr(self, name, value)
256 object.getattribute(self, “dict”)[name] = value
257 else:
→ 258 raise AttributeError(“Attribute {} not found”.format(name))
259
260 def _tear_down(self):

AttributeError: Attribute enable_step_dir not found

1 Like

odrv0.axis0.config.enable_step_dir = True

Don’t forget you can hit tab to autocomplete…

odrv0.axis0.config.<tab> will show you everything that’s available in the axis configuration, for example.

Perfect thankyou. Its alive :slight_smile:

1 Like