[Dr Ali Shirsavar] drawing schematics and equations on the whiteboard

Calculating The Capacitance And ESR Specifications For The Output Capacitor In Your Switching-Mode Power Supply

[Dr Ali Shirsavar] from Biricha Digital runs us through How to Select the Perfect Output Capacitor for Your Power Supply. Your switching-mode power supply (SMPS) will require an output capacitor both to iron out voltage swings due to loading and to attenuate ripple caused by switching. In this video we learn how to calculate the required capacitance, and when necessary the ESR, for your output capacitor.

To begin [Dr Ali] shows us that in order to calculate the minimum capacitance to mitigate voltage swings we need values for Δi, Δv, and Ts. Using these we can calculate the minimum output capacitance. We then need to calculate another minimum capacitance for our circuit given that we need to attenuate ripple. To calculate this second minimum we need to change our approach depending on the type of capacitor we are using, such as ceramic, or electrolytic, or something else.

When our circuit calls for an electrolytic capacitor the equivalent series resistance (ESR) becomes relevant and we need to take it into account. The ESR is so predominant that in our calculations for the minimum capacitance to mitigate ripple we can ignore the capacitance and use the ESR only as it is the feature which dominates. [Dr Ali] goes into detail for both examples using ceramic capacitors and electrolytic capacitors. Armed with the minimum capacitance (in Farads) and maximum ESR (in Ohms) you can then go shopping to find a capacitor which meets the requirements.

If you’re interested in capacitors and capacitance you might enjoy reading about Measuring Capacitance Against Voltage and Getting A Handle On ESR With A Couple Of DIY Meters.

Turning Down The Noise On SMPS

On paper, electricity behaves in easy-to-understand, predictable ways. That’s mostly because the wires on the page have zero resistance and the switching times are actually zero, whereas in real life neither of these things are true. That’s what makes things like switch-mode power supplies (SMPS) difficult to build and troubleshoot. Switching inductors and capacitors tens or hundreds of thousands of times a second (or more) causes some these difficulties to arise when these devices are built in the real world. [FesZ Electronis] takes a deep dive into some of the reasons these difficulties come up in this video.

The first piece of electronics that can generate noise in an SMPS are the rectifier diodes. These have a certain amount of non-ideal capacitance as well as which causes a phenomenon called reverse current, but this can be managed by proper component choice to somewhat to limit noise.

The other major piece of silicon in power supplies like this that drives noise are the switching transistors. Since the noise is generally caused by the switching itself, there is a lot that can be done here to help limit it. One thing is to slow down the amount of time it takes to transition between states, limiting the transients that form as a result of making and breaking connections rapidly. The other, similar to selecting diodes, is to select transistors that have properties (specifically relating to inherent capacitances) that will limit noise generation in applications like this.

Of course there is a lot more information as well as charts and graphs in [FesZ]’s video. He’s become well-known for deep dives into practical electrical engineering topics like these for a while now. We especially like his videos about impedance matching as well as a more recent video where he models a photovoltaic solar panel in SPICE.

Continue reading “Turning Down The Noise On SMPS”

Lowering Your Noise Floor, The Easy Way

If there’s anything more annoying to an amateur radio operator than noise, we’re not sure what it could be. We’re talking about radio frequency noise, of course, the random broadband emissions that threaten to make it almost impossible to work the bands and pick out weak signals. This man-made interference is known as “QRM” in ham parlance, and it has become almost intolerable of late, as poorly engineered switch-mode power supplies have become more common.

But hams love a technical challenge, so when a nasty case of QRM raised its ugly head, [Kevin Loughlin (KB9RLW)] fought back. With an unacceptable noise floor of S8, he went on a search for the guilty party, and in the simplest way possible — he started flipping circuit breakers. Sure, he could have pulled out something fancier like a TinySA spectrum analyzer, but with his HF rig on and blasting white noise, it was far easier to just work through the circuits one by one to narrow the source down. His noise problem went away with the living room breaker, which led to pulling plugs one by one until he located the culprit: a Roomba vacuum’s charging station.

Yes, this is a simple trick, but one that’s worth remembering as at least a first pass when QRM problems creep up. It probably won’t help if the source is coming from a neighbor’s house, but it’s a least worth a shot before going to more involved steps. As for remediation, [Kevin] opts to just unplug the Roomba when he wants to work the bands, but if you find that something like an Ethernet cable is causing your QRM issue, you might have to try different measures.

Continue reading “Lowering Your Noise Floor, The Easy Way”

Drop-In Switch Mode Regulators

Perhaps the simplest way to regulate a DC voltage is using a voltage divider and/or an active device like a Zener diode. Besides simplicity, they have the additional advantage of not being particularly noisy, but with a major caveat: they are terribly inefficient. To solve this problem a switching regulator can be used instead, but that generally increases complexity and noise. With careful design, though, a switching regulator can be constructed to almost completely replicate a linear regulator like this drop-in TO3 replacement. (Google Translate from German)

While the replacement regulator was built by [Mr. Floppy], the units are being put to the test in the linked video below by [root42]. The major problem these solve compared to other switching regulators is the suppression of ripple, which is a high-frequency artifact that appears on the DC voltage. Reducing ripple in this situation involved designing low-inductance circuit traces on the PCB as well as implementing a number of EMI filters on both input and output. The final result is an efficient voltage supply for retrocomputers which has a ripple lower than their oscilloscopes can measure without special tools.

[root42] is not only testing these, but the linked video also has him using the modules to repair a Commodore 1541 which originally had the linear TO3 voltage regulators. It’s definitely a non-trivial task to build a switching power supply that meets the requirements of sensitive electronics like these. Switch mode power supplies aren’t new ideas, either, and surprisingly pre-date the first commercially-available transistor although modern ones like these are much less expensive to build.

Continue reading “Drop-In Switch Mode Regulators”

Fail Of The Week: A Potentially Lethal Tattoo Removal Laser Power Supply

Caveat emptor is good advice in general, but in the wilds of eBay, being careful with what you buy could be life-saving. To wit, we present [Les Wright]’s teardown and very ginger power-up of an eBay tattoo-removal laser power supply.

Given that [Les] spent all of around $100 on this widowmaker, we’re pretty sure he knew what he was getting himself into. But he likely wasn’t quite prepared for the scale of the sketchiness this thing would exhibit. The deficiencies are almost too many to number, starting with the enclosure, which is not only made completely of plastic but assembled from individual sheets of flat plastic stock that show signs of being glued together by hand. Even the cooling water tank inside the case is pieced together this way, which probably led to the leaks that corroded the PCBs. Another assembly gem is the pair of screws the big energy storage capacitor is jammed under, presumably to hold it in place — because nothing says quality like a BOM that can’t spring for a couple of cable ties. Click through the break to read more and see the video.

Continue reading “Fail Of The Week: A Potentially Lethal Tattoo Removal Laser Power Supply”

Just How Dodgy Are Cheap USB Chargers Anyway?

Aside from apparently having both the ability to reproduce on their own and simultaneously never being around when you need one, USB chargers seem innocuous enough. The specs are simple: convert mains voltage to 5 volts, and don’t kill anyone while doing it. Both specs are typically met by most designs, but judging by [DiodeGoneWild]’s latest USB charger teardown, the latter only just barely, and with a whole lot of luck.

The sad state of plug-in USB power supplies is one of [DiodeGoneWild]’s pet gripes, and deservedly so. Most USB chargers cram a lot of electronics into a mighty small volume, and are built to a price point, meaning that something has to give in the design. In the case of the two units he tears apart in the video below, it’s pretty clear where the compromises are. Neither unit met the specs on the label in terms of current supplied and voltage regulation, even the apparently more capable quick charger, which is the first to go under the knife. The PCB within holds some alarming surprises, like the minimal physical isolation between the mains part of the circuit and the low-voltage section, but the real treat is the Schottky diode that gets up to 170°C under full load. Safety tip: when you smell plastic burning, throw the thing out.

The second charger didn’t fare any better; although it didn’t overheat, that’s mainly because it shut itself off before it could deliver a fraction of its rated 1 amp output. The PCB construction was shoddy in the extreme, with a squiggly trace standing in for a proper fuse and a fraction of a millimeter separation between primary and secondary traces. The flyback transformer was a treat, too; who doesn’t want to rely on a whisper-thin layer of cheap lacquer to keep mains voltage out of your phone?

All in all, these designs are horrible, and we have to thank [DiodeGoneWild] for the nightmares we’ll have whenever we plug into one of these things from now on. On the other hand, this was a great introduction to switch-mode power supply designs, and what not to do with our own builds. Continue reading “Just How Dodgy Are Cheap USB Chargers Anyway?”

Minimizing Stress On A Coin Cell Battery

When it comes to powering tiny devices for a long time, coin cell batteries are the battery of choice for things like keyfobs, watches, and even some IoT devices. They’re inexpensive and compact and a great choice for very small electricity needs. Their major downside is that they have a relatively high internal resistance, meaning they can’t supply a lot of current for very long without decreasing the lifespan of the battery. This new integrated circuit uses a special DC-DC converter to get over that hurdle and extend the life of a coin cell significantly.

A typical DC-DC converter uses a rapidly switching transistor to regulate the energy flow through an inductor and capacitor, effectively stepping up or stepping down the voltage. Rather than relying on a single converter, this circuit uses a two-stage system. The first is a boost converter to step the voltage from the coin cell up to as much as 11 volts to charge a storage capacitor. The second is a buck converter which steps that voltage down when there is a high current demand. This causes less overall voltage drop on the battery meaning less stress for it and a longer operating life in the device.

There are a few other features of this circuit as well, including an optimizer which watches the behavior of the circuit and learns about the power demands being placed on it. That way, the storage capacitor is only charged up to its maximum capacity if the optimizer determines that much charge is needed. With all of these features a coin cell could last around seven times as long as one using more traditional circuitry. If you really need to get every last bit of energy from a battery, though, you can always use a joule thief.