I want to share my very recent experience with several Wemos D1 boards. I hope this will help someone to save time and frustration.
This is my history: A customer ask me for 50 units of very simple WiFi data logger. It’s a product I sold several times. Yes, I used the ESP8266, in a Wemos board, with a ESP12 from DOIT.AM. Plus a 5v switching power supply, two status led, two optocouplers and not much more.
When the boards arrived I observed some very strange behavior when connected to a PC by USB cable: the computer enter in a cycle of: recognize the COM port and one second after loose it, and repeat forever. The period of the cycle sometimes was very homogeneous (~0.5Hz), that should be the first thing I should pay attention, but sadly I missed it. Intermediately I changed cables, computers, but nothing. Very soon I found that if I touch the module, the cycle stopped and I can access the module normally.
I thought It could be something with the CH340, a defective chip, something with a floating pin, etc. I check everything, but not very convinced: I never like the idea of touch something to solve a electrical noise problem; it should be the opposite! But I didn’t have something better. Finally I remove the two transistors driven by the CH340 (which are used by the board to reset and to put the ESP in programming mode). Once it was programmed I won need them anymore, neither the CH340. Very dirty, but I needed to deliver the units to my customer.
That stop the ESP reboots, and seems to work for a while, but very soon I found anothers problems with the Wifi: disconnections, huge ping times, and some modules didn’t connect at all. I checked and suspected of everything. I tied to ground everything, I put filter caps everywhere, seems to help, but I didn’t get rid completely of the problem.
Of course in the middle I was trying to convince my supplier that something wasn’t right but at the same time I needed the boards as soon as possible, I knew that that kind of problems are very difficult to demonstrate (he still saying I should try another USB cable), and the worse: maybe all the boards he has on stock could have the same failure. So I was determined to solve it.
Started to remove everything from the board, eventually I have just the ESP12 board without the metallic cover
Again, improved, but still I had connection problems, and the board feels a little hot. Sadly, wasn’t so straight as I writing it, and took me 2 days (and several boards), but finally I found the culprit component: one
inductor (or at least what I think it’s) capacitor in the RF output. It’s between the antenna and ground. In the picture it was already (brutally) removed. I think it should be a filter matching network which has a different value of what should be, shorting the antenna and injecting RF to GND.
After I remove it everything started to work perfect: nice ping times, no disconnections, no resets, and cold boards.
In the picture, it’s a before and after: it’s clear improvement in ping times and current consumption (0.47 ohms in series, 50 mv/div). Also it shows as fast I can open a ESP12 and remove a SMD
inductor capacitor (and that explains the previous picture ;)
As soon I saw this, all pieces fit’s correctly in my mind: principally why touching something helped, and why the disconnection-connection cycle was so precise. I feel very dumb I had all the evidence: it’s was RF noise coming from the ESP, not from outside; but sadly didn’t see it clearly.
In the middle I expend time searching the web for the same symptom, but I didn’t found nothing: I can’t have so bad luck to be the only one in the world with 50 defective Wemos boards. So I hope to help someone with the same problem, or maybe to learn as not to troubleshoot.