Reply by November 4, 20162016-11-04
Algún esquema de control con pic el lm2576?
Reply by RogerN January 3, 20132013-01-03
"mike"  wrote in message news:kc1kgl$8n4$1@dont-email.me...

>On 1/2/2013 3:51 AM, RogerN wrote:
<snip>> 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 >> >> >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
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 by mike January 2, 20132013-01-02
On 1/2/2013 3:51 AM, RogerN wrote:
> "Tim Wescott" wrote in message > news:ZO-dnalKjYHz2kbNnZ2dnUVZ_vOdnZ2d@web-ster.com... > >> On Tue, 25 Dec 2012 06:05:02 -0600, RogerN wrote: >> >>> I'm wanting to use a microcontroller to control the output of a >>> switching regulator, maybe something like a LM2576 simple switcher. I >>> see the adjustability is on the feedback lead but what's the best way >>> make it adjustable from a microcontroller. I'm guessing the feedback >>> may be used in switching timing, ie, I guess I can't just use a DAC and >>> get an output of 1.23V more than the DAC output? I want to monitor >>> voltage and current and use a control algorithm in the microcontroller >>> (Arduino at first for experimentation) for custom battery charging >>> experimentation. >> >> I don't know that anyone actually answered the question that you asked. >> You got a lot of good responses -- personally, if I were doing this I'd >> see if the microprocessor had a suitable PWM output and think about using >> that. >> > <snip> >> -- >> Tim Wescott >> Control system and signal processing consulting >> www.wescottdesign.com > > > 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 > >
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 by RogerN January 2, 20132013-01-02
"Tim Wescott"  wrote in message 
news:ZO-dnalKjYHz2kbNnZ2dnUVZ_vOdnZ2d@web-ster.com...

>On Tue, 25 Dec 2012 06:05:02 -0600, RogerN wrote: > >> I'm wanting to use a microcontroller to control the output of a >> switching regulator, maybe something like a LM2576 simple switcher. I >> see the adjustability is on the feedback lead but what's the best way >> make it adjustable from a microcontroller. I'm guessing the feedback >> may be used in switching timing, ie, I guess I can't just use a DAC and >> get an output of 1.23V more than the DAC output? I want to monitor >> voltage and current and use a control algorithm in the microcontroller >> (Arduino at first for experimentation) for custom battery charging >> experimentation. > >I don't know that anyone actually answered the question that you asked. >You got a lot of good responses -- personally, if I were doing this I'd >see if the microprocessor had a suitable PWM output and think about using >that. >
<snip>
>-- >Tim Wescott >Control system and signal processing consulting >www.wescottdesign.com
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 by josephkk December 31, 20122012-12-31
On Fri, 28 Dec 2012 18:42:41 -0500, rickman <gnuarm@gmail.com> wrote:

>On 12/28/2012 5:48 PM, John Larkin wrote: >> On Tue, 25 Dec 2012 06:05:02 -0600, "RogerN"<regor@midwest.net> >> wrote: >> >>> >>> I'm wanting to use a microcontroller to control the output of a =
switching
>>> regulator, maybe something like a LM2576 simple switcher. I see the >>> adjustability is on the feedback lead but what's the best way make it >>> adjustable from a microcontroller. I'm guessing the feedback may be =
used in
>>> switching timing, ie, I guess I can't just use a DAC and get an =
output of
>>> 1.23V more than the DAC output? I want to monitor voltage and =
current and
>>> use a control algorithm in the microcontroller (Arduino at first for >>> experimentation) for custom battery charging experimentation. >>> >>> RogerN >>> >> >> Somebody should do a GUI, vaguely LabView-ish, Windows app to design >> digital power supply controllers around a uP or a DSP-based power >> supply controller chip. Fill in the boxes and get both documentation >> and compiled code. It may as well simulate, while it's at it. It could >> output a nice PDF document for the record. > > >Open source or would you pay for this? Sounds like a good companion app=
=20
>for LT Spice. > >Rick
LT has one to sell their regulator ICs, so does TI. So far as i know nobody makes one for random uPs. ?-)
Reply by mike December 29, 20122012-12-29
On 12/29/2012 10:57 AM, John Larkin wrote:
> On Sat, 29 Dec 2012 10:04:14 -0800, mike<ham789@netzero.net> wrote: > >> On 12/29/2012 12:49 AM, Jasen Betts wrote: >>> On 2012-12-28, mike<ham789@netzero.net> wrote: >>>> On 12/27/2012 6:12 AM, Nico Coesel wrote: >>>>> mike<ham789@netzero.net> wrote: >>>>> >>>>>> On 12/27/2012 1:17 AM, Nico Coesel wrote: >>>>>> >>>>>>> >>>>>>> Yes. PIC and other 8 bit controllers are a stepping stone anyway. At >>>>>>> some point you have to move forward. Besides that the software to >>>>>>> compile for ARM microcontrollers is completely free. >>>>>>> >>>>>> I could use a project. Point me to your favorite free basic-like compiler >>>>>> for the ARM. Something with lots of available functions so I don't have >>>>>> to reinvent >>>>>> the wheel for I/O or display drivers or keyboard muxes data formatting etc. >>>>>> Life is too short to program in C. >>>>>> Period...I don't need or want to hear otherwise. >>>>> >>>>> http://www.eluaproject.net/ >>>>> >>>> Thanks for the link. Interesting read. >>>> I'm sure that it's wonderful for a lot of stuff, but the overlap for me >>>> is zip. >>>> >>>> I only studied it or an hour, but I'm having a hard time believing >>>> I can write a power supply control loop using an interpreted language >>>> running on a virtual machine and have it fit in 8K. ;-) >>>> >>>> I do hobby projects that interface hardware and do real-time-ish stuff >>>> on a PIC. >>>> The data gets sent out the rs232 port to a PalmIIIC that does all the >>>> heavy lifting and user interface in an interpreted language where time >>>> don't matter. Saves a LOT of packaging grief for the touch screen >>>> and display. >>>> >>>> I keep trying to justify buying an Arduino, but giving up on all the >>>> PIC infrastructure I've built over the years for no obvious gain >>>> keeps it on the back burner. >>> >>> 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. >>> >> 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. >> > > Try the PowerBasic Console Compiler. It can make useful (and > readable!) Windows programs in minutes.
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 by John Larkin December 29, 20122012-12-29
On Sat, 29 Dec 2012 10:04:14 -0800, mike <ham789@netzero.net> wrote:

>On 12/29/2012 12:49 AM, Jasen Betts wrote: >> On 2012-12-28, mike<ham789@netzero.net> wrote: >>> On 12/27/2012 6:12 AM, Nico Coesel wrote: >>>> mike<ham789@netzero.net> wrote: >>>> >>>>> On 12/27/2012 1:17 AM, Nico Coesel wrote: >>>>> >>>>>> >>>>>> Yes. PIC and other 8 bit controllers are a stepping stone anyway. At >>>>>> some point you have to move forward. Besides that the software to >>>>>> compile for ARM microcontrollers is completely free. >>>>>> >>>>> I could use a project. Point me to your favorite free basic-like compiler >>>>> for the ARM. Something with lots of available functions so I don't have >>>>> to reinvent >>>>> the wheel for I/O or display drivers or keyboard muxes data formatting etc. >>>>> Life is too short to program in C. >>>>> Period...I don't need or want to hear otherwise. >>>> >>>> http://www.eluaproject.net/ >>>> >>> Thanks for the link. Interesting read. >>> I'm sure that it's wonderful for a lot of stuff, but the overlap for me >>> is zip. >>> >>> I only studied it or an hour, but I'm having a hard time believing >>> I can write a power supply control loop using an interpreted language >>> running on a virtual machine and have it fit in 8K. ;-) >>> >>> I do hobby projects that interface hardware and do real-time-ish stuff >>> on a PIC. >>> The data gets sent out the rs232 port to a PalmIIIC that does all the >>> heavy lifting and user interface in an interpreted language where time >>> don't matter. Saves a LOT of packaging grief for the touch screen >>> and display. >>> >>> I keep trying to justify buying an Arduino, but giving up on all the >>> PIC infrastructure I've built over the years for no obvious gain >>> keeps it on the back burner. >> >> 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. >> >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. >
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 by mike December 29, 20122012-12-29
On 12/29/2012 12:49 AM, Jasen Betts wrote:
> On 2012-12-28, mike<ham789@netzero.net> wrote: >> On 12/27/2012 6:12 AM, Nico Coesel wrote: >>> mike<ham789@netzero.net> wrote: >>> >>>> On 12/27/2012 1:17 AM, Nico Coesel wrote: >>>> >>>>> >>>>> Yes. PIC and other 8 bit controllers are a stepping stone anyway. At >>>>> some point you have to move forward. Besides that the software to >>>>> compile for ARM microcontrollers is completely free. >>>>> >>>> I could use a project. Point me to your favorite free basic-like compiler >>>> for the ARM. Something with lots of available functions so I don't have >>>> to reinvent >>>> the wheel for I/O or display drivers or keyboard muxes data formatting etc. >>>> Life is too short to program in C. >>>> Period...I don't need or want to hear otherwise. >>> >>> http://www.eluaproject.net/ >>> >> Thanks for the link. Interesting read. >> I'm sure that it's wonderful for a lot of stuff, but the overlap for me >> is zip. >> >> I only studied it or an hour, but I'm having a hard time believing >> I can write a power supply control loop using an interpreted language >> running on a virtual machine and have it fit in 8K. ;-) >> >> I do hobby projects that interface hardware and do real-time-ish stuff >> on a PIC. >> The data gets sent out the rs232 port to a PalmIIIC that does all the >> heavy lifting and user interface in an interpreted language where time >> don't matter. Saves a LOT of packaging grief for the touch screen >> and display. >> >> I keep trying to justify buying an Arduino, but giving up on all the >> PIC infrastructure I've built over the years for no obvious gain >> keeps it on the back burner. > > 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. >
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 by Paul Hovnanian P.E. December 29, 20122012-12-29
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 by Jasen Betts December 29, 20122012-12-29
On 2012-12-28, mike <ham789@netzero.net> wrote:
> On 12/27/2012 6:12 AM, Nico Coesel wrote: >> mike<ham789@netzero.net> wrote: >> >>> On 12/27/2012 1:17 AM, Nico Coesel wrote: >>> >>>> >>>> Yes. PIC and other 8 bit controllers are a stepping stone anyway. At >>>> some point you have to move forward. Besides that the software to >>>> compile for ARM microcontrollers is completely free. >>>> >>> I could use a project. Point me to your favorite free basic-like compiler >>> for the ARM. Something with lots of available functions so I don't have >>> to reinvent >>> the wheel for I/O or display drivers or keyboard muxes data formatting etc. >>> Life is too short to program in C. >>> Period...I don't need or want to hear otherwise. >> >> http://www.eluaproject.net/ >> > Thanks for the link. Interesting read. > I'm sure that it's wonderful for a lot of stuff, but the overlap for me > is zip. > > I only studied it or an hour, but I'm having a hard time believing > I can write a power supply control loop using an interpreted language > running on a virtual machine and have it fit in 8K. ;-) > > I do hobby projects that interface hardware and do real-time-ish stuff > on a PIC. > The data gets sent out the rs232 port to a PalmIIIC that does all the > heavy lifting and user interface in an interpreted language where time > don't matter. Saves a LOT of packaging grief for the touch screen > and display. > > I keep trying to justify buying an Arduino, but giving up on all the > PIC infrastructure I've built over the years for no obvious gain > keeps it on the back burner.
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. -- &#9858;&#9859; 100% natural --- news://freenews.netfront.net/ - complaints: news@netfront.net ---