1 Introduction
Dead zone, simple explanation: Usually, high-power motors, inverters, etc., are all H-bridges or 3-phase bridges composed of high-power tubes, IGBTs and other components at the end. The upper and lower bridges of each bridge must not be turned on at the same time, but when the high-speed PWM drive signal reaches the control pole of the power component, it often produces a delay effect due to various reasons, causing a half-bridge component to not turn off when it should be turned off, causing the power component to burn out. The dead zone is to delay for a period of time after the upper half bridge is turned off before turning on the lower half bridge, or to delay for a period of time after the lower half bridge is turned off before turning on the upper half bridge, so as to avoid the power component from burning out. This delay time is the dead zone. (That is, the components of the upper and lower half bridges are all turned off) Dead zone time control is not available in the PWM equipped with ordinary low-end microcontrollers.
The transistors of the upper and lower bridge arms of the PWM cannot be turned on at the same time. If they are turned on at the same time, the two ends of the power supply will be short-circuited. Therefore, the two trigger signals must disconnect the transistors for a period of time. This area is called the "dead zone" and the advantages are needless to say. The disadvantage is that the harmonic content increases.
Only the advanced timer of stm32 has the function of dead zone control. For example, the dead zone time can be adjusted when CH1 and CH1N of TIM1 output PWM waves.
2. Dead zone test
Use CH1 and CH1N of TIM1 to output two PWM waves, with a period of 300us, a duty cycle of 1/3, and a dead time of 0xFF. The waveform to be achieved is as shown in the figure below:
3. Implementation method
The configuration process in cube is as follows:
For convenience, set the polarity of the two PWM waves to high.
The code is implemented as follows:
HCLK= 48MHZ
/* TIM1 init function */
static void MX_TIM1_Init(void)
{
TIM_MasterConfigTypeDef sMasterConfig;
TIM_OC_InitTypeDef sConfigOC;
TIM_BreakDeadTimeConfigTypeDef sBreakDeadTimeConfig;
htim1.Instance = TIM1;
htim1.Init.Prescaler = 48-1;
htim1.Init.CounterMode = TIM_COUNTERMODE_UP;
htim1.Init.Period = 300-1;
htim1.Init.ClockDivision = TIM_CLOCKDIVISION_DIV1;
htim1.Init.RepetitionCounter = 0;
htim1.Init.AutoReloadPreload = TIM_AUTORELOAD_PRELOAD_DISABLE;
if (HAL_TIM_PWM_Init(&htim1) != HAL_OK)
{
Error_Handler();
}
sMasterConfig.MasterOutputTrigger = TIM_TRGO_RESET;
sMasterConfig.MasterSlaveMode = TIM_MASTERSLAVEMODE_DISABLE;
if (HAL_TIMEx_MasterConfigSynchronization(&htim1, &sMasterConfig) != HAL_OK)
{
Error_Handler();
}
sConfigOC.OCMode = TIM_OCMODE_PWM1;
sConfigOC.Pulse = 100;
sConfigOC.OCPolarity = TIM_OCPOLARITY_HIGH;
sConfigOC.OCNPolarity = TIM_OCNPOLARITY_HIGH;
sConfigOC.OCFastMode = TIM_OCFAST_DISABLE;
sConfigOC.OCIdleState = TIM_OCIDLESTATE_RESET;
sConfigOC.OCNIdleState = TIM_OCNIDLESTATE_RESET;
if (HAL_TIM_PWM_ConfigChannel(&htim1, &sConfigOC, TIM_CHANNEL_1) != HAL_OK)
{
Error_Handler();
}
sBreakDeadTimeConfig.OffStateRunMode = TIM_OSSR_ENABLE;
sBreakDeadTimeConfig.OffStateIDLEMode = TIM_OSSI_ENABLE;
sBreakDeadTimeConfig.LockLevel = TIM_LOCKLEVEL_OFF;
sBreakDeadTimeConfig.DeadTime = 0xFF;
sBreakDeadTimeConfig.BreakState = TIM_BREAK_DISABLE;
sBreakDeadTimeConfig.BreakPolarity = TIM_BREAKPOLARITY_HIGH;
sBreakDeadTimeConfig.AutomaticOutput = TIM_AUTOMATICOUTPUT_ENABLE;
if (HAL_TIMEx_ConfigBreakDeadTime(&htim1, &sBreakDeadTimeConfig) != HAL_OK)
{
Error_Handler();
}
HAL_TIM_MspPostInit(&htim1);
}
Turn on complementary PWM wave output in the main function:
HAL_TIM_PWM_Start(&htim1, TIM_CHANNEL_1);
HAL_TIMEx_PWMN_Start(&htim1, TIM_CHANNEL_1);
4. Calculation method of dead time
Brake and dead zone dead time control register TIM1->BDTR
8*(1/72M)*(32 + DTG) = 5us
DTG=13
DTG[7:5]=110
DTG[4:0]=01011
DTG[7:0]=11001011=0xCD
The upper three positions can be set according to your needs, and different gears can be selected
Previous article:The concept of dead zone in the advanced timer of STM32
Next article:STM32F051 brake function problems and solutions
- Popular Resources
- Popular amplifiers
- Naxin Micro and Xinxian jointly launched the NS800RT series of real-time control MCUs
- How to learn embedded systems based on ARM platform
- Summary of jffs2_scan_eraseblock issues
- Application of SPCOMM Control in Serial Communication of Delphi7.0
- Using TComm component to realize serial communication in Delphi environment
- Bar chart code for embedded development practices
- Embedded Development Learning (10)
- Embedded Development Learning (8)
- Embedded Development Learning (6)
Professor at Beihang University, dedicated to promoting microcontrollers and embedded systems for over 20 years.
- Intel promotes AI with multi-dimensional efforts in technology, application, and ecology
- ChinaJoy Qualcomm Snapdragon Theme Pavilion takes you to experience the new changes in digital entertainment in the 5G era
- Infineon's latest generation IGBT technology platform enables precise control of speed and position
- Two test methods for LED lighting life
- Don't Let Lightning Induced Surges Scare You
- Application of brushless motor controller ML4425/4426
- Easy identification of LED power supply quality
- World's first integrated photovoltaic solar system completed in Israel
- Sliding window mean filter for avr microcontroller AD conversion
- What does call mean in the detailed explanation of ABB robot programming instructions?
- STMicroelectronics discloses its 2027-2028 financial model and path to achieve its 2030 goals
- 2024 China Automotive Charging and Battery Swapping Ecosystem Conference held in Taiyuan
- State-owned enterprises team up to invest in solid-state battery giant
- The evolution of electronic and electrical architecture is accelerating
- The first! National Automotive Chip Quality Inspection Center established
- BYD releases self-developed automotive chip using 4nm process, with a running score of up to 1.15 million
- GEODNET launches GEO-PULSE, a car GPS navigation device
- Should Chinese car companies develop their own high-computing chips?
- Infineon and Siemens combine embedded automotive software platform with microcontrollers to provide the necessary functions for next-generation SDVs
- Continental launches invisible biometric sensor display to monitor passengers' vital signs
- Why does this error always occur in the joint simulation of Xilinx 12.4 and modelsim?
- EEWORLD University Hall----How to read an OPAMP's Data Sheet
- [National Technology Low Power Series N32L43x Review] 04. Structural design allows LCD display to be independent of underlying operations
- Talk about MSP430G2553 clock and clock interrupt
- 【K210 Series】3. Core board connection
- Simple inductance measurement device
- Analysis Method of Deep Negative Feedback Amplifier Circuit
- A new moderator has taken office for the MCU section!
- Application of driver assistance system DAS in commercial vehicles
- [LSM6DSOX FSM finite state machine understanding]--Programming module introduction