How I leared what a decoupling capacitor is for, the hard way

(nbelakovski.substack.com)

168 points | by actinium226 3 days ago ago

85 comments

  • hilbert42 a day ago ago

    Ah how things have changed. When I was learning electronics we mainly dealt with radio and TV circuits and just about the first lesson one learned was to keep leads short (reduce unwanted inductance) and use decoupling capacitors everywhere.

    I recall some years later a young graduate engineer coming into my office with a rather involved circuit consisting of 30/40 TTL ICs and complaining that he'd double checked the circuit and it still didn't work. I took one look at his device then went to the draws of capacitors and handed him a handful of 0.1uF ceramic caps and told him to put them between the ICs' PS rail pins to ground which he did and to his amazement the circuit worked immediately.

    He stood in amazement that I should have such insight so as to fix the problem at first glance.

    How such critical knowledge can get lost in university training these days just amazes me.

    • lefra a day ago ago

      My university made us use really crappy power supplies and dev boards. Nothing worked unless you first put a large bulk capacitor on the power supply's output, and small capacitors close to the components.

      Also I got bitten by parasitics in capacitors very early in my career: capacitors of different face value will resonate with each other to effectively kill the decoupling network at a specific frequency (resulting, for me, in an amplifier with a nice hole in its frequency response).

      • hilbert42 a day ago ago

        Incidentally, in my post below on the MIT RadLab series I mention Vol 23. On p183 parasitic oscillation is mentioned. Also, I recall when working in the now defunct RCA prototype lab, one of the main cure-alls for parasitic oscillations was to place a ferrite bead on a transistor lead (between it and the PWA). It often worked wonders.

      • hilbert42 a day ago ago

        Excellent training, especially the parasitic bit. Trouble is somehow many aren't taught that stuff nowadays.

        • baq a day ago ago

          Sounds like an opportunity to build a shenzhen i/o prequel

    • michaelt a day ago ago

      > How such critical knowledge can get lost in university training these days just amazes me.

      It will probably have been taught.... but very briefly. Before going go back to analysing circuit schematics, where connections between components don't show resistance or inductance, and the capacitance of two parallel capacitors sums.

      • st_goliath a day ago ago

        This is why lab exercises are important. I remember first building some actual TTL circuits on bread board, I learned very quickly that this whole digital stuff is a lot uglier and messier than on paper or in the simulator.

        With sharp rise times, synced up to a common clock, even after soldering in a whole bunch of capacitors, you can still stick a probe pretty much anywhere and see switching spikes all over the place, from power rails to completely unrelated signals that are supposed to be stable. Using actual TTL, there was another funny lesson what this weird "fanout" value in the datasheet meant.

        A similar lesson I learned that way (and a very memorable one :-)) was about flyback diodes.

        • jacquesm a day ago ago

          Ah, but that may well be because of your scope probe's leads! The sharper the edge the more likely that will happen. That's what those shitty little springs are for that come with your scope probe: you disconnect the ground wire and put that spring on the naked scope probe pin around the ground collar. Then where you want to measure you use the pin to go to the signal and the little spring to reach the nearest ground. Presto: clean signal (or at least, much cleaner). Also, make sure to tune your probe (that's what the little plastic screwdriver with metal tip is for, there is a small trimmer in the probe you can reach through a hole and that is critical at high frequencies) and avoid probes with switchable 1/10 like the plague, over time the switches go lame and then you'll be tracking all kinds of weird gremlins.

          • ben_w a day ago ago

            This is just reminding me of the time I played with an oscilloscope, touched the probe against my finger and found my body was antenna picking up mains frequency.

        • derefr 12 hours ago ago

          > or in the simulator

          Inadequate simulator, then, no?

          (I imagine analogue RF board-level simulation is a lot more expensive than digital-logic board-level simulation. Might have been impractical way back when, such that we only used to have the digital-logic kind. But we certainly have both kinds today.)

    • ceejayoz 21 hours ago ago

      I've struggled to find a proper introductory guide to stuff like this. Moving from pre-made Adafruit boards to my own PCBs was very tough to navigate; every guide I came across assumed you knew all sorts of stuff that the EEs writing them probably committed to deep memory decades earlier.

    • InUrNetz 21 hours ago ago

      I have an MSEE from a top university (from 20 years ago), this topic unfortunately is not really taught. The theory and analysis is taught, but the practical implications were not. I connected the dots in my first job out of school where some very talented gray beards taught me how the real world works. Which brings me to my point that EE really is a trade. It takes schooling at the beginning and in most cases a degree or two, but there is critical knowledge that you learn in the real world after school; and there are levels analogous to apprentice, journey man, and master.

    • madaxe_again a day ago ago

      I feel it’s a function of abstraction.

      You learned when analogue circuitry was the norm. I learned when digital circuitry was simple enough that you could readily take something apart and understand it.

      Now, EE courses often start with cad, simulations, digital electronics, and you end up with people building ziggurats atop an ocean of incomprehension.

      It’s exactly the same thing with software.

      I don’t scorn people for this, rather I see myself as fortunate for having learned in a time when the more fundamental knowledge was still worth learning - and that’s the rub - for a vast majority, it simply isn’t worth the time or energy to explore the full stack, when there’s so much to learn atop it.

      • hilbert42 a day ago ago

        "You learned when analogue circuitry was the norm. I learned when digital circuitry..."

        What's not taught properly these days is that ALL electronics is analog at the physical/circuit level.

        For you digital types that's OSI Model Layer 1 — Physical layer (look it up on Wiki). Nothing in electronics works unless that's working properly—ICs, tunnel diodes, transistors, inductors, resistors, capacitors, cables and antennas are all analog devices at that level. That includes the heart of the most advanced digital ICs. For example, the upper clock speeds in processors are limited by transit times/electron mobility, inter-electrode and stray capacitances, unwanted inductance, etc.—all of which are analog effects and they must be accounted for.

        Like it or not, the physical analog world is alive and well! The Noughts & Ones Brigade unfortunately seems to have forgotten that fact.

      • vintermann a day ago ago

        > you end up with people building ziggurats atop an ocean of incomprehension.

        Everyone does. There's probably a layer below for everyone but the most theoretical physicists. I don't know where the leaks in electronics engineering's abstractions are, but I'm pretty sure they exist.

        • madaxe_again 11 hours ago ago

          This is why I went on to study physics - I never was someone who could stop asking “why?”

          All it does is provide yet more profound questions.

        • sdenton4 19 hours ago ago
    • Lerc a day ago ago

      I can see how that happens when people come at things from a conceptual digital side first.

      It probably doesn't help when you have a circuit diagram that while topologically correct doesn't show the relative positioning between components. The first time I saw all the decoupling caps rendered in a single chain on the side of the diagram I was mightily confused. It seemed like utter nonsense until I realised where they actually went.

      • hilbert42 a day ago ago

        "The first time I saw all the decoupling caps rendered in a single chain on the side of the diagram I was mightily confused…"

        If you've read my other comments here you'll realize I'm concerned that these days EE training doesn't place a strong enough emphasis on shielding, ground loops, decoupling and such that it ought to. For any electrical/electronic engineer these are critical concepts.

        By way of stressing that I'd like to take a sojourn into history and refer you to probably the greatest set of electronic engineering books ever produced: the MIT Radiation Laboratory Series — a massive 28 volume set written nearly 80 years ago to document electronics and microwave/radar research done during WWII.

        Anyone seriously interested in electronics should be aware of this series. Yes, it's dated, heavily weighted towards vacuum tube technology (although klystrons and magnetrons are still current), and it lacks modern semiconductor tech, however this truly remarkable set contains a huge amount of information that's still very relevant today. Moreover, whilst it covers the topics in depth it does so at a level that can be easily understood by undergraduates (explanations are more general than today's very specialized textbooks).

        https://en.wikipedia.org/wiki/MIT_Radiation_Laboratory_Serie...

        Here you'll find links to the Internet Archive where the volumes can be downloaded. Specifically, I would refer you to Volume 23 - Microwave Receivers, — Chapter 6 Intermediate Frequency Amplifiers p155. Now turn to p182 and read 6-10 Practical Considerations.

        Here's the PDF of V23:https://archive.org/download/mit-rad-lab-series-version-3/23...

        This section on decoupling, shielding etc. is just as applicable to today's high speed digital circuits as it was back in WWII. Sure it needs updating but the fundamentals of screening and decoupling have not changed. What's important here is that these physical (analog) effects are set by the fundamental laws of physics, and circuits that do not take them into account will fail to work correctly.

      • hulitu 22 minutes ago ago

        > It seemed like utter nonsense

        This is utter nonsense. Just ask the layouter where they will be placed. (at the output of the voltage regulator or where he will find empty space on the board, completely missing their function). Where your schematics is bad, the layout will be also bad.

    • amelius a day ago ago
  • nippoo a day ago ago

    This is probably a good place to debunk the usual wisdom that "decoupling capacitors must be placed very close to the IC pins". If you're using a solid power plane, rather than routing power through traces (and honestly 4/6 layer boards are cheap enough these days) it really doesn't matter where you place decoupling capacitors for most uses - keep the via traces short or ideally in the pad, and you can put all your decoupling capacitors in one place on the boards a way away from the chip and focus on good routing of your signals. Figure 15 on this paper (and the whole paper!) explains it well: https://scholarsmine.mst.edu/cgi/viewcontent.cgi?article=221...

    • fps-hero a day ago ago

      Loop inductance is what really matters with decoupling. Once you understand that, it becomes really easy to make good decisions. This article explains how you can approximate the inductance for a given layout, so it makes evaluating layouts much simpler. It actually used the data from the paper you referenced in example 3!

      https://learnemc.com/estimating-connection-inductance

      You can even use mutual inductance of vias improve performance, either by having vias spaced close together and in the right order (https://learnemc.com/decoupling-for-boards-with-widely-space...), or arranging capacitors in alternating or doublet layouts (https://incompliancemag.com/decoupling-capacitor-design-on-p...).

      As you say, just having power planes and directly connecting to them is almost always going to be superior to using a trace, despite seeing this all the time, especially in datasheet example layouts. It made sense for 2 layer boards, but not today. Just think, the inductance of the planes is practically zero, and distance to the plane from the components is going to be on the order of 0.2mm, round trip 0.4mm. Is there any way I could place the capacitor 0.4mm away from the pins to achieve an equivalent inductance? And even if you could, you can't add extra vias to lower inductance, and you don't benefit from mutual inductance.

      • amelius 20 hours ago ago

        Explanations like that are a lot easier to understand if you can see the equivalent circuit with the parasitic components.

      • raverbashing a day ago ago

        Yeah

        The ELI5 for decoupling capacitors is "imagine an energy storage for quick usage"

        The ELI(tired EE student) is more like the explanation above

        And this concept is ok for most of the 'low speed' circuits

        in RF ranges, everything is a capacitor (except when you need one), everything is an inductor (except when you need one) and the intuitive explanations break down and everything looks like dark magic

        • fps-hero 21 hours ago ago

          I love your reverse psychology analogy. That does make me wonder, if a cap past its SRF is an inductor, and and inductor past its SRF is a cap, why not swap caps for inductors and vice versa, put an amplifier on the end and call it a day!

          • lefra 17 hours ago ago

            You can't, because all amplifiers oscillate (except when you need an oscillator).

        • fuzzfactor 19 hours ago ago

          And every wire or PCB trace is an antenna, broadcasting and/or receiving whatever it has access to, at its own particular frequencies.

          Across distances according to the power available, where ariel orientation makes a big difference, "as expected".

    • PunchyHamster a day ago ago

      Well, till it does. Paper talks about frequencies in 200MHz range, not every project can afford solid power planes and putting it next to a chip costs literally nothing. It's like safety helmet, 99.9% of the time it's not needed

      • nippoo 14 hours ago ago

        Above 400MHz or so, the on-die/on-chip capacitance starts being the most important thing (you're going to have inductance through the legs or balls of the chip).

        Putting your decoupling capacitors next to the power pins _does_ cost. Not just in board space, but I've seen and reviewed layouts where the signal traces had to snake around decoupling caps or in some cases through vias because the designer believes that putting the caps close to the pins was the most important thing...

    • laydn a day ago ago

      Great paper!. Anyonw know whether there are any modern tools/software that can simulate this during design?

      • lefra a day ago ago

        For approximative simulation, any SPICE simulator works. You'll need to know your capacitors parasitics and power supply output impedance, find a typical via's impedance, and manually compute traces impedances and board capacitance.

        For accurate simulation, the actual board geometry needs to be fed to a simulator that'll compute the actual impedances. Last I checked only Very Expensive Software could do that in a user-friendly way (I had to route a DDR3 bus. I ended up being very cautious so that all traces had the same topology and the same lengths, and cross my fingers. It worked).

        If anyone knows of free alternatives for that, I'd be interested to hear about it.

  • kazinator 16 hours ago ago

    I think the author's analysis of the problem is off. He writes about ripple from the regulator:

    > This switching causes ripples in the voltage line,

    But what is on the scope is not that ripple:

    > Take another look at the pictures of the ripples above and notice the “M: 20ns” in the top left corner. This signifies that each vertical dotted line is 20ns apart, so the ripple you see has a frequency of something like 50MHz.

    The switching regulator does not operate anywhere near 50 Mhz. Those voltage fluctuations are caused by the magnetometer itself: its own internal switching causing rapid current demand fluctuations. Or, possibly, it could be some other nearby device, in which case that device needs the decoupler (also).

    This is why the decoupling capacitor addresses the problem. The purpose of the decoupling capacitor isn't to filter power supply ripple, but to provide a local, low-impedance current source that can swallow changes in current demand. That's why it's placed close to the device. It not only ensures that the device has smooth power, but also reduces the noise that it generates, protecting other devices.

    • Neywiny 12 hours ago ago

      I don't think you're entirely correct here. The regulator will create noise that has a fundamental frequency of 500 kHz. That we agree on. However, this 50 MHz noise can most certainly be caused by the regulator. It's critical to note that it's not a constant 50 MHz noise. It's clearly attenuating quickly and occurring sharply. If the author had zoomed out to the 500 kHz time scale, I'd bet we'd see this noise every time the switches change.

  • userbinator a day ago ago

    This signifies that each vertical dotted line is 20ns apart, so the ripple you see has a frequency of something like 50MHz.

    Unless you have a 50MHz buck converter (which would be very exotic --- the fastest common ones are around 1/10th that), that looks more like something may be inadvertently oscillating and/or you're picking up strong RF noise from possibly something in...

    https://en.wikipedia.org/wiki/6-meter_band#Radio_control_hob...

    And "leared" -- the (unintentional?) pun made me click.

    • Animats a day ago ago

      It's not oscillating at 50MHz. Look at the waveform, with the big spike in the middle. That's a spike at some lower frequency, wider than the screen, followed by ringing. Need to zoom out the time base some more to see the period of the big spikes. It's no higher than 4 MHZ (the screen is 12 units wide) and possibly much lower. (Assuming that M:20ns on the display means 20ns/grid division. The manual is a bit hazy on that part of the UI.)[1]

      The power regulator IC mentioned is normally run at 500KHz. There's a reasonable chance that this is the power regulator spike not being damped out. Easy enough to check with a scope handy.

      [1] https://fotronic.asset.akeneo.cloud/pdfs/media/owon_hds242s_...

    • JCTheDenthog a day ago ago

      >And "leared" -- the (unintentional?) pun made me click.

      I assume it's a reference to the "Quality Learing Center" in Minnesota, one of the questionable daycares at the center of the alleged Somali daycare fraud scandal. Ever since some of the expose videos about it came out it's become a meme to say "lear" instead of "learn".

      • nielsbot a day ago ago

        > questionable daycares

        If they don't find fraud, is it "questionable"?

        • bavell 20 hours ago ago

          Didn't the guy flee the country after posting bail? Doesn't exactly scream "innocent".

          • nielsbot 8 hours ago ago

            I didn’t see that. Is there a source? I saw Minnesota authorities investigated the business and didn’t find evidence of fraud.

            I did read there was some amount of fraud in state sponsored care programs but nothing extensive.

        • peterfirefly a day ago ago

          If they choose not to look, yes.

    • codedokode a day ago ago

      Cannot it be a noise from imperfect switching? The switching occurs at lower frequency, and the noise is high frequency.

    • elch a day ago ago

      I guess he also believes that 50 MHz or so signals can be measured reliably on a 40 MHz (on paper at least) scope.

      • PunchyHamster a day ago ago

        Most digital scopes have around 5-10 times faster sampling than bandwidth. The one on pic is 250Msps.

        That's more than good enough for the purpose of checking interference

        • elch a day ago ago

          But he tries to quantify this interference. Anyway Animats's comment is the one that points IMHO to the most likely cause of the observed waveforms.

          https://news.ycombinator.com/item?id=47931024

          PS Now that I’ve taken a closer look, this is even sillier than I first thought.

          He’s hunting for 50 MHz ghost signals by connecting his PCB to a breadboard using (crappy) wires that are at least 10 cm long. And he’s connecting the scope probe to the breadboard (or those breadboard wires).

          And if I’m not mistaken, he doesn’t even bother to connect the ground lead of the probe.

  • exDM69 20 hours ago ago

    Slightly related note, the pictures in the articles show a handheld digital oscillscope. It's an Owon HDS200 series oscilloscope with signal generator and they are amazing and the lower frequency models are quite inexpensive.

    I got myself one earlier this year and it does what it says on the tin. It can also be controlled from a computer via USB serial connection using a text based protocol (albeit poorly documented and a bit buggy). I used some python scripts to program the signal generator and then capture some measurements from the scope to check the frequency responses of some analog electronics circuits for guitar.

    There is a small community around, there are a few repos on GitHub for using them and also this very long eevblog thred.

    https://www.eevblog.com/forum/testgear/owon-hds-200-handheld...

  • hadrietta a day ago ago

    Having 1.5V Vpp ripple on a 3.3V supply rail seems more like an issue with the regulator / bulk capacitance than a decoupling capacitor, I would think?

    • actinium226 a day ago ago

      Yea since writing this I think it has more to do with the regulator circuit. I plan to do a small rewrite and change the title to something like "When 3.3V isn't actually 3.3V" to more accurately reflect the situation. A decoupling cap would probably still help, but there were some mistakes made on the regulator circuit.

      • dragontamer a day ago ago

        Switching regulators (and even linear regulators!!) have maximum capacitance ratings.

        Adding more capacitance could, in theory, further destabilize your regulator.

        The overall tank circuit (the inductor + capacitor forming the bulk of the switching circuit) is incredibly fragile.

        It's legend that some old switching designs stopped working as newer tantalum capacitors had less resistance, screwing with the stability of older switching designs. You kind of need to choose exactly the "expected" kind of capacitor (aluminum caps have more resistance, which increases stability of the feedback but slows down the feedback).

    • dragontamer a day ago ago

      Yeah. Decoupling capacitors are for smaller ripples than that.

      There might be a resonnance point on that regulator, or maybe a maximum capacitance that was violated on the feedback.

      There are a TON of ways to screw up your PDN on a PCB. It's nominally a master's degree level subject.

    • analog31 a day ago ago

      Some small switching regulators go into a low power mode when the output current goes below a threshold. The frequency drops to some "hovering just above zero" level. I've had to artificially load a power supply, to get it to be stable, e.g., with a shunt resistor. Naturally, that's inefficient, so it goes onto the TODO list to improve the design.

    • elch a day ago ago

      1.5 Vpp ripple measured on a 40 MHz scope - when the waveform is 50 MHz according to him...

    • boznz a day ago ago

      decoupling is a real issue, but I think you are right in this case.

  • frangonf a day ago ago

    To makers that want to play and learn with power converters I recommend you:

    - Test the converter at various points of load (when prototiping keep some 0ohm resistor/jumper for attaching a resistor load or electronic load).

    - When you have to measure things, look around app notes/white papers of manufacturers, you will usually find practical actionable info and some examples. Doing proper measurements is really a discipline of its own, but for low frequency you can get far with the basics of craftsman/rule of thumb engineering. [0] [1]

    For example the author here in the videos is mostly measuring the inductance loop between the positive of the rail and wherever ground is (we cannot even see where the osc negative is??) and how this particular loop responds to a cap, not the real bus.

    [0] https://www.analog.com/en/resources/app-notes/an-1144.html

    [1] https://www.richtek.com/Design%20Support/Technical%20Documen...

  • oakwhiz a day ago ago

    Seems like a missed opportunity to try adding a capacitor dead-bug style onto the board to see if it cleans it up.

    • dragontamer a day ago ago

      If it's really 20MHz++ noise that's screwing him, you need something faster than a through hole capacitor IMO to deal with it.

      That being said, I'm not 100% convinced this is a 20MHz++ noise issue.

      • WarmWash a day ago ago

        The capacitor doesn't have a concept of "fast enough", it's a passive component. The signal is what determines what it does when it encounters the capacitor. Non-linearities and capacitor species aside, a good ole x7r 100nF would clean this up.

        In general you can just liberally dump 100nF caps all over your pcb power traces and quash most problems like this before even knowing they exist. I joke that you make a circuit then take out your 100nF salt shaker to make it just right.

        • jacquesm a day ago ago

          The capacitor has a self inductance. That's why you use low self inductance capacitors with very short leads or traces in this role. 100 nF ceramics are fine, but you may actually need a 100 nF and a 10 nF side-by-side because of that inductance depending on how dirty your power line is. Fast clocked circuitry can be pretty nasty.

        • dragontamer a day ago ago

          Look up parasitic inductance.

          Through hole parts cap out at maybe low MHz. Many electrolytic caps frankly cannot effectively decouple signals above 100s of kHz even. Above that value, capacitors become inductors due to lead lengths, parasitic resistance, and other details.

          To make capacitors work faster, we make them smaller and smaller. Surface Mount Caps are the only way to reach 20MHz++ decoupling speeds, and you need crazier tricks if you need additional decoupling beyond that frequency.

          • WarmWash 19 hours ago ago

            Yes, but we are splitting hairs at that point. The transient spike is a high impedance voltage that is tripping the high impedance internal protection circuitry of the magnetometer. So whether we have 20mOhms of capacitive decoupling or 500mOhms of inductive decoupling, both are better than the infinite impedance of nothing there.

            We're not building a precision filter, were cutting the paws off of a paper tiger. No need to let perfect be the enemy of good.

            • dragontamer 12 hours ago ago

              This is a circuit with a switching regulator that is, presumably, stabilized with something on the order of a 10uH inductor + 22uF capacitor.

              So from my perspective, increasing the capacitance from 22uF on that output line to 22.1uF with a 100nF cap will likely do jack diddly shit.

              It is far more likely that, ex, the author of this post screwed up the regulator design. Ex: did the author mistakenly think that more capacitance is better-er and stick a 100uF cap there, blowing out the phase margin of the feedback of the switching regulator?

              Was the inductor properly sized? Not just inductance but also saturation current and internal resistance?

      • sebcat a day ago ago

        It's an easy test though and it can be an SMD component and some PUR-coated magnet wire or 30 awg single stranded kynar hookup wire.

        Use a small amount of glue from a hot glue gun to fixate it when done, or epoxy if that's your thing. Avoid cyanoacrylate. Not always needed but I imagine a drone moves around alot.

        Bodge wiring is a good skill to acquire - PCBs will not always be perfect. Maybe practice on something else first?

        • dragontamer a day ago ago

          True.

          I have a bunch of through-hole parts for these sorts of situations. There are plenty of small through-hole ceramics that have leads if you really want to go there.

          https://www.digikey.com/en/products/detail/vishay-beyschlag-...

          Like this or something similar.

          • jacquesm a day ago ago

            I've seen piggy backed decoupling caps straddling chips on some pretty fancy hardware. This lesson is re-learned quite frequently ;)

      • PunchyHamster a day ago ago

        you can dead bug SMD caps

      • ErroneousBosh a day ago ago

        > If it's really 20MHz++ noise that's screwing him, you need something faster than a through hole capacitor IMO to deal with it.

        That's always worked well enough in the past.

        • dragontamer a day ago ago

          That's because you weren't dealing with 20MHz noise.

          Hobbyists are not dealing with 20MHz noise issues. Period. And if you are actually crazy enough to deal with high frequency circuits like that, you would well know that the land of through hole designs is simply insufficient, and that you are probably somewhere with some 0402 capacitors and some tweezers right now.

          • PunchyHamster a day ago ago

            > That's because you weren't dealing with 20MHz noise.

            That is just straight up not correct

          • jacquesm a day ago ago

            > Hobbyists are not dealing with 20MHz noise issues.

            It happens. Not often, but it does happen and it depends on the hobbyist and what they're up to (but you won't be sticking that together on a breadboard). Also: if you start using HCT, AHC or even G parts where you don't really need them it can happen to you in places where you don't normally expect it. Those things have crazy fast rise times.

            • dragontamer a day ago ago

              Real talk: 6 layer oshpark is cheap enough for a hobbyist and there are a bunch of 500MHz / DDR2 parts that can be laid out. Like 0.8mm pitch BGAs can fit and breakout.

              So yeah. Hobbyists can go here. But here be dragons!!

              Nonetheless, I continue to assert that typical hobbyists are making mistakes at 100kHz region rather than the 100MHz region.

              • jacquesm a day ago ago

                That's fair. It's just that I have seen some hobbyists doing the most insane stuff and eventually getting it to work. Some HAMs for instance have pretty extreme skills and it is not their profession, they just do it because they like it, not because they get paid.

                And in many of those cases their skills are hard capped by their budget for test gear and simulation software rather than by their actual ability. Keep in mind that until not that long ago anything above 1 G was fair game because 'nobody does anything there anyway' and so HAMs and radio astronomers were pretty much the only ones with experience in that region.

            • ErroneousBosh 11 hours ago ago

              Or analogue. 20MHz is basically only just above audio. You can amplify it with a cheap jellybean opamp that requires no particular care to use.

              • dragontamer 10 hours ago ago

                Which one?

                MCP6002 jellybean is GBP of 1MHz. Most "jellybean" OpAmps I know cap out at 10MHz GBWP (aka: a useless 10x gain at 1 MHz).

                LM358B is 1.2 MHz GBWP or even 700kHz depending on the design. Magnitudes away from 20MHz especially when you want more than 1.0x gain.

                If you want even 10x gain (aka around 10% error), you might suffice with 200MHz GBWP at 20MHz. Or maybe get a nice ADC and just go all digital given today's equipment...

                Come on man. Typical "high speed" OpAmps are like 100MHz GBWP or less... correlating to only 5x gain at 20MHz. This sort of stuff is well outside "jellybean" amps. And I'm not even sure if a 100MHz amp is very effective at 20MHz.

                • ErroneousBosh 14 minutes ago ago

                  LT1812 is my weapon of choice for ultra low RF stuff (think Tayloe mixer frontends). Readily available, pennies to buy, reasonably flat to about 20MHz although THD is getting a little rough up there, possibly because I'm using it wrong.

                  They cost pennies.

          • ErroneousBosh 17 hours ago ago

            > Hobbyists are not dealing with 20MHz noise issues.

            What makes you think that?

            Edit: FWIW I consider 20MHz to be basically audio.

  • unwind a day ago ago

    Meta; typo in title, should be "learNEd".

    • xaxfixho a day ago ago

      Quality *Learing* Center 1-800-FRAUD

  • WarmWash a day ago ago

    If getting a cap on the input of the magnetometer is too challenging, a ferrite bead on the output of the caps fed by the switching supply might also do the trick.

    You could also try just sticking a 100n and 10n across the smps output too.

  • PunchyHamster a day ago ago

    Datasheet shows 2 (which is a bit unusual, one for VDD and one for VDDIO soooo very much "RTFM" problem

  • kreelman a day ago ago

    leared = learned ? The O'Reilly book "Designing Embedded Systems" covers this pretty well with a story very similar to yours. Great to be able to learn something new.

  • themafia a day ago ago

    The first time I saw a complex number used with units of resistance, I was like, huh?

  • moffkalast a day ago ago

    > How I leared what radial magnetic emissions are, the hard way

    Another lesson waiting in the wings from mounting a magnetometer in plane and right next to four BLCD motors, lmao.