I'd like to share some experience about PCB layout.

The usual order in which components are placed on a printed circuit board:

Place components in a fixed position that closely match the structure, such as power sockets, indicators, switches, connectors, etc. After these devices are placed, they are locked by the LOCK function of the software so that they will not be accidentally moved later;

Place special components and large components on the line, such as heating components, transformers, ICs, etc.

Place small devices. The distance between the components and the edge of the board: if possible, all components are placed within 3mm from the edge of the board or at least greater than the thickness of the board. This is due to the high-volume production of the plug-in and wave soldering. It need to be used for the mounting rail. And at the same time, in order to prevent the edge portion from being damaged due to the shape processing. If there are too many components on the printed circuit board, if it is necessary to exceed the 3mm range, a 3mm auxiliary edge can be added to the edge of the board, and the auxiliary side is opened V-shaped. The tank can be cut by hand during production.

Isolation between high and low voltage: There are high voltage circuits and low voltage circuits on many printed circuit boards. The components of the high voltage circuit are need separated from the low voltage parts. The isolation distance is related to the withstand voltage. Usually, At 2000kV, the distance between the boards should be 2mm. On this basis, the ratio should be increased. For example, if you want to withstand the 3000V withstand voltage test, the distance between the high and low voltage lines should be more than 3.5mm. In many cases, in order to avoid Crawling, it need to design the slotting between high and low voltage on the printed circuit board.