Electronics overview

Recommended process to design a mainboard PCB and write firmware for the MCU.

Software

PCB design

Altium Designer or KiCad are recommended. Please ask instructors if you want to use other software.

  1. Altium Designer

  2. KiCad

    • Operating system support: Linux, macOS, Windows.

MCU pin assignments and firmware project generation

Firmware code development

MCU configuration

Team repository

  1. Create clone of electronics branch and a separate clone of firmware branch.

  2. STM32CubeMX *.ioc file should be kept in the firmware branch and firmware directory.

    • STM32CubeIDE project (generated by STM32CubeMX) can be also be in the same folder.

  3. PCB design files should be kept in the electronics branch and electronics directory.

Schematic

Component libraries

Downloading

In general, the services that provide component libraries have a bad quality and can often be incorrect. Downloaded libraries should be checked against datasheets or drawing and fixed before using them in the design.

Creating from scratch

  • Component package and footprint drawings are usually available at the end of the component’s datasheet.

  • Symbols and footprints can be created completely from scratch or copied from existing libraries and modified if needed.

  • Wizards and generators are available that allow automatic generation or simplify the process.

    • Altium Designer

      • Symbols can be created manually or with the help of Symbol Wizard.

      • Footprints of common packages can be created with IPC Compliant Footprint Wizard.

    • KiCad

      • Footprints can be created with Footprint Wizard.

MCU pin assignments

STM32CubeMX can be used for the microcontroller pin assignments. Configuring all the peripherals can be skipped as it is not needed before writing the firmware.

See: Firmware

Schematic capture

Number of schematic sheets

Keeping everything on single schematic sheet simplifies reviewing the schematic, but duplicates the motor driver components. Having too many schematic sheets can make reading the schematic harder.

For mainboard design, a good number of schematic sheets is 2.

  • One sheet should contain motor driver and passive components connected to it.

  • Other sheet should contain all other components and also include 3 instances of the motor driver sheet.

PCB design

Firmware

Configuration

Writing firmware