Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

[PIC] SPWM using PIC16F684

Status
Not open for further replies.
Yes, that is the formula for LC low pass filer calculation.

Attached is the Inverter which I am designing. Filter I will finalize after I build the hardware and apply different loads. I will provide option for LC and Pi filters on the PCB but I will only put them after testing the signals.

You can see that I have not used IR21xx device for driving FETs because I have used FDP8440 Mosfets and it can conduct 80A at 4.5V Vgs. I will apply 5V to gate. This simplifies the circuit.

For battery charging I am using a separate transformer because I read somewhere on the net that if same transformer is used for Output and also for charging then due to difference in currents the transformer windings will get fried and the enamel coating will break and the transformer will short circuit.

Here what I found regarding filter design.

https://electronics.stackexchange.com/questions/144467/lc-low-pass-output-filters-for-inverters
 

Attachments

  • PSWI.PDF
    46.3 KB · Views: 136
Last edited:
i assumed 1.5mH and by using above formula it give me C=4.5F. fc =50hz

C is not 4.5F i did mistake in calculation so C is aprox 6800uF
 

You won't get 6800uF in Non Polarized Capacitor.

- - - Updated - - -

It is mentioned that for 1A of Output current 10A of battery current is drawn.

So, if you have a 500W Inverter then

I = P/V = 500W / 230V = 2.174A

So, Battery Current max will be 21.74A

Taking it as 22A, the max current that will flow through the mosfet will be 22A

P(mosfet) = Id^2 * Rds(on)

For FDP8440, Rds(on) is 2.4 mOhms

So, for max load P(mosfet) = 22A * 22A * 2.4 m Ohms = 1.1616W

So, the mosfet with a fan will be cool.

Lesser the power loss, greater the efficiency of the inverter. The main power loss are in Mosfets and transformer.

- - - Updated - - -

See if you can use this tool to calculate the filter component values.

http://www.calculatoredge.com/electronics/bw pi low pass.htm

https://www.edaboard.com/threads/295214/

- - - Updated - - -

In this document he calculates LC filter for Sine Wave Inverter but he chooses a high cut off frequency.
 

Attachments

  • PWM_Techniques_final.pdf
    3.7 MB · Views: 158
Last edited:
Hi

Sorry, Ipri calculation mentioned in previous post is wrong.

Ipri = (Vsec/Vpri) * Isec

Isec = 500W/230V = 2.174A

Ipri = (230/12) * 2.174A = 41.668A

This is for 100% efficiency

But, efficiency will be approx 85%

So, Ipri(85% eff) = 41.668A/0.85 = 49A

If you are mounting mosfets on PCB then

for FDP8440 mosfet PCB track width for mosfet side is 98.3 mm = 9.83 cm approx 10 cm copper pour.

for transformer output side that is 2.174A side taking current as 5A, PCB track width is 3.6 mm.

2 oz/ft^2 copper PCB is used.

https://www.4pcb.com/trace-width-calculator.html
 
@Okada

why he choosed cutoff frequency(7.153 kHz) above fundamental frequency(60Hz) and lesser than switching (40KHz)?

also the link which you have given me earlier using cutoff frequency at least 30% above the fundamental frequency https://electronics.stackexchange.com/questions/144467/lc-low-pass-output-filters-for-inverters

So what i've understand is, if i choose cutoff frequency above the fundamental frequency . For example in my case Switching frequency is 16Khz and fundamental is 50Hz. if i choose cutoff frequency 1kHz. So the higher order frequency component will also include in final output with sinewave?

I'm not understanding this point of choosing cutoff frequency higher than your fundamental frequency .
 

He has choosed 7.x KHz cut off frequency because it is difficult to get proper capacitor and inductor values for low cut off frequency. You can choose low cutoff frequency and try to experiment with different inductor and capacitor values. For inductor you have to use a toroidol ferrite core and try to wind insulated copper wire of proper current rating and experiment.

Yes, if cut off frequency is higher then hormonics will be present in the output.

Your fundamental frequency is 50 Hz and 30% of it is 50 * 0.3 = 15

and so 50 Hz + 15 = 65 Hz but this is too low to get standard value capacitance and inductance values for the filter.
 

@BradtheRad Hi,

Before your post #19 i assumed the value for capacitor 10uf 450v and calculated the value of L using this formula fc=1/(2*pi sqrt(LC)). fc =50hz
then L=1H 5amp.

now i have to choose the smaller value for inductor so i assumed 1.5mH and by using above formula it give me C=4.5F. fc =50hz

if the above calculation is not correct then what value of L should i start ? and transformer also has inductance should i consider that too?

My conceptual simulation of a spwm full-H-bridge inverter. It has switches which open and close, making the action visible.



To keep it simple, I used a single primary rather than a center-tap. You will not necessarily use a 1kHz switching frequency, so your primary Henry value will probably be less than mine.

See the scope traces for bias 1 through 4. These indicate which switches are open and closed. Notice how the action trades off between the half-bridges. One half-bridge switches rapidly, while the other half-bridge is in an unchanging position.
 

@BradTheRad

OP is not using Full-Bridge. I think he was not able to generate Half-Bridge signals P1A and P1B and hence he generated Full-Bridge signals P1A, P1B, P1C and P1D and using only P1A and P1C signals to drive the Push-Pull Mosfets.

Provide link for your falstab project so that we can see the simulation.
 

@BradTheRad

OP is not using Full-Bridge. I think he was not able to generate Half-Bridge signals P1A and P1B and hence he generated Full-Bridge signals P1A, P1B, P1C and P1D and using only P1A and P1C signals to drive the Push-Pull Mosfets.

The push-pull schematic in post #10 is popular. It's the design I chose when I tried to build a power inverter years ago. (I could not get much power out of it.)
So now I try simulating it at 60 Hz and I got it to work. However when I try the same design applying rapid SPWM signals, I could not get it to behave as well as when it was switched it at 60 Hz.

An improvement comes from using buck converter style switching action. It is a more efficient kind of snubbing. Of course I'm not an expert, but from my observations it should be true for both a single-winding or a center-tap transformer.

Provide link for your falstab project so that we can see the simulation.

https://tinyurl.com/zxve8jy

By clicking the above link, it:
* Opens the falstad.com website
* Loads my schematic into the simulator
* Runs it on your computer

The L & C filter is also one of the topics discussed. Their values are easy to change. Right-click on a component and select Edit. In Macintosh, press 'control' and click on a component.

- - - Updated - - -

I see the falstad.com/circuit website opens but it does not accept my text file. Here it is for copying and pasting into the Import window.


Code dot - [expand]
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
$ 1 1.1E-6 4.818269829109882 26 330.0 45
R 160 272 96 272 0 4 1000.0 5.0 5.0 0.0 0.1
x 707 377 757 383 0 24 load
w 288 416 352 416 0
w 256 256 304 256 0
R 192 400 144 400 0 1 50.0 10.0 0.0 0.0 0.5
x 184 490 199 496 0 24 4
R 160 240 128 240 0 1 50.0 10.0 0.0 3.141592653589793 0.5
x 224 219 239 225 0 24 1
l 528 288 608 288 0 0.03 0.5695011941205839
r 672 288 672 448 0 460.0
a 192 416 288 416 1 5.0 0.1 1000000.0
T 416 288 528 448 0 0.02 35.0 20.61623436964438 -0.5766617454152707 0.999
x 445 278 498 284 0 24 1:35
x 430 481 540 487 0 24 20mH pri
c 608 288 608 448 0 3.0E-6 318.2874387924533
x 556 256 584 262 0 24 L1
x 567 378 599 384 0 24 C1
w 608 448 528 448 0
w 608 288 672 288 0
w 608 448 672 448 0
w 416 448 368 448 0
r 528 288 528 448 0 46000.0
159 320 224 320 288 0 0.05 1000.0
159 320 288 320 352 0 0.05 1000.0
159 368 384 368 448 0 0.05 1000.0
159 368 448 368 512 0 0.05 1000.0
R 320 224 320 192 0 0 40.0 12.0 0.0 0.0 0.5
R 368 384 368 352 0 0 40.0 12.0 0.0 0.0 0.5
g 320 352 320 368 0
g 368 512 368 528 0
w 320 288 416 288 0
z 416 288 416 368 1 0.805904783 13.0
z 416 448 416 368 1 0.805904783 13.0
R 192 432 112 432 0 4 1000.0 5.0 5.0 0.0 0.1
a 160 256 256 256 1 5.0 0.1 1000000.0
I 256 256 256 320 0 0.5
w 352 480 288 480 0
w 256 320 304 320 0
I 288 416 288 480 0 0.5
x 154 332 169 338 0 24 2
x 257 380 272 386 0 24 3
O 256 256 256 208 0
O 256 320 192 320 0
O 288 416 288 368 0
O 288 480 224 480 0
o 41 128 0 38 10.0 9.765625E-5 0 -1 bias1
o 42 128 0 38 5.0 9.765625E-5 0 -1 bias2
o 43 128 0 38 10.0 9.765625E-5 0 -1 bias3
o 44 128 0 38 5.0 9.765625E-5 0 -1 bias4
o 20 128 0 33 8.183476519740355 83.79879956214124 1 -1 pri
o 21 128 0 34 701.4932422086807 0.006850519943444149 1 -1 sec
o 8 128 0 33 117.44625732962538 2.348925146592508 2 -1 L1
o 8 128 0 34 244.94416553286712 1.2247208276643358 2 -1 L1
o 14 128 0 33 299.3155353253689 1.4965776766268446 3 -1 C1
o 9 128 0 34 400.89896545712253 0.5011237068214033 3 -1 load

 

@Okada
Hi,
After searching lots of on internet, i found that Pi filter(CLC) have better response compare to LC filter .

So pi filter is Butterworth filter or Chebyshev filter ?

and also i've seen several schematic diagram of inverters in which they are using LC filter as a output filter,just like the below image . why they are not using pi filter ?
Screenshot_18.png

- - - Updated - - -



For RC snubber circuit i did an experiment, connected wires as in this diagram . Used 12v motor as a load . using IRFP450
Untitled.png

So i got this type of output waveform .
Bottom one is input signal(SWPM) at gate and the upper one is waveform at drain of mosfet .
pic1.jpg
waveform at Drain
pic2.jpg

I found different formulas for selecting the Values of R and C but i don't know which method should i use?
1) https://www.quora.com/How-do-I-pick-the-R-and-C-values-of-a-RC-snubber-what-are-the-most-important-equations
2) https://www.maximintegrated.com/en/app-notes/index.mvp/id/3835
3) https://www.digikey.com/en/articles/techzone/2014/aug/resistor-capacitor-rc-snubber-design-for-power-switches
4) https://www.paulorenato.com/index.php/electronics-diy/197-rc-snubber-calculator-spreadsheet
5) https://switching-power.blogspot.com/2013/09/turn-off-rcd-snubber.html

By reading different books i found these formulas. Please tell me which formula should i use .

Screenshot_5.png Screenshot_6.png Screenshot_7.png Screenshot_10.png

Screenshot_14.png Screenshot_15.png Screenshot_16.png Screenshot_17.png

snubber.jpg
 
Last edited:

It is wrong. If you change the units from say nH to mH and pF to uF then you agin have to click the calculate button.


Edit: Your calculations are correct.

See image 2.

You can use these two components with 730 Hz cut-off frequency, 50 Ohms impedance

https://www.mouser.in/ProductDetail/Murata/32330C/?qs=/ha2pyFadug1/1TYUsHmV2xjHyERvBSOTSmAwxx1Js8=

https://www.mouser.in/ProductDetail...=sGAEpiMZZMv1cc3ydrPrF8YT/vJ6Du2EALy2i5oenW8=

See image 3.

You can have cut-off frequency of 65 Hz, 50 Ohms impedance

You have to use 10x above capacitors in parallel and a 228 mH 1.5A or > inductor.
 

Attachments

  • butterworth filter.png
    butterworth filter.png
    43.8 KB · Views: 94
  • butterworth filter2.png
    butterworth filter2.png
    42.3 KB · Views: 89
Last edited:
@Okada
both image 2 and 3 are of same values but with different units.
Is it 730Hz or 73 Hz?

According the link you gave me
Inductor = 33uH 2.5A

Capacitor = 4.7uF 300volts

What is the cutoff freq you set for these values? and this is for Pi filter?
 

One is 73 Hz and another 73 MHz. I gave components links for 73 Hz cut-off frequency. You have to use 10 Capacito
 

@ okada

Can you please give me links for this components ?

L= 2.5mH (3-4 amps ) toroid core .

C= 10uF 450Vac .
 

Components of those ratings are not available.

Use two 4.7uF 300V and one 0.68uF 300V in parallel to get 10uF.
 

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top