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.

AC-DC Converter Is Reliable, Safe, And Efficient

When first starting an electronics project, it’s not uncommon to dive right in to getting the core parts of the project working. Breadboarding the project usually involves working with a benchtop power supply of some sort, but when it comes to finalizing the project the actual power supply is often glossed over. It’s not a glamorous part of a project or the part most of us want to be working with, but it’s critical to making sure projects don’t turn up with mysterious issues in the future. We can look to some others’ work to simplify this part of our projects, though, like this power supply from [hesam.moshiri].

The power supply is designed around a switch-mode topology known as a flyback converter. Flyback converters work by storing electrical energy in the magnetic field of a transformer when it is switched on, and then delivering that energy to the circuit when it is switched off. By manipulating the switching frequency and turns ratios of the transformer, the circuit can have an arbitrary output voltage. In this case, it is designed to take 220V AC and convert it to 8V DC. It uses a simplified controller chip to decrease complexity and parts count, maintains galvanic isolation for safety, and is built to be as stable as possible within its 24W power limitation to eliminate any potential issues downstream.

For anyone trying to track down electrical gremlins in a project, it’s not a bad idea to take a long look at the power supply first. Any noise or unwanted behavior here is likely to cause effects especially in projects involving sensors, ADC or DAC, or other low-voltage or sensitive components. The schematic and bill of materials are available for this one as well, so anyone’s next project could use this and even make slight adjustments to change the output voltage if needed. And, if this is your first introduction to switched-mode power supplies, check out this in-depth look at the similar buck converter circuit to better understand what’s going on behind the scenes on these devices.

Continue reading “AC-DC Converter Is Reliable, Safe, And Efficient”

Spy Radio Setup Gets A Tiny Power Supply For Field Operations

[Helge Fyske (LA6NCA)] may not be an actual spy — then again, he may be; if he’s good at it, we wouldn’t know — but he has built a couple of neat vacuum tube spy radios in the past. And there’s no better test for such equipment than to haul it out into the field and try to make some contacts. But how do you power such things away from the bench?

To answer that question, skip ahead to the 3:18 mark of the video below, where [Helge] shows off his whole retro rig, including the compact 250-volt power supply he built for his two-tube 80-m Altoids tin spy transceiver. In the shack, [Helge] powers it with a bench power supply of his own design to provide the high anode voltage needed for the tubes, as well as 12 volts for their heaters. Portable operations require a more compact solution, preferably one that can be run off a battery small enough to pack in.

By building his power supply in a tin, [Helge] keeps to his compact build philosophy. But the circuit is all solid state, which is an interesting departure for him. The switch-mode supply uses a 4047 astable multivibrator chip as a 50-kHz oscillator, which switches back and forth between a pair of MOSFETs to drive a transformer. This steps up the 12-volt input to 280 volts AC, which is then rectified, filtered, and regulated to 250 volts DC.

To round out his spy rig, [Helge] also designed a tiny Morse key, which appears to be 3D printed and fits in its own tin, and a compact dipole antenna. Despite picking what appears to be a challenging location — the bottom of a steep-sided fjord — [Helge] was easily able to make contacts over a distance of 400 km. His noise floor was remarkably low, a testament to the solid design of his power supply. Including the sealed lead acid battery, the whole kit is compact and efficient, and it’s a nice example of what vacuum tubes and solid state can accomplish together.

Continue reading “Spy Radio Setup Gets A Tiny Power Supply For Field Operations”

USB Power Isolator Keeps Smoke In

Anyone who’s done an electronics project knows the most important part of any good design is making sure to keep the magic smoke inside of all of the components. There are a lot of ways to make sure the smoke stays in there, but one of the most important is making sure that the power supply is isolated. If you’re using a USB port on a computer as your power source, though, it can be a little more complicated to isolate it from the computer.

The power supply is based around a small transformer with a set of diodes to act as a rectifier. Of course, while a transformer is great at isolating power supplies, it isn’t much good at DC. That’s what the ATtiny microcontroller is for. It handles the high-speed switching of the MOSFETs, which drive the transformer and handle some power regulation. There are two different power supplies created as part of this project as well — the first generates +5V much like a normal USB plug would have, and the other creates both +5V and -5V. It will be important not to mix these two up, or that tricky blue smoke may escape.

The project page goes into extensive details on the operation of the device, so if electrical theory is of interest, this will definitely be worth a read. Isolating a valuable computer from a prototype circuit is certainly important, but if you’re looking for a way to isolate a complete USB connection, look at this build which includes isolation for a USB to FTDI adapter.

Tricking A Smart Meter Into Working On The Bench

When the widget you’re working on is powered by a battery or a USB charger, running it on the bench is probably pretty safe. But when the object of your reverse-engineering desire is a residential electrical meter, things can get a little dicey.

Not that this elevated danger level has kept [Hash] from exploring the mysteries presented by smart meters. Still, with a desire to make things a little safer, he came up with a neat trick for safely powering electrical meters on the bench. [Hash] found that the internal switch-mode power supply on the meter backplane was easy enough to back-feed with a 12-volt bench supply, rather than supplying the meter with the full 240-volt AC supply it normally gets when plugged into a meter base (these are meters for the North American market, where split-phase 240-volt is the norm for residential connections.) But that wasn’t enough for the meter — it powered up, but stayed in a reset state without fully booting. Something more was needed to bring the meter fully to life.

That something proved to be a small AC signal. Normally, a resistor network divides the 240-volt supply down to about 3 volts, which is used by the sensing circuit in the meter. [Hash] found that injecting a 60-Hz, 600-mV sine wave signal with about a 3-volt DC bias into the sensing circuit was enough to spoof the meter into thinking it’s plugged into the meter base. The video below has a walkthrough of the hack, and some nice shots of the insides of the meters he’s been working with.

[Hash] has been working with these meters for a while now, and some of the stuff he’s learned is pure gold. Be sure to check out his 2021 Remoticon talk on meter hacking for all the fascinating details.

Continue reading “Tricking A Smart Meter Into Working On The Bench”

EMC Tutorial Puts You In The Loop

A student once asked his lab instructor why his amplifier was oscillating. After looking at it and noting the wild construction, the instructor remarked, “A better question would be why shouldn’t it oscillate?” The truth of it is, our circuits generate noise and especially if they are oscillating anyway. Distortion and nonlinearities generate harmonics and other component imperfections also contribute.

[FesZ Electronics] has a great video series about noise in switching power supplies and the latest talks about the hot loop. If you want to improve the noise performance of your next design, these videos are well worth watching. You can see the hot loop video below.

We really liked the homebrew noise probes. In addition to real-world probing. The video also observes circuit operation under simulation. Even if you don’t care about noise performance, there’s a lot of good information about basic switching power supply design here.

You can see the difference in a PCB that has a small hot loop versus a very small hot loop. Something to think about next time you are laying out a power supply board.

If you want to dive deeper into noise simulation, we have a good read on that for you. Or ditch simulation, and make your own cheap probe with an SDR dongle.

Continue reading “EMC Tutorial Puts You In The Loop”