Forum Rule: Always post complete source code & details to reproduce any issue!
Results 1 to 8 of 8

Thread: Uart protection

  1. #1
    DeletedUser
    Guest

    Uart protection

    I am connecting a nextion screen to my teensy4.1 through UART. It works fine, but I was wondering if for the production environment (the screen will be on a steering wheel, while the teensy is in the dashboard on a custom build pcb, there is about 25 cm between this two devices and the baudrate is 115200) I should implement any protection feature, what I'm most concerned about is EMI as the system will be mounted on a running car. I was thinking about using a TVS diode with a couple of resistors, but I'm not sure if this will have an effect on the signal integrity.

    Something like this:
    Click image for larger version. 

Name:	Captura de pantalla 2022-04-19 125534.png 
Views:	15 
Size:	209.3 KB 
ID:	28128
    Where screenRX and screenTX are connected to the Teensy serial8 pins and P3 is a connector to the steering wheel display.

  2. #2
    Senior Member BriComp's Avatar
    Join Date
    Apr 2014
    Location
    Cheltenham, UK
    Posts
    865
    What Nextion are you using?
    That diode has a minimum breakdown voltage of of 6.45 volts,
    I think that sort of voltage going into a Teensy will fry it,

  3. #3
    DeletedUser
    Guest
    The nextion that I am using is NX3224T024,
    maybe using something like a BAT54S, would be more appropiate?

  4. #4
    Senior Member BriComp's Avatar
    Join Date
    Apr 2014
    Location
    Cheltenham, UK
    Posts
    865
    Ok, the I/O to that are 3.3v compatible.
    Yes I was thinking BAT54S to Gnd and 3.3V.

  5. #5
    DeletedUser
    Guest
    Something like:
    cable -> 10k resistor -> BAT54S -> uC input is okay?
    or should I place a resistor between the BAT54S and the uC?

  6. #6
    Senior Member BriComp's Avatar
    Join Date
    Apr 2014
    Location
    Cheltenham, UK
    Posts
    865
    I am not an electronics engineer, but you also need to protect the BAT54S, so I would guess before the BAT54S.
    10k seems rather high to me, have you been able to communicate with a 10k series resistor to the T4 and the Nextion.

    Incidentally I am developing communications with a Nextion myself, but I don't use the Nextion library.
    I prefer to use my own code. It is easier to decode when something goes wrong.

    I think my code is a good framework for dealing with Nextion and soon I will be publishing it on Github.
    I have decoded all the comms FROM the Nextion and have some code to handle changing baud rate between both
    devices and recovering comms when something goes wrong.

  7. #7
    Senior Member
    Join Date
    Oct 2020
    Posts
    175
    "High" baud rate and "low" voltage of 3.3V is not a great combination. If you raise the voltage of your signal using a max3232 to nominal +-12V on the Teensy end, then lower it down to proper level with another MAX3232, it will be better protected against noise (EMI) and then add the TVS (probably bipolar) if you need the MAX3232 protected against transient spikes.

  8. #8
    Consulting "Noise Reduction Techniques in Electronic Systems" by Ott is probably in order. Or maybe not as the chapter on ESD scared me. Put it in a metal box with no connections to the outside world. It's the only safe way. :-)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •