Three-phase PWM

Use this section to discuss your embedded Flowcode projects.
Post Reply
toudenter
Posts: 2
http://meble-kuchenne.info.pl
Joined: Tue Jun 15, 2021 11:22 am

Three-phase PWM

Post by toudenter »

Hello,

How to use CAL_PWM or PWM(Internal) to generate three-phase PWM signals using dsPIC30F for inverters ?

Thank you

BenR
Matrix Staff
Posts: 1739
Joined: Mon Dec 07, 2020 10:06 am
Has thanked: 440 times
Been thanked: 603 times

Re: Three-phase PWM

Post by BenR »

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.

toudenter
Posts: 2
Joined: Tue Jun 15, 2021 11:22 am

Re: Three-phase PWM

Post by toudenter »

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.

BenR
Matrix Staff
Posts: 1739
Joined: Mon Dec 07, 2020 10:06 am
Has thanked: 440 times
Been thanked: 603 times

Re: Three-phase PWM

Post by BenR »

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.

artan
Posts: 13
Joined: Mon Oct 11, 2021 5:27 pm

Re: Three-phase PWM

Post by artan »

Can someone find me some brushless engine project in the flowcode?

artan
Posts: 13
Joined: Mon Oct 11, 2021 5:27 pm

Re: brushless

Post by artan »

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 ...

chipfryer27
Valued Contributor
Posts: 1147
Joined: Thu Dec 03, 2020 10:57 am
Has thanked: 284 times
Been thanked: 412 times

Re: Three-phase PWM

Post by chipfryer27 »

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

artan
Posts: 13
Joined: Mon Oct 11, 2021 5:27 pm

Re: Three-phase PWM

Post by artan »

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

chipfryer27
Valued Contributor
Posts: 1147
Joined: Thu Dec 03, 2020 10:57 am
Has thanked: 284 times
Been thanked: 412 times

Re: Three-phase PWM

Post by chipfryer27 »

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

Post Reply