• AVR Freaks

AnsweredHot!PWM High Speed Block. How to manage the output

Author
FilippoMonti
Starting Member
  • Total Posts : 32
  • Reward points : 0
  • Joined: 2017/11/03 03:10:15
  • Location: 0
  • Status: offline
2019/06/18 01:08:42 (permalink)
0

PWM High Speed Block. How to manage the output

Dear Lubin,
 
sorry for another post but I have another issue in my project of motor control.
I use the PWM High Speed Block to generate 6 pulses for a three phase inverter. I have set complementary PWM with a dead time of 2e-06s and a switching frequency of 10kHz.
 
The problem arises when I force the three duty cycles to 0 (i.e. to turn off all the IGBTs and to stop the motor).
I would like to have all the 6 IGBTs turned off in this situation, i.e. having the 6 PWM outputs all to 0.
But, phsically measuring the dsPIC PWM pins I see:
 
- The three PWM_H are 0
- The three PWM_L are 1 with a pulse to 0 for the duration of the dead time (see picture of the oscilloscope)
 
I think that this situation is consistent with the complementary logic of PWM and the motor physically stops but, it is not very safe. I would like to have all the six pulses at 0 when I stop the motor for safety reasons.
 
Is there the possibility to force all the six output to 0?  
 
Thank you for your precious support.
 
Filippo

Attached Image(s)

#1
Lubin
Moderator
  • Total Posts : 373
  • Reward points : 5
  • Joined: 2007/03/31 07:38:15
  • Location: Bayonne, France
  • Status: offline
Re: PWM High Speed Block. How to manage the output 2019/06/18 01:52:24 (permalink) ☼ Best Answerby FilippoMonti 2019/06/19 05:59:21
0
Hi Filippo
 
The blockset provide the "PWM High Speed override" block which allows to force the PWM pin state. 
I tend to think this block might help you to get the behaviour you're looking for.
 
Alternatively, the dsPIC has a PWM Fault option:
When a "Fault input pin" is set,  all PWM output switch to a user defined state.
You might tweak this Fault feature and connect this Fault input pin to a digital output pin.
 
Lubin
 
 
 
 
#2
FilippoMonti
Starting Member
  • Total Posts : 32
  • Reward points : 0
  • Joined: 2017/11/03 03:10:15
  • Location: 0
  • Status: offline
Re: PWM High Speed Block. How to manage the output 2019/06/19 06:03:15 (permalink)
0
Dear Lubin,
 
I have tried the solution with the PWM HS Override block. It work perfectly!
I have attached the image of the solution I have adopted.
 
Start == 0   -->   OvDr1 == OvDr2 == OvDr3 == 0000   (0)
Start == 1   -->   OvDr1 == OvDr2 == OvDr3 == 1100   (12)
 
This solution works :)
Thank you for the support.
 
Filippo

Attached Image(s)

#3
Jump to:
© 2019 APG vNext Commercial Version 4.5