Layout Design

Throughout laying out a schematic, I often go back in forth between creating/importing schematic symbols and PCB footprints, and placing the components onto the schematic sheet.

For small system schematics and two layer boards, I often like to create the symbols to reflect how their PCB footprints have them laid out. This allows me to get a sense of where I can place components on the PCB board in an organized fashion.

For large systems you can create a series of “Hierarchical Sheets” that each contain different sub-systems, such as “Power”, “Sensor Type X”, “RF Circuitry”, etc. Here is a useful link to how to create Hierarchical Sheets.

Keep circuit sub-sections organized by separating them out with space or lines

Motor Encoder Schematic - Rev 1

Motor Encoder

Power Input Connections

For any system, it is always a good idea to include Circuit Protection components such as Zener Diodes, Fuses, Schottky Diodes, etc. to protect any inrush currents, voltage spikes, or other sources of energy that will cause damage to the board.

  • Zener Diodes - Protects against sources of over-voltage
  • Fuses - Protects against high in-rush currents and over-current scenarios
  • Schotty Diodes - Protects from reverse-currents that can damage sensative components.

Protective Components

Data Input Connections

Similar to power input connections, high-speed and other sensitive data connections can benefit from Electrostatic protective devices, as shown by Diode (D3) on the USB connector.

ESD Protective Components

USB Connections

As shown in the micro USB image above, another protective diode IC (D2) was used to protect the data lines from any inrush energy when the connectors are attach/detached.

You may also find that other designs include more components for the USB Power and ground lines, however I opted to not use them and save money and space. It is always a good idea to add Ferite Beads, Capacitors and Resistors, to smooth out Power rails and Grounds. Here’s an example of how this can be implemented:

USB Protective Components

Reset Button

A reset button is usually mandatory for any new board design for its ease when programming the MCU. You should always include protective components with the button to prevent bouncing from occuring, which can cause issues with the MCU. For this, I’ve included a capacitor (C18) to help maintain voltage levels and a Transient surge Voltage Suppressor(TVS) depicted as D1. It is a good idea to keep the smoothing capacitor, C18, as close as possible to the MCU when laying out the PCB board.

User Button

Magnetic Hall Effect Sensors (Encoders)

The Magnetic Hall Effect sensors used in this design are classified as Magnetic Latches, therefore the output level is either HIGH(1) or LOW(0). As you can see, I included a Low-Pass filter for this design incase I decide to switch from a Latch to an Analog output sensor. For the Latch design, the resistor can be a simple 0 ohm jumper and the capacitor not installed(DNI). I’ve also included smoothing capacitors for the sensors power supply.

Magnetic Encoders

Grounding

When dealing with systems that have Digital and Analog components and sensors, it is typically a good idea to have their grounds separated by using either a Ferrite bead or a resistor. This helps reduce coupling and noise between other traces, such as data lines (SPI, I2C, etc.) and any small signal analog sensors. It is always a good idea to keep Digital and Analog grounds separate.

Grounding issues are less likely to arise in small systems that have short traces, however it is still extremely important to understand how each current will flow from its power source through the components and back to its ground terminal.

A more in-depth view into Grounding can be found in the PCB Layout - Routing Section.