This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

THVD4431: Custom communication shield with THVD4431

Part Number: THVD4431
Other Parts Discussed in Thread: TLV775, TPS2117, SN74LVC245A,

Hi,

I want to design a custom multi-protocol shield that must be compatible with the Arduino V3 footprint, as well with the ST Nucleo ZIO connector.
The reason I'm designing this, is because I haven't found any ready-to-use shield that complies to my wishes and my use case.

My shield is build up around the THVD4431 multi-protocol chip, along with some other chips, like a TLV775 LDO to convert 5V Arduino voltage to a 3,3V supply voltage to the board.
I use a TPS2117 power Mux to automatically select between the input voltages of 3,3V when connected to a ZIO-compatible board, or from 5V when connected to a Arduino V3 board.

Since it must be a multi-purpose experimental shield, I want to configure all jumper settings by manual jumpers but it also must be able to be controlled by the software of the MCU.
To make a seperation between the jumper configuration and MCU I/O, I use a SN74LVC245A in between.

Near each jumper I have an green and orange LED visually giving the state of the current setting. (green=connected to gnd, amber connected to 3,3V)

While I'm still finishing up the drawing, here is the more-or-less final version of it in .pdf:
THVD4431 Custom Shield.pdf 

My question is, will everything work as I think it would be?
I have designed an automotive module in the past but that was a couple of years ago and I hope I have understood the datasheets correctly.
The THVD4431EVM schematics were also very helpfull to verify some configurations, but as I said, I couldn't find an existing communications shield that could be programmed by jumpers and has a software override option as well.
For my own specific use case, the challenge was also to make it compatible with the NUCLEO H753ZI evaluation board, as well with the stacked LCD shield.
So the final configuration will be the NUCLEO board on the bottom, my communication shield stacked on the Nucleo board in the middle, and the LCD shield stacked on top onto my communication shield.
This also impacted the layout and use of I/O connectors I could use without getting overlapping with the LCD shield.

For the purpose of the board, I also wanted to expand all the communication signals to the side of the board for easy access so I can easily make meassurements to both UART signals, GPIO signals, and RS232/RS485 signals.

Now, I'm not asking to review my whole schematics, but it would be very much appriciated if someone could look over it to see any major design flaws or wrong connections that makes my shield not working as I wish it should work.

Many thanks in advance!

  • Hi Stefan,

    I can look over the THVD4431 schematic.

    You have some redundancies in the design.

    You have external termination on the RS485 lines but the device itself has termination internally. Usually in a full duplex set up, termination is placed on the receiver node so you typically don't even need termination on the Y/Z pins. 

    Same thing with the half duplex enable, this can be done using the mode pins for the device. In both situations it's okay as long as you're aware but does add a little more complexity from the layout point of view. (can be a bad thing if you for example use the internal termination and enable the external, or enable full duplex mode internally but then have half duplex mode enabled externally. This adds more room for user error).

    Do you know what your C18-C21 caps are rated for? I usually recommend larger than 2x of the V-/V+ levels. Probably best to choose something like 20V or larger.

    I recommend a weak pull up resistor (maybe 47k) on L2 incase you use the device in RS485 half duplex mode and DIR is set high, L2 will float and could cause a glitch to the MCU.

    Other thoughts: for layout the RS485 lines should be differentially length matched, impedance controlled, and stubs should be minimal to avoid reflections. 

    Some people opt to add external ESD protection on the RS232 pins using bidirectional TVS diodes. I sometimes see people add small series resistors on the RS232 pins and some small cap (maybe 180pF) on these as well. I'd avoid them being part of the RS485 circuit though. 

    -Bobby

  • Hi Bobby,

    Thanks for taking the time to look over my drawings. This is very much appreciated!

    I know I have some redundant function on the board, but this was done deliberately to make it as flexible as it can be.
    The purpose of this project is to create a multi protocol demonstration or experimental shield that can be used on either the ZIO compatible connector layout for the NUCLEO evaluation boards from ST, and to be compatible at the same time for the Arduino Uno V3 footprint.
    I've managed to have all the functionality to be compatible for both platforms, except for software control for the Rx and Tx LED's. When connected to the Arduino platform, these LEDs will only be functional based on the UART signals, and can't be software controlled as I don't have enough compatible pins for it.

    All ceramic capacitors have a voltage rating of 50V and are either in 0805 or even 1206 package size. This doesn't cause any layout problems and I know I need to place the decoupling capacitors as close to the supply pin of the IC's. Which I have done :-)

    About the pull-up resistor, you mean to add this on the L2 input of the THVD4431 chip? (Rx-line)?
    Will this not interfere with the data transmission of the UART from the MCU?
    If you can confirm this is indeed the correct modification to do, than I will add this 47K pull-up on the L2 line.

    I have tried to calculate and layout the tracks for the RS485 as good as possible.
    Meaning in my PCB design:
    a) matching length for the A/B pair. and matching length for the Y/Z pair. I tried to make these tracks as short as possible and they ended up as ±33mm for the A/B pair and ±42mm for the Y/Z pair. Total difference in length of the tracks is 0,23mm for the A/B pair and ±0,38mm for the Y/Z pair.
    b) Calculated the total track impedance of Zd=117Ω 
    However, I do have made testpoints available for all 4 wires so I can easily measure the signal with my scope.
    This also could be done through the connector itself, but this way I can have my wires stay connected while still be able to do measurements to the signal.

    About the extra ESD protection, since this is mainly for lab experimental purposes or in a relatively safe environment, plus the fact the THVD4431 has some build-in protection for ESD, I don't think I would need this for now, but it is sometihing I certainly take with me if I need a new revision or design.

    Below is a 3D rendering of my PCB:

  • About the pull-up resistor, you mean to add this on the L2 input of the THVD4431 chip? (Rx-line)?
    Will this not interfere with the data transmission of the UART from the MCU?

    Yes, it should not interfere as long as you choose the same digital logic high to tie the resistor to AND choose a weak resistor (something above 4.7k or larger should be enough that the Arduino can overcome/drive it). If your arduino Tx pin uses 5V as a digital logic output, I'd tie the pull up resistor to a 5V rail. And if it uses 3.3V then I'd use 3.3V.

    a) matching length for the A/B pair. and matching length for the Y/Z pair. I tried to make these tracks as short as possible and they ended up as ±33mm for the A/B pair and ±42mm for the Y/Z pair. Total difference in length of the tracks is 0,23mm for the A/B pair and ±0,38mm for the Y/Z pair.

    You should also work with the PCB fab company to set a characteristic impedance for the trace. Typically 120 for RS485 and 100 for RS422. 

    As long as you're intentionally length matching. differential routing, and reducing stubs I think you should be setting everything up to be more optimized for RS485.

    b) Calculated the total track impedance of Zd=117Ω

    I just want to double check this but total impedance and characteristic impedance are not the same thing. Characteristic impedance is the sqrt(L/C). 

    I would double check with the PCB FAB shop and let them know you want the differential traces to be set to a characteristic impedance of 120 ohms or 100 ohms. 

    -Bobby