Maker Pro
Maker Pro

Serial Control of Adjustable Voltage Regulators?

F

Frank

Jan 1, 1970
0
Hi everyone,

I'm looking for a way to control a adjustable voltage regulator via a
serial interface.

For the regulator, pick almost any adjustable linear or switching
regulator capable of supplying up to 1A and adjustable up to about 20
volts or so.

The serial interface would be something like a standard 2-wire (I2C,
SPI, etc). A microprocessor would control the 2-wire interface.

This is what I was thinking about:

+-----------+
Vin ------------->| Regulator |-------+------------> Vout
+-----+-----+ |
|Adj |Rh
| +-----+
| Radj | | Variable
+----------| | Pot
| |
2-wire <================| |
interface +-----+
|Rl
|
Gnd


The problem I see is that most of the digital pots I've researched
only allow for a voltage potential between Rl and Rh to be that of
Vcc, and I need up to 20 volts on the output. Some of the 1-wire
parts from Dallas will work up to 11 volts but that's still not
enough. I was thinking of maybe an op-amp between the pot and
Rh/Radj, but I haven't tried that configuration out yet.

Anyone have any suggestions on how I could solve this problem?

Thanks!

-Frank
 
F

Frank Bemelman

Jan 1, 1970
0
Hi everyone,

I'm looking for a way to control a adjustable voltage regulator via a
serial interface.

For the regulator, pick almost any adjustable linear or switching
regulator capable of supplying up to 1A and adjustable up to about 20
volts or so.

The serial interface would be something like a standard 2-wire (I2C,
SPI, etc). A microprocessor would control the 2-wire interface.

This is what I was thinking about:

+-----------+
Vin ------------->| Regulator |-------+------------> Vout
+-----+-----+ |
|Adj |Rh
| +-----+
| Radj | | Variable
+----------| | Pot
| |
2-wire <================| |
interface +-----+
|Rl
|
Gnd


The problem I see is that most of the digital pots I've researched
only allow for a voltage potential between Rl and Rh to be that of
Vcc, and I need up to 20 volts on the output. Some of the 1-wire
parts from Dallas will work up to 11 volts but that's still not
enough. I was thinking of maybe an op-amp between the pot and
Rh/Radj, but I haven't tried that configuration out yet.

Anyone have any suggestions on how I could solve this problem?

You could use an op-amp powered from Vin, and a digital pot or
serial dac (with reference). Output of the opamp controls Vadj,
and feedback from Vout. That would give you more predictable output
voltages too.

But I wonder, if the ADJ pin of a LM317 is kept high, using some
form of external control, how does it behave when short-circuited?
 
F

Fred Bloggs

Jan 1, 1970
0
Frank said:
Hi everyone,

I'm looking for a way to control a adjustable voltage regulator via a
serial interface.

For the regulator, pick almost any adjustable linear or switching
regulator capable of supplying up to 1A and adjustable up to about 20
volts or so.

The serial interface would be something like a standard 2-wire (I2C,
SPI, etc). A microprocessor would control the 2-wire interface.

This is what I was thinking about:

+-----------+
Vin ------------->| Regulator |-------+------------> Vout
+-----+-----+ |
|Adj |Rh
| +-----+
| Radj | | Variable
+----------| | Pot
| |
2-wire <================| |
interface +-----+
|Rl
|
Gnd


The problem I see is that most of the digital pots I've researched
only allow for a voltage potential between Rl and Rh to be that of
Vcc, and I need up to 20 volts on the output. Some of the 1-wire
parts from Dallas will work up to 11 volts but that's still not
enough. I was thinking of maybe an op-amp between the pot and
Rh/Radj, but I haven't tried that configuration out yet.

Anyone have any suggestions on how I could solve this problem?

You want something basically like this- the error amplifier can be
discrete components- not necessarily an opamp- or combination. It would
be beneficial to know your minimum output voltage requirement:

Please view in a fixed-width font such as Courier.



R2
Vout=(1 + --) x K x Vref
+-----------+ R3
Vin --+--->| Regulator |------------------------+-->
| +-----+-----+ |
| |Adj \
| | CF R2
| | +---||------+ \
| | | | /
| | | /| | |
| | | /-|---+----+
| +-------------+----< | |
| | \+|---+ \
| \ \| | R3
\ Rb | \
R1 \ | /
\ / | |
/ | | ---
| --- | Gnd
| Gnd |
| K x Vref |
| +----+
| Vref ( < 5V ) |
+-------------------------------+----------+
| | |Rh
| | +-----+
| | Radj | | Variable
/---/ zener or +-------| | Pot
/ \ TL431 | |
--- 2-wire <===============| |
| interface +-----+
| |Rl
--- |
Gnd
 
F

Fred Bloggs

Jan 1, 1970
0
Fred Bloggs wrote:
Eliminating that Vref short on the first diagram- looks like this:

Please view in a fixed-width font such as Courier.



R2
Vout=(1 + --) x K x Vref
+-----------+ R3
Vin --+--->| Regulator |------------------------+-->
| +-----+-----+ |
| |Adj \
| | CF R2
| | +---||------+ \
| | | | /
| | | /| | |
| | | /-|---+----+
| +-------------+----< | |
| | \+|---+ \
| \ \| | R3
\ Rb | \
R1 \ | /
\ / | |
/ | | ---
| --- | Gnd
| Gnd |
| K x Vref |
| +----+
| Vref ( < 5V ) |
+-------------------------------|----------+
| | |Rh
| | +-----+
| | Radj | | Variable
/---/ zener or +-------| | Pot
/ \ TL431 | |
--- 2-wire <===============| |
| interface +-----+
| |Rl
--- |
Gnd
 
F

Fred Bloggs

Jan 1, 1970
0
Fred said:
Fred Bloggs wrote:
Eliminating that Vref short on the first diagram- looks like this:

Please view in a fixed-width font such as Courier.



R2
Vout=(1 + --) x K x Vref
+-----------+ R3
Vin --+--->| Regulator |------------------------+-->
| +-----+-----+ |
| |Adj \
| | CF R2
| | +---||------+ \
| | | | /
| | | /| | |
| | | /-|---+----+
| +-------------+----< | |
| | \+|---+ \
| \ \| | R3
\ Rb | \
R1 \ | /
\ / | |
/ | | ---
| --- | Gnd
| Gnd |
| K x Vref |
| +----+
| Vref ( < 5V ) |
+-------------------------------|----------+
| | |Rh
| | +-----+
| | Radj | | Variable
/---/ zener or +-------| | Pot
/ \ TL431 | |
--- 2-wire <===============| |
| interface +-----+
| |Rl
--- |
Gnd

This is a fairly basic variation on the above:

Please view in a fixed-width font such as Courier.



R2
Vout=(1 + --) x K x Vref
+-----------+ R3
Vin --+--->| Regulator |----+-------------------+-->
| +-----+-----+ | |
| |Adj | 240 \
| | +--/\/\-+---+ R2
| | | | \
| +------------------+ c /
| \| |
| npn |-----+
| /| |
| e \
| | R3
\ e \
R1 K x Vref |/ /
\ +-----| pnp |
/ | |\ |
| | c-------+
| | |
| | ---
| | Gnd
| Vref ( < 5V ) |
+-------------------------|----------------+
| | |Rh
| | +-----+
| | Radj | | Variable
/---/ zener or +-------------| | Pot
/ \ TL431 | |
--- 2-wire <===============| |
| interface +-----+
| |Rl
--- |
Gnd
 
R

Rene Tschaggelar

Jan 1, 1970
0
Frank said:
Hi everyone,

I'm looking for a way to control a adjustable voltage regulator via a
serial interface.

For the regulator, pick almost any adjustable linear or switching
regulator capable of supplying up to 1A and adjustable up to about 20
volts or so.

The serial interface would be something like a standard 2-wire (I2C,
SPI, etc). A microprocessor would control the 2-wire interface.

This is what I was thinking about:

+-----------+
Vin ------------->| Regulator |-------+------------> Vout
+-----+-----+ |
|Adj |Rh
| +-----+
| Radj | | Variable
+----------| | Pot
| |
2-wire <================| |
interface +-----+
|Rl
|
Gnd


The problem I see is that most of the digital pots I've researched
only allow for a voltage potential between Rl and Rh to be that of
Vcc, and I need up to 20 volts on the output. Some of the 1-wire
parts from Dallas will work up to 11 volts but that's still not
enough. I was thinking of maybe an op-amp between the pot and
Rh/Radj, but I haven't tried that configuration out yet.

Anyone have any suggestions on how I could solve this problem?

Have a look at the SMB controllers that fit to the usual
switching controller chips. They tend to have an upper and
a lower boundary for the output voltages though.

Rene
 
J

John Popelish

Jan 1, 1970
0
Frank said:
Hi everyone,

I'm looking for a way to control a adjustable voltage regulator via a
serial interface.

For the regulator, pick almost any adjustable linear or switching
regulator capable of supplying up to 1A and adjustable up to about 20
volts or so.

The serial interface would be something like a standard 2-wire (I2C,
SPI, etc). A microprocessor would control the 2-wire interface.

This is what I was thinking about:

+-----------+
Vin ------------->| Regulator |-------+------------> Vout
+-----+-----+ |
|Adj |Rh
| +-----+
| Radj | | Variable
+----------| | Pot
| |
2-wire <================| |
interface +-----+
|Rl
|
Gnd

The problem I see is that most of the digital pots I've researched
only allow for a voltage potential between Rl and Rh to be that of
Vcc, and I need up to 20 volts on the output. Some of the 1-wire
parts from Dallas will work up to 11 volts but that's still not
enough. I was thinking of maybe an op-amp between the pot and
Rh/Radj, but I haven't tried that configuration out yet.

Anyone have any suggestions on how I could solve this problem?

Thanks!

-Frank

The basic resistor divider method you are illustrating has a
requirement your method is not addressing. They are usually made with
a fixed resistor between output and reference, to guarantee a minimum
load current on the regulator. Then a variable resistor is connected
between reference and ground to produce an adjustable voltage drop as
this load current passes through the variable resistor. If your
serial pot has enough resistance stability and low enough resistance
it can be connected this way. Otherwise, you will have to come up
with a circuit better suited to the pot. I see some suggestions here.
 
F

Fred Bloggs

Jan 1, 1970
0
John said:
The basic resistor divider method you are illustrating has a
requirement your method is not addressing. They are usually made with
a fixed resistor between output and reference, to guarantee a minimum
load current on the regulator. Then a variable resistor is connected
between reference and ground to produce an adjustable voltage drop as
this load current passes through the variable resistor. If your
serial pot has enough resistance stability and low enough resistance
it can be connected this way. Otherwise, you will have to come up
with a circuit better suited to the pot. I see some suggestions here.

The ADJ pin will rise to Vout-1.25 for the LM317 and similar types.
 
J

John Fields

Jan 1, 1970
0
Hi everyone,

I'm looking for a way to control a adjustable voltage regulator via a
serial interface.

For the regulator, pick almost any adjustable linear or switching
regulator capable of supplying up to 1A and adjustable up to about 20
volts or so.

The serial interface would be something like a standard 2-wire (I2C,
SPI, etc). A microprocessor would control the 2-wire interface.

This is what I was thinking about:

+-----------+
Vin ------------->| Regulator |-------+------------> Vout
+-----+-----+ |
|Adj |Rh
| +-----+
| Radj | | Variable
+----------| | Pot
| |
2-wire <================| |
interface +-----+
|Rl
|
Gnd


The problem I see is that most of the digital pots I've researched
only allow for a voltage potential between Rl and Rh to be that of
Vcc, and I need up to 20 volts on the output. Some of the 1-wire
parts from Dallas will work up to 11 volts but that's still not
enough. I was thinking of maybe an op-amp between the pot and
Rh/Radj, but I haven't tried that configuration out yet.

Anyone have any suggestions on how I could solve this problem?

---
If your µC is going to control a 2-wire interface and you could spare
one extra IO, you could do this:


+---------+
Vin>-------|REGULATOR|-----------------------------+-----+--Vreg
+---------+ | |
| [R] |
| | |
+----------------------------------+ |
| |
| |
| |
+------+ +-----+ |
LOCAL CLOCK--->|> | | R2R | |
+-------->|EN- Q|--->|D | |
| +---->|U/D | | | |
| | +------+ +-----+ |
| | COUNT | |
| | GND |
+-----+ +-------+ +-----+ [R]
DCLK>--------| | |A=B A>B| | | |
DATA>--------| Q|--->|A B|<---|D A|<------------+
RCLK>--------| | | | | | |
+-----+ +-------+ +-----+ [R]
SR COMPARE ADC |
GND
 
C

CBarn24050

Jan 1, 1970
0
I think there is an application note on microchips site showing how to make a
regulator with a pic.
 
J

John Larkin

Jan 1, 1970
0
You could use an op-amp powered from Vin, and a digital pot or
serial dac (with reference). Output of the opamp controls Vadj,
and feedback from Vout. That would give you more predictable output
voltages too.

But I wonder, if the ADJ pin of a LM317 is kept high, using some
form of external control, how does it behave when short-circuited?

We recently did a board that needed eight separate controllable power
sources for strain gage excitation. We used LM1117 ldo regulators and
applied the control voltages to their adj pins (open loop, so the
outputs were 1.25 volts above the control inputs.) That sort of uses
the regulator as a power amp with all the nice characteristics of a
voltage reg chip.

Anyway, I tested the 1117's for damage modes associated with driving
the adj pin from a stiff source and simultaneously abusing the inputs
and outputs various ways. I couldn't find a reasonable way to damage
the regulator, so it looks pretty safe. I didn't test an LM317, but
the 1117 is generally a nicer part anyhow.

John
 
C

Costas Vlachos

Jan 1, 1970
0
John Fields said:
Hi everyone,

I'm looking for a way to control a adjustable voltage regulator via a
serial interface.

For the regulator, pick almost any adjustable linear or switching
regulator capable of supplying up to 1A and adjustable up to about 20
volts or so.

The serial interface would be something like a standard 2-wire (I2C,
SPI, etc). A microprocessor would control the 2-wire interface.

This is what I was thinking about:

+-----------+
Vin ------------->| Regulator |-------+------------> Vout
+-----+-----+ |
|Adj |Rh
| +-----+
| Radj | | Variable
+----------| | Pot
| |
2-wire <================| |
interface +-----+
|Rl
|
Gnd


The problem I see is that most of the digital pots I've researched
only allow for a voltage potential between Rl and Rh to be that of
Vcc, and I need up to 20 volts on the output. Some of the 1-wire
parts from Dallas will work up to 11 volts but that's still not
enough. I was thinking of maybe an op-amp between the pot and
Rh/Radj, but I haven't tried that configuration out yet.

Anyone have any suggestions on how I could solve this problem?

---
If your µC is going to control a 2-wire interface and you could spare
one extra IO, you could do this:


+---------+
Vin>-------|REGULATOR|-----------------------------+-----+--Vreg
+---------+ | |
| [R] |
| | |
+----------------------------------+ |
| |
| |
| |
+------+ +-----+ |
LOCAL CLOCK--->|> | | R2R | |
+-------->|EN- Q|--->|D | |
| +---->|U/D | | | |
| | +------+ +-----+ |
| | COUNT | |
| | GND |
+-----+ +-------+ +-----+ [R]
DCLK>--------| | |A=B A>B| | | |
DATA>--------| Q|--->|A B|<---|D A|<------------+
RCLK>--------| | | | | | |
+-----+ +-------+ +-----+ [R]
SR COMPARE ADC |
GND


Hmmm... I wonder how stable this approach will be when there is a little
noise present in the ADC input, or during load transients. This is a
discrete-time closed-loop system and may need some tuning to work as
expected. Plus you're running the risk of having the counter constantly
counting up/down around the set point thus contaminating the output with
nasty quantized noise. I think it's better/safer to use the regulator's own
analogue circuit in closed-loop and leave the discrete-time stuff open-loop
(i.e., just program the set point).

cheers,
Costas
_________________________________________________
Costas Vlachos Email: [email protected]
SPAM-TRAPPED: Please remove "-X-" before replying
 
F

Frank

Jan 1, 1970
0
You want something basically like this- the error amplifier can be
discrete components- not necessarily an opamp- or combination. It would
be beneficial to know your minimum output voltage requirement:
Most of the regulators seem to bottom out somewhere around 1.25 volts.
I'd like the minimum output voltage to be around three volts or less.

I was thinking of using a switching regulator -- less heat, etc.
Maybe something like an MC34063.

-Frank
 
J

John Fields

Jan 1, 1970
0
---
If your µC is going to control a 2-wire interface and you could spare
one extra IO, you could do this:


+---------+
Vin>-------|REGULATOR|-----------------------------+-----+--Vreg
+---------+ | |
| [R] |
| | |
+----------------------------------+ |
| |
| |
| |
+------+ +-----+ |
LOCAL CLOCK--->|> | | R2R | |
+-------->|EN- Q|--->|D | |
| +---->|U/D | | | |
| | +------+ +-----+ |
| | COUNT | |
| | GND |
+-----+ +-------+ +-----+ [R]
DCLK>--------| | |A=B A>B| | | |
DATA>--------| Q|--->|A B|<---|D A|<------------+
RCLK>--------| | | | | | |
+-----+ +-------+ +-----+ [R]
SR COMPARE ADC |
GND


Hmmm... I wonder how stable this approach will be when there is a little
noise present in the ADC input, or during load transients. This is a
discrete-time closed-loop system and may need some tuning to work as
expected. Plus you're running the risk of having the counter constantly
counting up/down around the set point thus contaminating the output with
nasty quantized noise. I think it's better/safer to use the regulator's own
analogue circuit in closed-loop and leave the discrete-time stuff open-loop
(i.e., just program the set point).

---
Notice that once the set point has been reached the counter is disabled
and will only start counting again if the B side of the magnitude
comparator changes. Also, once the set point has been reached the
regulator _is_ running closed loop by itself (the R2R ladder being the
resistor from the regulator's ADJ terminal to ground. Load transients
can, of course, be taken care of with a little C from the ADC input to
GND and tuning, as such, would more than likely just consist of choosing
the proper word size and local clock frequency to get the granularity
and speed desired. In any case, this was presented as a concept, not a
finished design, so there's really no "work as expected" part to it. :)
 
C

Costas Vlachos

Jan 1, 1970
0
John Fields said:
---
If your µC is going to control a 2-wire interface and you could spare
one extra IO, you could do this:


+---------+
Vin>-------|REGULATOR|-----------------------------+-----+--Vreg
+---------+ | |
| [R] |
| | |
+----------------------------------+ |
| |
| |
| |
+------+ +-----+ |
LOCAL CLOCK--->|> | | R2R | |
+-------->|EN- Q|--->|D | |
| +---->|U/D | | | |
| | +------+ +-----+ |
| | COUNT | |
| | GND |
+-----+ +-------+ +-----+ [R]
DCLK>--------| | |A=B A>B| | | |
DATA>--------| Q|--->|A B|<---|D A|<------------+
RCLK>--------| | | | | | |
+-----+ +-------+ +-----+ [R]
SR COMPARE ADC |
GND


Hmmm... I wonder how stable this approach will be when there is a little
noise present in the ADC input, or during load transients. This is a
discrete-time closed-loop system and may need some tuning to work as
expected. Plus you're running the risk of having the counter constantly
counting up/down around the set point thus contaminating the output with
nasty quantized noise. I think it's better/safer to use the regulator's own
analogue circuit in closed-loop and leave the discrete-time stuff open-loop
(i.e., just program the set point).

---
Notice that once the set point has been reached the counter is disabled
and will only start counting again if the B side of the magnitude
comparator changes. Also, once the set point has been reached the
regulator _is_ running closed loop by itself (the R2R ladder being the
resistor from the regulator's ADJ terminal to ground. Load transients
can, of course, be taken care of with a little C from the ADC input to
GND and tuning, as such, would more than likely just consist of choosing
the proper word size and local clock frequency to get the granularity
and speed desired. In any case, this was presented as a concept, not a
finished design, so there's really no "work as expected" part to it. :)


It's two nested closed loops, the inner analogue (regulator) and the outer
digital (ADC, comparator, etc.). The point I was making was that just a very
tiny amount of noise/variation in the ADC's input can cause changes in the B
side of the comparator, which in turn will cause the counter to adjust. This
will almost certainly happen when the ADC's input is near the boundaries
between consecutive LSBs. This jumping up/down can cause ringing/noise in
the output, which is not a good thing (especially for a PSU). Taking the
digital stuff outside of the loop ensures that once the user selects a
desired output, the digital side will stay "quiet" and will not interfere
with the analogue loop.

Costas
 
C

Costas Vlachos

Jan 1, 1970
0
Hi everyone,

I'm looking for a way to control a adjustable voltage regulator via a
serial interface.

For the regulator, pick almost any adjustable linear or switching
regulator capable of supplying up to 1A and adjustable up to about 20
volts or so.

The serial interface would be something like a standard 2-wire (I2C,
SPI, etc). A microprocessor would control the 2-wire interface.

This is what I was thinking about:

+-----------+
Vin ------------->| Regulator |-------+------------> Vout
+-----+-----+ |
|Adj |Rh
| +-----+
| Radj | | Variable
+----------| | Pot
| |
2-wire <================| |
interface +-----+
|Rl
|
Gnd


The problem I see is that most of the digital pots I've researched
only allow for a voltage potential between Rl and Rh to be that of
Vcc, and I need up to 20 volts on the output. Some of the 1-wire
parts from Dallas will work up to 11 volts but that's still not
enough. I was thinking of maybe an op-amp between the pot and
Rh/Radj, but I haven't tried that configuration out yet.


A while ago there was a posting by Win Hill of a nice LM317-based PSU with
programmed voltage and current set points.

Here's the link to it:

http://groups.google.com/[email protected]

Not exactly answering your question, but may give you some ideas. BTW,
Google is great, I located the above posting in a few seconds by typing a
few words I remembered from when I read it months ago!

cheers,
Costas
_________________________________________________
Costas Vlachos Email: [email protected]
SPAM-TRAPPED: Please remove "-X-" before replying
 
J

Jamie

Jan 1, 1970
0
a pic chip would fit this great.
force the chip to receive the
voltage settings twice with in a
short period of time to unsure
no errors from the serial port or
remote IR port.
use one of the DAC outputs to drive a transistor
that is switched on from a logic output of the PIC..
the PIC will save you toons of time and is small
enough to do what you need.
you can use a low end pic with a RC osc and etc.
most likely cost you no more than 5 bucks for the chip.
but then again you have the problem of needing a programmer
,computer and software to burn the chip!
i realy think the initial cost of this is well worth having if you
are a real do it all electronics person.
 
F

Fred Bloggs

Jan 1, 1970
0
Costas said:
A while ago there was a posting by Win Hill of a nice...

What are you, some kind of drunken retard? That was a programmable
current source.
 
J

John Fields

Jan 1, 1970
0
It's two nested closed loops, the inner analogue (regulator) and the outer
digital (ADC, comparator, etc.). The point I was making was that just a very
tiny amount of noise/variation in the ADC's input can cause changes in the B
side of the comparator, which in turn will cause the counter to adjust.

---
"Tiny" is, say, one LSB which, depending on the width of the ADC and the
comparator, may or may not cause the output(s) of the comparator to
change.
---
This
will almost certainly happen when the ADC's input is near the boundaries
between consecutive LSBs. This jumping up/down can cause ringing/noise in
the output, which is not a good thing (especially for a PSU).

---
That's really no different from the up/down "jumps" the regulator has to
make on its own in order to keep the output voltage constant.
---
Taking the
digital stuff outside of the loop ensures that once the user selects a
desired output, the digital side will stay "quiet" and will not interfere
with the analogue loop.

---
Since arriving at the desired output voltage depends on the digital
servo slewing the control voltage until the numerical inputs to the
comparator are equal, there's no way (at least initially) the output
voltage can be correctly set without the digital servo being in the
loop. Once it's been decided that "Yes, the output's really at 12.34V",
(A=B for a while) then it would be possible to put the servo in watchdog
status, while leaving the R2R ladder set and allowing the analog stuff
in the regulator to play by itself.
 
J

Jamie

Jan 1, 1970
0
ah nice, you mean i wasted hours of coding getting mine to work
error free! :))
 
Top