I am working on a project to produce high voltage output. Since I supply this circuit directly from mains I have some problems. Here is my representative circuit:
I am controlling transistors from a PWM generator. Duty cycle is %25. I checked for dead time. It is safe.
Now, here I used safety bulb in series with the main (220VAC). When I plug it in Lamp goes fully on after 1-2 second later it goes almost off (just a little bit blinking). I thought first light is because capacitors are charging. So my questions are;
After I start pwm generator, I can see arcs but bulb also goes almost fully on. Is this a sign of a failure or short in the circut ?
I am checking voltage across C3 after I start pwm. Depending on my distance adjustment on flyback's secondary cables to have arc, it shows up to 1800V.
I will later add voltage feedback and current feedback. Other then these additions, what kind of improvements should I do? Or is this a completely ridiculous way?
You don't show the whole circuit, so it is impossible to give a precise answer.
Your upper PWM signal will need to be isolated from the lower one with a circuit that rejects up to 1000 V of common-mode signal at 50 kHz. An optocoupler might work, but you also have to provide power to it on the output side.
When you power this circuit up, the generated signals at the transformer may depend on the EXACT duty signal. Without feedback, you will be unable to regulate at 50 % overall, and the junction of C1,C2 will charge to the supply rail or GND, thus making the drive asymmetrical and unable to provide good PWM signals.
C3 cannot be charged to over the (peak-rectified) mains in this circuit. It will basically be a constant DC voltage unless the load power is significant w.r.t the lamp power.
It's high voltage and potentially lethal. If you do't know the basics, then you are working with very dangerous voltages and energy storage.