ADXL/Pi Pico USB connection problem Orange Pi

Basic Information:

Printer Model: Sapphire Pro
MCU / Printerboard: Robin nano, Orange Pi zero 2 for Klipper
klippy.log (1.9 MB)

Description:

As I finished my ADXL/Pico Pi for resonance measurement and connected it to my lead out USB-connector, I could request with “ACCELOMETER_QUERY” the current value of the ADXL. Everything fine so far. After that I wanted to start the resonance measurement of my x-axis. But then the problems began. At first I got the invalid adxl id error. Then I double checked my wiring from Pico to adxl board. Everything was fine. There are no solder links or faulty crimping making short circuits (I cross measured everything). The resistance is about 2 Ohm. Still no connection to the mcu adxl possible. I get the blue window in mainsail saying it’s connecting to the mcu adxl which switches to the red window that there is no connection possible. Well, I thought maybe I did caused a short circuit somehow or it’s a faulty ship, but the Pico is connectible both via boot and normally to my PC. No findable error there, which made me start looking at the USB connection. Several tried cables later no different result. Then I connected the Pico to the USB-A connection of the orange Pi and there it was in my putty command window. So I double checked the lead out cable and its connection to the orange Pi. Again there were no short circuits and good connection (about 7 Ohm). So my question is whether the USB controller on my orange Pi is broken now or am I missing something? I would be very glad for tipps, though Raspberry Pi 4B is affordable again :smiley:

Btw I also checked usb via lsusb (screenshot attached).

I’m not sure what you are reporting here.

I understand that you are using a Raspberry Pi Pico and you attached an ADXL to it. However, the screenshot of lsusb does not show a connected Pico and the klippy.log also complains that it cannot connect to it:

mcu 'adxl': Unable to open serial port: [Errno 2] could not open port /dev/serial/by-id/usb-Klipper_rp2040_E6614C311B570D31-if00: [Errno 2] No such file or directory: '/dev/serial/by-id/usb-Klipper_rp2040_E6614C311B570D31-if00'

Follow Measuring Resonances - Klipper documentation and make sure, your Pi Pico is correctly recognized as MCU

The screenshot of lsusb was with the connected Pico.

My issue is that the USB on the left side (USB A) is working and the right Pins don’t work anymore (as described above; see picture below). I want to know if it’s a hardware issue, so I have to buy a new µC or it’s a software one. Maybe there are other ways too.

I measured the Voltage between 5V and Grnd which is still 5V. I also tried both Data Pin pairs. Nothing.

Follow Measuring Resonances - Klipper documentation
Disconnect the ADXL and make sure that the Pi Pico is properly recognized by Klipper. Any other actions are futile until this works.

It seems to me you don’t understand me. If I connect my Pico to the left USB-A connection it is recognised. If I use the PINs it is not recognised. I don’t know how I should write it differently then above. (btw I know this guide, you linked)

You can also see in the log, that the adxl and pico was recognised while connected to the PINs once.

Most likely I do not understand it.
Typically you would:

  1. Connect the Pi Pico to the Orange Pi via USB
  2. Connect the ADXL via its SPI pins to the Pi Pico

You already have an issue with No. 1 as the Pico is neither recognized by your Linux and consequently also not by Klipper.

It is recognised when using the USB-A-connection. But I need that for the Robin Nano. So I crimped a female USB-A connector and pinned it to the corresponding pins on the orange Pi. It worked as described in my first post, but then something happened and it doesn’t work anymore.

Maybe we should talk in german via pm.

Did you check your adapter cable?
Maybe you can try USB3 on the pin row just above USB2.
So split GND and 5V from the two data lines of your connector and you can go from USB2 to USB3 and check lsusb again.

But looks like you did the latter when I read:

Then maybe something killed the USB lines, your cable is bad or something disables the pin row or parts of it.
For my OrangePi Zero whatever I had a USB HAT that made it way easier to connect peripheral devices.

I thought that too, that’s why I measured the resistance of my cable. Even every wire against all others. There are no short circuits and the resistance is about 7 Ohm. 7 Ohm is in my opinion not much for this small diameter. So it seems to me the USB lines or controller on the orange Pi is broken now. I thought there is a way to check it or maybe it’s a software issue.

Is there maybe a way to use the UART for USB?

Well if it really is broken I would buy a raspberry Pi and use this orange Pi for other stuff.

7 Ohms on a single short wire?? That is way too much.
AWG 24 for instance has about 89 Ohms per kilometer! i do not know the length of your adapter cable but I doubt its longer than 70 m, is it?

Did you maybe mean mOhms? Otherwise the cable is bad, very bad!

2 Likes

Well, this really could be an abundance of things, from hardware defect to a wrong cabling on both the Pico and OPi side.

What strikes me odd is your report about 7 Ohms. IMO this is huge, so I quickly measured a regular 1m USB cable and I get around 0.3 Ohm (and this is likely more due to my makeshift connection than to the real resistance)

Sure, you can connect the Pi Pico via UART (GPIO1/GPIO0) to the OPi. You just need to reflect this in the firmware flashed to the OPi (during make menuconfig)

1 Like

If I use a clamp then it’s 0,7 Ohm, but with measure pins it’s about 7 Ohm. Maybe I should kill one of my mini usb-cables that works and crimp the other end.

Is there a guide for this? I’m new to Linux and Klipper.

I also noticed that one contact spring (DP) is not above the white plastic. Maybe that’s the issue.

Where can I buy one oder what is the exact name?

No there is not since direct UART is typically used by folks who anyway know what they are doing but it is no rocket science either:

  1. Flash the properly configured firmware to the Pico
  2. Connect OPi UART TX to Pico RX and vice versa (RX to TX) and GND to GND (check the relevant pinouts)
  3. Reflect this in the Klipper config to have the connection to the Pico via /dev/serialX or /dev/ttySX (you will need to figure out on which tty it connects)
2 Likes

image

It was that USB adapter… You could only see that faulty spring in sunlight.

2 Likes

Always good when logical troubleshooting helps and physics is your friend! :nerd_face:

The USB HAT should be available on AliExpress. That is where I bought my OPi + HAT.
That one here should fit if I’m right:
https://de.aliexpress.com/item/1005004305667413.html

1 Like

I could do resonance testing but then I somehow crashed my system while removing the date via winscp. At first I could establish a link with putty, but now nothing. Probably have to reinstall everything…