[sci.electronics] Need help to finalize my circuit

jean@maxwell.Concordia.CA ( JEAN GOULET ) (10/27/89)

I've been working on this circuit for a while now, and I thought I was almost
finished, but it turns out that what I thought would be the easiest part of
the design has  become one of the strangest problems I've had.  Here's what
it's about.

I have made an 8W audio amplifier for my presently-speakerless monitor, and
I've made a video switch that selects one of two video signals coming from
my computer and sends it to the monitor, depending on a TTL control signal that
I control from my computer.  Both of these circuits are going to be put
together in the same box.

I protected both sections with normally-open relays.  I'm doing that so that
when my audio and video signals are on, but the power supply for my circuit is
off, that the signals don't harm the CMOS IC's.  The relays close when the coil
voltage is 5V.  I measured a resistance of 50 ohms across the coil terminals,
and I measured 100mA flowing through the coil when it's closed (makes sense).

I bought one of those '9V AC adapters' (the kind that claim to replace 9V
batteries; it turns out that mine puts out 14V, but that's OK for my
application - and it's rated for 1 amp) with the intention of using a 7805
voltage regulator to feed 5V to the portions of the circuit that need it.  The
7805 is also rated for 1 amp.

Here's the funny part.  When I power the circuit with my bench power supply,
it's fine.  Then when I try the AC adapter instead, the output of the 7805
drops to only about 1V, instead of 5V!  Immediately, I thought that my AC
adapter was the culprit, but when I go to measure the input to the 7805, it's
a healthy 13V.  Nevertheless I tried another '9V' AC adapter that I happened
to have (it's only rated for 500mA, but it does output about 14V).  Exactly
the same thing happened (Vout dropped to 1V).

So then I thought it was a bad 7805.  Yet, when I took off the
AC adapter and replaced it with my bench supply, it worked fine again.  Ugh!

The next thing I did was to test the current capability of the AC adapter and
the 7805.  I took out the 7805 from the circuit and loaded it with some
resistors (see the upcoming diagram).  To my regret, it worked.
Here are some measurements:  For the 7805: Vin=13.04V; Vout=4.7V, with a load
of five 130 ohm resistors in parallel (equivalent to 26 ohms).

Now, when I replace the parallel resistors with the relay, everything goes
out the window.  I thought that if I can put 4.7V across 26 ohms, I should
be able to put at least 4.7V across 50 ohms (that's the relay's
coil resistance).  Much to my astonishment, it doesn't happen.  Vin stays at
about 13V, but Vout drops to a little over 1 volt!  How can this be?

To summarize this maddness, here's a diagram:

                                  ______
                                  |7805|
                       ~13Vdc     |    |   4.7Vdc
                         |        ------     |
                         v        | | |      v    _________
120V AC ---- AC adapter ----------| | |-----------|26 ohms|------
                                  V G V           ---------      |
                                  i n o                          |
                                  n d u                         Gnd
                                      t

Now if you replace the 26 ohms with the relay coil terminals, Vout drops
to about 1V.  What's wrong here?  Does it have anything to do with the 
inductive nature of the coil?  Is the coil resistance that I measure with my
multimeter a bogus value?
                                             Jean Goulet
                                             Electrical Engineering
                                             Class of '89
                                             Concordia University
                                             Montreal, Canada

seningen@oakhill.UUCP (Michael Seningen) (11/03/89)

just guessing but how clean is your output from your ac adapter.  I bet that it may not be pure DC.  Try putting filter caps on thje outputs.    

----13 VDC? ---|cap|--7805--relay
               |   |
                ---
                gnd

cap should be tied between ac adapter output and ground.

mike seningen
oakhill\!serval\!seningen

tell@oscar.cs.unc.edu (Stephen Tell) (11/03/89)

In article <1508@clyde.Concordia.CA> jean@maxwell.Concordia.Ca ( JEAN GOULET ) writes:
>I've been working on this circuit for a while now, and I thought I was almost
>finished, but it turns out that what I thought would be the easiest part of
>the design has  become one of the strangest problems I've had.  Here's what
>it's about.
Power supplies are never as easy as they seem.

>                                  ______
>                                  |7805|
>                       ~13Vdc     |    |   4.7Vdc
>                         |        ------     |
>                         v        | | |      v    _________
>120V AC ---- AC adapter ----------| | |-----------|26 ohms|------
>                                  V G V           ---------      |
>                                  i n o                          |
>                                  n d u                         Gnd
>                                      t
>
>Now if you replace the 26 ohms with the relay coil terminals, Vout drops
>to about 1V.  What's wrong here?  Does it have anything to do with the 
>inductive nature of the coil?  Is the coil resistance that I measure with my
>multimeter a bogus value?
>                                             Jean Goulet
>                                             Electrical Engineering
>                                             Class of '89
>                                             Concordia University
>                                             Montreal, Canada

These 3-terminal regulators usually are much happier if you put
capacitors to ground at the input and output terminals, physicaly close
to the 7805 itself.
Try somthing like 1 to 10 microfarads, preferably tantalum-type,
at the output and a few hundred uF at the input.  A long time ago
I noticed this kind of behavior, and now always use said capacitors
in conjunction with a 78xx regulators.  I think the things can even
oscillate without the capacitors.
Likely it is related to the inductance of the coil, then.

Add to this the fact that your "9v" ac adaptor probably has the smallest
(read cheapest) filter capacitor across its output that they could get
away with.
Just for kicks, try looking at the input and output with an oscilliscope.
I'll bet its not the pure DC you expect to see.

I decided to post this in hopes that someone could follow up with
the real theory on this; I only know it works.
They don't teach you things like this in EE classes....

Steve
--------------------------------------------------------------------
Steve Tell					tell@cs.unc.edu
CS Grad Student, UNC Chapel Hill.
EE, Duke University school of Engineering, class of 1989.
Former video guy, Duke Union Community Television, Durham, NC.

elliott@optilink.UUCP (Paul Elliott x225) (11/04/89)

> Here's the funny part.  When I power the circuit with my bench power supply,
> it's fine.  Then when I try the AC adapter instead, the output of the 7805
> drops to only about 1V, instead of 5V!  Immediately, I thought that my AC
> adapter was the culprit, but when I go to measure the input to the 7805, it's
> a healthy 13V.  Nevertheless I tried another '9V' AC adapter that I happened
> 
>                                   ______
>                                   |7805|
>                        ~13Vdc     |    |   4.7Vdc
>                          |        ------     |
>                          v        | | |      v    _________
> 120V AC ---- AC adapter ----------| | |-----------|26 ohms|------
>                                   V G V           ---------      |
>                                   i n o                          |
>                                   n d u                         Gnd
>                                       t
> 

(with 26 Ohm load regulator works ok, with relay load it doesn't)

Just a quick suggestion:
  Yes, it may be the inductive load of the relays causing the regulator to
oscillate.  Try some output bypass caps (input bypass wouldn't hurt either).
These don't need to be huge; if they are too big you have problems with
transient fault conditions.  Try a 0.1uF ceramic cap in parallel with a
10uF tantalum cap at the output and input of the regulator (caps to ground, 
of course).  Please re-post when you find the solution; I am curious.

Good Hunting!

p.s.  I tried to e-mail, but couldn't find the path...

--- Paul Elliott


-- 
Paul M. Elliott      Optilink Corporation     (707) 795-9444
         {pyramid,pixar,tekbspa}!optilink!elliott
"I used to think I was indecisive, but now I'm not so sure."

usenet@cps3xx.UUCP (Usenet file owner) (11/04/89)

I agree entirely with Mike Seningen!  In fact, since your AC adapter
probably has very long leads (compared to your bench supply) you
might very well need a lot of bulk capacitance (>100uF) on the unreg.
side of your 7805.  Putting a 1 uF tant. cap in parallel with a 
0.1 uF ceramic cap on the output of the 7805 will probably also
help clean up things a lot.  The filtering inside the AC adapters
is often very poor.

Tom LeMense

liud@guille.ece.orst.edu (Dongtai Liu) (11/07/89)

In article <10351@thorin.cs.unc.edu> tell@oscar.cs.unc.edu (Stephen Tell) writes:
>I decided to post this in hopes that someone could follow up with
>the real theory on this; I only know it works.
>They don't teach you things like this in EE classes....

Here is comes ...

"The crash happens when there are Poles on the right half of the plane", said   , 
a EE professor when asked the condition for instability (oscillation).

	

barry@hprmokg.HP.COM (Barry Fowler) (11/07/89)

If the regulator is oscillating, it will usually get pretty hot real fast.

The problem may (or may not) be a result of this.  I would look at it
with a 'scope.  I have found that the regulators don't regulate running
open circuit.  Some type of resistive load could be substituted to cause 
around 100mA or so of current to flow and then, try measuring the output.

I don't have all of the answers but I have run into this problem on
some of my home projects.

Barry

jean@maxwell.Concordia.CA ( JEAN GOULET ) (11/08/89)

Thanks to all of you who helped me find the solution to my problem.  I got
over a dozen replies, and almost all of them suggested that I add two
capacitors to Vin and Vout.
                                  ______
                                  |7805|
                       ~13Vdc     |    |   4.7Vdc
                         |        ------     |
                         v        | | |      v    _________
120V AC ---- AC adapter ----------| | |-----------|26 ohms|------
                                  V G V           ---------      |
                                  i n o                          |
                                  n d u                         Gnd
                                  |   t
                                  |   |
                                 ___ ___
                                 --- ---
                                  |   |
                                  \Gnd/

The funny thing is that I actually *had* put in capacitors at Vin/Vout,
but I actually removed the capacitors from the circuit because I really
didn't think it would matter, and I didn't bother drawing them in the diagram.
What a mistake! 

It's interesting that practically everyone suggested different values for
the capacitors, ranging from putting a massive electrolytic at Vin, to
a little sub-microfarad tantalum on both pins.  I experimented with the
capacitors I had, and found that 0.01uF was about as good as using a 100uF
electrolytic.

The moral of the story:

   1) Always bypass a 7805 with capacitors!
   2) Beware: An AC adapter marked '9V DC' probably has more AC than you'd
      want, and it probably has an incorrect DC level too!

                                             Jean Goulet
                                             Electrical Engineering
                                             Class of '89
                                             Concordia University
                                             Montreal, Canada

henry@utzoo.uucp (Henry Spencer) (11/08/89)

In article <10040029@hprmokg.HP.COM> barry@hprmokg.HP.COM (Barry Fowler) writes:
>The problem may (or may not) be a result of this.  I would look at it
>with a 'scope.  I have found that the regulators don't regulate running
>open circuit.  Some type of resistive load could be substituted ...

In fact, if you look at the data sheet carefully, regulation is specified
over a specific range of currents, and the low end is *not* zero.  When
powering something like CMOS that may draw nearly zero current at times,
one sometimes has to put a resistor across the output to guarantee the
minimum load the regulator needs.
-- 
A bit of tolerance is worth a  |     Henry Spencer at U of Toronto Zoology
megabyte of flaming.           | uunet!attcan!utzoo!henry henry@zoo.toronto.edu

elliott@optilink.UUCP (Paul Elliott x225) (11/10/89)

In article <1989Nov8.053847.9348@utzoo.uucp>, henry@utzoo.uucp (Henry Spencer) writes:
> In article <10040029@hprmokg.HP.COM> barry@hprmokg.HP.COM (Barry Fowler) writes:
> >The problem may (or may not) be a result of this.  I would look at it
> >with a 'scope.  I have found that the regulators don't regulate running
> >open circuit.  Some type of resistive load could be substituted ...
> 
> In fact, if you look at the data sheet carefully, regulation is specified
> over a specific range of currents, and the low end is *not* zero.  When
> powering something like CMOS that may draw nearly zero current at times,
> one sometimes has to put a resistor across the output to guarantee the
> minimum load the regulator needs.

Switching regulators usually require a minimum load, as do some linear
types.  While it is correct that the 78XXX series regulators do not spec
regulation at zero load (and I do not recommend relying on un-spec'd
performance), in practice I have found that they will work reliably at
zero load.  If you look at the internal schematic (not guaranteed, I know)
you will see that the output is lightly loaded by the regulator feedback
path divider.

To re-hash the original problem:

  1) Low output voltage into a relay coil load (inductive).
  2) Correct output voltage with an equivalent (DC) resistive load.
  3) Input Voltage provided by a wall transformer DC supply of unknown
     characteristics.
  4) No capacitors shown on the schematic.

(2) suggests that the input supply has adequate current capacity and filtering,
although wierd interactions with the inductive load are possible.  Additional
bulk input capacitance is probably not needed, input bypass (0.1 to 10 uF typ)
may be useful.

I still think that output bypass caps are probably the key.

Has the original poster reported back yet?

Curiously,
-- Paul
-- 
Paul M. Elliott      Optilink Corporation     (707) 795-9444
         {pyramid,pixar,tekbspa}!optilink!elliott
"I used to think I was indecisive, but now I'm not so sure."