Firmware Settings
This page outlines the SPI configurations for the DRV gate driver, and the component selections for the circuitry surrounding the MCU
Phase VSENSE Feedback:
The MCU and control algorithm needs to know the phase voltages at all times to control the timing of the commutation. This is done through a voltage divider from the phase voltage to an ADC pin on the MCU
The maximum voltage we prepare for on any phase is 60V. The maximum input voltage of the STM ADC is 3.3V. Therefore, we can map 60V to 3.2V to make use of our whole voltage range. Resistors chosen have a slightly high power rating as they are exposed to higher voltage and will be able to have better thermal performance
R1 - 18k 1/3W 0603: https://www.digikey.ca/en/products/detail/panasonic-electronic-components/ERJ-PA3F1802V/5035880
R2 - 1k 1/3W 0603: https://www.digikey.ca/en/products/detail/panasonic-electronic-components/ERJ-PA3F1001V/5035848
Dead Time Settings:
Under the conditions specified in the table below, those are the rise, fall, and delay times for the chosen power MOSFET.
When selecting a dead time, we must ensure that it is greater than the sum of the turn-off time and fall time of the HS FET, and then turn-on time and rise time of the LS FET, or vice versa. When adding the times together we get 22.6ns
When setting the dead time for the gate driver over SPI, a value of either 50ns or 100ns seems to be good. We do not want to set this value too high or else we will have no current in our motor windings for too long as it can affect our commutation timing, our power efficiency, our response time, and our heat generation
Â
FOC Archive
Current Sense (Only used for FOC):
For the SPI version of the IC that we have, you do not use a resistor to set the gain, instead you set a bit in the chip:
To select a current sense resistor, we need to consider the power loss throough the resistor and make sure it’s rated for it, as well as the voltage drop across the resistor that will be sent to the CSA so that we know we are making the most out of our 0 to 3.3V range.
2mohm 5W: https://www.digikey.ca/en/products/detail/vishay-dale/WSLF25122L000FEB/6194694
Â
STM MCU Clock:
In the STM Motor Control Workbench software, we are configuring our MCU to be using an external oscillator with a frequency of 8MHz.
IC:
Â