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:
- UART
- 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:
- Timer
- USART2 & USART3
- I2C1 and I2C2
- ADC
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.
Discussions
Become a Hackaday.io Member
Create an account to leave a comment. Already have an account? Log In.
If you're thinking about manufacturing STM might not be a good option.
good post!
Are you sure? yes | no
Thanks for reading and for your comment! Although the chip shortage is still happening, there's still different ways to prepare in advance. For instance, while coding the firmware, driver and adapter patterns are being used (and in C). The rationale behind this approach is to make it portable. When we are ready for manufacturing, then we'll be ready to port. Until that time, using the STM32F3 is a good balance between development and future production - knowing that in the future the chip shortage will ease at some point.
Are you sure? yes | no