[HN Gopher] The magic of DC-DC voltage conversion (2023)
       ___________________________________________________________________
        
       The magic of DC-DC voltage conversion (2023)
        
       Author : _Microft
       Score  : 350 points
       Date   : 2024-09-11 03:53 UTC (19 hours ago)
        
 (HTM) web link (lcamtuf.substack.com)
 (TXT) w3m dump (lcamtuf.substack.com)
        
       | crote wrote:
       | > Between the resulting thermal management issues and reduced
       | battery life, linear regulation is seldom worth the pain.
       | 
       | I'd argue the exact opposite. The article is targeting
       | "enthusiasts", and a _very_ large portion of enthusiast projects
       | are going to be powered by a 5V USB charger and consume in the
       | order of a few 100mA of power.
       | 
       | LDOs are dirt cheap, widely available, have pretty decent output
       | characteristics, and incredibly easy to use. If you have
       | basically unlimited 5V and want 100mA of 3.3V, why _not_ use one?
       | 
       | On the other hand, buck converters require you to actually do
       | some actual engineering. You can't just haphazardly throw in a
       | single IC and expect it to work flawlessly on your first try. You
       | either have to use an (expensive!) fully-integrated module, or do
       | a decent bit of math and part sourcing yourself. Neither option
       | is exactly attractive to a hobbyist building a fairly simple one-
       | off PCB.
        
         | quacksilver wrote:
         | Linear regulation is also very good when you have situations
         | where you want to avoid generating unwanted noise or stray RF.
         | 
         | Cheap buck converters are very noisy and annoying if you are
         | building an audio or radio related project, or have such things
         | nearby.
        
           | f1shy wrote:
           | In my experience, not only noise in the RF sense, but also
           | audible. I put together a little audio amplifier, and the
           | sound of the DC/DC makes it unusable in quiet situations. The
           | 12kHz (coming physically from the converter, amplifier off)
           | really hurts the ears!
        
             | arghwhat wrote:
             | That's magnetostriction, components under switching load
             | (caps, inductors) need to be secured in place with an
             | appropriate glue/putty.
             | 
             | Using a higher switching frequency can also help, plenty to
             | choose from.
        
               | schoen wrote:
               | Can that also help with the emanations security issue
               | where an adversary might be able to extract usable data
               | from the audio produced by the electronic components?
        
               | mschuster91 wrote:
               | TEMPEST and other side-channel hardening is _hard_ to do
               | if you lack access to anechoic /RF isolated chambers,
               | sensitive scopes/microphones and knowledge.
        
               | kragen wrote:
               | yes, but the audio usually doesn't travel as far as the
               | rf; you'd almost have to be in a situation where the
               | adversary can't put equipment near you but has managed to
               | subvert a microphone
        
               | foldr wrote:
               | The usable data would just be "DC-DC converter is
               | on/off". In theory, if the converter uses a variable
               | frequency or duty cycle, you might be able to extract
               | some information about that too. But that's not very
               | interesting.
        
               | arghwhat wrote:
               | A DC-DC converter always uses a variable duty cycle to
               | maintain the target output voltage (or for CC, current).
               | Without it, the voltage would vary wildly depending on
               | load.
               | 
               | For something like an audio amplifier, obtaining precise
               | power supply load would in turn give you a curve over
               | amplifier load, which effectively gives you the speaker
               | amplitude. Input caps and filtering will likely remove
               | the high frequency components entirely, but you might be
               | able to construct at least part of the played waveform.
        
               | foldr wrote:
               | All good points. I would say that it's a fairly
               | outlandish scenario where you are (i) close enough to the
               | device to listen to the caps whining but (ii) can't
               | measure actual voltages within the circuit (which could
               | be a lot more informative) and (iii) can't just listen to
               | the audio output of the device directly.
        
               | arghwhat wrote:
               | Acoustic noise is one thing, but it's not at all
               | outlandish to be within range of the EMI emitted from the
               | same power supply which tells the same tale. What _is_
               | outlandish is thinking anyone bothers listening in. :)
        
               | arghwhat wrote:
               | The noise would correlate with load, but this is the
               | _least_ of your worries.
               | 
               | Unless you have a proper RF testing lab and skilled EMC
               | engineers at your disposal, the only thing you can do is
               | stuff everything into a properly designed faraday cage.
        
             | jimmyswimmy wrote:
             | The other answer about magnetostriction is technically
             | correct (the best kind) but Misses the actual cause, which
             | is subharmonic oscillation. This occurs when you have not
             | stabilized your control loop properly and is often the
             | result of inadequate phase margin. A simple fix may be to
             | allow the control bandwidth by increasing capacitance at
             | the work amplifier output. But this may also make the
             | response too slow.
             | 
             | For most people designing DCDC converters, this is the most
             | difficult part to understand and correctly tune. If you get
             | the parts selection right and carefully lay out the
             | circuit, this is the one that they can't get right. It
             | takes some understanding of control theory or careful
             | testing and tweaking. And it's what drives a lot of folk to
             | the expensive and relatively inflexible power modules.
        
               | megous wrote:
               | Noise can also come from pulse-skipping mode of
               | regulation, if you draw too little power from the DC-DC
               | converter, and can go away under higher load.
        
           | Animats wrote:
           | > Cheap buck converters are very noisy and annoying...
           | 
           | Yes. This is why the good ones have more parts. It's a
           | totally fixable problem, and the parts cost to fix it isn't
           | high, but it takes extra engineering effort.
        
             | shiroiushi wrote:
             | All true, but for a hobbyist it probably isn't worth it if
             | their goal is to just build some little audio project.
        
             | atoav wrote:
             | You are right. Yet, if you asked me how to get less noise
             | on your audio circuit the LDO is the easier answer that
             | will cost you less time to implement and likely give you
             | the superior result.
             | 
             | Especially for beginners without a ton of measuring
             | equipment and experience having potentially bursty high
             | frequency components in series can be an interesting way to
             | not get the thing they were planning done, but instead have
             | to deal with an entire new set of problems whose existence
             | they didn't even know about.
             | 
             | Technically you are correct, but "just slap a LDO on it" is
             | probably the better advice.
        
               | Animats wrote:
               | Agreed. I had to learn a lot to build one. I had an
               | application so unusual (driving antique teletype machines
               | from a laptop) that I had to do a unique design. For most
               | low-volume applications, it's not worth the trouble.
        
         | roaringraster wrote:
         | And 3.3/5 is approximately 66% efficiency, which isn't too
         | horrible. So even if you get your buck converter working,
         | getting those 95%+ efficiency numbers you see in datasheets out
         | of the circuit is not trivial.
        
         | _fizz_buzz_ wrote:
         | If you have 5V and have to step down to 3.3V using an LDO is a
         | very reasonable choice (at 100mA you have about 170mW losses).
         | However if you have e.g. 24V and need to step down to 3.3V, an
         | LDO can get annoyingly hot (at 100mA you now have over 2W
         | losses). But I agree, this is really a "it depends" situation.
        
         | michaelt wrote:
         | _> On the other hand, buck converters require you to actually
         | do some actual engineering. You can 't just haphazardly throw
         | in a single IC and expect it to work flawlessly on your first
         | try._
         | 
         | It used to be a hassle a few years ago - but these days you can
         | haphazardly throw in a R-78K3.3-0.5 - which has the pinout of a
         | classic three-pin 3.3v linear regulator, but it's actually an
         | 80% efficient DC-DC converter with 500mA output and an input
         | range that goes up to 36v.
         | 
         | That's enough current even if you've got something like an
         | ESP32 that needs 250mA - and for any type of hobby project, the
         | $2.40 is fine.
        
       | progbits wrote:
       | I can highly recommend the MIT 6.622 Power Electronics course
       | recently released on OCW:
       | 
       | https://youtube.com/playlist?list=PLUl4u3cNGP62UTc77mJoubhDE...
       | 
       | https://ocw.mit.edu/courses/6-622-power-electronics-spring-2...
       | 
       | Prof. David Perreault is excellent. While the course gets into
       | pretty advanced topics that simply won't matter unless you are
       | designing multi-kW systems, it covers all the fundamentals and
       | builds understanding from ground up so you will know what makes
       | sense to use and when.
        
         | kleiba wrote:
         | Thank you!
         | 
         | I was just going to ask about recommended resources for getting
         | into electronics. I've never been able to find anything that I
         | personally found useful - often times, introductury courses are
         | too basic and slow to keep me focused, or they lack exercises
         | or are too theoretical, etc.
         | 
         | There are many hobbyists who have learned all that stuff and
         | can design and implement their own circuits (say, audiophiles
         | or model train enthusiasts), so obviously they have all been
         | able to get there. But I have never managed to learn anything
         | about electronics, although I would really like to.
        
           | progbits wrote:
           | Yeah it can be hard. As a self-taught hobbyist I've found a
           | mix of university courses (not whole curriculum, just pick
           | and choose and don't feel bad fast-forwarding over some of
           | the math theory), books (art of electronics, practical
           | electronics for inventors), and high quality youtube channels
           | (eevblog, phil's lab, robert feranec, microtype engineering)
           | to be a good way to learn.
           | 
           | Also eevblog forums are great. I don't post much but just
           | reading through the discussions you get a lot.
           | 
           | My greatest annoyance is the flood of very low quality
           | Arduino tutorials everywhere that polute the search results.
           | Not to be ungrateful, Arduino got me into the hobby, but if
           | you just learned about resistors last week the world doesn't
           | need your blogpost on how to connect it to a breadboard.
        
             | Max-q wrote:
             | You probably know about this already, buy in case you
             | missed it: The Arts of Electronics is a wonderful book on
             | electronics, starting from zero, ending up at bachelor
             | level EE.
             | 
             | I was introduced to the second edition (silver) when I
             | attended college in the late 90s, and have later upgraded
             | to the third edition (gold). It also has a companion book
             | with more exercises and lab experiments.
             | 
             | For everyone that wants to learn EE, it is highly
             | recommend. Just beware: there are fake copies for sale on
             | Amazon, so be sure you get a genuine copy.
        
           | tzs wrote:
           | The MITx version of MIT's 6.002, "Circuits and Electronics",
           | is excellent. Its on MIT's OpenCourseWare [1], and on EdX
           | where a session is starting today [2]. The EdX is divided
           | into three parts, and that is part 1. Here are parts 2 [3]
           | and 3 [4].
           | 
           | Caveat: when I took it at EdX the textbook was available
           | online for free during the course, and it is an excellent
           | textbook that I found very useful. That was back when all the
           | MOOC platforms weren't too worried about monetization.
           | 
           | Now the textbook is only free online for people enrolled in
           | the "verified certificate track" of the course, which is
           | $189. The book is $64.97 for the paperback or DRM-free PDF
           | [5]. I'm not sure how well the course works without the book.
           | 
           | [1] https://ocw.mit.edu/courses/6-002-circuits-and-
           | electronics-s...
           | 
           | [2] https://www.edx.org/learn/circuits/massachusetts-
           | institute-o...
           | 
           | [3] https://www.edx.org/learn/circuits/massachusetts-
           | institute-o...
           | 
           | [4] https://www.edx.org/learn/electronics/massachusetts-
           | institut...
           | 
           | [5] https://shop.elsevier.com/books/foundations-of-analog-
           | and-di...
        
             | creeble wrote:
             | Most of the course in link[1] is available on YouTube as
             | well.
        
         | tecleandor wrote:
         | What's the starting level? My electronics knowledge is very
         | basic and I'd like to start "designing" some simple power
         | circuits.
         | 
         | I know the basics of resistors, diodes, capacitors,
         | transistors... And I could explain the most simple classic
         | power supply: transformer, full wave rectification, capacitors
         | and so on. I've built basic digital circuits (LDO + arduino/ESP
         | + leds and stuff) and know some basic physics. I'm good
         | soldering, though :D
        
           | EricE wrote:
           | Checkout bigclivedotcom on youtube - he reverse engineers
           | circuits all the time in entertaining and accessible ways; a
           | great way to learn through practical applications.
        
           | detourdog wrote:
           | MIT I think always starts from first principals. If one can
           | understand and not do math that is generally enough. I have
           | taken many MIT OCW classes and I'm completely uneducated.
        
         | nraynaud wrote:
         | funny, it got recently suggested to me too. I really feel like
         | youtube is not individualizing the recommendations.
        
       | hcfman wrote:
       | I've been working with audio recently and found so many of the
       | devices that convert 3.7V to 5V for example inject noise into the
       | rail that make's it in the microphone input source.
       | 
       | The battery support from pisource does this terribly. But so do
       | many battery sources. It's not just microphones that get
       | affected, but also other sensitive sensors like accelerometers.
       | 
       | I hope that other people making DC-DC convertors put some effort
       | into making sure the supply is so clean so as to prevent this in
       | future.
        
         | euroderf wrote:
         | Isn't this like 95% fixable with a capacitor ? Aren't there
         | cables with small embedded caps ?
        
           | dragontamer wrote:
           | Oh hell no.
           | 
           | I think a lot of people are overly cautious of DC-DC
           | conversion in this topic, but you've gone full-tilt in the
           | opposite direction and are severely underestimating the
           | problems that occur.
           | 
           | 1. Its not "power-conversion" that's hard per se, its EMC
           | that's very hard and not taught very well at a bachelor's
           | level.
           | 
           | 2. DC-DC Voltage Converters usually handle the entirety of
           | your board's power, meaning they are the highest power
           | component.
           | 
           | 3. High power and high-frequency is a difficult EMC problem.
           | This means that a bad design will absolutely send your
           | electrons / energy out and radiate out like an antenna. And
           | if things on the same board pick it up, it will be called
           | crosstalk. And if things off-board pick it up, its called
           | electromagnetic interference which almost certainly leads to
           | a compliance problem.
           | 
           | ---------------
           | 
           | 1. Hobbyists don't care about compliance. So bam. We are
           | already dealing with the biggest problem by simply not caring
           | about it. (Maybe you can care and go into deeper studies,
           | but... if you're a beginner just don't care. Learn this very
           | difficult stuff later).
           | 
           | 2. Prevent crosstalk by following good board design rules:
           | have a 4-layer board. Use Power+Signal / GND / GND /
           | Power+Signal stackup. Use two vias (one for signal-1 to
           | signal-4 traversals), and a 2nd via for GND2 to GND3
           | traversal of the return current). Thinking of both the
           | forward current and a tightly bound reverse current is
           | basically all you need to do to avoid difficult crosstalk
           | problems on board.
           | 
           | Done.
           | 
           | Point#2 requires deeper studies than is typical in bachelor's
           | level electrical engineering. But it truly isn't very
           | difficult once you learn the theory. Tight ground-planes
           | reduce crosstalk (and EMI problems), and furthermore thinking
           | of the return-current explicitly prevents problems.
           | 
           | Now you could have some truly difficult "ringing" from trace
           | inductance and other such nasty problems... but that tends to
           | occur beyond 100MHz. I'm thinking most beginners are going to
           | be under 20MHz for most of their designs and thus never deal
           | with those advanced "PDN" / Power Delivery Network problems.
           | 
           | Though if you do go into PDNs, its obviously a tough subject
           | with huge amounts of study and reading involved. But most of
           | the problems truly are at very high frequencies and/or at EMI
           | compliance. Beginner Hobbyists avoid the most difficult
           | issues entirely by nature of beginner (aka: low-speed) and
           | hobbyist (and therefore don't have to follow regulators).
           | 
           | ----------
           | 
           | I'm not a professional. But my understanding is that top-
           | level EEs who work on PDNs will simulate the circuit-board
           | itself to figure out trace inductances / capacitances in the
           | board itself. (Closer planes of ground/power will create more
           | capacitance. Long traces tend to increase trace inductance,
           | etc. etc.). And tight simulations are the only way to truly
           | understand the PCB and how it interacts at high frequencies
           | with high-power.
           | 
           | But such methodologies are gross overkill for a 1MHz boost
           | converter with a pre-made PCB Layout, and a list of
           | capacitors + inductors already picked out for you. (ex:
           | https://www.microchip.com/en-us/product/mcp1640)
           | 
           | Seriously: Page 17 (https://ww1.microchip.com/downloads/aemDo
           | cuments/documents/A...) already gives you the PCB-layout you
           | need for this, with recommended components. Don't overthink
           | it, just copy the design from the document.
        
             | Max-q wrote:
             | We have a couple of challenges today. Hobbyists often go
             | over 20MHz, because they put WiFi, BT or USB on their
             | boards, giving EMC issues. Also, the speed of the modern
             | ICs tend to be very high. If you have a 9600 Hz UART
             | signal, that is not a 9600 Hz signal if it's a square wave
             | with a modern IC with very short rise time on the pins. So
             | a good old, slow serial line can with modern MCU emit noise
             | up in the hundreds of MHz range.
             | 
             | So your PCB layout tips are important, even on slow
             | circuits these days.
        
               | dragontamer wrote:
               | Unless a beginner plans to sell a design on the public,
               | there is no EMC (compliance) issue.
               | 
               | Maybe EMI crosstalk. But WIFI and BT are supposed to
               | eminate out like a radio and jump across boards. That's
               | the point.
               | 
               | ---------
               | 
               | USB is a matched impedance differential pair. Are
               | beginners really running high speed USB differential
               | pairs down their circuits today?
               | 
               | Because that's a really.... Erm.... strange....
               | definition of a beginner. IMO anyway.
        
               | archi42 wrote:
               | Depends on your definition of beginner. It's trivial to
               | put a nrf52 module (like [1]) in a PCB design and wire a
               | USB socket to it; just make sure to route the data lines
               | as a differential pair in kicad (add protection diodes if
               | feeling fancy). And speak a little prayer that it
               | actually works as intended. No need to understand what
               | any of that means.
               | 
               | Of course the notion of using such a module might be a
               | step up from beginner for you, but IMHO it's more about
               | the understanding. But I agree that there is no definite
               | definition.
               | 
               | Disclaimer: I'm a beginner by my definition.
               | 
               | [1] example module:
               | https://www.waveshare.com/core52840.htm
        
             | Youden wrote:
             | > Use Power+Signal / GND / GND / Power+Signal stackup.
             | 
             | I'm just a novice (maybe intermediate) so I'm wondering:
             | the common 4-layer stackups available to hobbyists seem to
             | be 1oz/0.5oz/0.5oz/1oz and I assume the outer layers have
             | better thermal dissipation since they're only kept from the
             | air by solder mask; so wouldn't it be better to put
             | power/ground on the outer layers and keep signals in the
             | middle?
             | 
             | Also maybe I'm weird and this is pointless but I typically
             | put a filled copper zone tied to ground on every single
             | layer, unless I have a reason to put some other kind of
             | zone in a particular area. Is it necessary to have a full,
             | dedicated ground plane, rather than ground + signal or
             | ground + power?
        
               | dragontamer wrote:
               | Ground fill is counterproductive on the signal layer.
               | 
               | If you accidentally get the return path on layer1 or
               | layer4 instead of the designated layer2 or layer3, you've
               | created noise.
               | 
               | Power+Signal / GND / GND / Power+Signal is about
               | consistency and braindead-easy tracking of return paths.
               | The return path for layer1 is always layer2. The return
               | path of layer4 is always layer3.
               | 
               | Keeping track of both the forward signal (or power line)
               | and the reversed return current (which was electrically
               | induced onto the nearest reference plane) stops working
               | if suddenly you have random reference ground-fill planes
               | on the layer1 or layer4.
               | 
               | DO NOT put GND on layer1 or layer4 if you're doing this
               | methodology.
               | 
               | ---------------
               | 
               | Beginners likely aren't working with a hot enough circuit
               | where thermal dissipation is an issue. If you do have
               | thermal dissipation then I guess thermal ground on layer1
               | and layer4 ties with thermal vias will be needed.
               | 
               | In practice, the thermal resistance across the PCB cross
               | section is better than beginners expect anyway. Thermal
               | conductivity is just one attribute, the other attributes
               | of heat movement are distance and cross sectional area.
               | 
               | So the shape favors you up and down the PCB. Yes the
               | fiberglass has worse thermal conductivity but you win on
               | shape.
        
               | aaronmdjones wrote:
               | > so wouldn't it be better to put power/ground on the
               | outer layers and keep signals in the middle?
               | 
               | Signals must never cross a break or split in the plane
               | they're referencing (usually 0V or ""ground""). This
               | creates huge EMI problems. Your proposal would have
               | signals on layer 2 crossing a split in the ground plane
               | on layer 1 (that split caused by power traces).
               | 
               | Some interesting material on the subject:
               | 
               | https://www.youtube.com/watch?v=ZYUYOXmo9UU
               | 
               | https://www.youtube.com/watch?v=QG0Apol-oj0
               | 
               | https://www.youtube.com/watch?v=ySuUZEjARPY
               | 
               | https://www.youtube.com/watch?v=0RyBCnowLsI
        
               | dragontamer wrote:
               | All of those videos are great.
               | 
               | I'd start with this one specifically:
               | https://www.youtube.com/watch?v=ySuUZEjARPY . (Your 3rd
               | link).
        
           | magicalhippo wrote:
           | As the sibling comment mentions there are several aspects.
           | 
           | You'll need proper input filtering which may require a non-
           | trivial filter network. You'll also need proper output
           | filtering, which does include slapping a lot of capacitors on
           | there, but also careful selection of those capacitors both
           | type and size. Parasitic inductance of larger packages can
           | mean they can't filter high frequencies, and MLCC capacitors
           | have a DC bias which means the effective capacitance is
           | significantly reduced when they have a DC bias on them which
           | they will have in a DC-DC converter.
           | 
           | Then you need to take great care about component placement
           | and board layout, to minimize the return path of the currents
           | and such.
           | 
           | You can skip all of that and get a board that functions as a
           | DC-DC converter if you measure it with a multimeter, but
           | actually be horrible. And you just can't fix bad layout by
           | slapping more capacitors on there. And even with a not
           | terrible layout, you can't fix it by using the wrong kind of
           | capacitors. Like anything through-hole is just not gonna
           | pass.
        
         | klysm wrote:
         | Making a noise-free DC-DC converter is very difficult. Any
         | buck/boost style converter is going to introduce ripple and
         | switching noise into the system. This is inherently
         | unavoidable, and it's very sensitive to the layout of the
         | board. Actively or passively filtering out all this broadband
         | frequency content is far from trivial, and there is no general
         | solution - only a large, high dimensional tradeoff space.
         | 
         | You're right that noise is a concern for any analog circuitry
         | though, and if you want to, you can spend a lot of money on
         | specialized DC/DC converter modules with integrated inductors
         | that do their best to eliminate this noise.
        
       | exar0815 wrote:
       | I do work in automotive EMC testing and it's nearly always the
       | voltage conversion at fault when you fail tests or influence
       | other devices.
       | 
       | Buck-Boost converters are a noisy and finicky thing, and not easy
       | to debug if you use a monolithic IC from the cheapest vendor.
       | Quite annoying discussions.
        
       | Animats wrote:
       | DC-DC converters are hard, but fun. The basic concept is that
       | when you put current through an inductor for a while, then
       | disconnect it, you get a big voltage spike. That's a classic auto
       | ignition system. You can put that spike through a diode and use
       | it to charge a capacitor to get DC out. The neat thing about
       | switching power supplies is that there's very little resistance
       | in the power path. That's why the efficiencies are so good. The
       | not-neat thing is that they are a dead short across the input for
       | part of the cycle, which is why failures can cause fires and why
       | you may need an inrush current limiter and/or a fuse.
       | 
       | 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...
        
         | rkagerer wrote:
         | Can't you also charge up capacitors then slam them together in
         | series? Is there a name for that kind of supply?
        
           | caf wrote:
           | Yes, it's called a charge pump.
           | 
           | There's one specific sub-type called a Cockroft-Walton
           | voltage amplifier.
        
             | pfdietz wrote:
             | They won the Nobel prize using this invention (which wasn't
             | theirs).
             | 
             | https://circuitcellar.com/resources/quickbits/cockcroft-
             | walt...
             | 
             | Cockcroft went on to great acclaim for "Cockcroft's Folly".
             | 
             | https://www.bbc.com/news/uk-england-cumbria-29803990
        
           | hakonjdjohnsen wrote:
           | This is known as a charge pump, and is the third concept
           | described in the linked article. The article only mention one
           | flying capacitor, but you can use more than one and connect
           | them in series to get a higher multiple of the input voltage.
           | 
           | 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
        
           | Animats wrote:
           | The high voltage version of that is called a Marx generator.
           | The Museum of Science and Industry in Chicago used to have a
           | million volt Marx generator made by General Electric. The
           | parallel to series switching was mechanical. The "crack" when
           | it fired echoed through the whole building.
           | 
           | They've downsized to a Tesla coil.
        
             | jrockway wrote:
             | I know exactly what you're talking about! I used to go
             | there so often as a kid and definitely remember the crack.
             | (Also nearby was that exhibit where you could perform
             | electrolysis on some water. It had a "push to start" button
             | that was activated by touching some glass with a button
             | outlined by a red decal. I still don't know how that
             | works.)
             | 
             | 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.
        
         | amelius wrote:
         | I see you made a current limiter from a mosfet + resistor. I
         | wonder if there are ready-made components that do the same, and
         | also monitor overheating. Maybe not necessary in this case
         | (because you're only limiting the inrush current, not a
         | continuous current). There are current-limiting diodes but as
         | far as I've seen they are only available for smaller currents.
        
           | michaelt wrote:
           | You can get single-chip current limiters for LED driver
           | applications. A CL2N8-G for example.
           | 
           | 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 :)
        
             | amelius wrote:
             | Let's say I have a voltage source of 48V, and I want to
             | limit current in my system to 4.5A, precisely, and with
             | overheating protection. I could be wrong but I don't think
             | the led-driver and voltage regulator solutions would fall
             | in this range. Also, a heatsink would not be required if
             | the duration in which the current needs limiting is small.
        
           | Animats wrote:
           | Oh, you mean Q2-R5 in [1]? That was a late addition, and yes,
           | it's a linear current regulator using a depletion-mode
           | MOSFET. I did that because I didn't want to change the board
           | layout much and it only took two components. Others have
           | built this device, and having good protection circuitry means
           | it works for them, not just me.
           | 
           | 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_inactiv
           | e_d...
        
         | petertodd wrote:
         | > The basic concept is that when you put current through an
         | inductor for a while, then disconnect it, you get a big voltage
         | spike.
         | 
         | 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.
        
           | Terretta wrote:
           | DISCLAIMER: Described for entertainment value only. Some
           | details omitted. Don't try this at home!
           | 
           | 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.
        
             | PopAlongKid wrote:
             | Way, way back, when I was in fifth grade, my dad (who was
             | part owner of a car repair shop) brought an ignition coil
             | (the old kind, that was connected to a distributor for the
             | spark plugs) into the classroom, and I guess a 12-volt car
             | battery. All 25 of us students held hands in a large circle
             | and got the jolt. this was part of the teacher's ongoing
             | study of electricity, which also involved winding wire
             | around a hollow cardboard cylinder to make a magnetizer/de-
             | magnetizer tube.
        
               | Terretta wrote:
               | Yes! And same age when my dad taught me 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_inductio
               | n
               | 
               | 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.
        
               | chrisdhoover wrote:
               | 7th grade shop class. We all held hands and teacher crank
               | an old telephone generator
        
             | sfilmeyer wrote:
             | I initially misread this as you proposing using a car
             | battery rather than a 9 volt battery, which sounds like a
             | much less fun party trick.
        
           | dheera wrote:
           | > 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.
           | 
           | 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.
        
         | kosma wrote:
         | That voltage spike only applies to flyback converter. Your
         | typical buck/boost converter doesn't do that - the current
         | waveform is a sawtooth, and voltage ripple is designed to be in
         | the mV range.
        
         | mindslight wrote:
         | DC-DC converters are not a "dead short across the input for
         | part of the cycle" in normal operation - rather the voltage is
         | across the inductor. If the switch stays on too long and the
         | inductor reaches its saturation current, or one of the many
         | other (cascading) failure modes, _then_ can you end up with
         | effectively a short across the input. This can happen to many
         | kinds of electronics (eg a simple tantalum decoupling cap, or
         | an IC 's SCR latchup), but designing the power topology is a
         | good place to think about these failure modes.
         | 
         | (Although going 5V->120V with USB as the power source, I can
         | understand how "dead short" was a decent intuition)
        
           | Animats wrote:
           | > DC-DC converters are not a "dead short across the input for
           | part of the cycle" in normal operation - rather the voltage
           | is across the inductor. If the switch stays on too long and
           | the inductor reaches its saturation current, or one of the
           | many other (cascading) failure modes, then can you end up
           | with effectively a short across the input.
           | 
           | 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.
        
         | retrac wrote:
         | I think of it as synthesizing a sine wave (AC power) with DC
         | pulses, using an inductor or capacitor for smoothing. The
         | result is then rectified back to DC.
        
       | 3dGrabber wrote:
       | There exists an interesting connection between Boost Converters
       | and Hydraulic Rams [1]. A Hydraulic Ram is device that can pump
       | water from a stream to a higher location by harnessing the
       | kinetic energy of the stream, no other power source required.
       | 
       | The equations for the two devices are essentially the same, only
       | the units change.
       | 
       | 1 https://en.wikipedia.org/wiki/Hydraulic_ram
        
         | agumonkey wrote:
         | I love analogies between fields like this.
        
           | nraynaud wrote:
           | There is a whole area of multi-domain simulation, where the
           | simulator seamlessly jumps from one form of energy to another
           | as long as the units match. I have always loved that.
        
             | agumonkey wrote:
             | oh nice
        
             | 3dGrabber wrote:
             | Modelica comes to mind.
             | 
             | https://media.springernature.com/lw685/springer-
             | static/image...
             | 
             | https://en.wikipedia.org/wiki/Modelica
        
           | SoftTalker wrote:
           | Water flows in pipes, valves, etc. concepts transfer to a lot
           | of basic electrical circuits and concepts. E.g. voltage is
           | analogous to pressure. Current is analogous to the volume of
           | water flowing. Bigger pipe (wire) can carry more current.
           | Valves are like switches or resistors. It works to de-mystify
           | concepts for kids who have no concept of what electricity is
           | but can think about water flowing in a pipe.
        
             | agumonkey wrote:
             | The base analogy working is cool but that other mechanisms
             | on top also work similarly is what amazes me.
        
               | ssl-3 wrote:
               | Circuitry (both digital and analog, including entire
               | computers) can be built using hydraulics. Complex parts
               | like logic gates, oscillators are present, but also
               | "passive" things like accumulators, resistors, and valves
               | -- it's all there.
               | 
               | They work in about the same way as electronic circuits
               | do.
               | 
               | (But it's almost always less expensive to push
               | electricity around than it is to push liquid around, and
               | the parts are a lot smaller, so obviously electronic
               | circuits are the usual winner.
               | 
               | Nonetheless, hydraulic circuits are still pretty common:
               | See, for example, the valve body of an automatic
               | transmission such as (mostly?) electronics-free 700R4.)
        
               | mystified5016 wrote:
               | Also the signal propagation speed in a fluid system is
               | limited to the speed of sound in that fluid, vs ~c in
               | electric circuits
        
         | wrycoder wrote:
         | Current is analogous to momentum, because electron drift has
         | net momentum.
        
       | mikewarot wrote:
       | I've learned that the magic search word for 150ish volt boost
       | converters is "Nixie".
       | 
       | My friend needed that voltage for a Geiger counter B+ battery
       | replacement.
        
       | moffkalast wrote:
       | 96% efficiency sounds great on paper for synchronous converters,
       | but as SBC current draw just keeps increasing and BLDC motors can
       | run at higher voltages it starts to create a major heating
       | problem when you have to supply both from the same source.
       | 
       | Something like 12V down to 5V at 5A creates a managable amount of
       | heat, but going higher, 20V, 30V on the battery side and things
       | start to melt all around from heat losses from that large a drop.
       | In some cases I've had to resort to using cascaded rails,
       | stepping first down to 24, then 24 to 12 and then 12 to 5 just to
       | keep the heating spread between different buck converters even if
       | it multiplies losses. Would love to hear what the expert solution
       | is to this that isn't just a massive heatsink.
        
         | mschuster91 wrote:
         | > Would love to hear what the expert solution is to this that
         | isn't just a massive heatsink.
         | 
         | A smaller heatsink with active cooling and parallel MOSFETs. At
         | a certain power level, it's just physically impossible to rely
         | on convection cooling alone - just look at audio amps or your
         | average CPU/GPU... banks of MOSFETs, caps and inductors it is.
         | While the BOM part count may be higher, you need lower-
         | capability parts.
         | 
         | The danger is, you need to carefully grade and match the
         | MOSFETs, otherwise you risk them failing sequentially in a very
         | short time if you're operating too close to their rated current
         | - one burns out, the load distributes to the others, and then
         | they fail because they cannot handle the additional load (or
         | one fails into dead short instead of open, which instantly
         | kills all of the others).
        
         | posterboy wrote:
         | you forgot to mention it should fit under a thumbnail, probably
        
           | moffkalast wrote:
           | It would be a nice plus :P
           | 
           | Honestly the size isn't such a big deal, as long as it
           | doesn't weigh as much as two African elephants like the
           | average mains PSU of this amperage.
        
         | michaelt wrote:
         | You can get 48V DC -> 5V DC 6.5A converters that are 92%
         | efficient [1]
         | 
         | You're dissipating 25W from your SBC already. You can dissipate
         | the 2W from your DC-DC converter the same way.
         | 
         | [1]
         | https://www.meanwellusa.com/webapp/product/search.aspx?prod=...
        
           | moffkalast wrote:
           | > current range 0 ~ 6.5A
           | 
           | > Fuse recommended (5A)
           | 
           | I see they are very confident about going to 6A. These
           | ratings are often just "yeah it can technically do that but
           | it will reach 100 degrees during it", for any kind of stable
           | continuous draw you just have to halve the rating to be safe.
        
             | michaelt wrote:
             | If you want you can buy the next size up [1] giving you 11A
             | at 5V with the same 92% efficiency.
             | 
             | Of course, it'll still dissipate the same amount of power,
             | because 8% of 25W is still 2W.
             | 
             | [1] https://www.meanwellusa.com/webapp/product/search.aspx?
             | prod=...
        
               | moffkalast wrote:
               | That looks more like it (8A fuse), and relatively cheap
               | on Mouser too interestingly enough. Thanks for the heads
               | up I'll have to order and try one.
               | 
               | It does puzzle me why they went with the 2.54mm pin
               | layout though, those are rated for 3A max I think? So
               | even if the draw is perfectly split between the two vout
               | pairs they give it'll be melting at 6A already, probably
               | more like 5 if not.
        
               | michaelt wrote:
               | I know the pin looks small compared to the cable you'd
               | run to a wall socket for a 10A current - but those cables
               | are a lot longer these copper pins, and cables are sized
               | with the assumption the copper will be coated in
               | insulation then coated in another layer of insulation
               | then installed into a wall full of insulation.
               | 
               | A 10mm copper pin measuring 0.6mm x 0.6mm pin would have
               | half a milliohm of resistance. Even if you ran your
               | entire 5A load through a single pin, it would only have
               | to dissipate 13 milliwatts.
               | 
               | I'd be more worried about the PCB traces if I were you -
               | 2oz copper is only 0.07mm thick :)
        
       | ziofill wrote:
       | I'm a theoretical physicist and I swear electrical stuff is so
       | hard to understand! I have a lot of respect for electrical
       | engineers ^^' (and electricians)
        
       | mglz wrote:
       | For beginners it is super annoying that many tutorials say "there
       | is a magical switch or oscillator here which is integral to the
       | function of the boost converter, but we will not tell you how to
       | actually realize it". Additionally, that needs to work at the
       | voltage level you are starting out from and in many cases should
       | be galvanically isolated from the converter. This is _a lot_ to
       | keep in mind and it is actually not trivial.
       | 
       | The answer here is usually to find an IC that works at your
       | desired input voltage or to have a linear regulator provide a
       | small amount of power for the PWM generator. Also be wary of just
       | running with an AI generated answer. Claude 3.5 Sonnet suggest
       | you connect an Arduino straight to 230V and after some back and
       | forth generates circuits which contain strange elements like
       | "antiparallel diodes" which makes no sense.
        
         | posterboy wrote:
         | sounds like a spherical cow on a frictionless plane.
        
           | mglz wrote:
           | It is a very hairy cow, which likes to bite and is stuck in
           | the mud. Also it has a wierd high-frequency response. There
           | is a description of tractors to get it out, but we'll skip
           | how the controls work for now.
        
         | awjlogan wrote:
         | The TI Power Designer[0] is a great resource. Obviously it will
         | only show you TI parts, but it's very helpful to get a base
         | design. You can filter by complexity (roughly BoM count), size,
         | cost etc based on the parameters (input voltage range, output
         | voltage range, power etc). The designs usually have a reference
         | layout as well.
         | 
         | 0: https://webench.ti.com/power-designer/
        
           | mglz wrote:
           | Very convenient, thank you!
        
       | londons_explore wrote:
       | I have often wondered if ideas from a buck/boost converter could
       | be applied to a mechanical gearbox. Voltage and current in
       | electrical circuits (where voltage x current = power) is
       | completely analogous to torque and speed in mechanical shafts
       | (where torque * speed = power). Every electrical component has a
       | physical counterpart. Spring = capacitor. Inductor = mass with
       | momentum. Resistor = friction brake.
       | 
       | The goal would be a variable ratio gearbox using a fully
       | mechanical system, using a spring and a hammer type mechanism to
       | convert one torque/speed to another torque/speed.
       | 
       | This is already done in impact wrenches, but I would hope that
       | rather than having an impact rate of say 5 Hz, you have an impact
       | rate of 50 kHz or more, allowing a smooth conversion from one
       | speed to another.
       | 
       | Obviously, the difficulty is in the details - designing parts to
       | withstand 50k hammers per second for years of operating without
       | failing from fatigue.
       | 
       | Various other mechanical things already operate at high
       | mechanical frequencies. SAW filters vibrate things mechanically
       | at Ghz and don't suffer fatigue failures.
        
         | hwillis wrote:
         | You're overcomplicating it; you only need a single clutch and
         | in/out springs[1] to do this. If you're spinning at 4000 rpm
         | and your springs cover 6 degrees of rotation, then your clutch
         | needs to be able to actuate at 4000 Hz.
         | 
         | When the clutch is engaged, the engine-side springs compress to
         | supply the torque and match the speed difference. When it's
         | disengaged, the springs expand back out as it returns to engine
         | speed. The obvious problem is that clutches do not smoothly
         | click on and off like a transistor.
         | 
         | However there are more specialized devices that use stick-slip
         | dynamics like piezo actuators. Since there is a much more rapid
         | transition between "on"/"off", they can be very efficient and
         | allow relatively weak devices to exert very large forces.
         | They're just only able to take very small steps.
         | 
         | [1] Labeled 4 here: https://haynes.com/en-
         | gb/sites/default/files/styles/blog_lan...
        
           | londons_explore wrote:
           | > When it's disengaged, the springs expand back out as it
           | returns to engine speed.
           | 
           | What is _it_?
           | 
           | I think you need an intermediate flywheel, with springs and
           | clutches on each side. The intermediate flywheel's mass is
           | tiny, so might be formed by just the masses of the springs
           | and clutch mechanism.
        
       | kbouck wrote:
       | I want to power my 12V devices with USB PD. Looks like 12V is
       | optional in the spec and is supported only by some devices (eg.
       | UGREEN), and not by others (eg. Anker)
       | 
       | Given a USB PD power supply which supports 15V but not 12V, and a
       | usb-c/barrel-jack cable configured to negotiate for 15V, what
       | would be the simplest (yet safe) circuit i could add via barrel
       | jack to regulate the to voltage down to safe/consistent 12V?
       | 
       | is a simple linear voltage regulator (LM7812) sufficient? would i
       | need capacitors to smooth it out?
        
         | klysm wrote:
         | A 3V drop over an LDO is usually reasonable with low enough
         | currents. Some LDOs require capacitors to be stable, and it's
         | usually a good idea to have some capacitance on your power
         | rails anyway.
        
         | 15155 wrote:
         | The one important thing missing from your query here is:
         | 
         | How much current do you need?
         | 
         | If you need, say, >100A, the possible architecture looks very
         | different than ~1A or less.
        
         | _Microft wrote:
         | It might be cheaper to get a power supply that supports later
         | PD standards? E.g. IKEA is selling some cheap here for either
         | 8EUR (Sjoss, 1 USB-C port (max. 30W, up to 3A)) or 15EUR
         | (Sjoss, 2 USB-C port (combined power output of 45W, up to 3A,
         | also on a single port)). Both support PD 3.0 and PPS (that's
         | the fanciest PD standard that implements requesting arbitrary
         | voltages from the power supply) They also stock nice and cheap
         | USB-C cables. These power supplies work fine with USB-PD
         | trigger boards set to 12V.
        
       | cushychicken wrote:
       | A decent article, but there's a ton of misunderstanding in the
       | comment section.
       | 
       | For one thing: LDOs can be more efficient than buck converters,
       | especially at very low current consumptions. If you're drawing
       | sub 1 mA, like a battery powered system, an LDO is going to be a
       | more efficient step down converter, because it doesn't have
       | switching losses. Bucks are only better choices for stepping down
       | voltage at higher currents because the switching losses become
       | negligible.
       | 
       | Second: a ton of people here are vastly exaggerating the
       | difficulty of designing a step down buck converter. Integrated
       | designs from TI or analog devices will tell you all the
       | compensating components, output capacitor values, inductor
       | values, etc. for common step down output voltages. Most will
       | include reference layouts with a four layer six layer or even two
       | layer stack up for optimal performance. It's really not that hard
       | to get a one spin win out of most common buck designs.
       | 
       | Don't be afraid. Just follow the manual. You'll be fine.
        
       | minkles wrote:
       | Lots of things in here which kill me a little:
       | 
       | 1. You don't get a voltage spike when you disconnect an inductor.
       | The field collapses and induces a current. If you measure it
       | across a high impedance then it looks like a voltage spike. If
       | you measure it across a low impedance then it's not necessarily
       | much of a spike. Ergo depends on load impedance.
       | 
       | 2. SMPS designs are not necessarily noisier than linear power
       | supplies. It's always a design trade off. In fact you see SMPS in
       | all modern RF test gear which is generally far more sensitive and
       | has far more bandwidth than anything back when linear supplies
       | were common. Also there is a lot of noise coming off the diodes
       | in a basic bridge rectifier as well! Noise is a whole-system
       | design consideration that has to be made.
       | 
       | 3. Don't use any LLMs for designing circuits. Please go read a
       | book on it designed by experts, not stuff scraped from thousands
       | of idiots. I've seen some horrible stuff out there.
       | 
       | 4. I'm sure I'll come up with more over time.
        
         | hwillis wrote:
         | > If you measure it across a high impedance then it looks like
         | a voltage spike. If you measure it across a low impedance then
         | it's not necessarily much of a spike.
         | 
         | "Disconnect" implies an open circuit and high impedance.
        
         | Workaccount2 wrote:
         | This is really nit-picky.
         | 
         | The fundamental action of a boost converter is from the
         | inductors "voltage spike" behavior. The lowest noise linear
         | regulator is less noisy than the lowest noise smps.
         | 
         | I agree though that LLM's are not good at circuit design.
        
           | thehappypm wrote:
           | If you measure any voltage at low impedance, you'll suddenly
           | have a massive spike of current that will blow out your
           | fuses, drain your battery/capacitor/inductor, or blow your
           | measurement device
        
         | CamperBob2 wrote:
         | 5. Contrary to the article, FETs don't make suitable pass
         | transistors for Zener regulators that rely on Vgs being
         | relatively constant, the way Vbe is with bipolars. In fact,
         | even with a proper feedback loop, most FETs make awful series
         | regulators due to SOA limits.
        
       | marcodiego wrote:
       | A commonly used alternative in the microcontroller world is to
       | simply stack a few diodes. Very simple alternative which I have
       | seen being used a few times.
        
       | shellback3 wrote:
       | Interesting, but I had expected to see a comparison of generating
       | DC voltages using tubes, which were used in my university
       | Electronics course, with solid state. In those days to generate a
       | DC voltage from another DC voltage required generating an AC
       | voltage from the DC and then rectifying it.
        
       | stonethrowaway wrote:
       | Friendly warning to people who aren't electronics savvy: this
       | blog post is written in a "now draw the owl" sort of way. I'm not
       | sure who the audience is. Anyone who can read this stuff at the
       | level presented inherently knows most of this and then some.
       | Everyone else will need a book and that book will cover this
       | material as it's fairly fundamental and will derive equations
       | used in here as well so you can make sense of it.
        
         | anthomtb wrote:
         | Maybe the target audience is those with lapsed circuit theory
         | knowledge from undergrad and no hobby or professional power
         | electronics experience afterwards? Describing myself, of course
         | (most of icamtuf's stuff is up my alley, fwiw).
         | 
         | One would think the title including "DC-DC voltage conversion"
         | is enough of a squirrel-catcher to stop folks who either 1)
         | Know nothing about what it means or 2) know exactly how to do
         | it, from reading the article.
        
       | dgacmu wrote:
       | I've moved a lot of my home computing to home-brewed 12V UPSes
       | using these. LFP charger --> Battery --> 12V or 5V DC-DC buck or
       | boost/buck regulator --> device. Most UPSes are designed for high
       | wattage, short runtime, but things like my firewall or small
       | proxmox box for SDN+DNS benefit from low-wattage, long-runtime,
       | and getting the inverter out of the picture substantially
       | improves runtime. Said proxmox box uses under 10W and gets about
       | 20h of runtime from a $50 battery.
        
         | kijiki wrote:
         | What charger and battery did you use?
        
         | thehappypm wrote:
         | Does it outperform a $50 UPS?
        
       ___________________________________________________________________
       (page generated 2024-09-11 23:00 UTC)