Subject: Re: serial port control
To: Jukka Marin <jmarin@pyy.jmp.fi>
From: Ted Lemon <mellon@hoffman.vix.com>
List: current-users
Date: 02/12/1998 10:56:32
> Well, the current SMPS machines have capacitors which charge to the peak
> value of the input voltage.  With sine wave input, the input current is
> zero until the voltage approaches the peak voltage, then drops back to
> zero for the rest of the half-cycle.  So, a square wave would be better
> (the peak current would be lower, for example).

All this might make sense if the AC power was not being run through a
step-down transformer before being regulated and smoothed to produce
the nice 3.3/5/12V DC that your digital electronics are expecting to
get.   When you run a square wave through a transformer, this is what
it looks like on input:		        
				        
	|\            /|	      |\	    /|
	| ------------ |	      | ------------ |
	|	       |	      |		     |
	|	       |              |		     |
	|	       |	      |		     |
0       |	       |	      |		     |           0
	|	       |              |		     |
	|	       |              |		     |
	|	       |              |		     |
	|	       |              |		     |
------- |              | ------------ |		     | ---------
       \|    	       |/      	     \|		     |/


After going through the transformer, it looks like this (actually, the
phase changes, but don't worry about that):


        |\            /|	      |\	    /|
        | \          / |	      | \          / |
        | |          | |	      |	|          | |
        | |          | |              |	|          | |
        |  \        /  |              |	 \        /  | 
0----   |   --------   |   --------   |	  --------   |   --------0
     \  |              |  /        \| |		     |  /         
      | |              | |          | |		     | |	  
      | |              | |          | |		     | |	
      | |              | |          | |		     | |	
      \ |              | /          \ |		     | /         
       \|    	       |/      	     \|		     |/
 
This is because transformers do not conduct current - they induce it.
And they only induce current when the current is changing.   In a
square wave, the current is only changing for a brief period on the
cliffs at the edges of the squares - at the top and bottom of the
wave, the voltage is constant.   Depending on the inductance of the
transformer, you will get more or less spiky output, but even with a
big, fat transformer, you're going to get a sawtooth wave out the
other end, not a square wave or a sine wave.

The wave I'm showing above will mean that your transformer is going to
be getting really hot turning the DC current at the tops and bottoms
of the waves into heat.   Your voltage regulator is going to get hot
because it's being asked to deal with very spiky input, but that's
probably okay - VRs are expected to get hot.   Your capacitors are
going to work overtime, and they're not going to be able to completely
smooth out the input current.   So what you're going to get out of the
power supply is going to be *very* noisy.

What this noise translates to is not failed chips on your motherboard
- don't worry about that.  If anything is going to blow up here, it's
your transformer.  What this noise produces in digital circuits is
errors.  Digital circuits depend on a clean, constant supply voltage,
because the bits they manipulate are represented as voltage relative
to the supply voltage.  If the supply voltage is constantly moving
around, the results can be unpredictable at best.

How badly your motherboard will actually behave with bad supply
voltages depends on how well-designed it was - if it is covered with
those little blue tantalum caps, it's going to be fairly resistant to
noise, because those caps smooth out noise on the supply lines.   If
there are no such caps lying around, the board is going to flake out
bigtime.   And those caps are intended to prevent supply-line spikes
caused by sudden current needs of on-board chips, so they're already
working - if the supply voltage is bad at the power supply, you'd
better hope they were overspecified.

It's important to remember when dealing with digital circuitry that
it's only digital in name - these are really analog parts that have
been arranged so that they look like they're being digital.   The more
you mess with the analog nature of their inputs, the less digitally
they behave.

			       _MelloN_