Pages: 1 2 [3]   Go Down
Author Topic: Beta testers needed for a new library that generates true random numbers  (Read 8251 times)
0 Members and 1 Guest are viewing this topic.
Grand Blanc, MI, USA
Offline Offline
Faraday Member
**
Karma: 93
Posts: 3968
CODE is a mass noun and should not be used in the plural or with an indefinite article.
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

@wanderson, I did some previous random number testing and used an SD card to capture the output, so I didn't have to dedicate a PC to the task. Would that be acceptable?
Logged

MCP79411/12 RTC ... "One Million Ohms" ATtiny kit ... available at http://www.tindie.com/stores/JChristensen/

Dallas, Texas
Offline Offline
God Member
*****
Karma: 30
Posts: 887
Old, decrepit curmugeon
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

@wanderson, I did some previous random number testing and used an SD card to capture the output, so I didn't have to dedicate a PC to the task. Would that be acceptable?

Very much so, I didn't want to restrict people to hardware they may not have, but if you have such hardware it makes it somewhat easier to test.  Please post the information (and sketch used) here if you can.  Thank you!
Logged

New true random number library available at: http://code.google.com/p/avr-hardware-random-number-generation/

Current version 1.0.1

Grand Blanc, MI, USA
Offline Offline
Faraday Member
**
Karma: 93
Posts: 3968
CODE is a mass noun and should not be used in the plural or with an indefinite article.
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

@wanderson, have a look at the sketch here, and let me know what you think:
https://github.com/JChristensen/entropyTest
Logged

MCP79411/12 RTC ... "One Million Ohms" ATtiny kit ... available at http://www.tindie.com/stores/JChristensen/

Dallas, Texas
Offline Offline
God Member
*****
Karma: 30
Posts: 887
Old, decrepit curmugeon
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

@wanderson, have a look at the sketch here, and let me know what you think:
https://github.com/JChristensen/entropyTest


I don't see anything that should interfere with the Entropy library, though my experience with using the String type on the arduino has been memory leaks, or at least behavior that made me believe memory leaks were occurring.  I would be curious as to how long it would be able to run.  It definitely looks like a useful way to collect data for those who are unwilling/unable to use a computer to capture the data.

Thanks for running tests!
Logged

New true random number library available at: http://code.google.com/p/avr-hardware-random-number-generation/

Current version 1.0.1

Grand Blanc, MI, USA
Offline Offline
Faraday Member
**
Karma: 93
Posts: 3968
CODE is a mass noun and should not be used in the plural or with an indefinite article.
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

I have also had difficulties with Strings in the past, but there were improvements in 1.0, so I thought I'd give it another go. My expectation would be that it should be able to run pretty much indefinitely. I have two SD breakout boards, I should be able to get both going here shortly. I'll let them run for 24 hours or so, then get the data to you.
Logged

MCP79411/12 RTC ... "One Million Ohms" ATtiny kit ... available at http://www.tindie.com/stores/JChristensen/

Dallas, Texas
Offline Offline
God Member
*****
Karma: 30
Posts: 887
Old, decrepit curmugeon
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Here are the test results so far.  Just a reminder, that while so far the test results have been good, this library really needs a lot more testing on a lot more chips--even chip types that have already been tested.  Please consider, running an arduino overnight running this test code and capturing the output.  Then email me the output or attach it to a reply to this thread along with information on the type of arduino you ran it on and the text on the arduino chip.

Any assistance on this would be greatly appreciated!

Code:
#include <Entropy.h>

void setup()
{
  Serial.begin(115200);
  Entropy.Initialize();
}

void loop()
{
  Serial.println(Entropy.random());
}

And here are the latest test results:

IDTesterDeviceChipDate CodeTypeSample SizeEntropyChi squareP-valueMeanS.C.C.Comments
001wandrsonArduino Uno R3ATMEGA328p-PU1153DIP1,000,0007.999797281.390.1231127.58030.000811
002wandrsonArduino Uno R3ATMEGA328p-PU1107DIP1,000,0007.999819251.380.5524127.44030.000379
003wandrsonArduino UnoATMEGA328p-MU1103SMD1,000,0007.999809265.270.3163127.48230.001646
004wandrsonArduino Mega R3ATMEGA2560-16AU1131SMD1,000,0007.999813258.510.4268127.55480.000069
005wandrsonAdafruit ATmega32u4 breakout boardMEGA32U4-AU1038SMD1,000,0007.999811261.870.3703127.46970.001247
006pYro_65Clone megaATMEGA2560-16AU1110SMD809,9847.999729304.090.0189127.5027-0.000090
007wandrsonSparkfun AVR/StickTINY85-20SU1023SMD1,000,0007.999826240.630.7321127.59750.000831
008wandrsonArduino NG/Rev CATMEGA168-20PU0701DIP1,000,0007.999808265.590.3114127.32460.000910
009ChagrinSeeeduinoATMEGA328P-AU1040SMD1,336,3607.999865250.350.5704127.65950.000431
010ChagrinSeeeduino Mega v1.23ATMEGA1280-16AU0846SMD1,293,5007.999861248.240.6074127.5377-0.000420
011wandrsonArduino NG/Rev CATMEGA168-20PU0701DIP1,000,0007.999815256.570.4606127.47650.0000042
012wandrsonArduino Mega R3ATMEGA2560-16AU1126SMD1,000,0007.999843217.740.9562127.53590.000320
013wandrsonArduino LeonardoATMEGA168-20PU1039SMD1,000,0007.999788293.570.0487127.43570.000022
014wandrsonBreadboard tiny, 16MHz (internal PLL)ATTINY85-20PU1211DIP106,7447.998190267.920.2768127.37960.009237
015wandrsonBreadboard tiny, 16MHz (internal PLL)ATTINY85-20PU1211DIP102,6407.998103270.080.2468127.6913-0.001888
016wandrsonBreadboard tiny, 16MHz (internal PLL)ATTINY85-20PU1211DIP100,0007.998026274.120.1960127.49610.007423
017wandrsonBreadboard tiny, 16MHz (internal PLL)ATTINY85-20PU1211DIP277,3887.999275277.330.1610127.26890.003250
018wandrsonBreadboard tiny, 16MHz (internal PLL)ATTINY85-20PU1211DIP100,8647.9861593084.670.0000127.79450.032045
019wandrsonBreadboard tiny, 16MHz (internal PLL)ATTINY85-20PU1211DIP111,0767.998312259.450.4108127.76970.000617
020wandrsonBreadboard tiny, 16MHz (internal PLL)ATTINY85-20PU1211DIP101,4647.997946288.950.0707127.51820.006300
021wandrsonBreadboard tiny, 16MHz (internal PLL)ATTINY85-20PU1211DIP287,8087.999319271.780.2246127.30420.002162
022wandrsonBreadboard tiny, 16MHz (internal PLL)ATTINY85-20PU1211DIP262,3127.999314249.990.5767127.78280.001686
023wandrsonArduino NG/RevATMEGA168-20PU0624DIP539,7487.999642267.920.2769127.67160.000370
024wandrsonArduino Pro Mini 3v3ATMEGA328P-AU1208SMD1,004,3527.999785298.990.0304127.58720.001192
025wandrsonBreadboard tiny, 16MHz (internal PLL)ATMEGA328P-AU1211DIP111,5047.998213275.620.1791127.2366-0.003130
026wandrsonBreadboard tiny, 16MHz (internal PLL)ATMEGA328P-AU1211DIP115,7287.998499240.810.7292127.4722-0.001927
027wandrsonATmega1284p on STK500ATMEGA1284P-PU1209DIP100,9767.998129262.240.3642127.3669-0.001081
028P. StoffregenTeensy++ 2.0, 3v 8MHzAT90USB12871039SMD254,2807.999227274.240.2188127.13360.001923
029P. StoffregenTeensy++ 1.0, 5v 16MHzAT90USB6460849SMD343,0327.999508233.230.8322127.6864-0.001012
030P. StoffregenTeensy++ 2.0, 5v 16MHzAT90USB12860932SMD280,0687.999329260.120.3996127.64410.002521
031J. ChristensenArduino UNO SMD EditionATmega328P-MU1034SMD650,1767.999712259.910.4030127.3920-0.000527
032J. ChristensenBreadboard Arduino close, 16MHz xtalATmega328P-PU1053DIP670,1127.999712267.480.2832127.55120.000849
033wandrsonATmega1284p on STK500ATMEGA1284P-PU1211DIP484,2927.999649235.480.8045127.4796-0.000014
034wandrsonBreadboard tiny, 8mhz (internal oscillator)ATTINY85-20PU1211DIP104,6487.997952297.510.0347127.7577-0.001279
035wandrsonBreadboard tiny, 8mhz (internal oscillator)ATTINY85-20PU1211DIP310,5607.999305299.360.0294127.4556-0.000165
036wandrsonBreadboard tiny, 8mhz (internal oscillator)ATTINY85-20PU1211DIP106,3767.998142274.670.1897127.18530.001980


All of the above tests were performed on different chips. No repeated tests on the same chip, unless otherwise noted. Since test number 018 failed so spectacularly, I retested that same chip in test number 022. Tests 014 - 022, 025-026, and 034-036  were performed using arduino-tiny-0100-0013.zip from http://code.google.com/p/arduino-tiny/. Test 027 and 032 was performed using Mighty 1284P core files with the original bootloader.
« Last Edit: June 19, 2012, 10:08:02 am by wanderson » Logged

New true random number library available at: http://code.google.com/p/avr-hardware-random-number-generation/

Current version 1.0.1

Dallas, Texas
Offline Offline
God Member
*****
Karma: 30
Posts: 887
Old, decrepit curmugeon
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Here are some additional test results:

IDTesterDeviceChipDate CodeTypeSample SizeEntropyChi squareP-valueMeanS.C.C.Comments
037wandrsonBreadboard tiny, 8mhz (internal oscillator)ATTINY85-20PU1211DIP102,4127.998406225.980.9045127.14730.000618
038wandrsonBreadboard tiny, 8mhz (internal oscillator)ATTINY85-20PU1211DIP100,3687.998131260.480.3935127.4403-0.004133
039wandrsonBreadboard tiny, 8mhz (internal oscillator)ATTINY85-20PU1211DIP101,9647.998389227.510.8914127.0540-0.004832
040wandrsonBreadboard tiny, 8mhz (internal oscillator)ATTINY85-20PU1211DIP236,1367.999246247.630.6178127.3000-0.002023
041wandrsonBreadboard tiny, 8mhz (internal oscillator)ATTINY85-20PU1211DIP100,1447.998202249.550.5846127.80170.000526
042wandrsonBreadboard tiny, 8mhz (internal oscillator)ATTINY85-20PU1211DIP107,0927.998095282.900.1108127.42410.001396
043wandrsonBreadboard tiny, 8mhz (internal oscillator)ATTINY85-20PU1211DIP100,1687.998309234.680.8146127.59220.002843
044J. ChristensenArduino UNO SMD EditionATmega328P-MU1034SMD1,000,0007.999809264.470.3286127.3932-0.000010
045J. ChristensenBreadboard Arduino close, 16MHz xtalATmega328P-PU1107DIP1,000,0007.999792289.050.0702127.50880.000577
046wandrsonBreadboard 1284p, 16mhz xtalATTINY1284P-PU1211DIP446,9727.999577262.650.3575127.4290-0.002572
047wandrsonBreadboard 1284p, 8mhz xtalATTINY1284P-PU1211DIP109,7407.998350251.610.5483127.52610.001790
048wandrsonBreadboard 1284p, 8mhz xtalATTINY1284P-PU1211DIP318,4327.999402264.350.3305127.55980.001933
049wandrsonBreadboard tiny, 8mhz (internal oscillator)ATTINY84-20PU1010DIP278,9607.999355248.840.5969127.8017-0.003964
050wandrsonBreadboard tiny, 1mhz (internal oscillator)ATTINY84-20PU1010DIP100,2887.998213249.050.5933127.5756-0.003266
051wandrsonBreadboard tiny, 1mhz (internal oscillator)ATTINY84-20PU1010DIP100,0207.998360226.460.9009127.3991-0.002293
052wandrsonBreadboard tiny, 8mhz (internal oscillator)ATTINY84-20PU1010DIP102,9167.998466218.490.9527127.3037-0.002528
053wandrsonBreadboard tiny, 8mhz (internal oscillator)ATTINY84-20PU1010DIP265,4207.999419213.390.9728127.61360.000817
054Coding BadlyArduino UNO R2ATMEGA328P-PU1107DIP839,9887.999778257.950.4367127.3391-0.003102
055wandrsonBreadboard 1284p, 8mhz xtalATTINY1284P-PU1211DIP649,7287.999697273.190.2071127.4459-0.001684
056wandrsonBreadboard tiny, 1mhz (internal oscillator)ATTINY84-20PU1010DIP102,8607.998113269.980.2483127.55590.005196
057wandrsonBreadboard tiny, 1mhz (internal oscillator)ATTINY84-20PU1010DIP96,0687.997948274.550.1911127.45900.005131
058wandrsonBreadboard tiny, 8mhz (internal oscillator)ATTINY84-20PU1010DIP101,1647.998136262.130.3661127.0534-0.004649
059wandrsonBreadboard tiny, 8mhz (internal oscillator)ATTINY45-20PU1211DIP284,0727.999377245.090.6610127.3208-0.000006
060wandrsonBreadboard tiny, 1mhz (internal oscillator)ATTINY45-20PU1211DIP100,0727.998263240.500.7341127.3423-0.003373
061wandrsonBreadboard tiny, 16mhz (internal oscillator)ATTINY45-20PU1211DIP110,6447.998224272.660.2136127.47350.002846
062wandrsonBreadboard tiny, 1mhz (internal oscillator)ATTINY45-20PU1211DIP100,9127.998196252.700.5289127.34670.008878
063wandrsonBreadboard tiny, 8mhz (internal oscillator)ATTINY45-20PU1211DIP100,1647.998027273.660.2016127.21110.002015
064wandrsonBreadboard tiny, 16mhz (internal oscillator)ATTINY45-20PU1211DIP214,7607.999182243.370.6891127.4248-0.005771
065wandrsonBreadboard tiny, 1mhz (internal oscillator)ATTINY45-20PU1211DIP103,6567.998399229.730.8704127.4767-0.003893
066wandrsonBreadboard tiny, 8mhz (internal oscillator)ATTINY45-20PU1211DIP118,6767.998584232.000.8463127.3653-0.008254
067wandrsonBreadboard tiny, 16mhz (internal oscillator)ATTINY45-20PU1211DIP107,9207.998366244.520.6704127.2434-0.007688
068wandrsonBreadboard tiny, 1mhz (internal oscillator)ATTINY45-20PU1211DIP101,7167.998237247.820.6147127.2760-0.000026
069wandrsonBreadboard tiny, 8mhz (internal oscillator)ATTINY45-20PU1211DIP231,7407.999281230.800.8594127.5449-0.000518
070wandrsonBreadboard tiny, 16mhz (internal oscillator)ATTINY45-20PU1211DIP123,8207.998312289.800.0662126.9300-0.003889
071P. StoffregenTeensy2  5v, 16MHzMEGA32U4-AU0945SMD383,3807.999503264.980.3208127.65700.001401
072Elvind TrielArduino DuemilanoveATMEGA328P-PU0948DIP1,226,2567.999859239.460.7495127.6417-0.000672


All of the above tests were performed on different chips. No repeated tests on the same chip, unless otherwise noted. Since test number 018 failed so spectacularly, I retested that same chip in test number 022. Tests 014 - 022, 025-026, 034-043, 049-053, and 056-070  were performed using arduino-tiny-0100-0013.zip from http://code.google.com/p/arduino-tiny/. Test 027, 032, 046-048, and 055 were performed using Mighty 1284P core files.
« Last Edit: June 27, 2012, 03:27:58 pm by wanderson » Logged

New true random number library available at: http://code.google.com/p/avr-hardware-random-number-generation/

Current version 1.0.1

0
Offline Offline
God Member
*****
Karma: 25
Posts: 606
Always making something...
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

I have also had difficulties with Strings in the past, but there were improvements in 1.0, so I thought I'd give it another go. My expectation would be that it should be able to run pretty much indefinitely.

It should run indefinitely with the String implementation (developed in Teensyduino) which I tried to contribute for Arduino 1.0.  Sadly, the String that made it into Arduino has numerous changes that defeat much of the careful optimization work I did.  My attempt to fix memory allocation problems was also not used.

If it crashes on an Arduino board, could you please give the same sketch a try on a Teensy?


Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 5
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Howdy,
  It's 4 months later, and I am wondering, are you still looking for test results?  I have a few chips I could run this on.
Logged

Dallas, Texas
Offline Offline
God Member
*****
Karma: 30
Posts: 887
Old, decrepit curmugeon
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Yes, more results would be helpful.
Logged

New true random number library available at: http://code.google.com/p/avr-hardware-random-number-generation/

Current version 1.0.1

Pages: 1 2 [3]   Go Up
Jump to: