Avalanche noise generator - Page 1
Forum section: electronics / beginners

author: kmike
author_rank: Regular Contributor
timestamp: June 19, 2016, 01:32:51 pm
content: Hi,i have built an avalanche noise generator using two npn transistors, that is doing something.My question is how the oscillogram should look like? I have attached a screenshot from my oscilloscope, it does not look like white noise to me...Can someone please have a look at it?Thanks!br,mike

author: alsetalokin4017
author_rank: Super Contributor
timestamp: June 19, 2016, 03:25:29 pm
content: What kind of waveform were you expecting? I built the circuit, but used different NPN transistors (BC337-25). I get essentially the same waveform you got.Look at the signal using the FFT function in Math. Play with the various settings until you get a usable display.White noise has approximately equal power at all frequencies. It looks to me like this noise is more "blue" in that it has slightly higher power at higher frequencies -- if my (Rigol's FFT + my usage of it) is telling me the truth.

author: Audioguru
author_rank: Super Contributor
timestamp: June 19, 2016, 04:15:31 pm
content: The second transistor is having its base blown up by the unlimited base current. The noise waveform is compressed on the bottom by the severe distortion of the transistor that has no negative feedback and maybe the transistor is saturated most of the time instead of being linear.

author: uncle_bob
author_rank: Unknown
timestamp: June 19, 2016, 04:38:33 pm
content: HiWhat you actually have built is an oscillator. That's why the waveform looks like it does.Bob

author: Zero999
author_rank: Super Contributor
timestamp: June 19, 2016, 05:01:09 pm
content: Quote from: Audioguru on June 19, 2016, 04:15:31 pmThe current will be limited by R1.

author: T3sl4co1l
author_rank: Super Contributor
timestamp: June 19, 2016, 05:35:45 pm
content: Quote from: Hero999 on June 19, 2016, 05:01:09 pmUnless the load impedance is very low, in which case it's limited by the Thevenin resistance of the source and pullup together. Give or take whatever reactive impedance it might have, that becomes relevant on those fast edges.If you lowpass filter the noise, so that the ramps stop looking rampy, you'll get modestly uncorrelated white noise of limited bandwidth.A common technique used with generators of this type (which includes transistors as shown, zener diodes, and glow discharges in magnetic fields, such as the old 6D4 gas-filled triode) was to use two generators, and take the difference. This balances the correlation due to the rampy parts, and significantly extends the available bandwidth over which the statistics are good.Tim

author: kmike
author_rank: Regular Contributor
timestamp: June 19, 2016, 06:36:05 pm
content: Thanks to everyone!I have added another generator to the circuit, increased R1 to 15k and added a low pass filter with around 170kHz cutoff frequency.Now I will try to connect the outputs to a differential ADC and test the result with some standard random number generator tests. Let's see what happensbr,mike

author: bson
author_rank: Unknown
timestamp: June 19, 2016, 09:29:42 pm
content: You get the ramping waveform because the impedance is too low on the source voltage. I'd put 100k on Q1's emitter, this will give you a much wider noise spectrum.

author: bson
author_rank: Unknown
timestamp: June 19, 2016, 10:08:28 pm
content: Try this - tried and true. It'll also work just fine for pretty much any comparable small-signal NPN BJT: BC547, etc.If you want a higher voltage stick Q2 in there as a voltage amplifier before the output capacitor. If you have say a 9V Vcc, and the noise level is up to 300mV p-p (use the scope using its peak-to-peak measurement function and add a little margin), then amplify it to something less, like 5V p-p. 5/300m = ~16.7X. So Rc/Re for Q2 would be 16.7 for that gain. The noise will already be biased with a DC offset of roughly Vcc/2 but if it's a bit high (again, use the scope's mean measurement to check) you can bias it downwards a little with something significantly bigger than 100k. (Say 500k or 1M or more.) But this will reduce the noise peak excursions and you may need more gain.

author: uncle_bob
author_rank: Unknown
timestamp: June 19, 2016, 10:50:54 pm
content: Quote from: bson on June 19, 2016, 10:08:28 pmHiAdd an emitter follower on the output with a ~ 10K ohm emitter to ground resistance and you have a winner. Just be sure to run it into a fairly high impedance load. If you need to drive a speaker with it, tack on a legit amp.Bob

author: bson
author_rank: Unknown
timestamp: June 20, 2016, 07:03:55 pm
content: Of course, most of us would use a suitable op-amp to combine gain and buffering... At least up to 400-500MHz where you start needing RF amplifiers that operate over specific bands. But for something like audio an OPA1611 or LME49710 will do the job nicely.

author: kmike
author_rank: Regular Contributor
timestamp: June 20, 2016, 07:43:31 pm
content: Quote from: bson on June 20, 2016, 07:03:55 pmThe schematic You suggested is great, could not get any simplerOutput impedance should (hopefully) not be a problem as the circuit will feed an ADC input.The yellow trace (CH1) is after a low pass filter, the blue (CH2) is the output of the noise generator. I think I have to accept that avalanche noise looks this way.br,mike

author: uncle_bob
author_rank: Unknown
timestamp: June 20, 2016, 08:05:13 pm
content: Quote from: kmike on June 20, 2016, 07:43:31 pmHiMost ADC's that I am familiar with want to be fed from a fairly low impedance source. You get a (say) 50K input impedance, but it only works right when driven from a < 500 ohm source. Unless yours has some sort of built in buffer, it probably needs an amp of some sort between the noise generator and the input to the ADC. In some cases you can actually see the ADC back feed noise onto the signal source as they slap sampling caps on the line ...Bob

author: kmike
author_rank: Regular Contributor
timestamp: June 20, 2016, 09:00:04 pm
content: Quote from: uncle_bob on June 20, 2016, 08:05:13 pmHi!Thanks for your suggestion! The datasheet of the atmega32u4 tells I should connect a source with a 10k or less impedance and the chip also has an integrated amplifier. My biggest problem is the limited board space. I guess I have to try it out and measure, or use some sot23 op-amps as the board should be hand solderable.Should I simply use an op-amp as a comparator (or the built-in analog comparator) fed with the random source so I get a nice digital signal, and dont use the ADC at all?Going the ADC route should give a higher entropy, a comparator is simple... I thought it would be easier to make some noisebr,mike

author: uncle_bob
author_rank: Unknown
timestamp: June 20, 2016, 10:00:22 pm
content: Quote from: kmike on June 20, 2016, 09:00:04 pmHiWhat you may be seeing now is 80% ADC and 20% noise generator (who knows). The problem is that the ADC stuff looks random, but probably is not.From what I can see on the Atmega data sheet, there is no buffer amp in the chip. Everything they are doing comes from switching capacitors around. It's weird how they do it, but it works. Pretty much all the MCU guys do it that way. It puts spikes on the input. You need to drive out of a low impedance source to get the full 10 bits of accuracy on their "12 bit" ADC.Bob

author: Audioguru
author_rank: Super Contributor
timestamp: June 21, 2016, 12:37:23 am
content: Your noise still appears to be very distorted. Now the top parts are compressed. Top and bottom should look symmetrical.

author: uncle_bob
author_rank: Unknown
timestamp: June 21, 2016, 12:50:24 am
content: Quote from: Audioguru on June 21, 2016, 12:37:23 amHiI have never wired up this circuit. I have built other diode based noise sources. The waveforms shown look a lot more like some sort of semi-random oscillator than they do the output of the circuits I have built in the past.Bob

author: bson
author_rank: Unknown
timestamp: June 21, 2016, 04:49:48 am
content: I just set this up on a piece of Veroboard (I have an SMD board on its way, with proper shielding, ground pours, and LC filtered supplies but it's not here yet), alternating signal strips with ground strips. Picked up the output with a 2-pin strip header (signal and nearby ground strip) that I stuck an AP034 differential probe to. (1M, 0.6pF). 2N3904, 100k film, and a 47uF Vishay FG.Spectral distribution, 0-500MHz... As you can see it's VERY flat, just down -5dB or so at 500MHz. (A proper board should do better than this.)(You can see it's picking up the FM band!)As for the "curtain" like distribution (more below the mean that above), keep in mind it's a log vertical scale.Time domain noise views... 10us per div:1us per div:100ns per div:10ns per div... now severely limited by the scope's 500MHz bandwidth:1ns per div.There's no sign of that ramping stuff, just really white looking noise. In fact I several times flipped the power on the PSU just to make sure I wasn't just imagining things...

author: T3sl4co1l
author_rank: Super Contributor
timestamp: June 21, 2016, 07:52:13 am
content: Why would you plot out to 500MHz (and zoom to similar time scales) when your signal source obviously cuts off at, I can hardly tell, maybe 1MHz?If it's not obvious to you, then listen up,FFT shows a tail on the far left side. Maybe it's just DC offset, I have no idea. It's just a few pixels. But in any case that looks like the region of interest.Then it drops off, pretty sharply. Like -40dB sharp. That's good attenuation for an active filter!Since your circuit isn't being explicitly filtered, in any obvious way, that's good filtering indeed...Then it goes down to the noise floor, at -70dBm or so. That's a pretty good noise floor. That's about a third of a nanowatt (at 50 ohms)!Say, I wonder, what's the scope's spec sheet say the noise floor is? Never ignore and forget your instruments' capability!Then there's a hump around 20MHz. "Harmonics" from the spiky waveform? Ambient noise (SW radio stations, SMPS interference)? Who knows. Ditto at 65.Anyway, now you're well into the danger zone. Your proto's construction and probing isn't very good -- it's an excellent antenna, and you've got a forest from 88-108MHz. This shows up clearly on the time waveform, at 100ns/div and below. It is most certainly not "really white noise". The central peak is >40dB stronger than the background!So what you need to do:Shield the circuit. Ground it well, seal circuit-ground to connector-ground. Use a shielded connector. Use BNC at all, don't probe the damn thing! Because a differential probe doesn't mean anything if it's picking up a big loop's worth of RF! Especially in an urban environment with so many strong radio stations nearby!Filter the output. Filter it to whatever bandwidth you're expecting. Dn't know how much? Well, it looks to be on the order of 1MHz, but what exactly, I don't know. Like I said earlier, it depends on how much correlation you can tolerate (which, if you don't know what you're doing... it's probably a lot).And subsequent to the filter, ignore any frequencies that appear in the signal, well above the filter's cutoff. These are clearly unintended, not present (in the source itself), and interfering. Turn on the scope's bandwidth limiting feature (usually an option for 20MHz input bandwidth, but also options for digital filtering; beware if it varies with time/div, as is the case for "high res" and averaging modes -- always check your sanity and understand how the instrument performs the measurement, before reading numbers off it!).Do these on your SMD board, and you should have much better waveforms.Tim

author: kmike
author_rank: Regular Contributor
timestamp: June 21, 2016, 09:49:11 am
content: After more experimentation with this circuit I came to the conclusion that the bc547 is not a good choise. I will have to check the datasheets.Now I have ordered some 2n3904s, I will try it again when the transistors arrive.Fun fact: I built the following circuit, replacing the 2n3904 with a bc547c again, and it also does not work...br,mike

author: bson
author_rank: Unknown
timestamp: June 21, 2016, 07:04:50 pm
content: Quote from: T3sl4co1l on June 21, 2016, 07:52:13 amNo, there's just a bit of DC offset. No cliff at 1MHz.