[sdiy] Simplest random source
Magnus Danielson
cfmd at swipnet.se
Mon Nov 18 01:28:22 CET 2002
From: Seb Francis <seb at is-uk.com>
Subject: [sdiy] Simplest random source
Date: Sun, 17 Nov 2002 21:11:30 +0000
> Hi All,
Hi Seb,
> Thanks for the replies. It seems fairly universal that analog noise is generated by taking the noise of a transistor or zener diode and amplifying it a lot, optionally with freqency shaping.
>
> From what I've seen, the ways of getting the required gain are:
> 2-3 transistors + 4-6 resistors + 1-2 caps
> or
> 1-2 opamps + 2-4 resistors + 1 cap
>
> The first way is probably the smallest if resistors are small or mounted sticking up. But unfortunatly I probably don't even have space for that.
If you go for SMB you can go with 0603 resistors, which are fine to handsolder.
If you think they are too fat, there's 0402 resistors also available.
You can use both SMB transistors and SMB op-amps.
> Steve Ridley also pointed out that a S&H of analog noise is much more a gausian distribution than an even one, and although it's possible to make a more even random signal in analog, this uses even more components.
>
> So I guess it's software after all. I've been having quite a bit of success with bitshifts+xors, getting really random 16bit numbers which don't repeat for 65535 cycles, and using about 50 instructions to generate each number. This is getting pretty near an acceptable amount of CPU time .. so with a bit more tweaking...
If you look way back in time, you will be able to find a thread about random
generators and there I posted PRBS generator polynoms all the way up to 64 bits
of length. You will also find me arguing for the use of longer polynomial
lengths. Inside a PIC, AVR or anything like it, there is no excuse not to use
up the hardware better and go for a long polynomial. You get both cycletimes
beyond lifetime of the apparatous and thick noise-spectrum, which you do want
That comes hand-in-hand when you go for the longer polynoms. a 64 bit polynom
requires only 8 byte of storage and we're still only talking one or two XOR
gates, so processing is still fairly simple.
> I'll post the final algorithm in case it's of use to someone.
Great!
Cheers,
Magnus
More information about the Synth-diy
mailing list