Need opinions / suggestions on circuit design

Hi all,

Please see the attached image.

I wish to make a switching "front end" for a LINEAR regulator circuit. The linear regulator will be a conventional LM-317 with booster transistor design.

The switching front end is meant to "roughly" control the unregulated INPUT to the linear regulator to minimize power dissipation at low output voltages.

Note: the whole thing (setting the output voltage of the linear side, current and voltage monitoring, control of the switching front end, etc..) will all be done with an Arduino.

Imagine an adjustable power supply of 1.2 to 15 or 18 volts DC at 10 amps or more. Of course the linear regulator needs at least 22 to 25 volts input to account for the regulator losses. Now, setting the regulator to a low voltage like 3.3 and drawing 10 amperes causes the regulator to dissipate over 200 watts!

I expect the switching "front end" to track the output voltage setting (all Arduino controlled) and provide "just enough" for the linear regulator to work without heating the entire house! :slight_smile:

I'm not all that great with this type of circuit design, so I would really appreciate any input from you all.

Is anything blatantly wrong? Is there a better way to do it? Are the components I specified really needed? Did I leave out anything that is needed? Should I use a resistor or diode to snub the inductor so it doesn't "snap back" and injure the MOSFET? How should I calculate the best value for the inductor? What is the best PWM frequency to use for this - and why? Should the inductor be air core, iron core or ferrite core? And why?

Note: I made a circuit like this already for a power supply project and I'm not happy with the way it works. The MOSFET seems to get much warmer than I expected (switching time problem?) and a "teensy" bit of switching noise seems to get through to the output, despite the amazing AC rejection capability of the LM-317.

Comments please. Thank you!

-- Roger

I'd look into switching regulator chips. They switch at very high frequencies and can control the output voltage much better than something arduino controlled can.

CrossRoads:
I'd look into switching regulator chips. They switch at very high frequencies and can control the output voltage much better than something arduino controlled can.

Thanks for the reply. Honestly, I'd rather do it the way I showed in the diagram (aside from any changes anyone may suggest).

I don't need "good" regulation, all I want it to do is minimize the input to the linear part to limit the "analog" power waste.

The Arduino will monitor the linear regulator output setting and calculate the necessary "front end" voltage, as well as keeping the "front end" voltage correct despite changes in load (not to mention a whole bunch of other things like reading rotary encoders, driving a VFD output display, monitoring voltage, current and power for display, getting and saving settings in EEPROM, etc...)

Besides, with a switching regulator chip, I would need lots of extra glue parts and probably most of the chips are SMT and not through-hole. Having to design and get made a custom SMT board isn't the way I wanted to go with this.

Also, as I said, I've already done a circuit similar to this - it just doesn't work as well as I think it should and I'm guessing it can be improved. I don't want to "re-invent my own wheel". :slight_smile:

I really think you are going about this the wrong way. Not wanting to use a good voltage regulator IC because you don't want to add a couple of capacitors and resistors is the lamest excuse I've ever heard. I've yet to build my own variable bench supply, but I have done at least some research into it. I think the problem you are going to run into is the Arduino won't be able to sample the voltage fast enough to adjust it fast enough. I think a much better design would be voltage regulator who's output can be adjusted by a voltage divider, and use a digital potentiometer controlled by the Arduino to adjust the selected output by changing the value on the voltage divider. Use a ready-made volt meter display on the output to show the current voltage. Use a control hooked up to the Arduino (could be a couple of buttons, a potentiometer, a rotary encoder, whatever) to make the Arduino adjust the voltage divider up and down. Read the output on the display.

Do it right.
Many thru hole regulators are available:

NR111D, $1.54, some external Rs,Cs, and a 10uH inductor

See page 54-55
http://www.sanken-ele.co.jp/en/prod/library/pdf/h1-o03eh0-Reg.pdf

Xpendable:
I really think you are going about this the wrong way. Not wanting to use a good voltage regulator IC because you don't want to add a couple of capacitors and resistors is the lamest excuse I've ever heard. I've yet to build my own variable bench supply, but I have done at least some research into it. I think the problem you are going to run into is the Arduino won't be able to sample the voltage fast enough to adjust it fast enough. I think a much better design would be voltage regulator who's output can be adjusted by a voltage divider, and use a digital potentiometer controlled by the Arduino to adjust the selected output by changing the value on the voltage divider. Use a ready-made volt meter display on the output to show the current voltage. Use a control hooked up to the Arduino (could be a couple of buttons, a potentiometer, a rotary encoder, whatever) to make the Arduino adjust the voltage divider up and down. Read the output on the display.

With all due respect... I want to go to Disneyland in California and you're telling me Disneyworld in Florida is closer and I should go there. Yes indeed it's closer, but I WANT to go to Anaheim....... see my point?

Getting back to the topic, I'm doing this project with my son who's starting college this year. The point of this project is to show how "neat" the Arduino is (and microcontrollers in general) by making it control lots of things. So far, we're having a blast building and testing it, writing the code, finding problems and solving them.

For example, the voltage adjust for the linear (LM-317) part is a 10 turn pot controlled by a stepper motor (see attached design sketch).

Of course, a digital pot would be less expensive and operate a lot faster, completely silent and it wouldn't overshoot or hunt, but the "cool factor" of seeing the servo seek to it's new setpoint (and learning the hard way about damping, overshoot and hunting) can't be beat.

Changing the voltage setting and hearing the servo go "zzzzzzzzzzzzt" to the setpoint is way cool (IMHO).

I greatly appreciate all the talent here and all the help everyone provides, but I really hate having to either explain over and over again "I want to do it this way" or else add a disclaimer in the original post "please don't try to tell me to use something else".

My "switcher front end" already works. I (we) are just trying to improve it, and I suspect that something simple like a different inductor value, or a different PWM frequency or some bypassing in the right spot is all it needs, and I'm hoping for someone with experience with this kind of circuit to say "just change this" or "just add that".

This is a teaching and learning experience, not a power supply production factory.

Buying pre-built components and panel meters, then sticking them into the box, defeats the whole purpose of what we're trying to do.

Enough said.

-- Roger

Ah, that would have been good to know to start. Good luck with the tweaking.

Look up PID control.

polymorph:
Look up PID control.

Is that a joke?

No. Why would you think that it is?

polymorph:
Why would you think that it is?

Because it isn't a very helpful response?

OK, fair enough. You are building a potentially unstable system where some parts respond nearly instantly (changes in the load) and others can change only very slowly (servo controlled first regulator). I thought that looking up Proportional-Integral-Derivative control might be helpful.

Now let me look that up for you.

From Arduino.cc:
http://lmgtfy.com/?q=pid+site%3Ahttp%3A%2F%2Farduino.cc

From the web in general:
http://lmgtfy.com/?q=pid+control+arduino

Now it's just snarky.

Not really, or at least only slightly. lmgtfy is just as good as tinyURL at shortening links, better, in fact, because it shows you the search terms.

I find it is better for me if I don't interpret every message in the worst possible way.

I said "Look up PID control." I don't see how that is a joke. I don't see how it is unhelpful. I think if Krupski -had- looked it up, he'd not have thought it was a joke.

https://www.google.com/search?q=PID+control&oq=PID+control&aqs=chrome..69i57&sourceid=chrome&es_sm=93&ie=UTF-8

polymorph:
I find it is better for me if I don't interpret every message in the worst possible way.

I'm cool with that. And probably as guilty as the next guy of losing my head and doing it anyway.

Stepping back and trying to be fair, if you are lost on the issue "google PID" comes across like "google a pool" in answer to the question of "how do I learn to swim?"

The first page of results on Google for "PID" includes
http://ctms.engin.umich.edu/CTMS/index.php?example=Introduction&section=ControlPID

which starts right off with:

which I assert is not helpful and not what the home hobbyist wants.

I understand you are trying to be helpful. You have convinced me of your sincerety. I apologize for being snarky back, but I didn't see your response as helpful. I absolutely agree there is a lot to learn by googling PID, but then we are back to swimming in water over one's head.

I do think the top responses in your second link:
pid site:http://arduino.cc
are in fact very helpful.

You've just illustrated why I never click "I feel lucky".

bigred1212:
Now it's just snarky.

Agreed completely.

Whenever I reply to someone's question, I try to guage their level of understanding by their post, then reply at that level, giving examples or schematics or whatever may be required. In other words, I try to help.

Some people here seem to almost auto-reply solely to get their post counts up, others reply with something bordering on sarcasm.

I really don't know why this is. I'm on several other "technical" boards and the people are not like this.

(edit to add): Notice that this has extended to 2 pages so far and no help yet.

polymorph:
OK, fair enough. You are building a potentially unstable system where some parts respond nearly instantly (changes in the load) and others can change only very slowly (servo controlled first regulator). I thought that looking up Proportional-Integral-Derivative control might be helpful.

I am not building a "potentially unstable system".

The circuit I asked about is a "pre-regulator" which simply needs to track several volts above a setpoint (Arduino controlled).

It's response does not need to be fast or perfect, since there are large capacitors involved, and the Arduino is more than fast enough to keep up.

As I said, I already built basically this circuit and it works - all I want to do is OPTIMIZE a few values (such as switching speed and/or inductor value) based on the input provided by someone who knows switching circuits better than I do.

Should I need to preface all my posts with "only serious replies please"?

I'll add you to my list of people too sensitive to be on the internet. Now that -is- meant to be snarky, not that it matters, if you choose to read snark into everything I say anyway.

polymorph:
I'll add you to my list of people too sensitive to be on the internet. Now that -is- meant to be snarky, not that it matters, if you choose to read snark into everything I say anyway.

Whatever makes you happy is fine by me.