Switching power supply behavior

I'm mostly a digital guy, so building a high voltage supply for a Geiger counter has been an educational experience. For the sake of component reduction, my first version used a PWM output from the microcontroller to drive the FET on the primary of a transformer, rather than an external oscillator. I used a shunt regulator (made of MOVs or zeners) to regulate the output at 500 volts. But having the MCU capable of controlling the supply naturally led me to experiment with using it as a more intelligent controller.

But like I said, I'm a digital guy and I don't understand all of what I'm seeing. My HV output and PWM control signals look like this:

^ ^

-----+ / +--___ / +------- \\ / +-+ \\ / \\ / +____+

-----+ +---------+ | | | | | | | | | | | | | | | +-----------------------+ +

Hopefully that came out right. As the primary is energized, I see the output overshoot a bit and then stay level. When the primary is shut off, it drops rapidly and then rises again, slightly overshooting and then leveling out. It continues a slow decline and then repeats at the next pulse. I wasn't expecting the drop - I was planning for the output capacitor to keep the voltage up, but I must have it configured wrong.

Anyway, I guess I don't really understand the behavior of the transformer that well. In electronics class we just fed them continuous AC and expected AC out - can anyone point me to a good explanation of their behavior with square waves like this?

Also, my next problem is getting feedback into the MCU for control. To me, the obvious approach was to use a voltage divider and send the output into an ADC port for measurement. The difficulty there is in knowing at what point to sample the voltage, relative to the PWM signal. Is there any reference available that describes how this should be done? I think I probably need to examine how it behaves on start-up, before the target voltage is reached.

Another possible approach is to use zeners or MOVs on the output to drive a BJT that kills the PWM input at the primary. I'm not exactly sure how that will behave, if it starts cutting it off in the middle of a cycle.

Fortunately a bit of overshoot in the output voltage isn't critical in this application. At least with a halogen-quenched GM tube, it should just break down and conduct any excess voltage. It'll screw up your reading but won't kill the tube. I think it'd shorten the lifespan of an organically-quenched tube, but I'm not using those so I'm not really worried.

Again, this is mostly just an educational excercise. This project offers an interesting opportunity to get right into the guts of a switching regulator, but having little background in this I'm kind of lost. Any comments or suggestions?

Thanks,

Scott

Reply to
Scott Miller
Loading thread data ...

Here's the schematic, minus the regulation experiments. The LCD has been reconfigured to free up PTB3/ADC3 for feedback input. The configuration I'm testing at the moment has the MOVs driving a 2N3904 connected to PTB3. The idea is to use that to detect when the voltage is at the required level. That input is checked 3200 times per second and the PWM output is switched on or off. Right now, the behavior could best be characterized as 'freaking out'.

formatting link

Thanks,

Scott

Reply to
Scott Miller

Sounds like a very interesting and educational project.

Without knowing at least the general configuration you are working with, these mean very little to me. Is there someplace you can post a schematic (web page, alt.binaries,schematics.electronic) or email to me?

Transformers can either be used primarily as a turns ratio controlled coupling mechanism (what you are talking about) or an energy storage mechanism (the primary coil loads energy into the magnetic field when the switch is on and dumps that energy out the secondary when the switch is off). There are lots of variations with each concept, hence the need to see your schematic before wasting lots of time speculating.

Sounds reasonable.

As you said, earlier, the output capacitor should smooth the voltage well enough that this is not very critical, though some places in the cycle may have lower noise.

Anything like this, the micro can do better.

--
John Popelish
Reply to
John Popelish

Hadn't thought about that, but it makes sense. Is this going to be temperature-sensitive? i.e., is it going to get noticealby worse if it gets several degrees hotter and generates more minority carriers? What other sort of diodes are available at this voltage that'd perform better, or does it really matter? The diodes are currently 1N4007s.

The spec sheet puts it at 15 pf. I'm currently using 22,000 pf capacitors for C5, C6, and C9. Is this effect going to be small compared to the minority carrier effect? What parameters in the spec sheet are relevant to this kind of behavior?

The timing on the transformer was determined experimentally. I tweaked the frequency until I got the peak output voltage, and reduced the duty cycle to the lowest level that'd keep C9 charged. Is there a better way to go about determining these settings?

Yeah, that's exactly what I'm trying now. I think I've got a problem with the software switching of the PWM module, though. I need to set it to buffered mode or it does strange things.

You're right, that wasn't supposed to be like that. That part started out as a merger of two different designs, then a simplification that removed a number of parts. About one part too many, by the looks of it. =] I think there was supposed to be another 100k to ground on that side of the capacitor. It does actually work, though - I've tested it up to 30,000 counts/minute. Anyway, I'm thinking of re-doing the whole detector section. Seems like the better designs ground the cathode of the GM tube and detect the pulses on the high side. That means making C11 a HV cap, and redesigning the amplifier. I'm at a bit of a loss there, but I'm working on it. The only example I have to go by with that configuration is a late

1950's or early 1960's design. I have no idea what a '1437' transistor is... I've found some cross-references, but it's hard to tell if it's the same thing.

Thanks,

Scott

Reply to
Scott Miller

D1 and D2 are 1N4007's, C5 C6 and C9 are 0.0022 uF.

Hmm, don't ask me... I cribbed that from this design -

formatting link
- or one like it. I've seen the same design a few times. I substituted the BS170 FET for an obsolete BJT on the primary - seems to work just as well.

Seems to me that the supply doesn't need to be terribly efficient, because if you do it right it'll have a low duty cycle. C9 stays charged for a long time at normal radiation levels. It'll draw maybe 100 uA every count for a very short period - under 100 usec, I think. With the tubes I'm using, normal background radiation is around 20 counts/minute.

Anyway, like I said, we learned about driving transformers with AC.. I don't know exactly what the secondary output is supposed to look like when the primary is driven only one way with a square wave.

Scott

Reply to
Scott Miller

Umm... blue and green? =] I'm using this one:

formatting link

I really don't know its specifications.

Scott

Reply to
Scott Miller

Thank you. Can you tell me what kind of diodes D1 and D2 are, and what are the values of C5 and C6?

This is a strange sort of step up supply, what with the full wave doubler using both swings from the transformer, but the primary driven only one way.

--
John Popelish
Reply to
John Popelish

Thanks, I'll pick up a few of those with my next Digikey order. I can't find any reverse recovery time info for the 1N4007, but it'll be interesting to see how it compares.

Yeah, I'll have to check how high it's going. Hasn't started smoking yet, anyway. =]

Right. This is turning out to be a really educational project. I'll have to go do some research on the voltage times time thing... I'm sure I learned that at some point, but I find I remember things a lot better when I can put them to some practical use, and last time I came across it it would have been just theory in a book.

Another question - with such a small load, it seems to me that leakage in C9 should be a major concern. I'm using 1kv metallized polypropylene caps right now - is there anything else that'd have less leakage?

Thanks...

Scott

Reply to
Scott Miller

One other important parts question. What sort of transformer is T1?

--
John Popelish
Reply to
John Popelish

It is hard to find diodes that have both high reverse voltage capability and also fast reverse recovery. You should see considerable improvement if you replaced the 1N4007 with something like UF1007 (available from Digikey):

formatting link

As long as the peak drain voltage goes no higher than about 50 or 60 volts. but you should check this with a scope.

Something to keep in mind about any inductive components: They average zero volts, long term.

So the windings of this transformer have to have equal voltage times time swinging one way to match the voltage times time they swing the other way.

How long times how far depends on the on time of your switch each cycle.

But before you get into controlling the duty cycle, you need faster diodes in the rectifier so that their reverse recovery does not suck back all the charge they put into the output capacitor each cycle.

--
John Popelish
Reply to
John Popelish

In article , Scott Miller wrote: [...]

Lets look at this part:

Your circuit uses a doubler output section like this:

C5 D2

---!!----+--->!-----+----- ! ! ---D1 --- C6 ^ --- ! ! GND GND

At the voltages you are doing D2 is unlikely to be a Schottky diode. When current flows in a normal diode, minority carriers pass through the silicon (electrons in the P material and holes in the N). When the voltage suddenly reverses, the carriers that are "stored" in the silicon have to be swept out before the diode's impedance gets high.

The shape you reported looked quite a bit like the shape that this current would make on the ESR of C6.

Also, D2 has some capacitance. This adds another bit of charge that will be sucked out of C6 at the edge of the waveform.

If you delay turning the transistor back on until the current in the transformer has stopped, the effect can be reduced.

You could also add a transistor's E-B in series with the D10, that is part of the clamping circuit. The collector of this transistor could, via som resistors tell the micro when the clamp circuit is acting as anothe way to get feedback to the micro.

The Q3 circuit using the MPF102 looks a bit funny to me. You are relying on gate leak bias to bias a JFET off. You may want to think again about this part of the circuit.

--
--
kensmith@rahul.net   forging knowledge
Reply to
Ken Smith

Try to simulate it. Some of the shareware sites still carry a trial version of Microsim called Winspice. It will only allow a limited number of components, still more than enough to simulate these sort of circuits.

--
Reply to nico@nctdevpuntnl (punt=.)
Bedrijven en winkels vindt U op www.adresboekje.nl
Reply to
Nico Coesel

So would a higher ESR help reduce the effect?

It's been a couple of years since I did the original version, but I think I just assumed that the peak voltage would indicate the most efficient use of the transformer.

This part at least is no problem... I can handle the digital stuff. I know exactly what happens when you write to the PWM register at the wrong time. I've got another project that generates phase continuous audio frequency shift keying using the same chip - this application should be a lot easier.

I've just seen references to the grounded cathode design providing for proper shielding and grounding. Not sure how important it really is. My only problem with detecting the pulses on the anode side is finding a transistor that'll handle the higher voltage. I think.

Scott

Reply to
Scott Miller

Yes, I asked for suggestions on replacing the shunt regulator. I got some great input on using op amps to buffer the feedback signal. Turns out that's not really the tough part. I've had decent results feeding the MCU's ADC directly from a voltage divider. The more difficult part is making sense of those readings and determining how to change the PWM signal.

I agree that the MOVs as a shunt regulator is a POS. Unfortunately just about every hobbyist design I've ever seen for a Geiger counter uses the same sort of thing, sometimes using neon bulbs or lots of zeners. I've been experimenting with using the MOVs to trigger a PWM change because I know they work, which eliminates one more possible thing to screw up as I start making changes to the design.

I'm not asking anyone to design this thing for me. I'm just asking for help understanding what's going on. I've gotten some great feedback on things like the diode switching speed. I think I'm well on the way to a reasonably efficient, inexpensive, non-crappy design, and I appreciate all the help I've gotten here.

Scott

Reply to
Scott Miller

Ok, I'll have to give that a try. I should have the high-speed diodes in a few days - it'll be interesting to see how they affect the output.

Pretty much what I was trying before...

That's a good idea, might save me a lot of reprogramming. Assuming I can free up another ADC. I only used this particular part because I buy them by the hundreds.

Yeah, battery power is the main issue. This thing sucks a 9v alkaline dry in no time. I know there are some designs that'll run for a month on one. The MCU and LCD will add a few ma, but I want to be able to get at least 12 hours of runtime.

I'd rather eliminate the MOVs completely if possible, but I'll keep experimenting.

Thanks,

Scott

Reply to
Scott Miller

As I said, it can be regulated as long as the N*Vin is considerable less than the desired voltage, so that adjusting the flyback voltage component is enough.

Agreed.

--
John Popelish
Reply to
John Popelish

formatting link

Well, it is certainly cute. At least it appears to have a ferrite core. Do you have an oscilloscope or any other means to measure the turns ratio?

It appears to be a reasonable guess at a device for your purposes (if it is designed for the purpose described on the page).

--
John Popelish
Reply to
John Popelish

Once you get the rectification process better under control, this will get easier. You may want to parallel the resistive divider with a similar capacitive divider (put a large, low voltage cap in series with the ground end of the final supply storage capacitor). Your ADC sample and hold will be better behaved.

A simple proportional control may be all you need. This would involve having an output pulse duty cycle varied inversely with the ADC measurement, with some max. pulse width to handle start up or overload situations. You turn the proportionality constant up till the output starts to wobble, and then cut it is half. You can temporarily use a second ADC input with a pot across the supply as the gain adjustment. After you decide what gain is appropriate, store it in the program, permanently.

It ain't so bad. At such low current, it is quite functional if wasteful of battery power. It also takes less understanding to get it working.

You can also make the MOV part of the voltage divider to the ADC to increase the effective signal in the range of interest, though the temperature coefficient will be higher.

--
John Popelish
Reply to
John Popelish

What exactly does the ferrite bead accomplish? I've got plenty on hand to try it with...

Looks like it's 220 uF right now.

Ok. I'll play with that some more when I've got the rectification taken care of.

Thanks,

Scott

Reply to
Scott Miller

Scott Miller wrote: (snip)

The resistor you have in series with the transformer primary is soaking up a lot of energy, also. Once you have the feedback control working (and the maximum on time limit that safely limits current in the event of output overload) you might replace it with a ferrite bead on a wire or other small inductor. C3 should be big enough to supply an entire power pulse with only a little sag. Say, a few microfarads of electrolytic in parallel with .1 to 1 uf of film or ceramic for the high frequencies. This will give you more voltage across the primary during the on time and more energy in the core to be released during the off time (narrower pulse needed).

--
John Popelish
Reply to
John Popelish

ElectronDepot website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.