Algorithm needed for random number filtering

new topic     » topic index » view thread      » older message » newer message

Hello,
I have an Arduino that uses some transistors as avalanche noise generators.
The Arduino uses analog to digital converters, to take the noise and produce hopefully random numbers in the range 0-1024. But, there is a distinct prevalence of randoms in a range that is influenced by the voltage supplied to the noise generators. Pretty much a bell curve in the middle of the range, and a abberation of massive amounts of zeros.
I have used two noise generators with two inputs, then add the two numbers to make a number 0-2048 to try flatten the bell but its not working as well as hoped. I also drop the zeros.

My current method is to discard all numbers with samples above a certain limit, then add some samples to be the same as samples just less than the limit, giving hopefully 256 or more numbers with samples in a close range. But I have to manually tweak that limit value to get the 256. Is there a programmatical way to determine the limit by a first pass through the data?
My maths is hopeless BTW, google is no help.

I need to have a method of reading the random data, to determine the limit value, instead of a hit and miss approach. Google gives examples that are waaaay beyond my math!

new topic     » topic index » view thread      » older message » newer message

Search



Quick Links

User menu

Not signed in.

Misc Menu