Hello,
How to use CAL_PWM or PWM(Internal) to generate three-phase PWM signals using dsPIC30F for inverters ?
Thank you
Three-phase PWM
-
- Posts: 2
- http://meble-kuchenne.info.pl
- Joined: Tue Jun 15, 2021 11:22 am
-
- Matrix Staff
- Posts: 1924
- Joined: Mon Dec 07, 2020 10:06 am
- Has thanked: 501 times
- Been thanked: 684 times
Re: Three-phase PWM
Hello,
A simple way is to use a brushless ESC and the servo motor controller component.
A more advanced way giving more control would be to have a look up table containing duties for a sine wave output. Values below 0 would be set to 0. You would then have three pointers to the lookup table each 120 degrees out of phase which assign PWM duties to each of your PWM outputs. You would advance the pointers on a regular time interval and speed up or slow down the motor by altering the interval.
A simple way is to use a brushless ESC and the servo motor controller component.
A more advanced way giving more control would be to have a look up table containing duties for a sine wave output. Values below 0 would be set to 0. You would then have three pointers to the lookup table each 120 degrees out of phase which assign PWM duties to each of your PWM outputs. You would advance the pointers on a regular time interval and speed up or slow down the motor by altering the interval.
Regards Ben Rowland - MatrixTSL
Flowcode Online Code Viewer (Beta) - Flowcode Product Page - Flowcode Help Wiki - My YouTube Channel
Flowcode Online Code Viewer (Beta) - Flowcode Product Page - Flowcode Help Wiki - My YouTube Channel
Re: Three-phase PWM
Thanks for reply.
My application is a three-phase PWM inverter. To generate generate 5 kHz PWM signals with programmable deadtimes for each H bridge leg, I am used to configure PWM registers in other compliers but it is quite complicated. So I try Flowcode which is easy to use and students like it. If Flowcode can provide a component macro to do that task it would be great.
My application is a three-phase PWM inverter. To generate generate 5 kHz PWM signals with programmable deadtimes for each H bridge leg, I am used to configure PWM registers in other compliers but it is quite complicated. So I try Flowcode which is easy to use and students like it. If Flowcode can provide a component macro to do that task it would be great.
-
- Matrix Staff
- Posts: 1924
- Joined: Mon Dec 07, 2020 10:06 am
- Has thanked: 501 times
- Been thanked: 684 times
Re: Three-phase PWM
Hello,
Flowcode currently has a hbridge component if you do a component search, however it currently only supports the 8-bit PIC devices. Which dsPIC30F device are you looking at and I may be able to add support for this quite easily.
Flowcode currently has a hbridge component if you do a component search, however it currently only supports the 8-bit PIC devices. Which dsPIC30F device are you looking at and I may be able to add support for this quite easily.
Regards Ben Rowland - MatrixTSL
Flowcode Online Code Viewer (Beta) - Flowcode Product Page - Flowcode Help Wiki - My YouTube Channel
Flowcode Online Code Viewer (Beta) - Flowcode Product Page - Flowcode Help Wiki - My YouTube Channel
Re: brushless
Hello, I'd be honored if you find me a brushless engine control project, I'm looking everywhere but I don't see an example like that, thankyou ...
-
- Valued Contributor
- Posts: 1528
- Joined: Thu Dec 03, 2020 10:57 am
- Has thanked: 353 times
- Been thanked: 549 times
Re: Three-phase PWM
Hi
FC doesn't have a component so you will need to create your own control program.
This link may help
http://ww1.microchip.com/downloads/en/A ... 00857B.pdf
Regards
FC doesn't have a component so you will need to create your own control program.
This link may help
http://ww1.microchip.com/downloads/en/A ... 00857B.pdf
Regards
Re: Three-phase PWM
thank you. And once again if you can help me, I need to convert this part of the code into the flow code and I have no idea how to do the option for conversion say a syntax error, can you write me correctly or submit me to the flow code
-
- Valued Contributor
- Posts: 1528
- Joined: Thu Dec 03, 2020 10:57 am
- Has thanked: 353 times
- Been thanked: 549 times
Re: Three-phase PWM
Hi
In Ben's post above he recommends using a brushless ESC and the PWM component. Many examples in wiki of using the PWM.
Regards
In Ben's post above he recommends using a brushless ESC and the PWM component. Many examples in wiki of using the PWM.
Regards