I'm currently a novice and am learning EE. I've been experimenting with low voltage DC-DC converters. Now I want to build an offline DC-DC converter that operates directly from AC mains.

The schematic works very well in simulation, but being this converter draws its power directly from AC mains, I'd like some input from experienced users/professionals before I build this thing and test it in a real world scenario.

This NE555 circuit is only a learning tool. The objective was to take on a project way beyond the scope of my knowledge and I decided to build a SMPS using basic oscillators and designing all of the auxiliary circuitry around them.

I'm aware of the existence of and have many different SMPS control ICs.


I took the entire circuit apart and rearranged it a bit. I realized in order for PFC to really work the transformer has to be wound for the max voltage, so I'm operating the boost converter from a pre-regulator then once the boosted output hits 360VDC it starts up the flyback circuit. Once the flyback's regulated output reaches 14.8V it shuts the pre regulator off. All occurring within a half a second or so.

Will the pre-regulator blow up? I know I'll survive up to 170VDC I've tried these (get very hot after a few minutes, but will power an NE555 and a few transistors), but at 340VDC? I know the jump from 340 to 360 won't take more than 60ms, could be safe, but What do you guys think?

Here's are the latest revisions The output results are with PFC output @ 360VDC carrying a 129Ω load (>1KW)

Schematic More Organized First is both the boost converter and transformer waveforms without current traces. Second is Boost converter only with current trace. Third is transformer only with current trace OutPuts

  • 1
    \$\begingroup\$ I'm an experienced EE, I design circuits for a living. Low voltage circuits, including DCDC converters. Could I design a mains powered DCDC converter ? Probably. Would I do it ? Nope. Why not ? Because it will not bring anything compared to an off-the-shelf module. Also there are lots of practical issues, like electrocution risk being one of them. Also your circuit looks overcomplicated. Why use the 555 ? There are special purpose ICs for this. \$\endgroup\$ Mar 14, 2017 at 14:47
  • 1
    \$\begingroup\$ There is a difference between making something working in a simulator and the real world. For example, in the simulator things do not blow up. I see a transformer there but it's not for isolation ? Oh, you're switching the high voltage directly to low voltage. Hmm, everyone else uses a transformer for this (flyback converter). Can you guess why. There are 2 important reasons. Why have you chosen a different topology ? Even if it worked I would not use your converter to charge my phone, can you guess why ? \$\endgroup\$ Mar 14, 2017 at 14:50
  • 1
    \$\begingroup\$ I suggest that you study how mains supplies are build up because yours uses the same ground everywhere and your ground is mains referenced via the bridge rectifier. So your design is not isolated. If it was you'd be able to draw a line between input and output without crossing any connections. Usually this line will go through the transformer, opto coupler (for feedback) and a Y-rated capacitor. Despite what you say this circuit is not isolated. \$\endgroup\$ Mar 14, 2017 at 15:11
  • 4
    \$\begingroup\$ In case you are planning to make youtube videos about your circuits: do it as a live show. Dead people can't upload stuff. \$\endgroup\$
    – PlasmaHH
    Mar 14, 2017 at 15:14
  • 1
    \$\begingroup\$ It is not that there are "some errors" in your circuit which you can "fix" and all will be well. You will need to take a step back, look at how commercial power adapters are build up (use Google Image search for "flyback converter circuit") and try to understand what is done for safety and isolation and why that is done. Another good sources are EEVBlog and Bigclive on Youtube, they take power supplies apart and comment on the design and implementation. \$\endgroup\$ Mar 14, 2017 at 15:18

1 Answer 1


The NE555 is IMO totally unsuitable for such a design as the pulse width of the first pulse is invariably much longer than any subsequent pulses. This is due to the fact that the timing capacitor is charged and discharged between 1/3 and 2/3 of the supply ...except for the first time you charge it, and you always start from zero charge on the capacitor. So the first pulse is from 0 - 2/3.
This makes soft start almost impossible to engineer, and can result in large initial currents since you don't know when in the AC cycle you will first make contact.

I see no attempt here to make the supply zero crossing startup and your (I assume an attempt) at soft start looks quite flawed. Particularly the drive for Q1, Q7 and the fact that the C8 charge dump is not AC synchronized.
The first pulse from U1 will be much longer because of the ramp on C5 continuously raising the C6 aiming voltage and the complications with exactly what voltage it will get to. When your charge dump (Q1/Q2) turns on there is uncontrolled discharge of C8 through Q1/Q2 which I don't think you intended.

If I were to test this I'd be using a transformer as isolation and start with perhaps a 50 V RMS output.

Additional Comments 4/22 circuit:

  1. Pre-Reg shutdown. Overcurrent base drive from Q31 driving Q30. Need a base resistor.
  2. Pre-Regulator. Do you really need 9900 uF capacitance?
    Need a 270 Ohm resistor between C9 and Q3 Collector pulldown to lower Q3 current discharging C9.
  3. Zero-Crossing. Do you really need Pre_Charge since it's derived from Pre_Supply?
  4. PFC-Startup Controller and Flyback Startup-Controller. Need base resistor in Q2/4. Consider when latch turns on the base current is limited only by Q18/20 Beta.
  5. PFC Softstart and Transformer Softstart. Clamping U2_out and U4_out appears faulty. You are trying to hold the amplitude of the signal low, but with insufficient current limiting.
  6. Positive voltage regulator. If I read correctly Pre_Charge will be about 17-18 V, so Positive_Voltage will not turn on. The voltage for the two BE's, 3 diodes and a zener come to about 20 V, but if Supply goes over 20 V then there is an uncontrolled current path. Perhaps you could remove a diode and replace with a resistor and still get the correct operation.
  • \$\begingroup\$ Okay, I'm glad you mentioned the charge dump because the control chip's aren't really my issue. I have SG3225s, FAN4800s, Hi/Low side MOSFET drivers, etc., that I would use in the design of a power supply that had a purpose other than experimentation. The purpose for this experiment is the charge dump. I've been trying to make a low voltage regulated supply for the primary side of an offline DC-DC converter. It made sense to me to feed C8 through R2 then once C8's charge exceeds 12V it will cause D7 to conduct in the opposite direction, applying current to the base of Q2, pulling down the \$\endgroup\$
    – user14828
    Mar 15, 2017 at 8:09
  • \$\begingroup\$ ..base of Q1, dumping C8's entire charge into the NE555 driver circuit (D16 prevents feedback into D7) which starts switching M1, charging L3, inducing current in L1, feeding the driver circuit. There was no attempt at a soft start (didn't know I needed that in a flyback, if I do then I stand corrected). I really didn't think the first pulse being longer was going to be an issue because I've read that actual control chips vary duty cycle and if you look at the values of R14 and R15, the NE555 is switching at a pretty low duty cycle. I'm very new to EE so I'm sure there are mistakes. \$\endgroup\$
    – user14828
    Mar 15, 2017 at 8:31
  • \$\begingroup\$ The waveforms look good though. The peak voltage between L3 and M1 are >200V over supply which at peak is 595V (I have 800V MOSFETS). But correct me where I'm wrong I've only done this particular one simulation. \$\endgroup\$
    – user14828
    Mar 15, 2017 at 8:37
  • 1
    \$\begingroup\$ You've made significant changes, and certainly improved your design overall. Glad I could help in some way. I do still think that using the 555 has resulted in some odd design elements, especially with low current base protections for example. I'm surprised that zero crossing alignment didn't help control startup currents more. I'm stunned how good the waveform simulations turned out. \$\endgroup\$ Apr 8, 2017 at 14:38
  • 1
    \$\begingroup\$ You were correct again! I sharpened the startup by adding a smaller cap at SUPPLY then start switching at the FETs threshold voltage (4.5v) and BINGO! current spikes dropped by 6A,(21A). I also removed the second push pull amp as it was unnecessary, and added a small resistor in parallel with a diode. I'm getting much better performance, I'll post an update as soon as I'm done improving the soft start. \$\endgroup\$
    – user14828
    Apr 13, 2017 at 6:37

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.