Searching \ for '[PIC]: [EE] ? : Controlling a load with a variable' in subject line. ()
Make payments with PayPal - it's fast, free and secure! Help us get a faster server
FAQ page: www.piclist.com/techref/microchip/devices.htm?key=pic
Search entire site for: '[EE] ? : Controlling a load with a variable'.

Exact match. Not showing close matches.
PICList Thread
'[PIC]: [EE] ? : Controlling a load with a variable'
2001\06\15@015552 by Nick Veys

flavicon
face
Hi all, have a question for you.  I need to control a load using a PIC that
will take a variable voltage.  It is a simple variance, I only want it to
have either +7V or +12V.  Also 0V (off) will be needed.  I know I'll need 2
pins per load on this, perviously I used a power mosfet to provide only +12
and it worked great, so I'm looking for options.

Things I have considered so far:

7V going to one mosfet controlled by pin X
12V going to another controlled by pin Y
to get +7 -> XY=10  to get +12 -> XY=01  to shut off -> XY=00
this seems simplist, but scares me since I could accidentally end up w/both
on

another would involve only 1 mosfet, and an SPDT relay toggling between 7
and 12

what I would *like* would be some kind of voltage regulator with an Enable
pin, something like E=0 provides the input voltage (12) and E=1 would
regulate, to 7.  but I have no idea if these exist (i couldn't find any in a
web search and catalog flip)

any suggestions?  i really need to minimize cost/PCB real-estate, so keep
that in mind.  oh, and the load would be maximum 2A @ 12VDC.  thanks!!!

spam_OUTnickTakeThisOuTspamveys.com | http://www.veys.com/nick

--
http://www.piclist.com hint: To leave the PICList
.....piclist-unsubscribe-requestKILLspamspam@spam@mitvma.mit.edu


2001\06\15@052820 by Vasile Surducan

flavicon
face
You can do this very easy, using only one three pins regulator ( like 7805
) Conecting reference pin ( which normally is tied to gnd ) through a
resistor and a cmos switch to ground, or through a cmos transistor to
ground ( you can't use bipolar because VCE ) you'll have:
vout=vstab+irefxR where vstab=5V for 7805 and iref must be measured
experimentally . As a reference for magnitude order of this current, for
7809 and 420 Ohm resistence to gnd, the output voltage will be approx 10
V. Using two of such resistor/cmos switch you'll have 2 diferent output
voltages. If accidentally you switch both cmos the output will have
smallet voltage than the little one ( in your case smallest than 7 ) .
Use 3A 7805 in to3 package. Keep in your mind to not exceed the maximum
power for that package, a good heater is required.
Vasile

On Fri, 15 Jun 2001, Nick Veys wrote:

{Quote hidden}

--
http://www.piclist.com hint: To leave the PICList
EraseMEpiclist-unsubscribe-requestspam_OUTspamTakeThisOuTmitvma.mit.edu


2001\06\15@064959 by Spehro Pefhany

picon face
At 12:42 AM 6/15/01 -0500, you wrote:
>Hi all, have a question for you.  I need to control a load using a PIC that
>will take a variable voltage.  It is a simple variance, I only want it to
>have either +7V or +12V.  Also 0V (off) will be needed.  I know I'll need 2
>pins per load on this, perviously I used a power mosfet to provide only +12
>and it worked great, so I'm looking for options.
>
>Things I have considered so far:
>
>7V going to one mosfet controlled by pin X
>12V going to another controlled by pin Y
>to get +7 -> XY=10  to get +12 -> XY=01  to shut off -> XY=00
>this seems simplist, but scares me since I could accidentally end up w/both
>on

Both on should not be a problem, most regulators are not push-pull on the
output and connecting 12v to the output of a 7V regulator would just shut
it down. But look at the design to see if this is ok. Putting a diode
on the input (no bypass cap on the other side of the diode) would help, and
would reduce the power dissipation in the regulator. (12V - (7V + 0.7V )) * 2A
= 8.6W, quite a lot of power dissipation in the regulator, still. You might
want to consider a switching regulator such as those from Natsemi at these
power levels, your heatsink will be rather large.

You can use two P-channel MOSFETs controlled by open-collector (or open-drain)
drivers. You can do this with one NPN "digital transistor" (SOT-23-5) and
two little SMT source-gate resistors for your MOSFETs. There are SO-8 dual
p-channel MOSFETs that could be used, IIRC, so your 7V regulator is the
real killer space-wise.

So, if the control lines are RA0 and RA1, controlling 7V input and shunt
respectively...

RA0  RA1        output
0     0         0V
0     1 7V
1     0         12V
1     1 12V (with 7V regulator on, so wastes a bit of power)

Hope this helps,

Best regards..

=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
Spehro Pefhany --"it's the network..."            "The Journey is the reward"
speffspamspam_OUTinterlog.com             Info for manufacturers: http://www.trexon.com
Embedded software/hardware/analog  Info for designers:  http://www.speff.com
Contributions invited->The AVR-gcc FAQ is at: http://www.bluecollarlinux.com
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=

--
http://www.piclist.com hint: To leave the PICList
@spam@piclist-unsubscribe-requestKILLspamspammitvma.mit.edu


2001\06\15@075616 by Olin Lathrop

face picon face
> Hi all, have a question for you.  I need to control a load using a PIC
that
> will take a variable voltage.  It is a simple variance, I only want it to
> have either +7V or +12V.  Also 0V (off) will be needed.  I know I'll need
2
> pins per load on this, perviously I used a power mosfet to provide only
+12
> and it worked great, so I'm looking for options.
>
> ...
>
> what I would *like* would be some kind of voltage regulator with an Enable
> pin, something like E=0 provides the input voltage (12) and E=1 would
> regulate, to 7.  but I have no idea if these exist (i couldn't find any in
a
> web search and catalog flip)

I think you can control all this from one pin.  The pin can produce either
5V when high, a pre-selected voltage when tri-state, and 0V when low.  This
could drive the input to an opamp that drives a pass transistor.  With the
right offset and gain, 5V would slam the pass transistor always on,
tri-state would result in regulated +7V output, and 0V would always keep the
transistor off.  For example, suppose the opamp regulated the output voltage
to 3x the voltage from the PIC pin.  At 5V at the PIC pin the opamp would
try to keep the output at 15V.  Since it can't do that, it will always keep
the pass transistor fully on.  You set up resistors on the PIC output pin so
that when tri-stated it floats to 2.33V, which causes the opamp to regulate
the output to 7V.  At 0V from the PIC, the opamp will try to regulate the
output to 0V.  Due to offset voltage errors, it might actually try to
regulate to a few 10s of mV (3x the offset voltage spec in this example).
If that matters to your load, then you can add just enough positive bias
into the opamp negative input so that its desired output voltage never
exceeds 0 when the PIC pin is low.


********************************************************************
Olin Lathrop, embedded systems consultant in Littleton Massachusetts
(978) 742-9014, KILLspamolinKILLspamspamembedinc.com, http://www.embedinc.com

--
http://www.piclist.com hint: To leave the PICList
RemoveMEpiclist-unsubscribe-requestTakeThisOuTspammitvma.mit.edu


2001\06\15@084229 by M. Adam Davis

flavicon
face
There are switching regulators which are intended for flash memory that
provide outputs of 0, 5 and 12 volts.  You could probably tweak one to
give you 7 instead of five.  There are usually two pins for the control,
enable/disable and 5/12 output.

-Adam

Nick Veys wrote:

{Quote hidden}

--
http://www.piclist.com hint: To leave the PICList
RemoveMEpiclist-unsubscribe-requestspamTakeThisOuTmitvma.mit.edu


2001\06\15@133702 by Mark Newland

flavicon
face
As my fellow picsters have mentioned, useing a regulator would work just fine
but I always believe in having options.

Instead of haveing a seperate regulator for each load that you control, have a
single +12V and a seperate +7.7V regulator (yes, 7.7V).  Connect each load thru
a diode to the 7.7V regulator giving you 7V at the load.  Then connect your 12V
supply via your mosfet to the cathode side of the diode. Turn on the mosfet and
the diode is now backbiased and your load has 12V.

Nick Veys wrote:

{Quote hidden}

--
http://www.piclist.com hint: To leave the PICList
RemoveMEpiclist-unsubscribe-requestEraseMEspamEraseMEmitvma.mit.edu


2001\06\15@134959 by Roman Black

flavicon
face
Vasile Surducan wrote:
>
> You can do this very easy, using only one three pins regulator ( like 7805


Clever idea using a 3-pin regulator Vasile.
Maybe go one step further and use a variable
3-pin device like a LM317K, you could use a couple
of resistors and the one PIC pin could select
regulated 7v, reg 12v and off. I don't think it
would be hard, there would be almost zero parts
count and full voltage regulation with short
circuit protection built-in, all driven from
one PIC pin.
-Roman

--
http://www.piclist.com hint: To leave the PICList
RemoveMEpiclist-unsubscribe-requestspam_OUTspamKILLspammitvma.mit.edu


2001\06\15@141115 by Marcelo Yamamoto

flavicon
face
What about using a LM317 (adjustable voltage regulator)?
Use a voltage reference with 2 resistors connected in series to ground. Use
an small signal transistor to switch between 12V or 7.7V (just bypass the
resistor connected to ground to achieve 7.7V).
One pin controls the voltage, one pin controls a powerMosfet to switch load
On or Off.

Marcelo Y.

Mark Newland:
> As my fellow picsters have mentioned, useing a regulator would work just
fine
> but I always believe in having options.
>
> Instead of haveing a seperate regulator for each load that you control,
have a
> single +12V and a seperate +7.7V regulator (yes, 7.7V).  Connect each load
thru
> a diode to the 7.7V regulator giving you 7V at the load.  Then connect
your 12V
> supply via your mosfet to the cathode side of the diode. Turn on the
mosfet and
> the diode is now backbiased and your load has 12V.
>
> Nick Veys wrote:
>
> > Hi all, have a question for you.  I need to control a load using a PIC
that
> > will take a variable voltage.  It is a simple variance, I only want it
to
> > have either +7V or +12V.  Also 0V (off) will be needed.  I know I'll
need 2
> > pins per load on this, perviously I used a power mosfet to provide only
+12
> > and it worked great, so I'm looking for options.
> >
> > Things I have considered so far:
> >
> > 7V going to one mosfet controlled by pin X
> > 12V going to another controlled by pin Y
> > to get +7 -> XY=10  to get +12 -> XY=01  to shut off -> XY=00
> > this seems simplist, but scares me since I could accidentally end up
w/both
> > on
> >
> > another would involve only 1 mosfet, and an SPDT relay toggling between
7
> > and 12
> >
> > what I would *like* would be some kind of voltage regulator with an
Enable
> > pin, something like E=0 provides the input voltage (12) and E=1 would
> > regulate, to 7.  but I have no idea if these exist (i couldn't find any
in a
> > web search and catalog flip)
> >
> > any suggestions?  i really need to minimize cost/PCB real-estate, so
keep
{Quote hidden}

--
http://www.piclist.com hint: To leave the PICList
piclist-unsubscribe-requestSTOPspamspamspam_OUTmitvma.mit.edu


2001\06\15@144120 by Byron A Jeff

face picon face
On Sat, Jun 16, 2001 at 03:44:24AM +1000, Roman Black wrote:
> Vasile Surducan wrote:
> >
> > You can do this very easy, using only one three pins regulator ( like 7805
>
>
> Clever idea using a 3-pin regulator Vasile.
> Maybe go one step further and use a variable
> 3-pin device like a LM317K, you could use a couple
> of resistors and the one PIC pin could select
> regulated 7v, reg 12v and off. I don't think it
> would be hard, there would be almost zero parts
> count and full voltage regulation with short
> circuit protection built-in, all driven from
> one PIC pin.

Roman,

Any 78XX regulator can be used in that fashion:

1) Rename the GND pin to ADJ
2) Be aware that the minimum voltage available is the rated voltage of the
regulator.

Essentially a LM317 is a 1.25V regulator where you get variable regulation
by using the resistors to set the adjust voltage. The reason that the LM317
is useful is because of its minimum voltage.

BAJ

--
http://www.piclist.com hint: To leave the PICList
spamBeGonepiclist-unsubscribe-requestSTOPspamspamEraseMEmitvma.mit.edu


2001\06\15@150135 by Douglas Butler

flavicon
face
If 1.25V could be considered close enough to "OFF", you could use
another signal transistor to bypass both voltage setting resistors.
That saves trying to drive a MOSFET in the supply line.

Sherpa Doug

> {Original Message removed}

2001\06\16@052357 by Roman Black

flavicon
face
Byron A Jeff wrote:

> Roman,
>
> Any 78XX regulator can be used in that fashion:
>
> 1) Rename the GND pin to ADJ
> 2) Be aware that the minimum voltage available is the rated voltage of the
> regulator.
>
> Essentially a LM317 is a 1.25V regulator where you get variable regulation
> by using the resistors to set the adjust voltage. The reason that the LM317
> is useful is because of its minimum voltage.


Good point, which is why I suggested the LM317.
:o)
I couldn't see a way of turning the 7806 off
and getting the 7v and 12v using just one PIC
pin, but i'm sure it could be done with the
LM317.
-Roman

--
http://www.piclist.com hint: PICList Posts must start with ONE topic:
[PIC]:,[SX]:,[AVR]: ->uP ONLY! [EE]:,[OT]: ->Other [BUY]:,[AD]: ->Ads


2001\06\16@122742 by Spehro Pefhany

picon face
At 07:19 PM 6/16/01 +1000, you wrote:

>I couldn't see a way of turning the 7806 off
>and getting the 7v and 12v using just one PIC
>pin, but i'm sure it could be done with the
>LM317.

But you can't get guaranteed 2A from an LM317. 1.5A max.

I was of the impression that the 12V was provided already
regulated, so the dropout voltage would be an issue as well.

Best regards,

=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
Spehro Pefhany --"it's the network..."            "The Journey is the reward"
KILLspamspeffspamBeGonespaminterlog.com             Info for manufacturers: http://www.trexon.com
Embedded software/hardware/analog  Info for designers:  http://www.speff.com
Contributions invited->The AVR-gcc FAQ is at: http://www.bluecollarlinux.com
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=

--
http://www.piclist.com hint: PICList Posts must start with ONE topic:
[PIC]:,[SX]:,[AVR]: ->uP ONLY! [EE]:,[OT]: ->Other [BUY]:,[AD]: ->Ads


2001\06\18@034850 by Vasile Surducan

flavicon
face
On Sat, 16 Jun 2001, Roman Black wrote:

> Vasile Surducan wrote:
> >
> > You can do this very easy, using only one three pins regulator ( like 7805
>
>
> Clever idea using a 3-pin regulator Vasile.
> Maybe go one step further and use a variable
> 3-pin device like a LM317K, you could use a couple
> of resistors and the one PIC pin could select
> regulated 7v, reg 12v and off. I don't think it
> would be hard, there would be almost zero parts
> count and full voltage regulation with short
> circuit protection built-in, all driven from
> one PIC pin.

 Absolutely ! But here, 317 for large currents ( 3 A package ) is hard to
find and using an external power transistor increase the cost of
final project. I have use many times lm317/lm337 and the romanian clones,
and I also like them.
Cheers, Vasile

P.S. one second error free, when ?

--
http://www.piclist.com hint: The PICList is archived three different
ways.  See http://www.piclist.com/#archives for details.


2001\06\18@083735 by Roman Black

flavicon
face
Vasile Surducan wrote:

>   Absolutely ! But here, 317 for large currents ( 3 A package ) is hard to
> find and using an external power transistor increase the cost of
> final project. I have use many times lm317/lm337 and the romanian clones,
> and I also like them.
> Cheers, Vasile

Cool. I have plenty of old ones around, and 350s
too.:o)


>
> P.S. one second error free, when ?

Sorry Vasile, had a busy weekend. Have to pull
my code apart and write it up, mine has special
int handling all through it.

A couple of days. :o)
-Roman

--
http://www.piclist.com hint: The PICList is archived three different
ways.  See http://www.piclist.com/#archives for details.


2001\06\18@124118 by Mike Hardwick

flavicon
face
>Hi all, have a question for you.  I need to control a load using a PIC that
>will take a variable voltage.  It is a simple variance, I only want it to
>have either +7V or +12V.  Also 0V (off) will be needed.  I know I'll need 2
>pins per load on this, perviously I used a power mosfet to provide only +12
>and it worked great, so I'm looking for options.

If you want output voltage flexibility, try power amp chips. A single PIC
pin with PWM output drive can give you a variable voltage output (after
filtering), including zero volts. National's LM1875 audio power amp,
ferinstance, can handle up to 3A, is protected much like a regulator IC,
and doesn't cost much. Voltage gain has to be >=10, and you'll need a
low-current negative power supply to accommodate the amplifier's input
common mode range.

If you need multiple outputs, you can produce PWM briefly at each pin in
turn, just long enough to control a simple R/C integrator. Switch those
pins to input mode when they're not driven. Refresh/update the charge
periodically...

Mike Hardwick
Decade Engineering
http://www.decadenet.com

--
http://www.piclist.com hint: The PICList is archived three different
ways.  See http://www.piclist.com/#archives for details.


2001\06\20@021329 by Ron Wilder

flavicon
face
Try an LM338 (replaces the LM317 and it handles 5 amps). It can surge to at least
7 amps and is in a TO220 package.  Check JDR. Price is under $2 in single
quantities.
Ron

Vasile Surducan wrote:

{Quote hidden}

--
http://www.piclist.com hint: To leave the PICList
EraseMEpiclist-unsubscribe-requestspamEraseMEmitvma.mit.edu


More... (looser matching)
- Last day of these posts
- In 2001 , 2002 only
- Today
- New search...