Electronic Projects, forums and more.

Go Back   Electronic Circuits Projects Diagrams Free > Electronics Forums > Electronic Projects Design/Ideas/Reviews


Electronic Projects Design/Ideas/Reviews Are you building an electronic project or want to? Maybe you need some assistance? Come and submit your electronic questions here and let our experienced members find a solution.

Reply
 
Thread Tools Display Modes
Old 9th September 2003, 07:01 PM   (permalink)
Default Random Number Generator

Where can I find a circuit design for a random number generator? I've tried looking on Google, but only came up with University projects involving Geiger counters etc., and online random number generators. I'm taking electronics for GCSE, so nothing too complex, please. It really doesn't matter if the numbers are truly random.

At the moment, I'm currently considering mutilating 3 electronic dice circuits from www.maplin.co.uk , and putting them together to make a 3 digit number generator. Does anybody have a circuit design, or a better idea than the one I suggested?
__________________
I bet, after all the time you took to load up wordpad, copy and paste this text, you were expecting something witty? Fool...
Primar is offline   Reply With Quote
Old 9th September 2003, 07:26 PM   (permalink)
Default random?

if it really doesn't have to be truly random, the simplest circuit is a pseudo-random, maximal length linear feedback shift register. Look up LFSR on Google and you'll quickly find some circuits. It's basically a serially connected line of flip-flops with strategically placed XOR gate(s) providing feedback. Sampling a relatively long shift-register sequence, (n=127 for ex), will provide an essentially random output. Sequence repeat times of trillions of years (assuming the computing power common on todays machines) are easy to generate. The hard part is coming up with the feedback taps (prime over the Galois field, whatever that means. Damn it Jim, I'm an engineer, not a mathematician). Fortunately, the work's already been done for you and it's available on the web. I don't have the website handy, but a very generous minded mathematician (french, I think. I ran across it about 9 months ago) has posted all taps up to 512 or so on his website. Again, do a google search. Good luck.

- CAL
laroche73 is offline   Reply With Quote
Old 9th September 2003, 08:08 PM   (permalink)
Default more randomness

ok, I'm curious. I think the LFSR is the simplest digital method of generating a "random" number output. Does anyone have an analog counterpart that can easily be converted to a digital output? (maybe a diode noise generator coupled with a low cost serial A/D?) I ask because there are so many more random variables to deal with in the analog domain, temperature, supply voltage, component ageing, etc. The things that are normally compensated for might provide a better solution than an all digital one, not something I'd often claim...
laroche73 is offline   Reply With Quote
Old 9th September 2003, 11:10 PM   (permalink)
Default

http://www.ljgroup.com/techsupport/c...curric_update/ product/scantek/st140/us/1403_ds11.pdf

this should do the trick
themikestar is offline   Reply With Quote
Old 10th September 2003, 12:41 AM   (permalink)
Default

Quote:
Does anyone have an analog counterpart that can easily be converted to a digital output? (maybe a diode noise generator coupled with a low cost serial A/D?)
Laroche, ive recently bin thinking about that when i was posting to the electronic dice thread. Does a noise signal really need to be converted ?
If a noise spike of sufficient length and amplitude can "trigger" an input, conversion shouldnt be necessary. An ordinary transistor will generate some noise , as will a diode, but im just wondering is there some predictable pattern to it ? Temperature will have an effect on this as well, im assumming.
__________________
Two roads diverged into a woods...i took the one less travelled by. R. Frost.
nettron1000 is offline   Reply With Quote
Old 10th September 2003, 10:54 AM   (permalink)
Default random # generators

That's an interesting thought, where the "conversion" is done simply by triggering a timer.

What the output will be used for helps in deciding what kind of random number generator method to use.

LFSR generators can provide an output that is "random enough" for many applications. In other words, if the end user perceives the output as being random for a given application, a psuedo-random generator may work fine. The problem with using LFSR generators for things like cryptography is that they're based on a repeating sequence. It may be an incredibly long sequence, but it ultimately repeats. LFSR generators have been researched exhaustively for cryptographic use, and given a relatively small output sample, the originating generator configuration can be reconstructed (at least that's what my web search turned up).

btw, here's an app note listing the appropriate taps for LFSRs of up to length n=168. FPGA's provide an efficient means of constructing long LFSRs, due to their register heavy architecture.

http://direct.xilinx.com/bvdocs/appnotes/xapp052.pdf

If operating speed isn't a primary concern, a small micro can also do the job very simply. Check this link, it's one I posted under the lamp-dimmer thread, but also has a pn generator based on a PIC 12C508A.

http://www.e-insite.net/ednmag/conte...es/32102di.pdf


btw, a LFSR with n=168 and using a 10Mhz clock would have a sequence repeat time of ~ 10^36 years.
laroche73 is offline   Reply With Quote
Old 10th September 2003, 01:40 PM   (permalink)
Default

Ok, thanks for all the advice. I'll try my best at fudging it all together...
__________________
I bet, after all the time you took to load up wordpad, copy and paste this text, you were expecting something witty? Fool...
Primar is offline   Reply With Quote
Old 11th September 2003, 06:08 PM   (permalink)
Default

If the random numbers are requested as the result of some human input, the following circuit could be used...

An oscillator is connected to the clock of a modulo counter (i.e. one that loops back to zero after reaching its maximum value). When a number is requested, the clock is disabled, causing the counter to stop on a particular number. If the time taken for the counter to count through it's entire range is much less than the minimum time between user requests, the output will be for most purposes random.
I am a fish is offline   Reply With Quote
Old 22nd September 2003, 03:48 AM   (permalink)
Default random number generator

hi primar, have you found the circuit you're looking? if not i have the circuit for a 3 digit display. it uses the 555, MC14553B or CD4553 3-digit BCD counter, 74LS47 BCD to 7 segment decoder driver and 3 common transistors and operates at 6v. if you're interested, just email me here or my other email add: floyd2949@myway.com
__________________
\"NONE BUT THE BRAVE DESERVES THE FAIR\" ~Shakespeare~
mozikluv is offline   Reply With Quote
Reply

Bookmarks

Thread Tools
Display Modes




All times are GMT. The time now is 08:44 AM.


Electronic Circuits  |  Electronics Wiki
Powered by vBulletin® Version 3.7.0
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.