When starting a board layout the first thing to put into place are the mechanical constraints. For this design the board outline is the primary one. Others are locations of mounting holes and keep-outs for the mounting hardware. For this design the final consideration are the user interface component locations; specifically the connectors, switches, and LEDs. All of these mechanical constraints will be carried over from NXP’s AN11154 board design.
After the mechanical constraints are in place the floor plan for the components can be considered. Components within a function are grouped together. For this design there is USB suppression, power supply, microcontroller, 485 transceiver, and 485 interface suppression. The suppression components are placed near the connectors to keep transients from going further in board. The transmission line termination components are placed near the transceivers. The power supply is placed in a spot around the edge of the board to minimize its interference with other circuits. A switching power supply will have switching nets placed in board a bit to avoid emissions from the board edge. The microcontroller is central since it interfaces to all the other circuits and the transceiver is as near the communications connector as practical. Get the bypass capacitors close the the pins they are connected to. The transceiver circuit components are more isolated from the rest of the board to allow for functional isolation. I made several trials at component placement before settling on one. For each arrangement I thought of how the nets might route to determine whether I needed to try again.
When routing start with the more critical nets. The USB D+ and D- nets are sensitive in this design. Route them as a pair from the connector to the microcontroller. The 485 A and B nets are routed the same way. There are two 485 connectors so they are routed in series to avoid adding a stub to the transmission line. Routing bypass capacitors start with a connection to the supply then the bypass capacitor and last to the supply pin. This will keep supply transients between the component and its bypass capacitor. On this design, the crystal connections are between a
The kicad project can be cloned from github: