There is a list of peripherals needed for the module that will control the kite line:
- 4x Stepper Motor Drivers (4 pins each)
- 2x Endstops for each stepper
- 4x Analog inputs (2x for DC motor in, 2x for Current sensor in)
- 4x Timers (1 pin output compare each)
- 1x UART (connects to computer)
‘Nice to have’ with remaining pins are:
- 5x ADC inputs
- 6x Output pins for debug
Planning out the usage of the pins began by referring to the User Manual: STM32F3 Discovery kit with STM32F303VC MCU. “Table 7. STM32F303VCT6 MCU pin description versus board function” shows the pins in use by the on-board peripherals, and the alternate functions.
That table does not include the ADC pins however. By referring to the Datasheet: STM32F303xB STM32F303xC, the table “Table 13. STM32F303xB/STM32F303xC pin definitions” has the column “Additional functions”, which details which pins have the ADC available. The pins with ADC were marked into the ongoing table to get a complete picture of the pin usage.
A list of priority pin usages were determined, and placed into their own column:
- USART2 & USART3
- I2C1 and I2C2
The next step was to go through each row by row for a single column and check off if it was possible to use that pin. If a peripheral on the board was already using that pin, then it was skipped. Once all the columns were complete, it was a matter of selecting the pins.
Timer output compare pins were the first pins to be selected. Afterwards, steppers were selected, looking for a sequence of pins on the header connectors P1 and P2. Following that, the uart, endstops, analog inputs, debug, and extra.
The remaining step for pins will be to work on the power input. This ties into a separate electronics subsystem about also powering the steppers, power source, and voltage regulators.
Now that the pins are selected, progress can be made on the firmware and electronics board!
The entire spreadsheet can be seen on the Github repository.