Maker Pro
Maker Pro

How to develop a random number generation device

Hi,

I'm a researcher. As a part of my project work I want to desing a
random number generated and displayed on a LCD/ LED module. Can
anybody help me out in this.

Thiagu
 
S

Spehro Pefhany

Hi,

I'm a researcher. As a part of my project work I want to desing a
random number generated and displayed on a LCD/ LED module. Can
anybody help me out in this.

Thiagu

Maybe you should research how to generate random numbers.

Displaying a number is not very complex, maybe as simple as:
"printf("%d", x);"


Best regards,
Spehro Pefhany
 
M

Mahurshi Akilla

Hi,

I'm a researcher. As a part of my project work I want to desing a
random number generated and displayed on a LCD/ LED module. Can
anybody help me out in this.

Thiagu

Typically, the microcontroller that you use has a random number
generator (it may not be truly random, of course) which is "good
enough" for most school projects (I am assuming this is a school
project here)

I remember using PIC and Motorola microcontrollers a few years ago and
they both had some way of getting a random number. I just had to
"scale" the numbers so they ended up in the ranges I wanted.

What microcontroller are you using? Try looking up its user guide for
the assembly/c/BASIC command to get random numbers.


Mahurshi Akilla
 
R

Rich Grise

I'm a researcher. As a part of my project work I want to desing a
random number generated and displayed on a LCD/ LED module. Can
anybody help me out in this.

Get a piece of cesium-137 for $79.00, like from here:
http://www.unitednuclear.com/isotopes.htm
Set it up next to a radiation counter, like a Geiger-Mueller tube
or something (would a PV cell catch betas or gammas?), and use its
output to clock a counter or pseudorandom generator.

Good Luck!
Rich
 
V

Vladimir Vassilevsky

Hi,

I'm a researcher. As a part of my project work I want to desing a
random number generated and displayed on a LCD/ LED module. Can
anybody help me out in this.

1. Take a radio, tune it away from stations.
2. Connect the radio to the input of a sound card.
3. Compute the 1/16 hash of the wave input.

Vladimir Vassilevsky

DSP and Mixed Signal Design Consultant

http://www.abvolt.com
 
R

Rich Grise

1. Take a radio, tune it away from stations.
2. Connect the radio to the input of a sound card.
3. Compute the 1/16 hash of the wave input.

OK, I'm an ignoramus, but what's a "1/16 hash" - I know what a hash
is, and I know what 1/16 means, but I can't imagine what 1/16 of
a hash could be.

Thanks,
Rich
 
V

Vladimir Vassilevsky

Rich said:
OK, I'm an ignoramus, but what's a "1/16 hash" - I know what a hash
is, and I know what 1/16 means, but I can't imagine what 1/16 of
a hash could be.

The quantity of the random numbers at the output should not exceed the
entropy of the incoming noise like signal. Otherwise the random numbers
will not be truly random; there will be the statistical dependencies.

The simple way to deal with this problem is computing a hash of the
incoming data. So you generate one random word from 16 incoming words.
The 1/16 will make a near perfect randomness taking the radio noise
spectrum and the typical audio sampling rate into the account.


Vladimir Vassilevsky
DSP and Mixed Signal Design Consultant
http://www.abvolt.com
 
M

Martin Griffith

OK, I'm an ignoramus, but what's a "1/16 hash" - I know what a hash
is, and I know what 1/16 means, but I can't imagine what 1/16 of
a hash could be.

Thanks,
Rich
Same here, my first guess was about drugs, but I don't think Valdimir
would be into that sort of thing


Martin
 
Hi,

I'm a researcher. As a part of my project work I want to desing a
random number generated and displayed on a LCD/ LED module. Can
anybody help me out in this.

Thiagu

Search on pseudo-random binary sequence generators. Wikipedia has a
good general entry on the subject.

One way of getting a pseudo-random binary sequence is with a linear
feedback shift register - if you exclusive-OR the output with a couple
of carefully selected taps along the shift register you can guarantee
that the content of the shift register goes through all but one of tis
possible combinations.
 
V

Vladimir Vassilevsky

Martin said:
Same here, my first guess was about drugs, but I don't think Valdimir
would be into that sort of thing

OK, now I can understand.

BTW, once long ago, when we just moved to the US, I designed a
schematics. I noticed that this schematics always raised the mood of a
person who was looking at it. Later, they explained it to me. The reason
was the refdes: one of the fuses was marked as FU2.


Vladimir Vassilevsky
DSP and Mixed Signal Design Consultant
http://www.abvolt.com
 
J

Jamie

Rich said:
OK, I'm an ignoramus, but what's a "1/16 hash" - I know what a hash
is, and I know what 1/16 means, but I can't imagine what 1/16 of
a hash could be.

Thanks,
Rich
what he's means in sort, is take a reading from the results every 1/16
of the total samples you acquired while recording the white/pink noise
from the receiver. this will give you a random set of values.
Hash is just a slang for noise that is unintelligent able. Something
you hear from FM radio while tuned on a dead area of the band with
MUTE off.

How ever, this doesn't help if you have to get a computer involved!
this means you would have to have something like a PIC,AVR or even a
Serial ROM chip that up load the data information so that you can
play it back to reference the signals for random control of the LED's

I think there is a better way to generate random signals at a more
basic level.
 
R

Rich Grise

OK, now I can understand.

BTW, once long ago, when we just moved to the US, I designed a
schematics. I noticed that this schematics always raised the mood of a
person who was looking at it. Later, they explained it to me. The reason
was the refdes: one of the fuses was marked as FU2.

When I was a tech in the USAF, they'd use a number to designate a
particular sub-unit, and everyone's favorite component was the second
transistor on the fourth unit: 4Q2. ;-)

Cheers!
Rich
 
R

Rich Grise

Search on pseudo-random binary sequence generators. Wikipedia has a
good general entry on the subject.

One way of getting a pseudo-random binary sequence is with a linear
feedback shift register - if you exclusive-OR the output with a couple
of carefully selected taps along the shift register you can guarantee
that the content of the shift register goes through all but one of tis
possible combinations.

These things come up from time to time - does anyone know if there's an
algorithm for selecting taps for the maximum-length sequence, or is it
just by-guess-and-by-gosh?

Don L? Any ideas here?

Thanks,
Rich
 
J

John Fields

Search on pseudo-random binary sequence generators. Wikipedia has a
good general entry on the subject.

One way of getting a pseudo-random binary sequence is with a linear
feedback shift register - if you exclusive-OR the output with a couple
of carefully selected taps along the shift register you can guarantee
that the content of the shift register goes through all but one of tis
possible combinations.

It's often more than just a couple of the taps and, with a little
ingenuity, the "lockup" state can be included in the sequence.
 
G

Guy Macon

Vladimir said:
BTW, once long ago, when we just moved to the US, I designed a
schematics. I noticed that this schematics always raised the mood of a
person who was looking at it. Later, they explained it to me. The reason
was the refdes: one of the fuses was marked as FU2.

Ever hear of MIL-TFP-41C? :)
 
J

John Fields

These things come up from time to time - does anyone know if there's an
algorithm for selecting taps for the maximum-length sequence, or is it
just by-guess-and-by-gosh?

---
Depending on the period, there's generally more than just one
maximal-length sequence, but I'm not aware of any algorithm which
can successfully predict which sequences will be maximal length.

Google "Table of irreducible polynomials" for some fascinating
reading, if you like that kind of thing.

I do :)

I have a photocopy of Marsh's "TABLE OF IRREDUCIBLE POLYNOMIALS OVER
GF(2) THROUGH DEGREE 19" which stops at degree 14, and the
introductory material indicates that all of the sequences were
unveiled/tested through the use of software.

That is, I guess, EXORing all of the taps sequentially and examining
the output sequences.
 
These things come up from time to time - does anyone know if there's an
algorithm for selecting taps for the maximum-length sequence, or is it
just by-guess-and-by-gosh?

The rules of thumb appears to be:

1. Prime numbers tend to make good taps.
2. Good taps tends to have an even number of bits.
 
V

Vladimir Vassilevsky

These things come up from time to time - does anyone know if there's an
algorithm for selecting taps for the maximum-length sequence, or is it
just by-guess-and-by-gosh?

The taps should represent a primitive polynomial in GF(2^n). The
algorithm is similar to the search of the prime numbers: you pick a
polynomial of a degree n and try to factor it by dividing by all of the
prime polynomials up to degree n/2. There are not too many of the
primitive polynomials, so this procedure is fairly fast.


Vladimir Vassilevsky
DSP and Mixed Signal Design Consultant
http://www.abvolt.com
 
Top