Sunday, February 16, 2025

Ali Express "SDR TX/RX Switch" - A design not well thought out...

Figure 1: 
Front panel of the SDR TX/RX antenna switch showing the
the 3.5mm audio connectors and the red/green RX/TX LED -
which have been swapped to be in their proper location.
Click on the image for a larger version.

IMPORTANT:

If you have one of these devices, DO NOT connect it to your transceiver and second (SDR) receiver UNTIL you have read and understood the issues described here. 

Failure to understand how this device works may result in you blowing up your SDR when you transmit! 

I've you've been following this blog you'll note that I've used SDRs (Software Defined Radios) quite a bit - particularly for reception.  Transmitting in the vicinity of any receiver - or trying to use an outboard receiver in conjunction with a transmitter on the same antenna - is a bit problematic for several reasons:

  • If the transmitter and receiver are in close proximity and on very nearby frequencies (e.g. on the same band) then it is (nearly) inevitable that the receiver WILL be overloaded when the transmitter is active.
  • Unless the frequencies (transmit and receive) are very well separated AND both the receiver and transmitter have adequate filtering, the receiver will be overloaded by the transmitter.
  • It is possible that even if you have a separate receive antenna, it may intercept enough energy from the transmitter to damage/destroy the receiver.  If the two are on the same band, this is more likely - but even if the receiver is being operated on a very different frequency range than the nearby transmitter and there is insufficient filtering at the receiver the receiver could sustain damage.
  • It is often the case that one might have a single antenna on which two receivers (e.g. the receiver built into the transceiver and an outboard SDR receiver).  In this case one clearly must protect (e.g. disconnect) the outboard receiver when transmitting.

It's worth noting that most SDR receivers do NOT have particularly strong filtering in them:  Unlike an amateur transceiver - which may have separate filtering for each amateur band (or groups of bands) - this is rarely the case for wide frequency-range software-defined radios:  RTL-SDRs, SDRPlay, Funcube and others have either no band-specific filtering or rather broad (e.g. covering about an octave) filtering in them.

What this unit does

Some modern radios actually have external receive ports on them to allow you to "share" the RF while protecting the external receiver.  If your radio doesn't have that, there are/were several devices to allow this that may be found on the market (e.g. the MFJ-1708)- but by attention was brought to an inexpensive unit (pictured above) that has appeared on the various seller web sites (Amazon, EvilBay, Ali Express, etc.) so I obtained one via a U.S. seller.

The description of this device is typical of those found on at the stores of Chinese sellers, curiously being both under and over-descriptive at the same time:  "160MHz 100W Portable SDR Transceivers Aluminum Alloy Box Device Radio Switch Antenna Sharer Practical Signal Equipment Accessory"

By the description, with this device it should be possible to connect your transceiver and SDR (receiver) to the same antenna, perhaps receiving using both (e.g. the addition of a waterfall to an older radio) without fear of damaging the SDR or the transceiver.

This device also has another feature:  To re-route audio when transmitting - which is probably the most usable feature of this device as it comes out of the box as we'll see.

As we'll see, this device doesn't quite work as you might think that it should.

"Documentation?  What documentation?!" 

This unit arrived in a package with (surprise!) no documentation at all - which was somewhat disappointing:  Sometimes one gets a (badly!) translated half-sheet of paper that hurts one's brain to parse - or even a URL to a page with... something... but not the case here.

From a practical standpoint, it's somewhat "self documenting" in the sense that if you ordered this device in the first place, you already had an idea as to what it was supposed to do, so it's possible to figure things out.  Referring to Figures 1 and 2 (the front and back panels) we have:

Front panel:

  • LED on the left-hand side.  This LED is illuminated when the unit is in "Receive" mode - that is, the "SDR" rear-panel RF connector is connected to the "ANT" rear-panel connector.  (The PC board shows this as a green LED, but on mine the red and green were interchanged during assembly:  I swapped them back.)
  • 3.5mm jack labeled "SDR".  This is a stereo (2-channel) audio jack and, during receive, both channels are connected to the "Audio Out" connector.  It is disconnected during transmit.
  • 3.5mm jack labeled "AUDIO OUT".  This is a stereo (2-channel) audio jack that is intended to be connected to speakers.
  • 3.5mm jack labeled "TRX".  This is a stereo (2-channel) audio jack that is intended to be connected to the transceiver during transmit.  Is is disconnected during receive.
  • LED on the right-hand side.  This LED is illuminated when the unit is in "Transmit" mode - that is, the "TRX" RF rear-panel connector is connected to the "ANT" rear-panel connector.  (As noted, this should have been a red LED according to the marking on the PC board but mine was populated with a green LED, which I swapped.)

Figure 2:
Back panel of the SDR antenna switch.  SO-239 connectors
are for the radio (transceiver) and antenna with the SMA for
the SDR.  The 3.5mm PTT and power connectors are visible.
Click on the image for a larger version.

Rear panel:

  • RADIO connector.  This is an SO-239 (female) UHF connector to which the transmitter/transceiver is to be connected.
  • ANTENNA connector.  This is an SO-239 (female) UHF connector to which the antenna is to be connected.
  •  PTT ("Push To Talk") connector.  This is a 3.5mm connector in which the center pin (tip), when grounded, will switch the unit from"Receive" to "Transmit" mode.  It's likely that a 3 or 4 wire 3.5mm cable was provided in which case only the tip (PTT) and sleeve (outer-most ring - ground) are needed.
  • SDR connector.  This is an SMA connector to which the SDR (or other auxiliary receiver) is to be connected.
  • 13.8 VDC connector.  This is a 2.1x5.5mm coaxial power connector (center positive) though which DC power is supplied.  This voltage is not critical and could be anywhere from 11.5 through 15 volts.

Also in the box my unit came with an SMA-SMA jumper, SMA-BNC adapter to adapt the SDR connector to BNC, three "audio" cables with 3-conductor 3.5mm connectors on each end, and a 12 volt switching supply (with a European "pin" plug) and a universal plug adapter:  The 12 volt switching supply seems to be the cheapest, meanest possible unit with no brand name and should NOT be trusted or used - but at least its DC cord is useful!  (In other words, do not use this power supply - particularly as it is unfiltered from an RF standpoint and it would be a really bad idea to use it on an RF receive device of any type!) 

How it actually works

As you would expect, the antenna is to be connected to the "ANTENNA" port.  When in receive mode, the "SDR" connector is also connected to the "ANTENNA" port - but the "RADIO" port is not!

What this means is that as shipped from the factory, if you connect your transceiver, antenna and SDR to the unit, when it's in receive mode, you will get no receive signals on your transceiver.  This is by design, apparently.

It is expected that PTT connection on the back should be grounded when the transceiver is in transmit mode - and when this happens, the RADIO and ANTENNA ports will be connected to each other.  There is also an RF sensing circuit that is supposed to detect when the transmitter is producing RF, but this has its own issues as will be discussed later.

There is a jumper...

If you take the unit apart (via the four screws on the back panel) you'll see a jumper (J5 - see the schematic of Figure 3 and the photo of the board in Figure 4) and some awkwardly-worded text indicating that if you remove the jumper that you'll have "dual receive" - which means that the Radio's receiver and the SDR will be connected to the antenna at the same time.

This is technically true - but there are a number of "gotchas" here

 First, let's take a look at a reverse-engineered schematic of the unit, below:

Figure 3:
Reverse-engineered schematic diagram of the unit.
The parts designators are those shown on the silkscreen of the circuit board.
Click on the image for a larger version.

Circuit description:

DC power

The DC input power via J4 is protected with F1, a 500mA self-resetting fuse and D10, a diode for reverse polarity protection while L2, a 220uH inductor, isolates the connection at RF.  Capacitors C6 bypasses RF while C7, a 220uF electrolytic, provides smoothing/filtering - likely enough to even allow an AC power source (from a 12-ish volt transformer) to be used. 

It's worth noting that there are two "grounds" on this device:  The "antenna ground" of the rear panel and RF connectors and the "shack ground" of the DC power and audio which are isolated by L1, a 220uH inductor.  On paper, this isn't a bad idea - but on this unit there's a flaw:

The back panel being used to mount the connectors and it - and the entire case - is at "RF" ground - which would be fine as that would be the same "ground" as your radio.  The problem is that the circuit board's ground planes are not set back from the edges of the board meaning that it's possible that the green insulating coating could scrape off the board and contact the case it the mounting slot, connecting the two "grounds" together - perhaps intermittently.  (Practically speaking, most people would not be likely to ever have a problem.)

Oops.

Keying

J6 is the PTT input, activated by grounding the tip of the 3.5mm connection with the outermost sleeve being the "shack" (not antenna) ground.  Diode D6 blocks positive voltage and when the PTT is keyed, the gate of Q3, an N-channel MOSFET, goes low, de-energizing all of the relays.  When the PTT line is "un-grounded" capacitor C3 and R9 charge, preventing Q3 from re-activating the relays instantly, providing about 100msec or so of delay through the charging by R3.

Comments about the keying via the PTT port:

This relay keying scheme assumes that there is either NO voltage or a POSITIVE voltage on the keying line from the radio.  There are several caveats to this:

  • When powered up, the relays are energized whenever it's in "Receive" mode (PTT ungrounded or no transmit RF).  What this means is that if power is removed, it's as if it's in "transmit" mode.
    • This connects the ANT to the RADIO port and the SDR port is grounded when in TX mode or powered down.
    • Additionally, the front-panel AUDIO jack gets connected to the TRX jack. when in TX mode or powered down.
  • The keying line from the radio must go to GROUND when keyed.
  • If the keying line is shared with an amplifier, that amplifier CANNOT put a negative voltage on the keying line as that will hold the SDR switch in "Transmit" mode at best, damage the SDR switch in worst case - and in either case it would hold the amplifier in a "keyed" state.
  • If there IS a positive voltage on the keying line when "unkeyed" it must be at least 5 volts just to assure that Q3 will turn on reliably when the radio is un-keyed - and this lower voltage may affect the duration of the "un-key" delay.  If the voltage is less than 10 volts, the full delay caused by C3 and R3 may not occur.
  • The 100msec or so of "un-key"delay afforded by R3 and C3 is insufficient to prevent the relays from "chattering" during SSB and CW transmissions if RF sensing is used!
    • If you are a CW operator, the unit will not switch back to receive mode as quickly as your radio might.  If you are a CW operator that prefers QSK (full break-in) you probably don't want to have this unit inline.

There is also an RF keying circuit:  Transmit RF is tapped from the RADIO RF line (from the transmitter) by C1, a 47pF capacitor and rectified by D1 and D2 and used to turn on Q1 - grounding it in the same way that grounding the PTT line does - which in turn keys the transmitter.  There is a fatal flaw in the design of this device exacerbated by RF sensing which I will discuss shortly.

Audio switching

Figure 4:
The circuit board, showing J5 in the center.
The power supply filtering is in the upper-right with the audio
relay (K3) on the left.
Click on the image for a larger version.

Relay K3 may be used to switch audio based on keying.  Let's assume that you are using a separate SDR with a computer to receive audio:  By connecting the computer speakers to the "Audio Out" connector and the computer audio output to the front-panel 3.5mm "SDR" jack the SDR audio will be muted when transmitting at which any audio from the radio connected to the front-panel 3.5mm "TRX" jack will be passed through to the speakers.

Practically speaking, you would probably never use the "TRX" jack to mute your radio's audio, but a more likely scenario is that if you are using an online WebSDR (see the WebSDR.org web site for a list) to listen on the air, you could use this to mute your speakers when you transmit to prevent your own transmitted audio from coming back with a delay and causing an echo.

RF Switching

This is where it gets a bit scary.  First, consider the configuration - from the factory - with jumper "J5" in place.

Remembering that when powered up, the relays are energized, you can see that when in "Receive" mode, the ANT port is connected directly to the SDR port - but you'll also note that the RADIO port is not connected to anything (e.g. floating).  When you transmit, the relays de-energize, connecting the RADIO port to the antenna and grounding the SDR port.  This means two things:

  • There is no receive RF at the transceiver.  Most people that I know don't use their transceiver's receiver instead of the SDR, but use them at the same time - perhaps turning down the volume on the one not being used.  Not having antenna RF to be able to receive anything on the transceiver is likely not what you really want to do.
  • When using the RF sensing, the transmitter is connected to an open circuit before the relay switches.  This has several implications:
    • If you don't have the PTT line wired to your radio, there will be a split second when RF first appears that the radio will see an infinite VSWR.  This can progressively damage a transmitter's finals, despite the SWR protection circuitry within the radio.
    • When relay K1 does de-energize and connect to the antenna, it will be "hot switching" the relay contacts.  This tends to burn contacts and shorten the life of the relay.
    • The RF sensing circuit doesn't have adequate "hang time" to ride through word pauses and CW elements meaning that it will likely "chatter", repeatedly causing the hazards noted above.

As can be seen from the picture of the circuit board in Figure 4 there's a jumper, J5, on the board with the following somewhat confusing text:

J5 Usage
Open = Dual receive wheh [sic] RX
Short = Normal Operation

By removing J5, relay K1 is never energized meaning that it is always connected to the antenna:  This helps to mitigate the problem that - when RF sensing is used - that the transmitter is connected to "nothing" as it would be the case with J5 installed - but this also means that in receive mode, the transceiver and the SDR are connected in parallel

Simply paralleling two (nominally) 50 ohm devices (the transceiver operating in receive mode and the SDR) isn't a great idea - but it will generally work "OK", particularly if the SDR and the transceiver are tuned to the same frequency range.  When the transceiver is OFF or on a band  other than that to which the SDR is tuned may cause its filters to "suck out" RF and a loss of signal/sensitivity on the SDR.   

(Note:  A "properly-designed" device that shared the antenna for receive would likely include a built-in 2-way splitter which can reduce such problems.)

The bad part here is that if you transmit - and, for some reason relay K2 doesn't de-energize instantly, as would be the case with RF sensing only - you will transmit directly into your SDR, likely destroying its front end.

Oops, again.

What this means is:

  • If you remove J5, DO NOT operate the unit UNLESS you are using the PTT cable - which is to say DO NOT rely on RF sensing alone as transmit power will briefly enter the SDR's front end before the relay can switch.  The SDR is likely to be damaged due to the lack of RF power protection on that port.
  • If your PTT cable accidentally becomes disconnected - or external keying is turned off in your radio's menu - you will transmit into the SDR and destroy its front end due to the inability of the RF sensing to act instantly and due to the lack of protection to the SDR.

The reason for this as as mentioned above:  Not only are the transceiver and SDR connected together without any protection circuitry, but also the RF sense needs to detect transmit power before it will activate - and by the time that it does, a brief burst of full transmit power may have found its way into your SDR.

A hardware bug

There is also a more subtle bug that I uncovered.  While testing the unit on the bench, I disconnected J5 - but was confused when the ANT and RADIO ports were not connected.  What was happening was that when I removed J5 - while the unit was powered up and in receive mode - enough current was flowing through LED D8 and resistor R4 to hold relay K1 closed.

Simply removing the power temporarily caused K1 to release - and there wasn't enough current to close it again, but if you are messing with the configuration, this "bug" could bite you, too!  I suppose that it's also possible that jarring the unit could cause the armature of K1 to hold in place - but I didn't try this.

The "fix" for this - if you want to bother with it - is to change resistor R4 to a 10k resistor:  This also tones down the TX LED's brightness a bit, too.

Overall comments

I get the sense that whoever designed this thing may have been copying the general idea from other, similar devices - but not really understanding what was being done, and why.  For example, the separate "grounds" implies an understanding that having them separated would be a good idea - but whoever laid out the circuit board made the "rookie mistake" of making it possible for the two "grounds" to be connected, anyway if the green coating on the board and the black anodization of the case wear through.

The description of this unit implies that it's useful up to 160 MHz.  I suspect that this is probably "true-ish", but that the VSWR starts to climb when one gets to and above 6 meters (50 MHz) meaning that it's likely most useful at low power at these higher frequencies.

The cardinal - and unforgivable - sin has to do with the fact that if you want to use both your transceiver's receiver and your SDR simultaneously, you WILL want to remove J5 - but if you do - and you don't absolutely have the PTT connection working properly, you WILL blow up your SDR!

Fixing this problem is possible with the addition of some simple protection circuitry to allow the SDR to survive brief bursts of transmit power - perhaps the topic of a later post. 

AS IT IS, I WOULD NOT USE IT FOR ITS INTENDED PURPOSE, AS AN SDR ANTENNA SWITCH - at least not without significant modification.

What it IS useful for, out of the box

What it IS useful for is an audio switch to mute your computer audio when you transmit - as you might do when using a WebSDR or other remote receiver.  For this, I would:

  • Connect the PTT to your radio's PTT
  • Connect your computer's speakers to the "AUDIO OUT" jack
  • Connect your computer audio output to the "SDR" jack

If you are hell-bent on not using the PTT cable, the RF sense may be useful, but you would also need to:

  • Remove internal jumper J5
  • Connect the transceiver to the "RADIO" port
  • Connect the antenna to the "ANTENNA" port 
  • DO NOT connect anything to the SDR port

As noted before, the time constant of C3 and R3 may not be enough and the relay may "chatter" - in which case R3 could be replaced with a higher-value resistor of, say, 330k - or with a 1 Meg potentiometer in series with a 47k resistor to allow "hang time" adjustment.  (Adjustment of R3 is preferable to increasing the value of C3 as the latter could also slow the activation time when RF is detected.)

Final comments

Other than to switch audio as described above, I wouldn't use this device as it is shipped for any other purpose without appropriate modification.  This makes this device a possible  "starting point" for another project (e.g. there are already some relays and a metal box!) - one to provide proper RF protection for the SDR and make the RF sensing more useful when using modes that have variable power levels (e.g. CW, SSB) which can cause the current design to "chatter".

* * * * * * *

This page stolen from ka7oei.blogspot.com

[END]


Sunday, January 26, 2025

A short-term "UPS" for mini (NUC-type) PCs

The problem

Figure 1:
A "Beelink" small form-factor PC.  This unit sports a Ryzen
processor and runs from an external 19 volt supply.
Click on the image for a larger version.
Very small computers (so-called "NUCs" - a term that we'll use generically throughout) of recent manufacture are energy efficient and are increasingly used in lieu of full-size desk top PCs.  Many of these use external power supplies - often referred to as "bricks" - of the sort also used to power and charge laptops.

Even if one has a UPS (Uninterruptable Power Supply) attached to their computer - or especially in the case of a "whole house UPS" (e.g. Tesla Power Wall or equivalent) there are instances during which the transition between power grid going down and the UPS picking up the load may not be fast enough to prevent the computer from rebooting or just crashing and hanging.

For this article, we are looking at the case when the power supply for a "NUC" (small form-factor power supply) is incapable of "riding" through the aforementioned UPS transition.  In this instance at least part of the problem has to do with that unlike the power supply in a desktop computer - which are physically bigger and have a comparatively large reservoir of energy storage in the form of big filter capacitors - the small power supplies used for these small computers have a comparatively small energy reserve - and unlike a laptop, there is no onboard battery to serve as a backup.

Returning to the "whole house UPS" and, to a lesser extent its much smaller counterpart used to back up only critical gear, it may take more than 100 milliseconds for the power to resume after the grid is lost - depending on the nature of the outage:  Owning a Tesla Powerwall - and talking to others with this and similar (non-Tesla) systems - they all seem to share a common trait:  Sometimes they switch quickly enough that nothing reboots, but other times they take much longer to switch (sometimes more than 500 milliseconds) and many computers - even desktop PCs with more capacitive energy storage - fail to carry through the transition.

For this reason it might be reasonable to have a smaller (and, presumably a "fast") UPS to carry the computer through this transition although it seems a bit silly to have a UPS when one already has one for the entire house - but all it needs to do is to run for a few seconds, so even UPS batteries in poor condition will likely suffice.

In the case of a very small form-factor computer such as a NUC, we could contrive a means of providing power for just long enough for the UPS - whether desk-top or whole-house - to do its job.  It, too, needs only last long enough - perhaps a second or so.  If it's powered via a "brick" power supply this task is a bit easier and it is those devices with external power supplies that this article addresses.

Carrying through the interruption

In the specific case of the "NUC", these are often (but not always) powered via an external DC power supply.  In my case, I have a Beelink NUC using a Ryzen 5700 that is powered from a 19 volt supply.  In communicating with others who own this same mini PC it's clear that it's shipped with a wide variety of different power supplies from different manufacturers - some of them with ratings that seem a bit low for the rated power consumption of the computer - so I replaced it with a good-quality MeanWell unit (see sidebar) which not only has more robust ratings, but its input is power factor corrected - a very important consideration when powering it from a UPS! See comment #1 at the end of this article

Details about the replacement power supply

The MeanWell power supply that works with this Beelink NUC  is P/N:  GST90A19-P1M  which may be found at Jameco Electronics and it is Jameco Part Number 2223486 (link) and from Digi-Key as Part Number 1866-2156-ND (link).  This unit is rated for 19 volts at 4.74 amps - much greater than the supply that is likely to have been supplied with the PC and it has the needed 5.5mm O.D./2.5mm I.D. coaxial power connector with center positive.  Other NUCs will have different power requirements and connector types and polarities so it is up to YOU to determine what might work for your computer.

As noted, it has good power factor correction (PF of 0.9 or better) and produces very little to no radio frequency interference - unlike some power supplies of "unknown" brands.  As a bonus, it so-happens that this supply works perfectly with my older Asus ROG laptop as well!

In testing, neither the original or MeanWell power supply had enough reserve capacity to consistently carry it through a UPS transition - particularly if the computer was "busy" and consuming maximum power

The major reason why there is this concern is that this Beelink computer is located at the remote site of the Northern Utah WebSDR where power bumps and outages causing the load to switch to the UPS are very frequent - and occasionally, this causes the computer to "hang" (and not reboot!) requiring that the power outlet be remotely switched off - and back on.  As this is not a "public-facing" computer (it does WSPR monitoring) its outage may not be immediately noticed.  It's worth noting that the desktop-type computers have no issues with these transitions.

What to do?

Figure 2:
The Tecate SCAP PBLS-3.5/21.6 capacitor module.
This unit contains the necessary voltage equalization circuitry.
Click on the image for a larger version.
I did not want to put a separate mains-powered UPS on this computer and while I could have figured out a battery-based solution, this seemed overkill as I literally needed it to power the computer for less than one second - plus I didn't want to have batteries that would eventually "age out" and need to be replaced.  The obvious solution seemed to be the "supercapacitor" - devices with Farads of capacitance, capable of storing enough energy to power the computer for a very short period of time.

In perusing the DigiKey catalog I found at least two useful candidates:  One capacitor of 1.25 Farads with 540mΩ of internal resistance (Tecate P/N: SCAP,PBLS-1.25/21.6) and another of 3.5 Farads with 260mΩ of internal resistance (Tecate P/N: SCAP,PBLS-3.5/21.6), each rated for 21.6 volts - both suitable for use with a 19 volt supply.  These are actually capacitor modules, consisting of eight 2.7 volt capacitors of 10 and 20 Farads each, respectively, and containing simple circuitry to assure that the voltage across each of the internal capacitors was balanced.  It's worth noting that the voltage equalization circuitry itself will consume a small amount of current (perhaps as high as a few 10s of milliamps) - particularly as one approaches the maximum voltage rating and this must be considered in the design of the support circuitry.

It's important to note that these won't actually function as a UPS in the traditional sense:  These capacitors can store enough energy to power the computer for a short time - only for a few seconds at most - but this is more than enough to carry it through for the few hundred milliseconds of drop-out that might occur during a UPS transition. 

Using the supercapacitors

The problem with using a supercapacitor is that when they are discharged, they look like a dead short, meaning that you probably cannot simply tack them in parallel with a power supply:  To do so would stress the power supply - putting it into current limiting at best, possibly causing it to "trip out" and go offline, or in the worst case, damaging it - so provisions must be made to regulate the charging of the capacitor.  The diagram in Figure 3 shows the circuit surrounding the capacitor.

Figure 3:
Schematic of the supercapacitor NUC UPS.
A standard outboard power supply is used - typically the one supplied with the computer, but it could
be another unit - probably of better quality - as noted in the article.
Click on the image for a larger version.

How it works

For charging, we are using old and "newer old" tech here - R1 is a simple series resistor of 100 ohms with a power rating of 5 watts which will limit the current to around 200mA, tapering off gradually as the capacitor charges up.

In parallel with R1 is F2, a 100 milliamp self-resetting thermal fuse (e.g. "Polyfuse").  This device is really a thermistor and when "excess" current flows through it, it heats up and the resistance skyrockets, greatly reducing the current flow.  The way that it is used here means that when the power supply is first connected (and the capacitor is fully-discharged) there's a brief inrush of current until F2 "blows" (gets hot) at which point it takes only 15-20 milliamps to keep it in this state at which point R1 is handling most of the current.  As the capacitor charges and the voltage differential across R1 decreases, the current through the 100 ohm resistor will also drop - but F2 will also gradually cool down as the voltage across it decreases - but the current will also increase - but never more than approximately the 100 mA rating.

Figure 4:
Internals of the UPS.  The support circuit was constructed
on a small piece of prototype board (left) while the LEDs to
indicate the status are on the right.  The rear panel (far left)
has the power cable and coaxial power connector.
Click on the image for a larger version.
asfasdf

The use of F2, the 100mA fuse results in much faster charging of the capacitor.  In testing with a 3.5 Farad capacitor, it took about an hour for the capacitor's terminal voltage to be within a hundred or so millivolts of the power supply voltage with just R1, the 100 ohm resistor - but it took about 9 minutes with the addition of F2.  As an added bonus, when the capacitor is nearly fully charged (within a volt) the current through the 100 ohm resistor would be only about 10mA or so and the charging rate would slow to a crawl - plus the equalizing circuit within the capacitor module draws a few milliamps meaning that it will never get closer than 200-500 millivolts of the power supply voltage.

With the addition of F2 - and the fact that at this low voltage drop it will have cooled off and have a resistance of between 3 and 10 ohms - the capacitor's resting voltage will be within a few 10s of millivolts of the power supply rather quickly.  This is important as even a few hundred millivolts of extra charge on the capacitor will measurably extend the "run" time.  Attaining this sort of "full charge" could be done with a solid state circuit using FETs and op amps,  but it would be fairly complex:  This approach - with a single, inexpensive component - is nice and simple.  The use of F2 also overcomes the small current consumption of the capacitor module's equalization circuitry:  A few milliamps of current from this circuitry would drop the full-charge voltage by as much as a few hundred millivolts without F2.

A maximum charge current of 200-300mA seems reasonable as that would not put a significant amount of burden on the power supply - which must be able to power the computer and charge the capacitor.  I also considered the use of a simple transistor-type current limiter which would maintain a constant current until the capacitor got to within a volt or so of the supply voltage, but decided that it probably wasn't worth the added complexity - and I would still have required something like F2 to bright the capacitor right up to the supply voltage.

The "Charge" LED works by detecting the voltage crop across R1:  If it exceeds approximately 0.6 volts, Q1, a PNP transistor, is turned on, pulling its collector high, turning on LED2.  When this LED goes out, the capacitor will be within 0.5-0.6 volts of full charge.  The "Ready" LED (LED2) is in series with D2, a 15 volt Zener diode and it will start illuminating when the voltage across the capacitor exceeds about 17 volts for an old-tech AlGaInP LED (with a 2.1 volt threshold) or about 18 volts for a more modern GaN LED.  In a "standby" state, the "Charge" LED will have extinguished and the "Ready" LED will be on indicating the unit's readiness.  Neither of these circuits are perfect, but they give a "good enough" indication of the state of the device and let the user know that things are working.

Figure 5:
The completed UPS with the two LED indicators on
on the front panel.
Click on the image for a larger version.

An "ideal" diode - in real life

Parallel with R1 is a diode (D1) that is reverse-biased when the capacitor's voltage is lower than the supply voltage, preventing current flow other than through the resistor.  While I originally considered using an "ordinary" diode - which would have a voltage drop of about 0.6 volts for a standard silicon or around 0.4 volts for a high-current Shottky type - I decided to do something different:  Use an "ideal diode".

A voltage drop of 0.3-0.6 volts from a typical diode would represent an immediate voltage drop from the capacitor - and since the voltage on the capacitor will drop as it's discharged, the "diode drop" would represent less time that the computer could be powered by it, alone.  A hypothetical "ideal" diode would have zero voltage drop in the forward direction and block current in the reverse - and fortunately, something pretty close to that actually exists these days!

As it turns out, such a thing actually exists - and it is pretty inexpensive.  This implementation of an "ideal" diode is really a module with several components:  The specific modules that I used (which I got from Amazon - five for US$10) use the Diodes Incorporated DZDH0401DW chip along with an AGM30P05A P-channel FET along with a 100k and 1 Megohm resistor.  These "diodes" are rated for a maximum stand-off voltage of 26 volts and a steady-state current of 10 amps, but could probably handle 15 or even 20 amps for brief periods.

The way that these work is that the DCDH0401DW has a comparator that is used to detect the minute voltage drop between the "input" of the diode (the "+" side) and the "output" (the "-" side):  If the voltage on the input is higher than the output, the P-channel FET is turned on, allowing it to conduct from the input to the output.  If the voltage on the input is NOT higher than the output, the FET is turned off, preventing current from flowing from the output to the input.  The use of a P-channel FET allows the switch to be placed in the positive lead which permits the negative side of the power sources - the power supply and the super capacitor - to be connected together.  Incidentally, the FET is wired such that even if it weren't "on" at the moment that it might need to conduct, it's intrinsic diode would conduct, anyway, albeit with a 0.6 volt drop, but since the DZDH0401DW chip responds within a few microseconds at most, the FET would be very quickly turned on.

Figure 6:
The back panel of the supercap UPS.
The original power supply plugs into the jack while the
short cable needs to be just long enough to get to the
back panel of the PC.
Click on the image for a larger version.

When the FET is on, it's resistance is on the order of 5.5 milliOhms which means that if there's three amps flowing through it, less than 20 millivolts will be lost - about 1/30th of that of a standard silicon diode - and since there is so little voltage lost, there will be a similar fraction of heat being produced as well.

As you may have noticed in the schematic diagram of Figure 3, there are actually three connections to this "diode":  The anode, the cathode and ground - the ground being required because not only does the comparator/control chip need power, but the gate of the P-channel FET needs to be pulled negative with respect to its source.  The "overhead" current of the FET and comparator/control chip is only on the order of 175 microamps according to the data sheets so it's power consumption is practically negligible in our application.

The other components in the circuit include D2 - a 15 volt Zener diode along with LED1 and R2 for current limiting:  This LED will illuminate if the applied voltage exceeds about 17 volts and functions as a "Power" indicator.  Transistor Q1, a PNP, is connected across R1 via current-limiting resistor R4 and when the voltage drop across R1 exceeds about 0.6 volts, its collector will be pulled toward V+, causing LED2 to illuminate, indicating that the capacitor is charging.  When this LED goes out, this indicates that the capacitor is - at the very least - "mostly" charged.

The final component is F1 - a self-resetting thermal fuse (e.g. "polyfuse") which could have a rating of anything between 5 and 9 amps.  As the capacitor can deliver a large amount of current when shorted, this is provided as protection.  A "normal" fuse of 6-10 amps would suffice here, but I happened to have the polyfuse on hand.

Variations on a theme:  Backing up a 12 volt PC.

As noted, this unit was built using the 3.5 Farad capacitor - but it should be capable of doing its job with the lower-cost (and physically smaller) 1.25 Farad unit.

The described unit is also designed to be used with a NUC/PC that operates at 19 volts - a common voltage used by laptop computers.  Many of these small computers use 12 volts - and while one could possibly tack a small battery across the power supply, the use of a capacitor-based backup would mean that there would be no battery that would have to be checked/replaced on a routine basis.

The circuit depicted in Figure 3 - designed for 19 volts - would have to be modified slightly, as follows:

  • D2, a 15 volt Zener, would be changed to a 9 volt device for a 12 volt bus.  This would better-represent the charge state of the capacitor for a 12 volt supply, causing it to illuminate once it had charged to better than about 11 volts.  The "Ready" LED would illuminate at voltages above that of the 9 volt Zener plus the LED's forward voltage.
  • R1, a 100 ohm resistor for the 19 volt device would be changed to somewhere between 47 and 62 ohms but still a 5 watt device.
  • The capacitor described is rated for 21.5 volts - which is probably overkill for a 12 volt power supply.  A 16 volt capacitor would be a better choice.  Additionally, a lower-voltage capacitor module will have commensurately lower internal resistance which improves efficiency - and for a 12 volt power supply where voltage droop due to Ohmic losses is arguably more important, it would be best to keep it below 400mΩ.   Possible capacitors for 12 volt use include:
  • It's worth mentioning that while a "12 volt" computer may operate from a supply voltage that is nominally 12 volts, it's worth checking to make sure that it's within the safe operating range of the capacitors that you choose.  For example, the Tecate capacitors listed above can operate safely only up to 13.5 volts, ruling out the use of a power supply that operates in that range - but the Cornell-Dublier capacitor with its 18 volt rating would work nicely over a slightly wider range.

Conclusion

Figure 7:
The supercap UPS, on the shelf next to the PC -
now in service at the Northern Utah WebSDR!
Click on the image for a larger version.

As can be seen from the photos, the capacitor and support circuitry was placed into a plastic enclosure:  The two LEDs were placed on the front panel and labeled while the back panel has a female coaxial power connector that matches that of the computer and power supply along with a short cord terminated with the same type of male power connector used by the PC - which happens to be the common "5.5mm x 2.5mm" type with the outside shell being negative.

To install the UPS, the PC was powered down and the device inserted into the power lead - the power supply plugging into the UPS and the short cable plugging into the PC.  After a bit less than 10 minutes, the "Ready" LED illuminated - followed soon after by the "Charge" light extinguishing - but since the charger is current-limited, the PC could be powered up immediately after installation - not needing to wait for it to fully charge.  Of course, any testing of the device to determine its ability to "ride through" an interruption should wait until the capacitor has fully-charged.

As can seen in Figure 7, the UPS was placed on the shelf next to the PC that it supports.  With the PC under a "moderate" load (about half of the maximum power consumption) the power supply was unplugged briefly to see if it would hold.  Interruptions of up to 1.5 seconds were tried with no disruptions of the PC with the capacitor being fully "recharged" to just a few 10's of millivolts of the maximum voltage in under two minutes due to the "shallow" discharge.  We chose not to try to see how long it really would hold the PC up, but with the UPS installed, we cycled the UPS several times and the PC happily rode through it - something that it would not do without.

In other words, success!

 * * * * * * *

Comment #1:

In this article, I mention that having a power factor corrected power supply is particularly important when running from a UPS.  If your UPS is running power supplies without power factor correction, it may well be that it will trip out due to overload at around half of its wattage rating:  The real clue is to closely look at your UPS's specifications and note that it has a "volt-amp" rating (which is more of a true indication of its capability) that is much lower than its wattage.

For more information about this, see the Wikipedia article about Power Factor (link) - and pay special attention to the section about "Non Linear Loads" which are what a typical, non power-factor corrected switching supply presents to the mains.  In these cases, the peak amperage can be several times higher than the average - and all power circuits must be able to supply these high peaks regardless of the average power, which is why a UPS, generator or even mains supply circuit must to be de-rated to accommodate devices with poor power factor.

In other words:  If you don't use power-factor corrected power supplies on your UPS or generator, you won't be able to safely and reliably supply anywhere near its "wattage" rating - but if you do use only devices with good power factor, you will be able get much closer to its ratings without overloading it.

* * * * * * *

This page stolen from ka7oei.blogspot.com

[END]