Avalanche Noise Amp

This lashes a pretty good avalanche noise source to an absolute dog of an op amp:

Noise Source - Schematic
Noise Source – Schematic

It’s built into the formerly vacant space on the 8×8 LED matrix board last seen generating random numbers by timing Geiger detector pulses:

Reverse-bias noise amplifier - overview
Reverse-bias noise amplifier – overview

The LM317 tweaks the reverse bias voltage to ram about 10 µA of DC current through the 2N2907A base-emitter junction; I picked that transistor because it has a 5.0 V breakdown spec that translates into about +8 V in reality, plus I have a few hundred lying around.

The 4.7 kΩ collector resistor sets the operating point of the 2N3904 NPN transistor at a bit over 6 V with a collector current of 1.6 mA, around which there appears ±500 mV of pure noise:

Noise - NPN C inv - op amp
Noise – NPN C inv – op amp

The 2N3904 spec says hFE > 100 and, indeed, I measure 200: 8 µA in, 1.6 mA out.

The bottom trace is the output of the first LM324. With a GBW of 1 MHz and a voltage gain of 10, it should have a cutoff at 100 kHz, but that’s obviously not true; the 0.5 V/µs large-signal slew rate just kills the response. The flat tops at 3.8 V show that it’s definitely not a rail-to-rail op amp.

The horizontal cursors mark the ATmega 328 minimum VIH and maximum VIL; the actual thresholds lie somewhere between those limits. What you don’t get is the crisp transition from a comparator.

The trimpot setting the logic level lets you tune for best picture; in this case, that means balancing the number of 0 and 1 bits. It’s a bit more complex, of course, about which, more later.

I picked the LM324 for pedagogic reasons; it’s a Circuit Cellar column and I get to explain how a nominally good analog circuit can unexpectedly ruin the results, unless you know what to look for…

16 thoughts on “Avalanche Noise Amp

  1. Ah, this is a subject that interests me on several fronts. While I doubt you’re going for cryptographic-quality random numbers, the subtleties that go into producing them are myriad and fascinating. I’m also fond of creative abuse of analog electronics, and when to do things like use op-amps as comparators and when not to. As an aside, I needed a sort-of random number recently for a project I’m working on, and discovered that the bluetooth interface (of all things) had a command to return one, meaning I could skip this sort of fun.

    1. creative abuse/op-amps as comparators

      If Vin-diff is OK and you don’t mind the speed issues, go ahead. (Some opamps have limiting diodes that need respect.) We did stuff like that in the late ’70s on a millisecond resolution test box. 20 years later, I did the same thing elsewhere on a $150K automatic tester. Progress!

    2. Definitely not crypto-grade results from this one! The random numbers serve as a MacGuffin to talk about op amp parameters and why they matter, plus why stuffing a random circuit from the Interwebs with random components might produce, uh, non-random results.

      Not to mention: I get a show-n-tell object out of it…

  2. flat tops at 3.8 V

    Gotta watch those specs. When it’s in the electrical characteristics table as a min or max, it’s a hard limit. (Looks like max-Vout is 2 Vbe below Vcc. JFET/bipolar circuitry, I think.) For the GBW and slew rate, with typicals, I take a “trust but verify” attitude, and watch out for how they interact with the others.

    Are you putting a variation of RTFM in your article? I hope so. I’ve had a few experiences where the blurb in the first page on a sheet makes a part look attractive, only to find an issue that makes it non-suitable for the application. (Case in point, the LM395 aka “blow-out-proof transistor”, but with a 2V sat. In the small power amp project it would have been shutting down all the time…)

    1. a variation of RTFM

      Aye! My favorite was the MAX4372 high-side current monitor’s ±300 mV max differential input voltage across the sense resistor. I proved that a transient was perfectly capable of blowing the amp, before figuring out a decent protection circuit…

    1. Absolutely!

      It has lots of input offset and a surprising amount of delay, but should support a much higher sample rate. Biasing the AC-coupled noise from the 2N3904 at VCC/2 on AIN0 and feeding the DC bias into AIN1 should do the trick.

      I should tinker up something around that just to see how it works. The LED array might turn into a diffuse blur, though.

      I’ll add that as a homework assignment in the CC column… [grin]

      Thanks for reminding me…

    1. Having wrestled with getting “real DC” from those low-resolution PWM outputs, I’d rather throw a real DAC at the problem and eliminate a whole class of annoyance.

      But you’re right about automating the pot twiddling. The code should monitor the long-term bias between the 00 and 11 sequences, then tweak the offset voltage to make the answer come out right.

      calculate the value of Pi


      Having a plotter draw the circle and ink the points as they’re calculated sounds a lot like an art installation!

      1. I’d probably go with SPI controlled potentiometers instead of PWM or DACs. It would be nice to put the feedback loop in the microcontroller, and have it servo the values until the bias produced the desired distribution. Having done several electronic art projects, I love the idea of using the a plotter! They’re just satisfying devices to watch.

    2. Noise sources are interesting. Zeners are easy to use and do a decent job (they’re actually noisier than gas tube voltage references at high voltages, but the gas tubes are prettier all lit up). Then again, you can make a dandy noise source out of a different gas tube: a small thyratron in a magnetic field produces gorgeous broadband noise – that’s what’s inside those old General Radio noise sources: a 6D4 and a magnet. Of course, Ed’s already done the fancy radioactivity-based source of randomness.

      1. I worked on a project to build radiation hardened op-amps for a Jupiter probe. That approach failed, but the amps were great shot-noise sources… [wince]

      2. a 6D4 and a magnet

        There’s a box labeled “Hollow State Electronics” with some regulator tubes in the 0D3 family that should become art projects. They run at 100-ish volts and 5 mA (= 500 mW) after they’re warmed up, but need a 150-ish V / 100 mA kick for 10 seconds to start.

        Screwing an old transformer to the case would be cheating…

        1. There are lots of fun ways to come up with a couple hundred volts…

Comments are closed.