Serial port voltage levels - Page 1
Forum section: electronics / projects

author: glentek
author_rank: Regular Contributor
timestamp: April 13, 2022, 10:12:40 pm
content: I have an ATMega324 running at 5v connected to a Nextion display that has an STM processor running at 3.3V. My serial port is protected with 120R series resistors and 5.6V zeners to ground on the processor side. There is also leds from Tx and Rx on the display side of the 120R resistors to 5V via 22k resistors. Nextion claims the display is tolerant to 5.0V on the receive side.After working well for several days my display has now been damaged, the serial ports when idle sit at about 2.4V and transmit giberish, receive nothing. Is it a random failure, or is my setup faulty?

author: moffy
author_rank: Super Contributor
timestamp: April 13, 2022, 10:34:36 pm
content: If the display side alone is damaged but not the Atmega then maybe it is the setup, but only the input to the display should be damaged. The 3.3v signal from the display might be a little marginal to transmit reliably to the 5v Atmega, I don't know what the thresholds are. It is hard to judge as you have provided so little info.

author: glentek
author_rank: Regular Contributor
timestamp: April 13, 2022, 10:43:42 pm
content: I can add that a working display with just power and the serial not connected, the Tx and Rx sit at 3.3V. The damaged display both sit at 1.8V. Other than the serial lines the display works perfectly, being updateable by SDCard. Of course without serial it is useless.

author: moffy
author_rank: Super Contributor
timestamp: April 13, 2022, 11:10:49 pm
content: Normally when fault finding you look for cause and effect, the effect being the damaged display serial port, was there an event that coincided with the failure? If you find an event you can try to deduce what happened and failed and how to remedy the situation.If there is no event then maybe it is the problem of feeding 5v levels into 3.3v inputs, but without a circuit diagram you don't know. If you want to feed a 5v signal into a 3.3v input, all you need is two resistors acting as a voltage divider.I looked at an STM32 data sheet and most inputs don't like 5v, but again without a circuit diagram one is only guessing.

author: glentek
author_rank: Regular Contributor
timestamp: April 13, 2022, 11:43:42 pm
content: The display serial lines go direct to the STM - there is no protection. The display was working on Tuesday when I stopped for the day, then when I powered up my bench on Wednesday, without changing any connections, it had stopped working. My thought is to increase the resistor on the processor Tx side to 1.5k and hope the STM protection diodes limit the voltage. I can't imagine the 5V applied from the notification leds could cause the damage as there is a 22k resistor in series. I could add a 3.3V zener on the display Rx as well.

author: james_s
author_rank: Super Contributor
timestamp: April 14, 2022, 12:09:36 am
content: Is it possible something got shorted together? ESD event? What about the power supply? Is there a possibility of overshoot when you turned it on or off?

author: moffy
author_rank: Super Contributor
timestamp: April 14, 2022, 12:13:22 am
content: The problem won't be the display Tx to the Arduino Rx unless there is a grounding or supply issue, but putting a 1k resistor in series is a good safeguard. For the Arduino Tx to display Rx put a 1k resistor in series and a 2k to gnd on the display side and this will change the 5v output from the Arduino into a 3.3v input into the display. Do you have solid gnd connection between both units?

author: CaptDon
author_rank: Super Contributor
timestamp: April 14, 2022, 12:49:16 pm
content: What standard is your serial communication? SPI, I2C, RS-232, USB(X) ? Increasing the 120 ohm resistors may help but may also degrade the shape of the signal above some certain signalling speed.

author: tooki
author_rank: Super Contributor
timestamp: April 14, 2022, 06:32:56 pm
content: Quote from: CaptDon on April 14, 2022, 12:49:16 pmThe voltages described already rule out RS-232 (since that specifies positive and negative voltages). The named “TX” and “RX” lines rule out I2C, SPI, and USB. (USB is bidirectional, differential signaling.)Anyhow, those displays are UART (logic-level serial).

author: glentek
author_rank: Regular Contributor
timestamp: April 14, 2022, 08:52:30 pm
content: Thanks everyone. I'll divide down the processor Tx and hope the replacement $150 display survives! Previously I ran them on a 3.3V Teensy for years without issue.

author: james_s
author_rank: Super Contributor
timestamp: April 14, 2022, 08:58:49 pm
content: What kind of display is it? Does it have a buffer or transceiver IC you could potentially replace?

author: moffy
author_rank: Super Contributor
timestamp: April 15, 2022, 12:06:12 am
content: He mentioned previously that the Tx and Rx lines ran directly into the STM controller for the display. Unfortunately no driver chip to replace.P.S. Don't forget to add an extra 1k in series with the Arduino Rx and Display Tx. It would help if there are any strange startup issues with the controllers, you did seem to lose the display at a switch on. Best of success.