Our company (anonymous, sorry) uses an Arduino Leonardo in commercial application. Its been used for a good 4-5 years without problems with hundred of units shipped each year.
POLOLU2128 POLOLU.COM ITEM NO: 3101 A-Star 32U4 Micro
Its a very simple program of maybe 50 lines of code (not including libraries). The basic function of the microcontroller is 2 fold. The first function is that we read a polulu VL53L0X Time-of-Flight Distance Sensor and then when the computer requests a measurement, we report it back. The second function is that we send color codes to a LED timing strip which is model: BTF-LIGHTING WS2811 and these functions allow it to blink and shut off. Im not sure hy the previous engineer picked these devices but I think its is because they came with Arduino libraries for easy integration.
What is odd is that Im not sure what has initiated the events as the firmware has not changed, nor have the PCBs. or any of the hardware. that we are aware of.
We are having an issue that started on 3 systems in the last 2 weeks of which 3 were yesterday. Im a little worried now that it seems to be happening more than 1 time. In each case is that notice the LEDs on our systems shut off. The LEDs are controlled by the contact side of relay k7. Overall this entire Leonardo electrical system is isolated as there is a relay involved, opening and closing the relay contacts pass outside of the circuit but its isolated. There is also a ground goes out of the schematic but even this should not be needed but shouldn’t hurt.

When the issue seems to happen, the technicians are reporting this occurs around every hour that the LEDs seem to shut off. However, what is odd is that when i go to trouble shoot it, it seems that it never occurs but I think that I am inducing this effect while trouble shooting and possible reprogramming rather than it being just luck.
Im not 100% sure of what the issue is. However, it appears the firmware is corrupted when trouble shooting The reason I believe this is that if I open up the Arduino IDE and reprogram the microcontroller, it will start to work again. However, in 2 of the cases, we had to replace the height sensor but also had to reprogram the Leonardo in all 3.
In the latter case today, I connected the serial monitor to the device and it would hang up if a command M was sent (no reprogramming used).. However, after it was reprogrammed, I could resend the serial commands from the IDE and get an appropiate responce.
What is also weird is that in 2 of the 3 cases, it seemed like the USB driver for the Leonardo was corrupt as it produced an error in device manager that prevented it from showing up as a comm port. Image below.
So there are 3 main things Im looking at there and again, nothing has changed 4-5 years but we are seeing somehow
- height sensors somehow failing (2 cases)
- USB driver drops out for Leonardo (2 cases)
- Leonardo requires reprogramming and it just starts to work again (at least for a few days)
Any help is appreciated, even if its just where to start debugging
For some reason, the system is not letting me upload the code or simple schematic image.
