I am trying to write simple AT commands with a UART connection from my MCU (just RXD and TXD at the moment) and am looking at the transmissions on the oscilloscope and trying to make sense of them. MCU datasheet Receiving IC datasheet

The format is 115200 baud and stop bits 1, parity None, ByteSize 8. (default) Two pictures are shown below. The first displaying the whole transmission (1ms frame) on the TXD line, which is yellow. The second showing where the information is being transmitted? (just a 50us frame).

Also one can see the RXD line (purple) is not very active during the second frame but the TXD is. Is this what one could expect to see on an Oscope for serial data?

1ms frame 50uS frame

Also wanted to clarify that the above readings are after a logic level shifter. 3.3V --> 1.8V.

Perhaps the most bizarre reading I have gotten on the oscope is below. When the MCU is transmitting its pad (purple) which rests at 2.7V peaks at 1.8V and troughs at GND. I cannot explain this behavior. After the logic level shifter the TXD trace (yellow) which normally is 1.8V begins to peak at 500mV and trough at GND. How is this possible? For each pad there are 3 voltage levels there should be only 2. Also wanted to mention I have manually verified the baud rate to be 115200 at least this was expected. enter image description here multimeter readings


Adding circuit details. Most of the circuitry is around the level shifter. The B side is connected to an ESP32's pins and the A side is connected to the IC receiving these transmissions. The TXD/RXD lines are not labeled with respect to the ESP but in respect to the other IC. So the RXD labeled is connected to the ESP's TXD and vice versa. I have connected the oscope to the RXD/TXD traces on the level shifter by soldering wires to the pads. level shifter circuit esp receiving ic power circuit

#include <HardwareSerial.h>
int greenpower = 32;
int led = 33;
int pwr = 5;

void setup() {
  pinMode(pwr, OUTPUT); //for verifying power to the board
  pinMode(led, OUTPUT); //for verifying power to the board
  pinMode(greenpower, OUTPUT); //for allowing power to auxillary processes
  digitalWrite(greenpower, HIGH); //allow power to aux devices
  digitalWrite(led, HIGH);  //apply power to verification circuit
  digitalWrite(pwr, LOW);  //begin modem start-up
  digitalWrite(pwr, HIGH);  //start-up signal
  //digitalWrite(pwr, LOW);  //end modem start up sequence
  delay(5000);  //wait for stabilization

  Serial.begin(115200);  // Open serial communications and wait for port to open:


void loop() {
  while (!Serial2.available()) continue;
  while (Serial2.available()) {
    char g = Serial2.read();

pcb board

  • 4
    \$\begingroup\$ No, it is not good. \$\endgroup\$
    – jay
    Aug 12, 2021 at 3:10
  • 7
    \$\begingroup\$ Something is wrong with the circuit, or the serial TX, or the way you've connected your scope. This is a single ended digital signal, so you should see GND, VDD, and nice square transitions from one to the other. \$\endgroup\$
    – Drew
    Aug 12, 2021 at 5:14
  • 1
    \$\begingroup\$ Please add a schematics of the whole thing. Without it, the only thing we can tell is that there is something wrong. period. For more, you have to provide more information. \$\endgroup\$
    – Blup1980
    Aug 12, 2021 at 7:30
  • 4
    \$\begingroup\$ @Feynman137 - Hi (a) This question seems a continuation of your earlier one with the same hardware. Please edit this question to make the context clear, and stop asking about the UART signals in that question, else the two questions become duplicates. (b) Your new schematic is not "the whole thing", as was requested. Please add full schematics. (c) The code in your earlier question is needed by readers here, to explain this trace showing the 1.8 V signal changing before the 3.3 V signal - yet the signal direction is 3.3 V -> 1.8 V. \$\endgroup\$
    – SamGibson
    Aug 12, 2021 at 12:32
  • 5
    \$\begingroup\$ [continued] It's because you are switching power to the 1.8 V device (Quectel BG95) aren't you? That is just one example of a detail which you need to explain here to give readers any chance of interpreting those traces. || I started analyzing this last night, but I realized how much I would need to clarify with you in comments, and decided it would take too long to do that :-( So please edit and make this question as complete as you can (explain context, add full schematics, show code etc.) to have the best chance of getting help here - and don't duplicate between questions. Thanks. \$\endgroup\$
    – SamGibson
    Aug 12, 2021 at 12:34

3 Answers 3


(c) The code in your earlier question is needed by readers here, to explain this trace showing the 1.8 V signal changing before the 3.3 V signal - yet the signal direction is 3.3 V -> 1.8 V. – SamGibson

You have not answered that part yet, or am I missing it? Is the scope screenshot from "//digitalWrite(pwr, LOW); //end modem start up sequence", before you commented that out? I had the same question, but the code does not cover the answer enough.

I absolutely agree, and exactly on the same page with @SamGibson about the reasoning below. Looking at what is up there, it still feels less than needed. The question is showing the problem, but not enough reviling what is related. You may eventually find the answer, but after more iterations of process than needed. My point is that; The problem is not too difficult to solve, but, the approach is important; "how to isolate issues and conquer one after another in logical order."

I started analyzing this last night, but I realized how much I would need to clarify with you in comments, and decided it would take too long to do that :-( So please edit and make this question as complete as you can (explain context, add full schematics, show code etc.) to have the best chance of getting help here - and don't duplicate between questions. Thanks. – SamGibson

Anyway, going back to the technical parts, I suspect, too, the MODEM RX pin is loading the CPU TX pin through opened "Npass" of the level-translator. How is the question. You need to read the MODEM data sheet, look into your code, and probe the power and signals. Unfortunate level-translator got caught in the middle.

The level translator has more than you want, "One-Shot Accelerator". Read page 17 & 18 of the datasheet. It can oscillate due to the feed-back effect through "Npass" and high-gain & high-speed (edge detection) nature of the One-Shot-Accelerator, when the conditions are met. That is what we see the high speed oscillation during the transition. I've seen that happening with I2C repeaters as well. You can try a buffer type level-translator at the next layout, for the peace of mind.

Move VBAT to 3.3V, remove the voltage translator. Your MODEM is 3.3V part.

From Feynman137's finding (I stress this), "V_IL(min/max) and V_IH(min max) on page 29 of the manual":

Page 28: VBAT_BB, pin 32, 33, Power supply for the module’s baseband
Page 74: Section 6.2. Power Supply Ratings, VBAT_BB/VBAT_RF, Typical 3.3V for M1, M2, N1 devices, 3.8 (min 3.3V) for M3, M5, M6 devices.

  • \$\begingroup\$ For the part inquiring about //digitalWrite(pwr,LOW); the oscope readings are for when this is commented out. I initially read the modem's power up sequence from the manual and made this logic. But realized I was getting feedback from the modem on the scope when I commented out the last portion therefore it must be on at this point. The shutdown sequence is very similar so I was worried that the last line was shutting down the modem. \$\endgroup\$
    – Feynman137
    Aug 15, 2021 at 19:09
  • 1
    \$\begingroup\$ Ha! WE (I feel guilty) should've checked that first. Good finding! Why didn't you tell me before. :-) I will write it in the main text. \$\endgroup\$
    – jay
    Aug 15, 2021 at 20:56
  • 1
    \$\begingroup\$ @Feynman137 , My regards to you for your humble endeavor! \$\endgroup\$
    – jay
    Aug 15, 2021 at 21:01
  • 1
    \$\begingroup\$ Aha, it was a exciting momentarily.. @Feynman137 We will move this into the main text when we are done, per the StackExchange rules. Anyway: 1) VBAT has to be 3.3V or 3.8V. 2) 1.8V from the MODEM VDD_EXT is output. Don't connect it to the 1.8V regulator. 3) page 53 "Main UART Reference Design (Translator Chip) illustrates the 1.8V and 3.3V(VCC_MCU) use. It is using unidirectional buffer. Continue the pin-lifting and probing, while checking the 1.8V rail. And then let us know. SamGibson may want to move us to the chat room. \$\endgroup\$
    – jay
    Aug 15, 2021 at 21:45
  • 1
    \$\begingroup\$ Let us continue this discussion in chat. \$\endgroup\$
    – jay
    Aug 15, 2021 at 22:20

First thing (usually always in any diagnosis of a PCB fault):

Check the power to all IC's with a scope, make sure that they are steady and have the appropriate RMS values (make sure they aren't too noisy). Make sure no loads are bringing down the rails. Measure the voltage differential between rails (shorts to higher rails can do weird things, for example the difference between 3.3 and 1.8 should be 1.5V)

Double check the grounds to the PCB make sure that all grounds are low resistance (usually that means lower than 0.1Ω or more) to the main power ground for the PCB (usually a cable). Another thing is checking the resistance to the power supply to make sure the grounding system is low resistance. (I've seen bad vias that are halfway between open and short)

Second thing: Check the scope. Double check the probes on the square wave output of the scope (even if there is no remote possibility that they are bad do it anyway).

Check the ground to the probe, it should be next to the IC you are measuring or on the via to the IC's ground (especially for higher speed +10MHz measurements I'm not saying that applies here but at any rate it will make sure you have a common ground with the IC)

Third thing: Make sure no ports on the level shifter or other digital ports are creating excessive loading (ie two outputs connected together). If you have any way to measure temperature (especially a thermal cam), that can help determine excess power dissipation).

Another thing you could do is lift the Vcc pin to the level shifter or and insert an ammeter or small resistor (and measure voltage across the resistor to get current Lower than 1Ω or 0.1Ω lower is better depends on the voltage resolution of the DMM you have) to measure the current.

Even removing the IC and measuring the total power on a lab bench supply and calculating the power dissipation in the level shifter might be useful.

  • 1
    \$\begingroup\$ I cannot find the high frequency bypass capacitors at the regulators. Check the data sheet of the manufacturer of the regulator and see what they recommend. If the leads and traces are over about an inch from the regulator the capacitors can become infective. I am not saying that is your problem but I will not say it is not, regulators do funny things when not bypased properly. \$\endgroup\$
    – Gil
    Aug 15, 2021 at 22:45

0.)Your wire gauge is WAY too big, get some 30 gauge for signals.

1.)Make sure your Rx/Tx directions are not backwards, causing a buffer war.

2.)Make sure your power supply rails are solid.

2a.)Check your current draw on the board to make sure it's not excessive.

3.)Look closely at your level translator datasheet. They are not as simple as you might think.

4.)Replace the level translator. They are usually high speed digital parts can be damaged easily by static or shorting accidentally.

5.)Try another board.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.