by Animats · 2y ago · 0 comments
There are boost converters, buck converters, and ones with transformers. With a transformer you can isolate the input from the output, which is mandatory for safety if you're driving the thing from the AC power line.
Here's one of mine. USB 5VDC in, 120 VDC out, to operate antique teletype machines that need 60mA 120VDC.[1] The basic circuit is simple, but there are multiple surface mount ferrite beads and small capacitors to keep the spikes from coming out via the input USB, output, or as RF. LTspice simulation was needed to pick the values for those, so as to minimize noise in both voltage and current.
[1] https://github.com/John-Nagle/ttyloopdriver/blob/master/boar...
That's actually usually not true, as the vast majority of DC to DC converters are step-down converters: you do not want the voltage to spike. And in general, it isn't really a "spike".
A better way to think about what is happening is that passing a current from a power supply through an inductor transfers energy into the magnetic field. When you stop doing that, the magnetic field diminishes, transferring energy back into current. But this time, you direct the current into the circuit.
The trick is that by picking the timing and other parameters correctly, you can pick the voltage of the downstream current. Specifically, you can do this because the voltage across the inductor is a function of the slope of the strength of the magnetic field around the wire in the inductor. Pick a different slope, and you can pick a different voltage. Since you usually want a stable voltage, the graph of the magnetic field strength will be (roughly) a sawtooth, and the graph of the induced voltage will be (roughly) a square wave (I am simplifying here for understandability!). A sawtooth shape has a consistent current slope, which leads to a consistent voltage.
I made the design my own by mounting the transformer to a 4x4 piece of scrap plywood, and then cutting out two square 'finger pads' from a tin can, and screwing those into the plywood also.
Add in some wire, a switch, a battery, and a little patter, "place your two fingers on the shiny pads and this will make music....using your mouth as the speaker" and your parents get a call from the principal.
Honestly, I always thought I was the only one who did this. My dad was a practical joker with a sense of humor that only he understood.
My dad died last February. This was a wonderful memory that made me smile. Thanks Hacker News for two memories in a weeks time!
That energy transfer makes an “interesting” party trick.
Get the step up/down winding transformer from an old CRT TV. Get rid of other components*, and wire it with a 9 volt battery on one side, and connect the other with + to conducting surface on three sides of a box with - to the three opposing sides. Put a switch on the underside that opens the circuit.
To pick up a box generally requires touching two opposite sides. Opening the circuit dumps the field into the person picking it up who gets a momentary jolt.
It's enough to run through multiple people: hold hands in a ring of 2 - 10 people, and have two people at ends of the ring each press an opposite side of the box and pick it up, the whole ring gets the jolt!
As a grade school science experiment, have the experiment display say something along the lines of "Guess the weight" so people pick up the box and get a surprise.
For more about retro transformer circuits, see:
https://hackaday.com/2016/07/04/retrotechtacular-dc-to-dc-co...
This is sort of a single vibe (the switch opening) of a vibrator-transformer-rectifier transformer, to collapse the magnetic field that dumps into the still "closed" side through the person picking it up. No rectifier since it's not AC, it's just C. So the same principle, without the rest of the parts.
* WARNING: Don't look up the rest of the owl. Don't build this. Don't try this. Don't let anyone touch this.
(Wasn't it great learning in an age before cars had seatbelts, before push mowers had kill bars, and when nothing had warning labels?)
I was mostly tongue in cheek about the danger above, as the most dangerous step would be relieving a previously functional CRT of the transformer block. The CRT discharge can kill you.
Using an ignition coil should work (I didn't try it) and is likely safer to source if you're getting it from something assembled instead of from a used parts bin.
As for the rest of the owl, this is from memory, nearly half a century ago, so, yeah, disclaimers:
---
# How to Build a Prank Shock Box for a Science Exhibit
This fun project will surprise your friends with a harmless electric shock when they pick up a prank box to guess its weight. Here’s how you can build it and how it works.
## Materials:
- 9-volt battery
- Step-up transformer (designed to increase voltage)
\_ consider a flyback transformer from old CRT or auto ignition coil, talk to circuit electrician expert
- Switch (spring-loaded or pressure-based)
- Wires
- Small box (to hold the circuit)
- Electrical tape
- Conductive foil or metal strips for accessible sides of box
## How It Works:
This circuit uses a step-up transformer coil to generate a small electric shock when someone picks up the box. While transformers typically work with alternating current (AC), here you use direct current (DC) from the 9-volt battery. The trick happens when the circuit opens as the box is lifted, causing the transformer’s magnetic field to collapse and induce a voltage spike.
When the box is lifted, the switch opens, cutting off the current from the battery. This sudden interruption collapses the transformer’s magnetic field, generating a quick, harmless jolt.
## Steps to Build:
1. Assemble the Circuit:
- Connect the 9-volt battery to the primary side of the transformer, with a switch in between. The switch should stay closed when the box is at rest and open when it’s picked up.
- Wire the secondary side of the transformer to two sets of exposed contact points on the outside of the box: one set connected to the positive side and the other set to the negative side of the transformer.
2. Add Conductive Surfaces:
- To make it more effective, cover three sides or faces of the box with conductive material (like aluminum foil or metal strips) connected to the positive output of the transformer. Then cover the opposite three sides with conductive material connected to the negative output of the transformer.
- When someone picks up the box, their hands will naturally touch both a positive and negative side, allowing the shock to pass through them.
3. Install the Switch:
- Position the switch on the underside of the box so that it opens when the box is lifted. You can use a spring-loaded or pressure-based switch that triggers when the box is moved.
4. Test the Circuit:
- With the box resting, the current will flow through the transformer, building up a magnetic field. Once someone lifts the box, the circuit breaks, causing the field to collapse and induce the shock.
5. Secure the Box:
- Place and affix all the components securely inside the box, bringing your two wires through the sides and making sure the exposed contact points are positioned on opposite sides of the box. Tape down any loose wires.
## Science Explanation:
This project uses Faraday’s Law of Induction, which states that a changing magnetic field induces voltage. The transformer converts the collapsing magnetic field into a brief, high-voltage spike, delivering a small shock to whatever is completing the high side circuit when the low side circuit is opened. Although transformers usually work with AC, you’re using the moment when the DC current stops to mimic that effect.
https://en.wikipedia.org/wiki/Faraday%27s_law_of_induction
The conductive material on the box ensures that when someone lifts the box, their hands make contact with both the positive and negative sides, completing the circuit for the jolt.
## Safety Note:
When done correctly, this project delivers a tiny, harmless jolt, similar to static electricity. Always use low power, an appropriate transformer, and avoid using higher voltages or currents. Consult with a TV repair expert or similar on your design before starting. DO NOT TOUCH ASSEMBLED CRTs. Let the TV repair person do it. She'll have parts anyway.
That's not my understanding of how down-converters work.
Rather, there's a big fat output capacitor that the load is connected to, and you keep topping off its charge with a MOSFET gated by a feedback loop that monitors the capacitor's voltage and actively adjusts the PWM duty cycle to keep the capacitor charged at the desired voltage regardless of what the load does. If you your input is 100V and your desired output is 10V, you just keep charging a capacitor to 10V, disconnect when it gets to 10V, and keep repeating that at hundreds of kHz, faster than the load can appreciably drain the capacitor. Inductors and diodes are "optional", but added to absorb current spikes. Their main principle doesn't rely on induction though.
Boost converters, on the other hand, rely on inductors to achieve higher output voltages than the input.
Right. I've mostly dealt with up-converters, which have to store and release energy somewhere.
By slope, you mean rate of change (over time)?
(Although going 5V->120V with USB as the power source, I can understand how "dead short" was a decent intuition)
Right. Which is why under-designed AC-line powered power supplies can catch fire. The failure mode of MOSFETS is usually to the "on" state, so the switch staying on is quite possible.
The problem with fires isn't the type of circuit per se, but rather that anything connected to the mains can unleash a significant amount of power. And that designing/building for safety increases cost, for additional components or even things like larger PCB area for creepage. We basically take a lot of the work that goes into electrical safety for granted.
Ben Eater also did a nice introduction to charge pumps by building a simple one on a breadboard: https://www.youtube.com/watch?v=4alV5LzHLE4&t=704s
There's one specific sub-type called a Cockroft-Walton voltage amplifier.
https://circuitcellar.com/resources/quickbits/cockcroft-walt...
Cockcroft went on to great acclaim for "Cockcroft's Folly".
They've downsized to a Tesla coil.
Something else stuck in my head from that museum was the Operation Lifesaver displays around the model train exhibit. I think my dad was a little freaked out by how many times I wanted to watch the video of the train hitting a car.
Honestly, I'm a little disappointed every time I visit a museum because of how much fun I had at MSI as a kid. I think a lot of that was from being a kid, but ... good museum.
You might be doing a short through some parasitics for a bit, but in the ideal case, you're not.
The new chips typically do soft start on their own, the problem is you need input caps, which really are a dead short when first connected.
Which wouldn't normally be an super big issue with small ceramic capacitors, except the cable inductance forms an accidental boost converter that wants to give your actual converter a voltage spike.
Q2-R5 is not the inrush current limiter. The inrush current limiter is U2. That's an AP2553W6.[2] That's a part designed to solve a specific problem - plugging into a USB port. USB port ICs have overcurrent detection which will quickly turn off power from the port if you try to pull too much power. This keeps external devices from pulling down the +5 rail in a laptop or pad with limited power available. The port turns off until reset. (On Windows this used to take a reboot; Linux usually resets if you close and open the device.)
So if you plug in something with a large filter capacitor, the inrush current as the capacitor charges can momentarily cause an overcurrent condition and shut the port down. The AP2553W6 has both a linear regulator and a switch. When everything is good, the switch is closed and power flows through. If there's a momentary overload, it current limits. If there's a steady overload, it cuts power.
Devices which don't do this power startup properly are often the cause of problems mentioned in searches for "USB port stops working". Not doing this properly saves about $0.25 in parts cost in volume. Such devices will work fine plugged into a USB charger or a desktop machine, but may shut down a USB port on a laptop or tablet.
(This is for USB-A. USB-C is more complicated.)
[1] https://github.com/John-Nagle/ttyloopdriver/blob/master/boar...
[2] https://www.diodes.com/assets/Datasheets/products_inactive_d...
Yes I'm looking for a device family that can do exactly that, but for a large range of currents and voltages (48V, 5A max). Preferably with just two terminals.
Those are safety devices. If you're worried about a sudden load introducing a glitch on the 48VDC rail, you may need faster response. It wouldn't have worked in my application, because I need something that will current limit before the overload detector at the power source end trips.
Here's a bigger current limit switch.[2] Versions are available that can handle 48VDC 5A. Texas Instruments calls it an "e-fuse". Not two-terminal, though; it needs some external resistors and caps, plus a connection to ground. Turns off in 280 nanoseconds on a short circuit. This is functionally similar to the part I used, but for higher voltages and currents in industrial applications. TI has many useful tech notes available.
[1] https://community.element14.com/technologies/experts/b/compr...
In some applications you can also use almost any linear voltage regulator - put a resistor between your linear regulator's ground and output pins, and you'll get a constant current.
Of course if your application involves the amount of power dissipation that requires a heatsink, you'll probably end up with a discrete component for that anyway :)
I just fixed up a 1972 Honda motorcycle, and when I took the cover off the ignition point it was fascinating looking at that whole system, so simple and easy to fix.