MicroController control for switching regulator

On 12/28/2012 8:56 AM, rickman wrote: snipped per instruction

In a perfect world, all designs are failsafe and never have bugs. We don't live in a perfect world. Many, MANY engineers have tunnel vision and get blinded by their own cleverness and never consider the ramifications of their decisions outside their tiny sphere of control.

Of course, none of those people post here, but they do exist...in droves.

The only thing missing in this thread is the point.

Yes, you could probably figger out how to use an old Buick to control your PS loop.

If you've got free resources in your microcontroller and you have the imagination to understand possible interactions with the rest of the world, and it works, that's fine.

Shoehorning a PS control loop into the wrong device is not always better than sticking in a single-chip power supply controller. Especially for those OTHER inferior designers who don't post here.

If I had extra resources in my microcontroller or FPGA, I'd be thinking about how to use it to the benefit of the customer/user.

Yes, there are always exceptions.

Reply to
mike
Loading thread data ...

if you're doing PIC stuff in C or assembler don't bother with arduino, just go straight to AVR. the assembler syntax is easy to grasp and you can get a USB programmer delivered for under $5 on ebay or ali-express if you don't have a parallel port handy.

--
?? 100% natural 

--- news://freenews.netfront.net/ - complaints: news@netfront.net ---
Reply to
Jasen Betts

All good points for a production power supply design. I think the OP wants to do some experiments with switcher designs. In this case, direct PWM control from a uC output pin would give more flexibility.

I'd oversize some components so as to tolerate a s/w lockup and 100% ON condition without releasing the magic smoke. Its just a bench top experiment, so what's a few extra pennies?

--
Paul Hovnanian     mailto:Paul@Hovnanian.com 
------------------------------------------------------------------ 
The purpose of language is communication. If the idea is clear  
the grammer ain't important.
Reply to
Paul Hovnanian P.E.

Over the last 44 years, I've written exactly ONE C program that did anything useful. And that only because I just couldn't get interpreted BASIC to keep up with the data from the spectrum analyzer.

C, as defined by K&R is simple enough. Although I balk at a language that makes me do a function call to concatenate two strings...and most anything else I want to do. I get lost in all the defines and includes and pragmas and and and... Life is too short ;-) I'm sure it's all trivial the second time you get it set up.

PicBasicPro and inline assembler is the sweet spot for me.

I went in search of a way to change my development environment from Windows to linux. Gambas3 looks interesting for PC programs, but the search for a linux microcontroller development paradigm that fit within my attention span came up short. The hype for the microcontroller version of gcc, exceeds reality for simple minds like mine.

When you've got a complete design/debug environment set up, it's hard to justify change that you don't really need. It's just an intellectual exercise with short attention span.

I'm sure I'll change my tune if I need something I can't do.

Reply to
mike

etc.

Try the PowerBasic Console Compiler. It can make useful (and readable!) Windows programs in minutes.

' ' ROBOT.BAS ' ' ' By John Larkin ' Highland Technology, Inc ' San Francisco ' December 27 , 2012 '

' Remote Batch File Executor Dropbox version ' ' If this program sees a file called ROBOT.BAT, it shells to it then deletes ROBOT.BAT ' ' ' One good command is shutdown -r -f to reboot the PC. ' ' This program is coded for PBCC v 5 ' '

#COMPILE EXE

'$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ '$$$$$$$$$$$$$$$$$$$$ MAIN PROGRAM $$$$$$$$$$$$$$$$$$$$$$$$$$$ '$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$

FUNCTION PBMAIN() AS LONG

DEFLNG A-Z

REV$ = "D"

CONSOLE SET SCREEN 25, 80

CONSOLE NAME " ROBOT Batch File Executor Rev " + REV$ CURSOR OFF

' DEFINE VGA COLORS

BLK% = 0 GRY% = 7 BLU% = 9 GRN% = 10 CYN% = 11 RED% = 12 VIO% = 13 YEL% = 14 WHT% = 15 DARK% = -8

TOP:

COLOR VIO%+DARK%, WHT% : CLS

TLOOP:

SLEEP 2000

IF DIR$("ROBOT.BAT") "" THEN ' GOT A BATCH FILE TO RUN?

PRINT "Executing ROBOT.BAT "; DATE$; " "; TIME$

TRY

SHELL("ROBOT.BAT") ' RUN COMMAND AS A SYNC PROCESS THEN SLEEP 5000 KILL "ROBOT.BAT" ' NUKE COMMAND FILE PRINT

CATCH

PRINT "Error "; ERR ' OOPS, SOMETHING'S WEIRD PRINT

END TRY

END IF

GOTO TLOOP

END FUNCTION

Reply to
John Larkin

compiler

etc.

Thanks, Deal Breaker: PB/CC 6 is priced at $169 I'm a hobbyist with a serious cheap streak.

I write virtually all my Windows PC programs in Visual Basic 6. The only disadvantage is that you sometimes have dependencies that don't exist on older systems. PITA. I migrated dos basic stuff to FreeBasic with FBIDE gui development wrapper. For non-gui progs, it produces one file that doesn't need VB libraries and still runs in win7.

It's cold and wet outside. I keep telling myself I'm gonna take another crack at microcontroller C. But my body just wants to hibernate...nap time!!!

Reply to
mike

switching

used in

output of

current and

LT has one to sell their regulator ICs, so does TI. So far as i know nobody makes one for random uPs.

?-)

Reply to
josephkk

I'm wondering about another idea for the control. What if I used a resistor from the output to the feedback pin, and then a NPN transistor from the feedback pin to ground. A DAC would feed the base through the base resistor, it would use the transistors current gain to control the current through the resistor, more current would require move voltage drop through the resistor and increase the output voltage. Does that sound like it would work?

RogerN

Reply to
RogerN

Sure, that works just fine as long as you want an output voltage greater than the reference voltage.

You'd get what you asked for...but probably not what you wanted.

The current gain of the transistor varies greatly. You'd have to embed it in a circuit that sought to eliminate the dependency on the actual gain of the transistor...and the temperature characteristics of the junction voltages...and straightening out the nonlinearities...and...and

Reply to
mike

resistor

That would probably be OK for my battery charging application, the whole process is measure voltage & current then adjust the output until charge termination. But it may be better to use some sort of rail-to-rail Op-Amp so the feedback controls the voltage instead of the transistors drifting current gain.

RogerN

Reply to
RogerN
Reply to
leonardo.padovano

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.