Chat freely about anything...

User avatar
By Guillaume
#55942 Hello :)

I'm a relatively new user of ESP8266, I use some NodeMCU devkit 1.0, official boards, with the Arduino core. I've searched for a solution to my problem, but found nothing, not even someone with the same problem :/



When connected by USB cable only, to the computer, everythin works as expected, in the Serial monitor I see exactly what is supposed to be displayed...

But if I use an external PSU (even if I only connect the GND of this PSU to the GND of the NodeMCU, without connecting +V of the PSU to Vin of the NodeMCU) then the Serial monitor is displaying non-sense garbage (in RealTerm, the Error status LED is always blinking with message "UART receiver framing error"), sometimes immediately, sometimes after a few seconds.

The program itself is still working perfectly fine, it's just the Serial monitor displaying garbage, as in this example:

The GND of the external power supply is connected to the GND of the NodeMCU, and the USB cable is plugged to the computer. I open a serial monitor (tried a few) and I see this:
10:43:01 Fri 30 Sep 2016 CET Paris 24.75°C UpTime = 16 hours, 23 minutes
10:43:02 Fri 30 Sep 2016 CET Paris 24.75°C UpTime = 16 hours, 23 minutes
10:43:03 Fri 30 Sep 2016 CET Paris 24.75°C UpTime = 16 hours, 23 minutes
10:43:04 Fri 30 Sep 2016 CET Paris 24.75°C UpTime = 16 hours, 23 minutes
~˜x˜˜æ˜ffx˜à˜ø†f†žx˜€f``f€†øfžx`†~˜æž€˜ff†žæžf˜þ˜àžff~fx†x˜žfžøžf~fæøf€˜€`˜þxf†`
xfæxø†˜€†˜˜þ~†€˜†˜˜€~˜x˜˜ffx˜à˜ø†f†žx˜€f``f€†øfžx`†~˜æž€˜ff†žæžf˜þ˜àžff~fx†x˜žfž
øžf~fæøf€˜€~˜x˜˜˜ffx˜à˜ø†f†žx˜€f``f€†øfžx`†~˜æž€˜ff†žæžf˜þ˜àžff~fx†x˜žfžøžf~fæøf
€˜€`˜þxf†fxfæxø†˜€†˜˜þ~†€˜†˜˜€~˜x˜˜ffx˜à˜ø†f†žx˜€f``f€†øfžx`†~˜æž€˜ff†žæžf˜þ˜àžf
f~fx†x˜žfžøžf~fæøf€˜€~˜x˜˜ø˜ffx˜à˜ø†f†žx˜€f``f€†øfžx`†~˜æž€˜ff†žæžf˜þ˜àžff~fx†x˜
žfžøžf~fæøf€˜€`˜þxf†fxfæxø†˜€†˜˜þ~†€˜†˜˜€


As you can see, it worked well for 4 seconds after I opened the serial monitor, and the NodeMCU was running since more than 16 hours with no problems, the program is working fine. It's only when I open the COM port that the Serial issue begins... Also it seems to always finish printing a full line correctly, before going crazy, this is strange.

If I close the COM port and wait a few seconds, then open it again, it will work again for only a few seconds.

I also tried on another NodeMCU, alone (without my RTC connected), with the simplest program (just print "hello" and delay one second), same problem.

I tested, re-tested to make sure, it is as soon as I connect the GND of the NodeMCU to the GND of the PSU that the Serial monitor starts showing garbage, even when Vin of NodeMCU is not connected to +V of the PSU.

I tried adding a 10uF capacitor across Vin and GND of the NodeMCU, but it has no effect. I also tried different values of capacitors, again with no luck.

I also tried baud rate 74880 (I saw this weird value mentioned somewhere else) because I was desperate, but again no luck.


My PSU is a 12V 5A (KY-60W-12-L), with adjustable step down module that I've set to 5V but also tried with 7 and 9V.

PSU:
Image

Step down modules that I tried:
Image

Image


Characteristics of the PSU:
Input:

Input Voltage(V): 180VAC~264VAC
Input Current (A): 0.56A Max
Frequency (Hz): 50Hz–60Hz
Efficiency: 82% Typ(230VACFull Load)
Inrush current(A): Cold star <40A/230VAC
Leakage current(mA): <3mA/240VAC


Output:

Output Voltage(V): +12VDC
Voltage Regulation: +3,-2%
Output Current(A): 5A
Current Range (A): 0 ~ 5A
Rated Power(W): 60W
Start time, hold-up time(ms): Ton≤1000ms,Td≥20ms @230Vac Full Load
Rise time(ms): Typ:20ms @230Vac Full Load
Ripple/Noise(mVp-p): 120mVp-p


Environment:

Working Temperature (°C): 0°C - +40°C(refer derating curve)
Storage Temperature(°C): -20°C - +60°C
Humidity(%): 20% - 90% RH non condensing


Safety/ EMC:

Withstand voltage(VAC): I/P-O/P:1.5KVAC,I/P-FG:1.5KVAC,OP-FG:0.5KVAC 1min
Safety Standard: EN/UL60950-1,GB4943
EMC Standard: EN55022 Class B,EN61000-4-2,3,4,5,6,8,11 GB17626.5 Level3


Protection:

Over voltage Protection: >115%-135% Rated output voltage
Over load Protection: >105%-150% Auto recovery
Short circuit Protection: Latched
Over Temperature Protection: No




I would like to understand why it's happening, and how to solve it.

Also, I would like to know if it's possible to use Serial without using USB cable? In RealTerm I can choose to listen on an IP address instead of a COM port, but how do I configure my ESP8266 for it ?

Thanks in advance for any help ;)
User avatar
By rudy
#55967 Can you try a battery as the source for the step down converter?

Another thing you can try is to connect the negative of the AC-DC power supply to a ground connection of your computer.
User avatar
By Guillaume
#55973 Hello,

I didn't think of trying another power source than my current PSU, because it never failed before, when I was using it with Arduinos...

I tried, instead of a battery, a wallwart, 12V 1.7A, from an old printer, to which I connected the step down module, and guess what, problem solved!

So, I'm sure that the problem is caused by the other PSU. Is it only good for powering LED strips? I have no oscilloscope so I can't really see if there are spikes or whatever..

Also I noticed something on this PSU. There is a LED on it (which turn ON when the PSU is powered, obviously). When the NodeMCU is connected to both the USB cable and this PSU, and I de-power the PSU, then the LED of the PSU will still stay on (not fully bright, but no fade out like it should normally do), it is backfed by the power from the USB, I don't know much in electronics but this is not good, right? Should I add diodes or something?

I can use the wallwart PSU for now, but later I will need those 5A that the other PSU can deliver. Any advices? I'm probably not on the best forum for this kind of questions but still, feel free to answer if you know something that I should know ;)

Thanks.