So a little backstory here - I got my first arduino uno, and it worked fine. One day, it started giving garbled serial. I posted a post on the forums and didn't recieve an answer.
I bought a new esp32 and 2 arduino unos.
Worked fine for a glorious whole day - then the cloud agent kept leaving ports closed, making me have to unplug and re plug in my esp32 after uploading. Same thing with the arduino uno.
And now my esp32 has succumbed to the fate of my old arduino uno, with garbled serial and bootloops with bad instructions as well as messages like TG1WDT_SYS_RESET
Please help. Could my macbook be destroying the microcontrollers?
(Arduino Cloud on Macbook Pro M2 with 2 usbc ports, issue occurs in the cloud agent)
If you power them directly from one of the USB-C ports, in theory that's possible. If you have a multimeter you can measure the +5V if it deviates much (+1 is too much, and at a certain voltage lower, that message
would show. Please notice this isn't a final diagnose, other fault conditions are possible, as is the case with electronics.
Before blaming the Mac’s USB—which seems to work fine for hundred million people around the world—I’d first investigate the operator sitting between the chair and the screen or the cable / whatever is connected on the Arduino….
You wouldn’t be the first one killing an Arduino because of wrongly plugging in something or working on a table with metal tools touching underneath the board and creating short circuits (or placing powered-up boards directly on a conductive surface, shorting out pins and frying them ➜ use an anti-static mat) etc…
Tell us more…
Trust me - I have definitely checked for any accidental connections. I'm working on wood, and this still happens no matter what is connected to the esp32/Arduino Uno's pins. And an Arduino Uno, fresh out of the box, had the same issue with the port not opening issue, although that is the least of the problems, and I haven't checked the rest of them
..ok?
So try the multimeter test, also have you connected them to another computer?
If you’re having electrical problems, I would be more concerned about damaging your Mac.
If you don’t have any other hardware to try, maybe get a Pi to play with, although that would need some installation of software to remote into it if you don’t have monitor, mouse and keyboard.
Initial gibberish from the serial port is normal. The procedure I use with my M4 is to ensure the baud rate in the sketch and the baud rate set in the monitor are the same. Once the serial output stops, click the clear output, then press the reset button on the board.
The Mac is pretty sensitive to the quality of the USB cable too or what happens on USB (to protect the Mac).
Sometimes connecting an USB C hub with USB A port and the Arduino at the back of the hub gives better results.
I found the issue. The voltage issue was from my macbook (Clarification: Some issue between my cable and Arduino caused this issue - most likely my cable, as the MacBook was more sensitive to bad quality cables) , as when testing on a windows laptop it worked fine. The bootlooping issue was caused by a faulty library, which was made for arduino and didn't support esp32. (adafruit_ST7796S_kbv), but I found the official adafruit library that supported the driver (Adafruit-ST7735-Library)
EDIT: I have marked this as the solution. J-M-L has provided a solution for people with only one device, to use an externally-powered usb hub
Happy to hear you nailed the problem.
You could try what @J-M-L wrote about using a USB-C hub.
I highly doubt there is a voltage issue on your Mac.
The fact that it worked on another laptop may indicate rather a cable quality issue and the Mac going into protects mode and shutting down the usb port (which creates the impression for you that your arduino might be dead). Some other laptops are more permissive - and making the laptop’s USB port more at risk.
Same device, same cable and it worked on my windows laptop.
That was not what led me to believe my arduino/esp32 was dead - as it worked fine when I unplugged and plugged it in again, and the arduino debug console showed that the port wasn't reopening, either by the agent or the device.
I was more concerned about the bootlooping.
This was correct, I was just led to believe that it was constant because of the bootlooping (and therefore always garbled serial), and the fact that my first arduino uno had constant garbled serial.
As I wrote, some hardware are more permissive on what happens on an USB C port. Poor-quality or non-compliant cables can cause electrical faults, miscommunication, or overcurrent risks.
macOS can disable a USB-C port temporarily if it detects overcurrent or undervoltage conditions, signal integrity issues or violations of the USB Power Delivery or Thunderbolt protocol.
These protections are especially robust on Macs with Thunderbolt 3/4 or Apple Silicon, where the system controller actively monitors the physical layer and power delivery.
In some cases, a port can be re-enabled only after a restart or SMC reset.
So what led you to believe the Mac’s voltage is wrong ?
I didn't necessarily believe it was my macbooks fault - I just considered it as a compatibility issue between the devices, because other cables had the same result. I haven't checked the external USB hub yet
OK so the statement
The voltage issue was from my macbook
Is totally misleading and not a real finding…
I have edited it to clarify the issue.
Thanks for pointing that out, I have fixed it and hope other people find this topic helpful
This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.