Losing USB connection

center positive

David Lang

not likely to make a difference. The maslow is not driving much from the
arduino.

David Lang

Have you tried hooking the arduino to a powered usb hub and then to the computer? Maybe your pc is struggling to output a consistent usb power signal?

The Arduino is connected to a raspberry PI 4B. I will research if this could be a problem. Currently i think its either the power-supply or general problem with the electricity. I cant connect a second power-supply to the arduino, can i?

The “USB-Loss” mostly happens when the sled travels “fast”. Like 600mm per minute.

I also accidentally solved my issue… Mine is more embarrassing though…
While rigging up a single weight pulley system I noticed that the usb led was flickering. My control board and Arduino are mounted to the back of the main beam so they are mounted leaning backwards. The Arduino was mounted to the main board just fine, but I never secured the control board, so it was pulling out of the headers. Huge face palm. Havent had an issue since.

1 Like

I zip tied my boards together… just in case.

1 Like

Hi,

i cant use an external power supply for the Arduino and the motor head, can i?

You can use 5v for arduino, but it gets enough power from the usb.

Hi,

continuing my sad “USB loss” story:

i did check the breakers and it turned out they installed only 6A breakers. So i did replace the one powering the maslow-setup (minus the vacs, they are on a different breaker) with a 16A breaker. No change, i still got “USB loss” 2 times yesterday within like 3 hours.

Luckily i do have one Arduino and one motor-head spare which i did install yesterday. When being like 3 minutes into a testcut i did check on the temp of the controller and the left chips cooling thingy had been so hot i could barely touch it. Is this normal or could it hint at wiring or motor problem? The right heat-dispenser had been only slightly warm.

I will test today if i still get “USB loss” with the brand new, original Arduino and the original maker-made motor-head. If yes, i will exchange the powersupply. If this does not work i am close to giving up. What would be left to do? Get an Oscilloscope? I would need a means of debugging the electricity installation and be able to log spikes etc?

1 Like

The ambient temp here is around 24-30C btw. I did buy the backup Arduino/motor shield i just installed about 6 month back directly from the maker-made store. Is this setup “overheating proof”? Probably not, right?!

Same error with new Arduino/Shield Setup. Now i did exchanged the power-supply… cant say i am too optimistic of the outcome…

1 Like

A new power supply also does not change anything. Any ideas how i can further debug this or can i put the whole setup into the trashcan?

1 Like

there has been a lot of discussion here from multiple people trying different things, restating the underlying possible problem.

losing the USB connection can be one of three things

  1. power loss to a board
  2. electrical interference
  3. firmware on the arduino crashing

testing in fake servo mode will eliminate #3 the crash would also be consistent (always at the same line of gcode)

for electrical interference, shorter wires, making sure power cords are not run alongside motor cords (especially the power to the router and the Z axis motor cable), and ferrite beads are all good things to try. One great thing about webcontrol is that it lets you use a very short USB cable (say 6" or so) that is always a long distance from any electrical wiring.

for both the power problem, and to make completely sure that there is no interference getting into the arduino via the power, try running it off of a car battery (with as short a power cord as you can manage), that will make sure that there is no interference from the AC line getting into the DC power.

motors like the router tend to generate a lot of electrical interference.

I’ve found the USB connection on some computers to be much more reliable than others. Do you by any chance have the ability to test on a different computer?

I did put an USB hub between Raspberry and Arduino and i could do a couple of cuts without “USB Loss” but just an hour ago it came back. I will now try connecting to a different device, probably a notebook and also will try to get a car battery.

Regarding the ferrite cores: I did already put ferrite cores on “everything”. The “USB Loss” happens at different line numbers so i figure its not a firmware problem.

Can someone confirm that i can attach power-supplies to the motor shield and to the arduino at the same time? I would like to try this too. I need a 7V, 1A power supply for the arduino, right?

And thanks for the help!

there is a regulator on the motor board that powers the arduino, so unless you
disable that, it’s not a good idea to put power to both.

David Lang

Among all of the suggested fixes (and they are all worth trying), ive found that the easiest and most effective at eliminating this problem is to shorten the cable distance between the Raspi and the arduino considerably. Once i switched to a jumper style cable (6in / 15cm) this problem went away and i have not had it since.

Want to add that the Raspi 4b’s have a known usb chip flaw that will require a future hardware revision to fix. Also, when the 4b’s get above 50% CPU loading they can get a little unreliable. Especially in the communications area.

Problems got worse for me after i moved the PI close to the Arduino board. I had far less “USB loss” problems when using a 5 meter USB cable and had the raspberry on my working table. Could be because i replaced the cabled mouse with an bluetooth one?

Regarding the Raspberry PI “USB Bug”. There is one HW Bug which seems only to affect some “high speed” USB cables (https://www.tomshardware.com/news/raspberry-pi-4-usb-c-update) and there is this bug: GitHub - yoctopuce-examples/raspberry_4_usb_bug

I am pretty sure i did upgrade the firmware already but i will recheck and probably pull out a Raspberry PI 3 B+ board and test if it runs better.

Thanks for the advice.

have you tried using the pi only for webcontrol, no keyboard or mouse, and
connect to it via wifi? That would eliminate as much ‘antenna’ wiring as
possible connected to the pi, especilly to the USB ports where it could
interferewith the arduino communictions.

David Lang

Hi Dlang,

i unluckily need an external wifi antenna because the internal one is not strong enough. But then i can also make a 10m ethernet cable to exclude the wifi antenna as source of error/interference. I will also disconnect the bluetooth devices to be 100% sure and use an very old linux notebook for testing. Kinda defies the use of an RPI though…

After this i will replace the 4B with an 3B+.

As expected, my 4B already has a current EEPROM version:

root@maslow:/home/pi# rpi-eeprom-update 
BCM2711 detected
BOOTLOADER: up-to-date
CURRENT: Thu Apr 16 17:11:26 UTC 2020 (1587057086)
 LATEST: Thu Apr 16 17:11:26 UTC 2020 (1587057086)
 FW DIR: /lib/firmware/raspberrypi/bootloader/critical
VL805: up-to-date
CURRENT: 000137ad
 LATEST: 000137ad