News:

Let's find out together what makes a PIC Tick!

Main Menu

PWM feedback and variable frequency

Started by Abdullah, Aug 31, 2025, 06:04 PM

Previous topic - Next topic

Abdullah

Hello everyone I need A program for HPWM 7khz to 40khz if input volt is > 100
then HPWM = 7KHZ else 20khz if input volt is > 150 then HPWM = 10KHZ else 20khz
if input volt is > 200 then HPWM = 15KHZ else 20khz if input volt is > 250 then HPWM = 20KHZ else 20khz if input volt is > 300 then HPWM = 40KHZ else 20khz and output volt control to the duty cycle as A feedback using 16f684

Pepe

I think you should do it and in any case ask for help if something doesn't work. Without effort and research, you can't learn new things. It's very easy to ask and have others solve your problems.

Stephen Moss

I agree with @Pepe
Are you sure that what (from your question) your want to do is the correct approach? Do you even understand PWM?

I ask because ususally the PWM frequcny is fixed and you adjust the cycle to change the amount of energy/voltage output, if you change the frequency then the duty factor changes as well to get the same energy out (50% modulation depth at 10Khz is not the same enery as 50% at 20Khz), that is a lot of refactoring.

Also, it looks like you fallback postion which I presum is for < 100V is 20KHz, and you say > 250V is also 20KHz, perhaps there is a reason for it but it does not seem logical to use the same frequency for both. 

Abdullah

Yes Sir but I don't know how can feedback work and how can variable frequency can work and how l can create variable frequency in difference state because I don't know about that I need a demo to learn because I don't have a teacher to teach me about positron compiler I am only a new student you all are my teachers I have a small idea how to make a pwm but I don't know what is the command of variable frequency and feedback to control out put volt sorry for disturbing

Abdullah

Quote from: Stephen Moss on Aug 31, 2025, 07:53 PMI agree with @Pepe
Are you sure that what (from your question) your want to do is the correct approach? Do you even understand PWM?

I ask because ususally the PWM frequcny is fixed and you adjust the cycle to change the amount of energy/voltage output, if you change the frequency then the duty factor changes as well to get the same energy out (50% modulation depth at 10Khz is not the same enery as 50% at 20Khz), that is a lot of refactoring.

Also, it looks like you fallback postion which I presum is for < 100V is 20KHz, and you say > 250V is also 20KHz, perhaps there is a reason for it but it does not seem logical to use the same frequency for both. 
Yes sir this is idea for boost converter using in Soler inverter input 100V to 400V and output 230V AC. booster good work with to Soler panels in 7khz and good work in 20khz in 4 panels

Abdullah

Quote from: Abdullah on Aug 31, 2025, 08:15 PM
Quote from: Stephen Moss on Aug 31, 2025, 07:53 PMI agree with @Pepe
Are you sure that what (from your question) your want to do is the correct approach? Do you even understand PWM?

I ask because ususally the PWM frequcny is fixed and you adjust the cycle to change the amount of energy/voltage output, if you change the frequency then the duty factor changes as well to get the same energy out (50% modulation depth at 10Khz is not the same enery as 50% at 20Khz), that is a lot of refactoring.

Also, it looks like you fallback postion which I presum is for < 100V is 20KHz, and you say > 250V is also 20KHz, perhaps there is a reason for it but it does not seem logical to use the same frequency for both. 
Yes sir this is idea for boost converter using in Soler inverter input 100V to 400V and output 230V AC. booster good work with to Soler panels in 7khz and good work in 20khz in 4 panels
I have a booster and I check it that's work in 7khz to 40khz with defrance input volt

charliecoutas

Surely solar panels produce DC? Is the frequency you talk about that of a DC to AC converter? The frequencies seem a bit low but it seems possible? So as the DC input from the panels change, the DC to AC converter also changes frequency? Then another converter changes it to AC mains frequency? Just a few thoughts....

Charlie