Showing posts with label RFI filtering. Show all posts
Showing posts with label RFI filtering. Show all posts

Saturday, December 28, 2024

Charging LiFePO4 batteries from a vehicular electrical system - the problems and a solution.

Figure 1:
The Renogy RNG-DCC1212-20 - an isolated
and current-limited battery charger, intended
for use with vehicle electrical systems.
Click on the image for a larger version.

There are times - usually on a camping or road trip - where I would like to charge my LiFePO4 batteries en-route, from the vehicle.  The "need" is largely the result of having one of those coolers with a built in compressor:  It runs about 10-30% of the time at normal room temperature and pulls up to about 3.5 amps when doing so - but it's also advantageous to be able to keep a battery topped off in the event that you didn't start the trip with a fully-charged battery in the first place.

To do this, one may be tempted to connect the battery directly to the vehicle's electrical system, as might have done in days past with a lead-acid battery.

DO NOT do this with any lithium battery - at least not directly.

In short, you cannot and should not parallel a LiFePO4 battery with an existing charging system intended for lead-acid batteries.  The biggest issue with doing so is that unlike a lead-acid battery, a LiFePO4 battery will attempt to charge with all available current, likely resulting in blown fuses, heated wires and burnt-out alternators. A secondary issue has to do with the BMS (Battery Management System) of the LiFePO4 simply disconnecting abruptly when the battery is fully-charge, potentially causing voltage spikes capable of damaging vehicle electronics and possibly, the BMS itself.

See the section "Why you need to treat LiFePO4 batteries differently" in the "tl;dr" section near the end of this article (link) for more details as to the problems that can occur.

A solution

The solution to the issues noted above lie largely in limiting the charging current.  One way to do this would be resistively - perhaps with the use of intentionally small-gauge wire and/or resistor or incandescent automobile headlamp in series.  This will, by its nature, generate heat as it's inefficient - and it can generate quite a bit of heat (potential fire risk here!) - but this is the way one might have accomplished this in years past.

This sort of limiting may occur unintentionally if one charges via, say, a cigarette lighter/accessory plug connected with light-gauge wire, but this is sort of a "kludge".  One issue with this is that it can cause frequent blown fuses as the current isn't regulated and if the user attempts to circumvent this by using a higher-current fuse, damage to the electrical system (or even fire) can result.  If the connection is made to a power source that is switched on/off with the ignition, a connected battery can "back feed" the electrical system which can result in the battery being discharged when the vehicle is off or, worst case, damage to both the vehicle and battery.

These days one would use a current-limited and regulated voltage DC-to-DC converter with its power source connected as close to the vehicle battery as possible.

One of the many devices out there that will fit the bill is the Renogy RNG-DCC1212-20 (pictured above), available at the time of the original posting of this article for around US$100:  Using DIP switches, the type of battery (lead-acid, Lithium-Ion or LiFePO4 - I configured for the latter) may be selected along with the charging profile/voltage - and the device will limit the maximum charge current to just 20 amps, selectable to 10 amps with the addition of a jumper wire to the "LC" terminal.  What this means is that no matter the charge state of the LiFePO4 battery, the current being pulled from the vehicle's electrical system will be limited - very useful if one expects to avoid blowing fuses, destroying alternators, or burning up wiring.  (Note:  I have no vested interest in Renogy, they just happen to make one of the readily-available devices that is appropriate for this task.)

Additionally, it's rated to operate from between 8 and 16 volts while maintaining a constant output voltage (once the output current has dropped below limiting) that is independent of the voltage from the vehicle's electrical system. The Renogy is also an isolated DC-DC converter in that there is no electrical connection between the input and output terminals:  By being isolated, circulating currents (through the chassis or other "sneak paths") can be completely avoided which may be helpful for some sensitive equipment and/or to minimize/eliminate alternator "whine".

This particular unit is rated for up to 20 amps output current.  Rated at about 90% efficiency, it will take more power on its input connections than it will output, producing a bit of heat (which is why it has internal fans).  Also note that the current pulled by the unit will vary depending on the voltage input despite the fact that the output voltage and current - and overall power consumption - may remain constant.

For example, let's say that the unit is outputting 20 amps at 14.5 volts, representing a LiFePO4 battery that is nearly fully-charged representing an output power of 290 watts:  Assuming 90% efficiency, the unit will actually consume 322 watts with the difference (32 watts) as heat.   At an input voltage of 12.0 volts,  322 watts is 26.8 amps, but at 14.0 volts, 322 watts is just 23.0 amps.  The fact that it can pull more current from the source supply than it is outputting - particularly when the input voltage goes down - must be taken into account when sizing the wire and selecting the fuse rating.

You can't just connect it and walk away!

The Renogy has a "D+" terminal that, when connected to a voltage source, will activate it.  The intent is that this wire is connected to some part of the vehicle's electrical system that is likely to be on when the engine is running to charge the battery - such as the "accessory" circuit.  The reason for this is that the Renogy itself has no useful low-voltage disconnect:  If you connected it to the vehicle's electrical system with the engine off, it will happily attempt to charge the battery to which it's connected - and if the battery being charged is a large, discharged LiFePO4 battery, it will likely run the vehicle's battery down completely in doing so.

For a permanent installation in a truck, van or RV, finding a wire that is only active when the engine is running (or, perhaps, the ignition is just "on") makes sense - but in my case I have no need for a permanent installation of the unit - plus, I don't have room to mount the unit and am unwilling to connect/disconnect an "ignition on" wire from the electrical system every time I install/remove it.

One way around this would be to monitor the battery voltage:  If it's above about 13.2-13.5 volts, one can be assured that the engine is running, but it will drop fairly quickly when the engine is off as the lead-acid starting battery's voltage drops.  Unfortunately, the Renogy's only means of low-voltage cut-off is set to 8 volts (a very "dead" 12 volt battery!) which requires that I come up with another way of enabling/disabling the device. 

Another issue is that whenever  the unit is on (the D+ line is active) but unloaded (e.g. no battery connected to the output) it consumes about 250 mA at 14 volts - increasing to over 500mA at 10 volts - and more than this if its cooling fans are running:  This sort of load may run a battery dead in a few days at best, so there had to be a way of completely disabling it and eliminating current draw.

A voltage-controlled switch

In poking around, I noted that without the "D+" line connected to a voltage source, the Renogy drew no detectable current meaning that I could leave the high-current input leads connected full-time:  By switching just the D+ lead I could enable/disable the device as needed without the need of a heavy-duty relay.  (Judging by the "clunk" that one hears when applying power to the D+ line, the Renogy probably has such a relay built into it.)

As the D+ line itself drew very little current (only about 3 milliamps) and anything above about 4 volts seemed to reliably trigger it, it would take almost nothing to drive it so the circuit could be very simple as the diagram below shows:

Figure 2:
Schematic diagram of the low-voltage cut-off circuit with hysteresis.
This circuit provides an "on/off" control of the converter to the "D+" line based on the
voltage at the "V+" and "V-" connections.
Click on the image for a slightly larger version.

How it works:

The "V+" and "V-" lines are connected across the unit's input terminals to monitor the voltage applied to it.  Resistor R1 scales the input voltage to a lower value to apply to the top of R2, a 10-turn trimmer potentiometer, that is used to divide the voltage down to the 2.5 volt threshold of U1, a TL431 "programmable Zener" via its "reference" terminal.  Capacitor C1 connected across the top of R2 provides a degree of filtering to reduce the probability of the circuit from responding to noise on the electrical system.

Figure 3:
The prototype, built on a scrap of proto board.  This uses
uses through-hole components, but could have been built to be
much smaller using surface-mount devices.  The capacitor has
been lifted up to allow a better view of the components.
Click on the image for a larger version.

Resistor R3 limits the current into U1 and R4 limits the current into Q1 while R5 keeps the emitter-base voltage of Q1 high when U1 isn't conducting, turning it off, resulting in no voltage on the "Out" lead and in this state, with the Out lead connected to the Renogy's "D+" connection, the unit would be powered down and draw no current.  Resistor R6 offers protection to the circuit in case the "Out" terminal is momentarily shorted to ground.

If the voltage on the reference terminal on U1 exceeds 2.5 volts, it turns on, pulling the bottom of resistor R3 toward ground, turning on Q1 and causing the "Out" lead to go high, enabling the Renogy via the "D+" line. When this voltage goes high, resistor R7 feeds back a slight amount of current into the junction of R1/R2, very slightly increasing its voltage, lowering the circuit's turn-off voltage slightly but leaving the turn-on voltage unchanged:  The value of 270k shown causes this voltage difference between "on" and "off"  to be about 0.9 volts while a value of 680k results in a threshold difference of about 0.3 volts.

This threshold difference between turn-off and turn-on (a.k.a. hysteresis) is very important to the stable operation of this circuit.  If the voltage applied to the circuit were just above the threshold (by a fraction of a volt) the "Out" lead would turn on and activate the Renogy.  When this happened, the Renogy would start drawing current, causing the voltage to drop slightly through wire losses and load on the electrical system - but if this voltage dropped below the threshold, the "Out" lead would turn off again and the current consumption would stop, causing the voltage to rise again and turn it back on, causing an endless "on-off" cycle.  

By adding such hysteresis - and making sure that the voltage drop under load was comfortably less than the hysteresis amount - the unit will reliably turn on at the high voltage threshold and will not turn off until/unless the voltage drops below the low voltage threshold.  It is also imperative that this unit be connected as close to the battery (with appropriate fusing!) with as short and heavy leads as practical:  Too-light wiring will cause the voltage to drop under load, possibly causing it to trip out due to low voltage - only to be re-enabled immediately (e.g. the "on/off" cycling mentioned above.)  The need to minimize voltage drop is one reason why the power source should be connected as near the battery/alternator as practical.

Figure 4:
The completed unit in heat-shrink tube.  There are no
exposed electrical connections - just the adjustment at the end.
Click on the image for a larger version.
Enabling the Renogy by voltage detection alone isn't quite as reliable as having a connection to the ignition circuit of the vehicle, but it will work "well enough" and prevent the vehicle's battery from being flattened by the unit staying on all of the time, when the engine is off.

Figure 3, above shows the prototype unit, built on a small piece of prototype board.  R2, the 10 turn potentiometer is the blue device on the far right with U1 being the black object to the left of it with Q1 being on the far left.  In this photo, capacitor C1 is bent up, out of the way to allow a view of the components underneath where it will be laid over.

Figure 4 shows the same circuit covered with some yellow heat-shrink tubing to hold the components together and to protect it from external short circuits.  The end of the adjustment resistor, R2, protrudes from the end of the tubing so that it is accessible.

Installing within the unit

Figure 5:
The circuit within the converter.  The DC output
terminals (to the battery being charged) are in
the lower part of the image.
Click on the image for a larger version.
Not wanting to have any more of a maze of wires outside the device than necessary I installed the circuit inside the Renogy unit itself as seen in Figure 5.  Using some "Shoe Goo", a strong rubber adhesive (do not use "hot melt" glue!) the encapsulated board of Figure 4 was mounted in the upper-right corner of the "output" side of the unit, set back by about 3/8" of an inch (10mm).  The location is such that the voltage threshold adjustment is accessible via one of the ventilation holes:  Setting it back prevents it from obstructing air flow and makes the precise alignment between the screw of the potentiometer and the hole less critical.

The "V+" and "V-" wires from the circuit are soldered directly to the bottom of the board on the DC input terminals and the "out" terminal of the circuit (the blue wire in Figure 5) is routed through another hole near the green "D+" and "LC" terminals.

Figure 6 shows how these wires are routed.  In addition to the connection to the "D+" terminal from the circuit, another wire and a switch was added that optionally connects the "LC" terminal to the "D+" to set the Renogy to the "Low Current" mode by pulling it high when the switch is closed - in this case, limiting the maximum charge current to 10 amps, which may be useful if you are connecting the unit to a current-limited power source (e.g. "cigarette lighter" plug) that cannot supply the 25-ish amps current input that the unit may draw when charging at 20 amps output.

Figure 6:
Looking on the "output" side of the Renogy, this shows how
the "out" wire from the circuit routes out of one of the air
to the "D+" terminal.  Also shown is a switch that optionally
connects the "D+" to "LC" terminal for just 10 amp max.
Click on the image for a larger version.

This "modification" - since it does not involve drilling any holes - is "reversible" if desired as the circuit and wiring could be easily removed.

In-vehicle testing and use

High/low voltage turn-on/turn-off

Prior to testing the modified unit in my vehicle I set the "cut-in" voltage to about 13.65 volts which resulted in a disconnect voltage of around 12.7 volts - a voltage below which a 12 volt lead-acid battery will quickly drop when charging is stopped.  As expected, the unit did not get turned on until a few seconds after the engine was started, the voltage rising due to charging by the alternator:  If the battery had been heavily discharged and a lot of accessories were running (headlights, blower, wipers) it may take longer than this for the voltage to rise above the threshold.

The voltage dropped below the 12.5-12.7 volt shut-off threshold within a few 10s of seconds of turning off the engine with the entire unit drawing only about 0.5mA (all of that being from the added circuit) in that state - far lower than the vehicle's own quiescent current, and probably lower than the vehicle battery's self-discharge rate.  So far, I have found no tendency for the unit to cycle on and off while the engine is running - even if the headlights, heater blower and windshield wipers are on.  (As noted in a sidebar below, cycling did start to occur, but this was traced to the adjustment potentiometer setting having drifted upwards by about 0.4 volts, likely due to vibration.)

Of course, the voltage thresholds mentioned above are only valid for a healthy (and properly functioning) conventional charging with lead-acid batteries as part of the chassis electrical system:  If your vehicle somehow has a different type of electrical system than the conventional "alternator + lead acid" configuration it'll be up to you to determine how and even if a solely voltage-referenced on/off system like this can be done.

RF Noise generation

Being an amateur radio operator, I was concerned that this unit might produce an excess of radio frequency interference as it contains a high-power oscillator in its power converter.  While visual inspection of the Renogy (with its end covers removed) showed that it does have some filtering of its own in the form of series inductors and capacitors across the input/out leads and to the metal case (to suppress common-mode and differential RF energy) it would be unusual for even a well-designed commercial device to go to extremes in reducing radio frequency energy to the point of extinction. 

Using a "Tiny SA" Spectrum analyzer I connected directly to the input and output leads - using a 0.002uF capacitor to block DC and protect the analyzer - I measured the amount of RF energy being differentially emitted from the unit.

This measurement is important in that if the instantaneous RF voltage on the output leads is different than on the input leads, the in/out cables will necessarily conduct RF energy to the outside world, into whatever is connected at both ends, including the wiring itself, which may radiate like a dipole antenna and/or conduct radio-frequency current through the unit and into other wiring and/or equipment.  A plot from the spectrum analyzer showing the produced RF energy up to 10 MHz is shown below:

Figure 7:
The spectrum of RF energy as measured directly between the voltage in and out terminals across the range of 0-10 MHz with no filtering.  If a receiver's input terminals were connected directly to the DC terminals, the signal level at 40 meters (7 MHz) would be bit more than "10 over S-9.

Without any added filtering, I tested it in my vehicle - powering the 100 watt HF transceiver directly from the Renogy (with no battery) - something that I probably would not ever do in normal use:  If the converter does have the tendency to produce RF interference, connecting the radio directly to it and putting conducted RF energy on its power leads - and its chassis - would represent a "worst-case" scenario.  On 40 meters (7 MHz) and 12 meters (24 MHz) I could just hear the switching frequency's harmonics near the noise floor which indicated that it was pretty quiet - but not completely so.

Since the spectral switching components were just audible I decided to add a modicum of filtering on both the DC input and output leads - four bifilar turns of #12 AWG (e.g. the input/output power cables) each on their respective T140-43 ferrite cores as seen in Figure 9.  In most situations I would prefer to include bypass capacitors in the mix (see figure 4 in the article "Reducing QRM (interference) from a Renogy 200 watt (or any other!) portable solar panel system" - link) to (significantly!) improve performance, but I decided that even a modest reduction in conducted emissions would likely reduce them to the point of inaudibility.

A spectrum analyzer plot of the noise generated by the unit with the added filtering using just the bifilar-wound T140-43 cores is below:

Figure 8:
The spectrum of RF energy as measured between the in/out terminals with the bifilar inductors between the measurement point and the converter - also over the range of 0-10 MHz.  If a receiver's input terminals were connected directly to the DC terminals the signal level at 40 meters (7 MHz) would be a bit less than "S-9" - for a reduction of about 15dB, or nearly  3 "S" units.

As can be seen Figure 8, the bifilar chokes alone reduced conducted RF by a significant amount above a few MHz, but from as noted in the linked article mentioned above, the addition of the capacitors would have improved the attenuation of the conducted RF energy by another 20 dB or so, but including capacitors is a bit awkward as it involves baring wires and adding additional jumpers.  One issue related to lacking capacitors is the response peak around 2 MHz - likely due to a broad resonance of the bifilar inductors themselves - but this effect diminishes quickly as frequency increases on amateur bands likely to be used in a vehicle.  While not shown in any of the included plots, between 10 and 30 MHz the attenuation afforded by the bifilar chokes, alone, remains at 20dB or better for much of that range.

Note:  At HF, a simple "snap on" choke with a single wire running through its center will not offer enough impedance to provide good attenuation - particularly below 20 MHz.  As the choking inductance is proportional to the square of the number of turns through the ferrite device (e.g. 16-fold with four turns) it is only by being able to put multiple turns through it that we can effectively attenuate frequencies in the HF spectrum.

Figure 9:
The Renogy charger with 5-turn bifilar-wound 12 AWG
chokes wound on the DC input and output leads.  For best
results, always place the inductors as close to the noise-
generating device as practical.  Not visible is a fuse on the
input lead to provide protection to the device and wiring.
Click on the image for a larger version.

If interference from this device were to persist after adding the bifilar inductors, I will go through the trouble of adding the aforementioned capacitors.

Can it be scaled up?

The Renogy RNG-DCC1212-20 is "only" a 20 amp converter/charger, but higher current devices are made by Renogy and others.  While I don't own a higher-current Renogy device, those units seem to operate in exactly the same way:  The "D+" terminal may be used to power it on/off and the "LC" terminal, when pulled high, sets the output current to half of the unit's rating.

If RF interference is considered to be an issue, the higher-current units would require proportionally larger wires and likely larger ferrite cores (say, FT240-43) to accommodate a reasonable number of turns of that larger wire.

I cannot speak to how other brands or dissimilar models from Renogy might be powered down via their equivalent of the "D+" terminal to minimize quiescent current consumption:  That must be left as an exercise by the reader.

Real-world useage

Shortly after originally posting this article I went on a rather long road trip.  I had along with me three 100 aH LiFePO4 batteries and I was using them to power not only my refrigerator/cooler, but also my 100 watt HF transceiver.

The reason for powering the transceiver from the batteries was due to not wanting to pull more than about 30 amps from the connection to the battery, which itself is fused for 40 amps:  At full charge current, the Renogy could pull about 26 amps from the vehicle to deliver 20 amps to the battery, but the addition of the transceiver would have added another 20 amps, peak to this, the the desire to "average" out the current.  To monitor, I put a voltage and current meter on the "vehicle" side of the Renogy.

For the most part, things work perfectly:  I heard no QRM (interference) from the Renogy across the HF spectrum and the 20 amp charge current was more than enough to keep up with the loads, recharging the batteries within an hour or so even after running the refrigerator for a couple of days, in the car.

The one issue that I had was that at night, with the headlights and with the heater running was that when the vehicle's engine cooling fan would kick on, the electrical system voltage would drop just enough that my circuit for the Renogy would drop off - then the voltage would increase and would kick back on, repeatedly cycling.  At the time I simply flipped the switch (see Figure 6) to the "10 amp" position to reduce current and the related I*R drop:  This lower current was still more than enough to maintain the batteries - even with the refrigerator and the HF transceiver running/being used.  This issue was later found to be due to the voltage threshold having drifted upwards by about 0.4 volts - likely due to mechanical vibration of the potentiometer.

Conclusion

This unit - and the modification - have worked as expected:  The unit gets turned on and off with the running of the engine automatically with no connection required other than that of power.  When traveling, 20 amps is enough to provide a reasonably fast charging rate to a modest bank (say, 200aH) of LiFePO4 batteries while even the "Low Current" 10 amp limit is more than enough to keep the batteries topped off with a moderate load such as a refrigerator-type cooler or a 100 watt HF amateur transceiver occasionally used for transmitting.

With the added filtering using the ferrite cores on which multiple turns are wound, no interference from the Renogy is audible on the HF transceiver in the vehicle.

 * * * * *

The TL;DR part

Why you need to treat LiFePO4 batteries differently

In the "old days" of lead-acid batteries, you could probably get away with putting it in parallel with the vehicle's electrical system - possibly with the use of an "isolator" (e.g. diode, FET pack, a relay or contactor that connected it in parallel with the starting battery when the engine is running) to prevent the drain on the auxiliary battery from depleting the vehicle's starting battery when the engine was off - but this CANNOT and SHOULD NOT be done with LiFePO4 batteries.

A LiFePO4 battery will attempt to pull "infinity" current when charging

The reason for this has to do with a fundamental difference between the two chemistries.  A healthy lead-acid battery is somewhat self-limiting in the amount of charging current it will take - at least when it's nearly fully-charged:  The charge current will gradually taper off as it asymptotically approaches full-charge.  Additionally, on a typical lead-acid battery the internal resistance of the battery and evolution of gasses at the plates often leads to intrinsic current limiting.

A healthy LiFePO4 battery is closer to that of an "ideal" battery in that unlike a lead-acid battery, where the current will gradually taper off as it approaches "full-charge" voltage (which isn't well defined in that chemistry), a LiFePO4 battery will attempt to consume as much current as it can until it is fully charged.  Practically-speaking, the current is actually limited by internal resistance of the battery - which can be in the milli-Ohm range - and the resistance of the wiring between the voltage source (the alternator) and the battery - and since heavy-gauge wire is typically used, this current can be very high.

In the case of a large (100aH or bigger) LiFePO4 battery, it's likely capable of consuming as much current as the alternator will put out - and this could easily exceed its actual ratings.  Short-term overcurrent conditions on an alternator - such as those that might occur immediately after starting the engine, particularly if accessories (lights, wipers, heater) is on - are tolerated, but they cannot withstand a continuous overload - such as that which might occur with a discharged LiFePO4 battery - without overheating - particularly in hot weather and/or if the vehicle is moving down the road quickly and providing air movement.

Another potential issue with a LiFePO4 battery has to do with its BMS (Battery Management System).  If the charge current exceeds the rating of the BMS, it will disconnect to prevent overcurrent that could damage the cells by charging them too vigorously.  At best, this would cause the BMS to disconnect/reconnect the battery (called "load dump", which is a problem as noted below) and at worst it could cause overheating and damage to the BMS - not to mention the alternator and other vehicle systems as well.

The dangers of alternator "load dump"

Another issue with LiFePO4 batteries that does not exist with Lead Acid is that they can abruptly "dump" their load (e.g. disconnect).  While a lead-acid battery's charge current will gradually taper off, if a LiFePO4 battery attains full charge, its BMS (Battery Management System) will abruptly disconnect the battery once any of its individual cells get to full voltage - something that can happen if the cells are all fully-charged and the current is minimal (the preferred situation) or if high current is still flowing, perhaps due to too-high charging voltage - a much worse case.  The result of an abrupt drop of a large current flow is that the voltage from the alternator will briefly skyrocket, its voltage regulator unable to compensate quickly enough.

While this can happen in a vehicle using a lead-acid battery when a load is suddenly removed (e.g. fan cycling, headlights being turned off) a healthy lead-acid battery is quite good at suppressing such voltage spikes and protecting the attached electronics as it functions much like a large capacitor - but voltage transients high enough in voltage to cause damage can still occur, perhaps cumulatively, particularly if the lead acid battery's condition is poor:  If there is no lead acid battery at all to buffer such transients (e.g. only a LiFePO4 battery) such a voltage spike can damage other devices connected to that power source as described in the example below.

(Note:  As the BMS "disconnect" voltage of a four cell LiFePO4 battery is typically around 14.6 volts, a "load dump" may not regularly occur in many automotive applications as the voltage may never get that high - at least under typical conditions.)

Lead Acid and LiFePO4 batteries don't use the same voltages

A third issue is that the full-charge voltage of a typical "12 volt" LiFePO4 battery is 14.6 volts, precisely, whereas a lead-acid battery is quite forgiving, allowing anything between 13.5 and "14.something" volts as a full charge.  The implication of this is that a vehicle's electrical system is not precise enough to either avoid under-charging (e.g. too low voltage, preventing full charge) or over-charging (e.g. causing the BMS to connect/disconnect/reconnect).

Maintaining a precise voltage near the maximum voltage of a "12 volt" LiFePO4 battery (14.4-14.6 volts) for extended periods (a few hours) - at least occasionally - is also necessary for the BMS (Battery Management System) equalize the individual cells within the battery.  Failure to do this every so often will allow individual cells to drift apart in their charge states as inevitably, one or more cells will discharge more quickly - and if never fully recharged, those cells will seem "weaker" and the battery will appear to lose capacity.

"Equalization" as done by the BMS of a LiFePO4 battery is typically done by "leaking" current across fully-charged cells to top off those that are not - but this will only happen effectively at/near the battery's maximum voltage.  Depending on the degree of this "inequality", it may take hours of holding the battery at this high voltage to fully equalize the battery's cells.

Note that the equalization mechanism for LiFePO4 cells is NOT compatible with that which might be done for Lead-Acid - see the battery's manual or other references for the technical details.

Real-world case

I've seen the above issues play out on a friend's RV:  The original "chassis" battery to run the engine and charge the engine starting battery was augmented by a second and completely separate "coach" alternator which was dedicated to charging the LiFePO4 battery bank and running the devices in the living quarters (lights, TV, pumps, microwave oven, inverter, etc.)  In this case, the secondary alternator was adjusted to produce higher voltage than would be necessary for lead-acid batteries to allow full charging of the LiFePO4 system.

Built by Thor onto a Mercedes chassis,  several alternators were destroyed (one of them lasting only minutes!) by overheating due to the the lack of current-limiting in the battery-charging regimen:  One of them lasted longer than the rest only due to several of the rectifier diodes going open-circuit almost immediately, crippling the ability of the alternator to produce output, limiting current - but putting very high ripple voltage/current onto the coach battery's electrical system.  Additionally, equipment connected to that circuit (namely a $1200 amateur radio transceiver) was destroyed by the high-voltage spike when a "load dump" occurred at the instant that the LiFePO4 battery disconnected  upon full charge do to the intrinsic inability of the alternator's voltage regulator to act quickly enough.  

It is fortunate that this vehicle had two separate alternators so the integrity of the "chassis" electrical system responsible for powering the vehicle itself was spared any problems - and no damage to its components (engine and transmission computers, etc.) was possible.  Without a functioning "coach" alternator to recharge the LiFePO4 battery he was still able to make his trip, but had to stop every couple of days and camp somewhere where he could plug into a mains outlet and use the onboard charger to top it off.

Ultimately this friend ended up taking his rig to a company that specialized in RV power systems and the system was upgraded and reconfigured - at significant expense - to avoid the issues noted above.  A quick perusal of online RV forums will reveal many similar stories - some being a result of the manufacturers apparently being unfamiliar with the requirements of LiFePO4 batteries, and others from individual owners' botched retrofits.

* * * * *

This page stolen from ka7oei.blogspot.com

[END]

Friday, February 20, 2015

A "quiet" 5 volt USB car power supply

For a previous, related article see the May, 2014 posting - "How USB car power adapters can ruin 2 meter mobile reception" - link.

In that post I wrote about those ubiquitous USB car power adapters that fit in a cigarette lighter and while these devices work well for power phones, GPS receivers and the like, they are terrible if you have any intention of listening on 2 meters (or other bands!) while in your car - even if you are using an external antenna.

Unmodified, I found that the unit that I had in my car had effectively reduced the sensitivity of my 2 meter transceiver - with its external, permanently-mounted antenna - by nearly 40dB.  To put that into other terms, a signal that was weak, with this adapter turned off, would have to be increased in signal strength by a factor of 10 thousand to sound the same when the adapter was plugged in with cables attached!

Figure 1: 
The completed USB car power adapter in the box.
Click on the image for a larger version.
Modifying the adapter as noted in the above link I managed to knock down garbage emitted from the adapter by 15-20 dB (a factor of 30-100) - a significant improvement - but when driving up some of the local canyons I found that repeaters that had been perfectly copyable along the entire route previously were no longer audible unless I unplugged the adapter.

Something had to be done!
 
I'd already done about as much
to the small cigarette-lighter USB adapter as I could, short of completely rebuilding it, but it was still too noisy.  The problem with this device was that of differential currents:  Between the input and output terminals of the device there were, on the circuit board, several amps of switching current floating around.

Even though there was a common "ground" shared between the input and output, this same "ground", consisting of just a few short and somewhat thin traces rather than a large, heavy and solid ground plan was suprisingly reactive at higher frequencies - such as those above a few 10's of MHz.  Even a very short length of circuit board trace can have a few 10's of nanoHenries of inductance, but if you are pushing amps of current and considering harmonic energy at 100+ MHz, you can soon see that these seemingly few nanoHenries can make what would seem like a "solid" ground plane act like the feedpoint of an antenna.  With the switching supply itself as the transmitter and the car wiring and the connected USB cables acting like the wires of a dipole antenna one can soon see where the interference was coming from!

Aside from having the voltage converter designed on a "proper" multilayer circuit board with very high quality components - not something that you'll get on a $5-$20 power adapter - the only other way to take care of the problem is to put the entire thing into a metal enclosure and filter/bypass all of the power leads going in and out.

Two approaches:

There are two approaches that I could have taken to accomplish this task.

 1)  Containing noise from the original adapter.

The easiest would have been to take the original USB power adapter and put it in a shielded enclosure and bypass all of the leads going in and out.  I would, of course, have lost the convenience of the small, self-contained device that plugged into the cigarette lighter, but I would have solved the problem.

The techniques described below could apply to filtering the original adapter, just as they did the approach that I ended up taking.

2)  Build another supply.

Figure 2:
The "DC to DC Converter Step-down Voltage LED Power Module 3A"
obtained from EvilBay.  (Ignore the slightly messy soldering - that
was the fault of myself and the often  "grainy" nature
of  lead-free solder!)
Click on the image for a larger version.
If you have been following this blog or read any of the other entries, you will not be surprised that I took this route - but I did not build it entirely from "scratch", but I went to EvilBay and found some inexpensive buck-type switching regulators for under $2 each and used them as a starting point:  I couldn't even get the components themselves for $2!

The devices that I found were described as "DC To DC Converter Buck Step-down Voltage LED Power Module 3A 12V To 5V 3.3V" (see Figure 2) and are based on the LM2576 switching regulator.  These also had a fixed 3.3 volt regulator on board, but I had no need for that so I left it in place, doing nothing with it.

It is important to note that a cheap, $2 switching regulator from EvilBay is not going to be any better than the original USB car adapter in terms of RF cleanliness and it may even be suspect in terms of reliability so a few things need to be done to the $2 board before it may be deemed to be reliable and useful.

The first things to consider are the electrolytic capacitors on the cheap switching regulator boards:  They are not to be trusted!  This should be considered to be true of any cheap switching supply that you get on EvilBay!
 
Figure 3:
The inside of the converter showing the  components for filtering
and the two switching modules.
Click on the image for a larger version.
In any switching regulator, one of the most important aspects of component selection is that of the quality of the capacitors:  They must be of the low ESR type, designed specifically for switching service and even more importantly, they must be of a known manufacturer, obtained from a reputable seller.

Upon inspection of these switching regulators I saw that the capacitors onboard were rated at 105C - a good sign - but I'd never heard of the maker.  Rather than removing the original capacitors, I simply paralleled them with 100uF low-ESR Nichicon units that I'd obtained from a reputable supplier (either Digi-Key or Mouser) and used a dab of RTV ("silicone") adhesive to secure them into position.  I would not recommend the use of "hot melt" (thermoset) glue for this:  It will be in a car, which will get hot and bounce around and they will break loose!  Putting these "good" capacitors in parallel would take a lot of the stress off the "unknown" capacitors on the board, prolonging their life.

Figure 4: 
A close-up of the added capacitors and the piece of copper added
for heat sinking and mounting of the regulator board.  As can be seen, a
small piece was added to help stiffen the right-angle board and
increase the heat conductivity.
Click on the image for a larger version.

The second thing to consider about these cheap switching regulator boards are their current/power ratings.

These units are rated at 3 amps output, and a quick check on the data sheet for the LM2576 indicated that this was about right.  Going on faith that the LM2576's on board were the genuine article - and not counterfeit devices - I put one of them on the bench supply and loaded the output to 3 amps and found that they held up fine, but that the heat-sinking - such as it was - was not adequate, at least if I were to put them inside a metal box with no air ventilation.

Fortunately, the solution was simple:  Add a bit of extra heat-sinking.

Using a bit of scrap copper, I constructed and then soldered an "L" bracket to the circuit board on the back side of the board, opposite to where the LM2576 was mounted.   This bit of copper would not only conduct heat away from the LM2576, to the aluminum body of the  die-cast box, but it also provides a very good local electrical "ground" connection for the board as well:  Figures 4 and 6 show details on this bracket.  When you solder this piece of copper to the board, be careful in the application of heat as you could easily "un-solder" the LM2576 from the other side:  I did this by accident on this board that you see in Figure 2 which explains the rather lumpy solder connections!


Filtering circuitry:

The schematic diagram in Figure 5, below, shows how the input and output filtering is connected.
Figure 5: 
Schematic diagram showing the filtering and interconnections.
The "5V/3A Buck Conv." are the voltage converter modules as described/modified.
Click on the image for a larger version.

How it works:

Referring to the diagram in Figure 5, above, L1, a 22uH inductor (the toroid in the upper-left corner of Figure 3, wound with red wire) offers impedance to RF that may ingress from outside and feedthrough capacitor FT1 shunts any remaining RF to ground.  L2 (the yellow-core toroid on the far left wound with reddish wire) blocks RF that may be present from the switching converters DC inputs, also allowing capacitor FT1 to do its job.  Capacitors C1 and C2 perform "bulk" filtering of high switching currents that may be present on the DC input lines, coming from the two DC-DC converters.

There are two identical DC-DC "buck" type converters and only the upper one will be discussed:

Inductor L3 (visible on the right side of Figure 3 on edge covered in heat-shrink tubing) blocks residual switching energy and RF that are on the DC line coming out of the switching converter and these are shunted to ground by FT2, a feedthrough capacitor and additional filtering is provided by C3.

As noted above, all of the electrolytic capacitors are of the "Low ESR" types and of well-known manufacturers (I use only Panasonic or Nichicon).  Again, when dealing with switching supplies, these special low-impedance capacitors are absolutely necessary in order for proper, long-term reliability and efficient operation of such power supplies and using any other type of capacitor will inevitably result in reduced operational lifetime and/or efficiency.

Figure 6: 
The back side of the switching regulator board showing the
added capacitors and the added mounting bracket/heat sink.  The 100uF,
low ESR capacitors added to supplement the original capacitors
on the (cheap!) regulator board can be clearly seen, held in place
with RTV (silicone) adhesive.
Click on the image for a larger version.

Not mentioned in the above description are components R1, R2 and R3 which are self-resetting thermal fuses.  These typically look much like yellow disk ceramic capacitors (they may be either round or square) and when the current through them exceeds their ratings, they get hot (approximately 100C) and their internal resistance increases, effectively opening the circuit.  Unlike a fuse, when the current is removed they immediately cool down and return to their previous state and reset themselves.

These devices are inexpensive and have the obvious advantage of protecting their circuits like a fuse, but self-resetting after the fault has been cleared!

In the above circuit I happened to use "feedthrough" capacitors which may be seen on the metal barrier near the right edge of Figure 3 (the blue devices soldered into it).  While these devices are especially designed for passing DC and blocking RF, they are a bit difficult to find - but are not absolutely necessary.  Instead of feedthrough capacitors, good-quality "monolithic" multilayer capacitors (the small square ones - not disk ceramic) could be used instead, soldered to the wires with very short leads as they pass or through a hole in the solderable ground plate.

In looking at Figure 3 you will also notice that there are two metal barriers constructed of brass:  One in the upper-left corner, just above L2, and the more obvious one near the right side into which feedthrough capacitors FT2 and FT3 are soldered.  Perhaps a bit of overkill, these provide a (literal!) RF barrier into which the feedthrough capacitors are soldered,  Practically speaking, they provide a convenient place to which the important RF bypassing capacitors may be mounted to the aluminum box to which one cannot solder

Aspects of filtering - why this works:

It was noted earlier that the reason why the original USB power converter was so noisy was that there were many amps of switching currents floating around along the circuit board and even though it was "grounded" at DC, the fact that there was so much current and that the circuit board's traces had some inductance that was significant at VHF was the reason why it radiated badly!

In this circuit, we have taken pains to avoid the pitfalls that would cause it to radiate and if you take your own approach using your own switching converter - perhaps putting that USB power adapter that you already own into its own, shielded box, there are a few things to consider.

In this case, it is the combination of the box itself and the inductors and capacitors that work together to contain the switching energy within the confines of the ground plane of the interior of the box.  It is important to note that it is not the shielding of the box, per se that is the magic here, but the combination of chokes in the various leads and the "solid" ground plane which assures that the circulating currents stay between the input and output leads and do not appear across them where they can radiate.

Take, for example, the output inductors, L3/L4.  The job of an inductor is to resist the change of current so it will pass DC just fine, but it will block AC which means that any RF that gets out of the switcher will hit L3/L4, be blocked by it and whatever small amount of residual energy is left will get shunted to ground by FT2/FT3 and further filtered by C3/C4.

The point here is that on the output lead, L3/L4 will block the RF currents as they leave the switcher, breaking up the path for these currents on the output leads.  This not only prevents that energy from appearing on the output leads, but it also prevents any circulating currents between the input and output as well.

What about switching currents on the input lead?

This is handled by using a good quality capacitors for C1 and C2 which will shunt the vast majority of switching energy to ground.  Residual RF switching energy is then blocked by L2 and whatever little gets through is shunted to ground by FT1 and then there's yet another inductor, L1!

Sources of components:

I happen to have a pretty good junk box of components - particularly the toroidal inductors used.  If you don't have such inductors laying around, junked PC power supplies will likely have what you need in the form of toroidal inductors and small, solenoid-wound chokes wound on ferrite.

The values given (22uH, 47uH) are not at all critical:  Anything from 4.7uH to 100 uH would likely work fine as this range would be more than enough to choke off RFI - but the higher values (22uH and higher) would be somewhat preferable if you have an HF rig in your vehicle that might be bothered.  The most important rating on the chokes to consider is that they be wound with reasonably large wire - say #18 AWG or heavier:  If a couple of amps is pulled through the choke, you don't want it to drop more than a tenths of a volt at most, particularly on the output lead!

As mentioned above, you really do need to get good quality electrolytic capacitors for this and I would recommend places like Digi-Key or Mouser in the U.S. and Panasonic or Nichicon brands. I would strongly suggest that when you go looking for capacitors that you get only those that have "low impedance" and/or "low ESR" in their specifications.  Another thing to look for is their temperature rating:  If they are only 85C, they are probably NOT low ESR or low impedance type.

The die-cast box is approximately 4-5/8" x 2-1/2" x 1-1/2" (12 x 6.5 x 3.75 cm) in size and I obtained it from Jameco Electronics, but similar boxes are readily available surplus and on EvilBay.  A suitable enclosure could be also be constructed using pieces of copper-clad circuit board material, and this would have the advantage of being able to solder directly to it, or one could use a much less-expensive folded aluminum "Bud" type utility box.  The important point is that internally, everything must be connected together on a very heavy, solid ground plane, preferably  without any mechanical joints in the box itself between those internal ground connections.

If you were to just put all of these same components into a plastic box and connect their common point grounds together with thin pieces of hookup wire, you would be risking having RF currents circulating along that thin piece of wire and there being differential voltage across it and having the problem, once again, of RFI escaping the switching regulators!  The only way to make a plastic box work for this sort of thing would be to construct a "box within a box" with the internal one being constructed entirely of metal.

Getting the power out and connecting it to the devices in the car:

Up to this point nothing has been said about getting the power out of this box.

Since the female USB connector is ubiquitous, I decided that this was a good approach so I found some inexpensive "USB Extension cables" on either EvilBay or Amazon (I forget which) and when they arrived, I cut them up, using only rather short portion of the cable with the female USB cable to minimize voltage drop, verifying the power connections in the USB connector using an ohmmeter and a USB pinout diagram that I found on Wikipedia.

It should be mentioned that some devices, particularly cell phones of various brands, particularly those named after fruit, may require that the "data" lines be connected to resistors that "program" the charging current before they will accept a charge:  Not having one of those types of phones I connected nothing to the "D+" or "D-" lines and found that my Android phone charged normally - although it may be that it would charge faster if I would have connected those lines to resistors.  Some phones will pull several amps while charging, hence the use of a pair of 3 amp converter boards!  (e.g. one to run the GPS receiver in the car, the other to charge phones...)

Other devices simply connect to the female USB sockets as normal.

One of the devices powered by this box is my Garmin GPS receiver which has a "special" power cord:  If there is not a resistor across one of the pins of its mini USB connector it will search for a computer when it powers up, delaying its start up.  Since this resistor is built into its power cord I simply removed the cord from the original Garmin power adapter and connected it to the new power converter box and it was happy, booting up immediately, bypassing the check for the computer!


How well does it work?

One of the tests that I ran on this USB supply was to connect a 100 MHz oscilloscope to the input and output leads of the power supply.  With the sensitivity of the 'scope set to maximum I can see just a few millivolts of ripple from the LM2576 regulators, but this energy is confined only to the switching frequency of these devices and the first few harmonics.  Since it is at such a low level it is very unlikely that even if I were to power a sensitive receiver from this regulator that was tuned to the switching frequency that I would even be bothered by it!

The 'scope showed absolutely no evidence of switching energy at higher frequencies so I connected my FT-817's antenna directly to the DC input and output of the supply via a 0.01uF blocking capacitor and only at the lower frequencies (say, 160 meters and lower) could I detect the harmonics of the switching regulators.  If I placed a wire connected to the FT-817's antenna port near one of the power wires going into/coming out of the box, I could hear nothing of it at all.

After all of this, it needn't really be said that this device is completely "clean" at 2 meters and 70cm as well as the FM broadcast band!

What I did hear a little bit of "grunge" from is one of the devices that I run from it (a gps-based dashcam) but breaking that device open and adding a small choke and capacitor on its DC input lead fixed that problem - but a couple of turns of the power lead through a ferrite core would have probably quashed this as well.

Using a "Linear" regulator:

It is worth noting that a much simpler 5 volt USB power supply could have been built using a linear, 3-terminal regulator such as a 7805 or one of its variants.

While this would certainly satisfy the problem of there being switching energy, it would introduce the problem of power conversion efficiency.  In the car environment, wasting a few watts of electricity isn't too much of a problem, but the difficulty is getting rid of heat.  For example, if you were charging your telephone and it was pulling 1.25 amps, running the numbers tells us:

14 volts (typical vehicle voltage) - 5 volts (output) = 9 volts to drop across the regulator

9 volts * 1.25 amps = 11.25 watts of heat to dissipate

11 watts of heat does not sound like much, but it actually takes a fairly large heat sink to do this - and this heat sink must have free air circulation around it.  In other words, if you build a power converter based on this, if you put it into a box, the heat sink cannot be enclosed within the box unless there are a lot of holes and the box itself is located where there can be good convection air circulation!

Alternatively one could build the regulator into a metal box, using the enclosure itself as the heat sink.  Still, it would be a good idea not to bury it somewhere where it could not get some air across it or was exposed to engine heat or in the direct path of air from the heater vent.

In contrast, the aforementioned switching power converter is capable of approximately 6 amps and if one assumes that it is 85% efficient - a reasonable value - one can see that it would not produce much more heat than the above example, worst case!


Final comments:

I could have used the above techniques to clean up the original cigarette-lighter USB power adapter, if I had:
  • Removed the circuit board from its case.
  • Put it in a metal box, grounding it firmly.
  • Supplied DC input power via the L/C (coil/capacitor) filtering as done above.
  • Filtered the DC output power via the L/C filtering as shown above.  I would not have been able to use the USB connectors of the original power adapter, directly, but rather I'd had to have wired in female USB connectors as was done above.
 It would have taken less effort, but it would probably have worked just as well!


[End]

This page stolen from "ka7oei.blogspot.com".

Monday, August 18, 2014

Completely containing switching power supply RFI

In the old days, radio amateurs were concerned with (or should have been) energy from their transmissions getting into devices unintentionally, the classic being televisions, phonographs, telephones, hi-fi sets, and the like.

A few years ago hams' hackles were raised with the prospect of BPL - Broadband over Power Line - a system by which the already-extant infrastructure used to convey electrical power would be used to transport data all about the land.  While it did work (sort of) it had the potential to cause a great deal of interference to amateur radio operators.

A lot was written and to their credit, some designers/operators even designed their systems to avoid putting energy within the HF amateur bands - to varying degrees of success.  While this wouldn't have really helped the causal shortwave listener, it did still not address the fundamental problem that the power lines were simply not suitable, low-loss, low radiation transmission media for radio frequency energy.

What we really should have worried about was not BPL...

Figure 1:
The computer power supply making RF noise up and
down the HF bands.
As it turns out, when it comes to worrying about devices that had the potential to clobber our HF bands, we really should not have worried too much about BPL - which, as hindsight has proven, wouldn't have gotten anywhere, anyway, but rather devices that are right under our noses:  Switching power supplies - particularly the cheap, lightweight ones that are now supplied with everything that we buy and even put in our own shacks!

These inexpensive "wall warts" used to consists of a small, iron and copper transformer - often with a rectifier and capacitor.  These devices would plug into the wall and operate, typically for 5-10 years until whatever it is that they were powering wore out.

Unfortunately for them, they would consume 1-5 watts all of the time just sitting there doing nothing, even when the device was "off" - the so-called "phantom loads" or "power vampires" and many locales/countries have legislated them out of existence in favor of the newer, much more efficient switching-type devices.

All would be good except for two things:

The first of these is that many of these cheap switching-type wall warts last only 12-24 months before dying - usually a victim of an inferior quality capacitor and/or poor design.  What this means is that more often than not, the device to which they were attached is often thrown out as well.

While this new-style switching-style wall-wart may take less power to operate, it is my guess that considering that its premature failure caused a premature product replacement, it never actually saved any money.  Whether it actually saved much energy overall is debatable since it probably took a lot of energy to make (and ship!) the device that the failed supply powered in the first place!

Stepping back off the soapbox, these switching supplies - even if well-built and long-lasting (if you are lucky enough to encounter one) bring us to the second of the two problems concerning us about these devices:  The generation of RFI, or Radio Frequency Interference.


Such was the case with one of these devices that I use on my TV to run a small multimedia computer.  This computer, obtained surplus, did not come with its original supply so I found a genuine (not counterfeit!) OEM Dell laptop supply of  reasonable quality and suitable ratings - about 19 volts and 3 amps.  There was one problem:  It seemed to radiate a low-level RFI signal that got everywhere on HF.

Figure 2: 
Configuration showing the interconnects and where the RF circulating currents are flowing.
The conduction of RF currents onto the AC power, speaker and outside antenna leads
assured that it was being radiated far and wide!
Now part of this problem was due to how and to what it was connected - See Figure 2, above:
  • The power supply was connected to the AC power line.
  • The power supply was also connected to the TV through the video/audio cables.
  • The TV was connected to the high-power stereo system which, in turn was connected to speakers in different parts of the room.
  • The TV was also connected to a coaxial cable that went to the rooftop antenna.
What this meant was that this power supply was, itself, indirectly connected to both ground - via the power line - and several forms of antennas, via the TV, TV antenna and its cable, and speakers.

Whatever low-level RFI was being produced by this power supply had exactly what it needed to be conducted out into the world and cause problems:  A complete path in and out of the power supply and on to conductors that could act as antennas!

What it sounded like:

Typically, switching power supplies sound like a "buzz" every 30-60 kHz - the power supply's switching frequency - up and down the bands, usually worse on lower bands, but not always.  This buzz is usually modulated at twice the power line frequency (120 Hz in the U.S., 100 Hz in most locations in Europe, Asia and Africa) but this modulation is usually very "dirty" and full of harmonics:  If the radio is switched to "AM" mode (and all noise reduction is turned off) the "buzzy" nature of the modulation becomes much more apparent.

It is often the case that the 30-60 kHz intervals at which the interference occurs are more obvious at lower frequencies such as the AM broadcast band and 160 through 80 meters (1.8-4 MHz) - that is, one can more clearly hear the distinct switching supply "carriers".  As one moves up in frequency the amplitude interference may sound like it is decreasing, but this may not actually be the case as these "bunches" of energy often get spread out, changing from a fairly sharp "buzz" as you tune across the switching harmonic to more of a "hiss" and in severe cases - and on higher bands - these "bands of hiss" may actually run together.  In the latter case, it may not, at first glance, sound like a switching supply at all, but rather just an elevated noise floor and it may not be until one switches to AM and notices that this "hiss" has a powerline frequency AM component to it and/or that it disappears when the power is removed from the supply that it is, in fact, from a switching supply!

The latter was the case of the power supply depicted in Figure 1:  On 160 meters it could be heard every 60 kHz or so as a "dirty" buzz, but on 40 meters it was just an indistinct rise in the noise floor of about 2 S-Units that was about 10 kHz wide while on 20 meters it just seemed to raise the noise floor by 1-2 S-Units everywhere that, to the uninitiated, didn't even seem resemble noise from a switching power supply - at least until one switch to "AM" and observed that the background noise seemed to be modulated with twice the mains frequency.

It should be pointed out that I'd already modified this power supply to reduce its conduction onto the AC and DC power leads and that had solved one problem - bothering a receiver that was located next to it - but the lower-level, HF frequency energy that was induced across the power supply between its AC input and DC output was much more difficult to manage as that was not a matter of either shielding or direct power line conduction.

Since I'd already gone out of my way to add bifilar chokes to both the AC and DC leads of this power supply, I'd likely reduced its potential to emit energy by a significant amount, but here, we are talking about residual amounts that are being coupled into what amounts to antennas that are connected to my TV system and being picked up by a sensitive HF receiver.


Before we continue on, let me say a few things about what won't work to fix this.

What will NOT work to solve this problem:

Ferrite beads and snap-on chokes will not be enough.

Ferrite beads and snap-on chokes will not likely solve this sort of problem because what is needed is to prevent the egress of the RF energy from the switching supply one or more of the following:
  • Very high series reactance to block RF energy
  • Shunting of RF energy to a common path on the input and output of the power supply to prevent it from circulating elsewhere.
Simply put, a simple, ferrite bead or snap-on ferrite cannot practically introduce enough inductive reactance to effectively knock down the RF energy to the degree that we might like.  While it may reduce the energy by a few dB, it is often the case that we need to reduce the RFI by 10's of dB and more aggressive filtering is usually required to do this!

Ferrite beads and snap-on chokes are better at minimizing the ingress of energy to reduce the probability of the device in question from being bothered by external RFI than they are at eliminating the emission of RFI in the first place. 

In other words, the reactance that they add to the interconnect leads gives whatever built-in RFI immunity the device already has more of a chance of working to keep RF out of it.  They are much less effective in quashing the emission of RFI emitted by that device in the first place.

To get enough inductance to present a high inductive reactance at the lowest desired frequency it is often required that many turns be wound on a piece of ferrite, but the size of the core, the diameter of the wire - and even the length of the wire - usually precludes putting more than a turn or two on all but the largest core.

As noted before, in this case I'd already have installed additional filtering in the power supply that was orders of magnitude more effective than simple snap-on ferrite devices - and it wasn't enough - so we are going to attack this problem using the second of the above techniques:  Shunting the RF energy to a common path.

I knew now that I had to do the complete "filter job" on this power supply.

Having had to do this before on other power supplies, I gathered the necessary parts - this time, documenting my efforts for this blog:
  • Dead PC power supply, complete with case and power cord.
  • Two brand new low-ESR electrolytic capacitors of suitable voltage for the DC power supply, capacitance with values between 100uF and 1000 uF, inclusive.
  • Two monolithic 0.1uF ceramic capacitors of suitable voltage for the DC power supply.
  • Terminal strip.
  • A piece of perforated prototype board.
  • Misc. screws/hardware for standoffs.
  • A piece of plastic for a shield - see text.
  • An AC line filter - or parts to make one.
  • Four self-adhesive rubber feet.
  • Some soldering skills.
  • A bit of common sense!

Before I go on I must spout out a few weasel words of warning:
  • This project involves hazardous/lethal AC power/mains voltages!  DO NOT undertake this project unless you have experience with such voltages and the necessary safety procedures in dealing with them!
  • Please observe the safety regulations and requirements for your locale noting that the methods described here may not be suitable for your area!
  • You MUST make certain that the components that you use are rated for the voltage/current at which they will be operated!
  •  YOU are responsible for your own safety.  I cannot be held responsible for damage, injury, accidents or even death that might occur by following - or failing to follow - any instructions or recommendations on this page!
  • If you do not feel comfortable working with high voltages and currents or do not have familiarity with wiring procedures and safety related to such, PLEASE do not even think of doing so! 
    Figure 3: 
    The discarded PC power supply case, stripped of its insides leaving
    only the power receptacle and the on/off switch.
    Click on the image for a larger version.
  • YOU HAVE BEEN WARNED!!!

Gathering parts:

The first thing to do is to gut the PC power supply, leaving in the case the connector for the power cord and the on/off switch if it has one.

Please be aware that the input capacitor of the power supply may retain voltage even if it has been powered down for a long time - check and discharge it if necessary.

The picture shows several of the parts that you will need from the power supply:
  • If you don't have an AC line filter on-hand, you'll need to get the parts for one and the first on the list is a bifilar input choke.  This could either be toroidal, or look like a transformer.  Make certain that you identify the two "halves" of the inductor:  AC power will flow through each half, separately.  These inductors will have values of 100uH to 50 mH per half, depending on the source.  Those depicted in Figure 4, below, measured about 4.5 mH per half, enough inductance to be effective down to a few hundred kHz.
  • Common-mode capacitor.  This will typically have a value between 0.047uF and 0.22uF and will be connected directly across the AC line - usually located right next to the bifilar input choke.  In the U.S. where 120 volts is used, these capacitors are typically 0.1-0.47 uF.    Make sure that the capacitors that you use have "X1" or "X2" marked on it somewhere, indicating that it is both safe and designed for this purpose.
  • Two identical high-voltage bypass capacitors:  These connect from each side of the AC supply and go to the case ground.  These are typically blue or yellow and have values from 1000pF to 4700 pF (e.g. 1nF to 4.7nF).  Make sure that the capacitors that you use have "Y1" or "Y2" marked on it somewhere, indicating that it is both safe and designed for this purpose.
  • The safety fuse(s) from the power supply - if they are not blown.  In the U.S., there is typically only one fuse found on the "Line" (black wire) side of the AC input, but a fuse on each side of the AC line may be required in other parts of the world.
  • Figure 4: 
    Parts needed for the AC input filter, found on the discarded PC
    power supply:  The fuse, the common-mode
    capacitor (the yellow block), the common-mode choke (the
    toroidal inductor with two halves) and the two blue disk-
    ceramic capacitors.
    Click on the image for a larger version.
  • Another Common-mode capacitor.  If you have another PC power supply to scavenge - or if the power supply that you have has one, get from it another common-mode capacitor of the same description as above.  This is is optional.

Comment:
  • It has been noted that some REALLY CHEAP and/or "suspected origin" power supplies have been spotted that have none of these RFI suppressing components - or even a fuse - even though their cases had a "UL" and "FCC" certification sticker on them!  In this case, it was probably just as well that the power supply was pulled out of service as they were neither safe or compliant with regulations! 

Warning:
  • All of the capacitors should have on them explicit AC voltage ratings consistent with those of the mains voltage in your area.
  • DO NOT use any capacitor unless it has printed upon it the proper AC voltage rating!  The capacitors typically used for these applications are usually (but not always) blue, light yellow or white in color and have printed on them an AC voltage rating.
  • Make sure that the mains-connected capacitors that you use have an "X1", "X2" "Y1" or "Y2" mark on them indicating that they may be safely used for power mains filtering.
Note:
  • You may be able to find a pre-built filter unit that has a standard IEC (e.g. "Computer Plug") connector on it that you can mount to the power supply case, saving you the trouble of building a filter.  These units may be found both new and surplus.  Such a pre-built filter unit is depicted in the upper-left of Figure 5, below:  If you find one of those, by all means, use it!
Figure 5:
Various styles of bifilar inductors that may be found in scrapped
switching power supplies - plus a complete, self-contained
AC RFI filter built into an IEC power connector
in the upper-left corner.
Click on the image for a larger version.
Constructing the filter:

 The schematic diagram of the filter is shown below.

The filter is of the so-call "Brute Force" type and it is a common-mode low-pass filter that removes high frequency content from the AC power line.  Because our main goal is to contain the RFI within the box, any RF energy from the switching power supply first hits the common-mode capacitor which forces it to be equal on both sides of the AC power line.  The RF energy then hits the bifilar RF choke which then cancels out any energy that is equal on both sides of the AC power line - a condition that was just enforced by the common-mode capacitor.

Any RF that managed to make it through the bifilar choke will now be greatly diminished and it is now shunted by the two capacitors to the metal case to ground while the (optional) common-mode capacitor on the AC input side reinforces the equilibrium of any RF energy that might be on that common-mode choke.
Figure 6: 
The completed AC input filter, constructed on a piece of phenolic prototype board.
This one has a common-mode filter on both the input and output.
Click on the image for a larger version.

The filter shown was built on a piece of phenolic prototyping board, maintaining at least 1/2" spacing (12mm) between any two points that carry mains voltages or between a mains voltage and/or a ground point.  On the bottom, short pieces of solid bus wire were used to interconnect components and to make the loops used to solder the interconnecting wires.

As can be seen, the power supply's original fuse was retained and used on the "line" (hot) side of the AC input of the filter as a matter of safety.

Figure 7: 
Schematic of the AC input filter.
Note:  Typically, a 100k-1Megohm "safety" resistor is connected across the mains (on either side of
the inductor) to discharge the capacitors should it be disconnected while the AC sine wave
is at either peak.  This is not shown in the above diagram since this resistor was already present
in  the power supply to which it was permanently connected.
The phenolic board was mounted on the side of the PC power supply case, but to protect it from items protruding into a vent hole and causing a short or electric shock, a piece of heavy plastic larger than the perfboard was cut out and mounted against the case.  This piece of plastic was cut from a discarded "blister pack" that had contained items bought at a store and was fished out of the trash can:  It just so-happened that there was a large enough portion of flat plastic to accommodate my needs and it made a nice, durable and free shield!

The board was mounted using 6-32 screws and spacers as standoffs to hold it about 1/4" (5mm) or so from the side of the case.  For a ground connection, a ring lug was put under one of the screws and soldered to the ground connection on the filter - and also soldered to the ground connection on the AC power plug which, itself, was also connected to the case.

Using the original on/off switch and wire from the scrapped power supply, the filter was wired to the AC mains and then over to the power supply.  Some push-on pins were found that mated snugly with the power supply's AC input connections and connected to its AC input, but it would have been possible to cut off the original AC power cord and wire it in.  Some RTV ("silicone") adhesive was then used to secure the push-pins on the power supply's AC input as well as to hold it to the bottom of the case - either of which could be removed later, if necessary.

DC output filter:

Figure 8: 
Schematic diagram of the DC output filter.  The "ground" of this filter was firmly attached
to the metal power supply case using the ground lug of the terminal strip seen in Figure 9, below.

Errata:
 Please note that "C4" is also a low-ESR electrolytic capacitor, not "C2" as
indicated in the text, above.
With the AC line input now being completely filtered, we still have to isolate the other end of the path through which the low-level RF currents can flow - the DC output.


Inspecting the junked PC power supply again I noticed that there were two toroidal inductors and I removed them both.  One of them had several different wire gauges and was set aside, but the other consisted of a pair of wires wound in parallel, connected in parallel on the circuit board - and a quick check on the inductance meter showed its value to be around 43 microhenries - plenty good for our purposes.

Figure 9: 
Output filter components mounted on a terminal strip with the ground
lead of the capacitors being wired to the mounting lug.  One of the
two yellow monolithic ceramic capacitors can just be seen
behind the closest terminal strip.
Click on the image for a larger version.
Had neither toroidal inductor been suitable as-is, I would have picked the one with the heaviest-gauge wire and removed all but the winding with that wire:  Most of these power supplies use toroids with yellow or green cores and a dozen or two turns on these typically yield inductances well above 10 uH - more than enough to block HF energy when bypassed with good-quality capacitors.

On a terminal strip I mounted the inductor and two low-ESR electrolytic capacitors, as shown, bypassing each one with a 0.1uF monolithic ceramic capacitor.  The use of these low-ESR capacitors rather than "normal" electrolytic capacitors is important as these types are specially-designed to remove the high-frequency components.  Once you get above a few hundred kHz and into the MHz range many electrolytic capacitors start to lose their efficacy so monolithic capacitors such as the ones shown take over, shunting the RF to the case ground.

Important construction notes and comments:
    • Again, use ONLY LOW ESR capacitors for the output filter.  These capacitors are almost always rated for 105 degrees C, so if the capacitors that you have say "85C" on them, they are probably not low ESR - but their having "105C" on them that doesn't guarantee that they are low ESR, either!
    • While the output capacitors of PC power supplies are (ostensibly) of the low ESR type, it is often the failure of these capacitors - along with the fan - that causes these power supplies to fail, so don't count on a failed power supply to be a usable source!  Unless you have an ESR meter, don't count on a capacitance meter to tell you if a capacitor is any good, either:  It can still read the proper value and "seem" to be good, but have terrible ESR!
    • If a terminal strip cannot be found, a small piece of copper-clad circuit board could be used, instead, with the components mounted "dead bug" or "Manhattan style" on it, using the copper itself as a ground plane.  The circuit board material would then be mounted using screws, to the metal case, assuring a solid ground connection.
    • Be sure to ground the output filter directly to the case near the point where the DC cable exits the case rather than run a wire to the AC input filter's ground point!  One of the ways to maximize the effectiveness of the filter is to minimize the length and impedance of its ground/common connection, and the best way to do this is to utilize the broad metal plane of the case itself!

    Figure 10: 
    The input filter mounted on the wall of the power supply case.
    Note the clear plastic shield behind the phenolic board to
    prevent accidental shorting/contact through the vent holes.
    Click on the image for a larger version.
    Note that if you use ordinary 0.1 uF disk ceramic capacitors instead more modern monolithic ceramic units be aware that many of these can have rather low voltage ratings (e.g. 16 volts) unless otherwise marked.  Also note that these ordinary disk types can lose effectiveness at high frequencies so they should be bypassed with 0.001uF capacitors.

    This terminal strip was mounted to the case using a 6-32 screw and a "star" washer.  The DC output cable of the power supply was then cut and wired to the terminal strip, using the ground lug as a "common" and passing the DC through this filter which effectively shunts any RF to the case ground.

    Finishing it up:

    Once all wiring is completed, ohmmeter tests should be made to verify continuity (or lack thereof) as appropriate and stick-on feet should be applied to the bottom to prevent it from sliding around and scratching whatever surface it rests on.

    Figure 11: 
    Filters and power supply mounted within the case.
    The power supply itself was affixed using RTV
    ("silicone") adhesive.
    Click on the image for a larger version.

    How well does it work?

    At HF frequencies this filter's effectiveness is seemingly absolute in that the power supply within cannot be detected from outside the box, even with a portable shortwave radio held within a few inches!

    It should be noted that it is not the "shielding" of this box to which one would attribute its effectiveness, but simply the fact that the AC input and the DC output share a solid, common RF ground.

    Any RF currents on the AC input and DC output simply circulate on this common ground (e.g. the metal case) after having already been attenuated by the chokes rather than radiate on the AC power leads and/or the wires connected to the DC output - or the things connected to it!

    Were this same circuit arrangement constructed on a flat piece of metal without a shield cover, it would have worked nearly as well and it is likely that a shortwave receiver would have detected it at very short range (e.g. within a few feet/a meter) but (importantly!) the "grunge" would not be conducted on either the AC input or DC output leads:  The 100% cover of the case is there mostly to prevent accidental electric shock and shorting of the otherwise exposed AC mains connections and that there is no chance at all of any radiation of noise from this power supply - even over very short distances! 

    It's worth nothing that the "shielding" by the metal box is NOT what is containing the RFI, but rather the fact that the input/output RF currents from the power supply are shunted to a common conductor (the box) which effectively eliminates any differential RF on the in/out leads:  If the cover was left off the aperture of the open box would be to small to effectively radiate RF - at least at HF - and the over is mostly for the purposes of aesthetics and safety.

    Figure 12: 
    The completed, enclosed, power supply, the DC output lead seen emerging
    via a grommet.
    Click on the image for a larger version. 
    Other related articles on this subject:


    [End]

    This page stolen from ka7oei.blogspot.com