Wemos D1 Mini - Serial Monitor issues

Hi all,

Thanks for reading, and for any insight you're able to share.

General Background

13” Macbook Pro (2016)
MacOs Catalina 10.15.3
Wemos D1 Mini clone (Makerfire), CH340 USB to serial converter
Arduino IDE 1.8.12

I’ve had ongoing problems with these little ESP8266 boards which seem to be related to the CH340 usb to serial chip under MacOs Catalina.

For a couple of days I had no luck connecting at all, but after removing all traces of Wemos' CH340 driver I can now see the board in About this Mac > System Report > USB as “USB2.0-Serial”. This device seems to be stable, ie doesn’t disappear unexpectedly as far as I can see.

In the Arduino IDE however the board shows up in the ports list rather unreliably. After much googling and experimentation I am finally able to reliably upload sketches in the Arduino IDE using the following steps

  1. Hold reset button on the D1 Mini
  2. Go to Tools>Ports> and select the board with a name like /dev/cu.usbserial-xxxx where xxxx is a three to four digit number. (NB - this number frequently changes. I’m not 100% certain but it appears to change every time the D1 Mini is reset)
  3. Click on Upload to being the programming process - wait until “connecting….” appears in the Arduino programming window
  4. Only now release the Reset button on the D1 Mini

Programming is seemingly very reliable when following this method (although very different to the easy connectivity I’d become used to with similar boards from Adafruit using Silas USB to Serial chips).

The main issue

I’ve not managed to have any real success viewing code output using Serial Monitor. On occasion I get an indication that the setup() function has been called but I don’t think I’ve ever seen the line I’ve placed at the start of loop() be output.

It seems almost as if the USB to Serial chip is shutting down after the first few milliseconds of the code running.

In order to view again I have to reset the chip, select the port for the driver based on whatever number it’s given itself this time (it will always have changed as far as I can tell), and then again, occasionally, the first line in setup() will be received by serial monitor but no more before Serial Monitor window goes grey/disconnects.

Has anyone else experienced these sorts of issues, and if so, any tips? Apologies if I'm missing something obvious.

Regards,

Alastair

Hello Alastair,

Welcome to the Arduino fora.

I don't know what the cause of your problem is but you are making the classic mistake of people new here of assuming the problem is not your code. You might, of course be right, but we can only help you if you provide all the information, such as your code.

Before you do anything else please take a moment to read General guidance
And How to use this forum
Especially item #7 on posting code.

Since you are able to upload code it appears the communications is operating properly. Start with a very simple sketch such as the blink one. If that works then the problem is in your code.

gilshultz:
Start with a very simple sketch such as the blink one. If that works then the problem is in your code.

That's exactly what I am doing. The Blink example, edited only to begin Serial communications and print a line of text each time around loop().

The code runs just fine, but serial monitor output fails after 1-3 loops.

HI Aljrob
I am having similar issues with a batch of Wemos D1 Mini clones that I bought as well.

I have 60 of these boards and they have caused no end of trouble. I can upload code about 50% of the time, other times I have to unplug the Wemos and plug it in again and then it may upload or it may not. Usually eventually works.

As for the serial monitor. Sometime works sometimes not, have tried different speeds etc. And when it does work I usually get some garbled characters in the output.

I have a genuine Wemos and it works with the same sketches first time every time.

I have tried different version of the USB-Srial CH340 drivers but no luck.

I am a school teacher and bought these for my students to do a Blynk project and it has been very frustrating.