From 1979 to 2007, the Princeton Engineering Anomalies Research (PEAR) laboratory investigated possible interactions between human intention and physical systems. One of its main experimental platforms used Random Event Generators (REGs), which produced random binary sequences.
Participants were asked to focus on three conditions:
• HIGH: attempt to generate more 1s than expected.
• LOW: attempt to generate fewer 1s than expected.
• BASELINE: no attempt to influence the output.
PEAR researchers reported small statistical deviations associated with intention in their accumulated experiments. Their work remains a point of reference in research on consciousness and machine-generated randomness. PEAR REG research archive
I wanted to build a device inspired by these experiments. Most of the microcontroller boards I had available relied on software pseudorandom number generators, so I looked for a board with a hardware source of random bits.
A pseudorandom number generator (PRNG) uses a mathematical algorithm to generate a sequence from an initial seed. If the algorithm and seed are the same, the sequence can be reproduced.
For example, a standard Arduino sketch might use randomSeed() and random():
long randNumber;
void setup() {
Serial.begin(9600);
randomSeed(analogRead(0));
}
void loop() {
randNumber = random(300);
Serial.println(randNumber);
delay(50);
}Reading an unconnected analogue pin can provide a variable seed, but it does not turn the algorithm into a true random number generator. The underlying sequence is still pseudorandom.
Arduino randomSeed() reference
A true random number generator (TRNG) derives random bits from a physical process rather than relying solely on a deterministic software algorithm.
The Arduino UNO R4 Minima uses the Renesas RA4M1 microcontroller, which includes the Secure Crypto Engine 5 (SCE5) peripheral with a hardware TRNG. The trng Arduino library provides access to this functionality for the project.
This makes the UNO R4 Minima a suitable platform for a compact experimental device that generates bits and evaluates their distribution.
Components
• HW-069 four-digit TM1637 display
• DFRobot Gravity Analog Rotation Sensor, DFR0054
• Gravity digital push button
• USB-C cable
• Jumper wires and breadboard
• 9 V battery
Other boards may contain hardware random generatorslike ESP32 or STM32
Connections
Some time ago, a follower gave me an obscure Italian handheld device originally designed for soil testing. I liked the enclosure, and its shape seemed ideal for this project. Even the name could be repurposed.
GUAR: Generador Uniforme de Anomalías Random.
I added a hole for the rotary sensor and reused the existing enclosure. The 9 V battery was a convenient power source, and the UNO R4 Minima can accept it through VIN.
The result is a repurposed instrument with a new function: instead of testing soil, it generates random bits and records statistical measurements.
Software installation1. Install the Arduino IDE.
2. Install the TM1637 library.
3. Install the TRNG library: https://github.com/embarquech/trng
4. Connect the UNO R4 Minima to your computer with a USB-C cable.
5. Open guarx.ino.
6. Select Arduino UNO R4 Minima as the board and choose the correct serial port.
7. Compile and upload the sketch.
After uploading, the display should show the startup messages and allow you to select a condition using the rotary sensor.
1. Connect the battery.
2. Wait for the startup messages on the display.
3. Rotate the sensor to select the experimental condition:
◦ LOW: attempt to produce fewer 1s.
◦ BASELINE: no specific intention to influence the output.
◦ HIGH: attempt to produce more 1s.
4. Press the push button to begin the session.
5. Maintain the selected intention, or the baseline condition, throughout the session.
6. The device generates 60 trials of 200 bits each, for a total of 12, 000 bits per session. Each trial is evaluated against the expected count of 100 ones.
7. At the end, the display presents the session results and cumulative statistics.
The display provides immediate feedback about individual trials, while the serial output provides the data needed for more detailed analysis.
Changing the selected condition resets the associated cumulative statistics. The statistics are held in RAM, so they are also lost when the device loses power. Save the serial output if you want to preserve the results.
The following parameters are the most useful to inspect when adapting the sketch. Their exact names may differ between firmware versions, so check the corresponding constants in guarx.ino before editing them.
Trial length: Increasing the number of bits per trial makes the expected count and its standard deviation larger.
Number of trials: Increasing the number of trials provides more observations and improves the ability to measure small differences in the average output.
Significance threshold: A lower threshold flags smaller deviations more often. A higher threshold requires stronger deviations. The threshold should be selected according to the intended statistical test, rather than adjusted after looking at the results.
Display pause: Increase the pause if the result screens disappear too quickly. This affects usability, not the statistical calculations.
Session length and trial size: If you change these parameters, update the analysis to use the actual number of bits and trials collected. Do not compare sessions with different lengths using raw totals alone.
Connect the device to a computer and open the Arduino Serial Monitor at 115200 baud. The firmware emits a CSV header and a data row for each completed trial, along with human-readable status messages.
Copy the serial output into a text file. Retain the header and valid data rows, excluding startup messages and other status text. Save the cleaned data as guar.csv.
Each trial record can include the condition, selector reading, trial number, number of ones and zeros, cumulative counts, cumulative Z-score and p-value, session totals, elapsed time and TRNG errors. Use the actual CSV header from your firmware as the definitive description of the available fields.
The main quantities to analyse are:
- Ones per trial: the number of 1s in each 200-bit trial.
- Mean ones per condition: the average count of 1s across all trials for LOW, BASELINE and HIGH.
- Deviation from expectation: the difference between the observed count and the expected count under the unbiased-bit model.
- Cumulative deviation: how the total departs from expectation as trials accumulate.
- Z-score: the size of the deviation expressed in standard deviations.
- P-value: the probability, under the specified null hypothesis, of obtaining a result at least as extreme as the one observed.
The Z-score measures how far an observed result is from its expected value, expressed in standard deviations.
For N independent bits, where X is the observed number of ones:
Z = (X − N/2) / √(N/4)
A positive Z-score means more ones than expected; a negative score means fewer.
For example, a session containing 6, 001 ones out of 12, 000 bits is only one bit above the expected total of 6, 000. This is well within normal statistical variation.
The main comparison should be between the average number of ones per trial under HIGH, LOW and BASELINE, using repeated sessions rather than individual unusual trials.
Final notesThe PEAR laboratory reported small deviations in its random-event-generator experiments over many trials.
I have not yet been able to influence the random generation in a statistically significant way with GUAR Tester. In any case, there is something fascinating about building an instrument for a question that sits somewhere between electronics, probability and the limits of what we understand.
References and further readingPrinceton Engineering Anomalies Research — REG experimentshttps://phere.global-mind.org/reg.html
Jahn & Dunne, The PEAR Proposition (2007)https://pubmed.ncbi.nlm.nih.gov/17560342/
PEAR REG experiments: equipment and designhttps://phere.global-mind.org/rdnelson/reg.html
PEAR analysis of variance of REG experimentshttps://phere.global-mind.org/rdnelson/anova.html
Princeton Engineering Anomalies Research — overview and historyhttps://psi-encyclopedia.spr.ac.uk/articles/princeton-engineering-anomalies-research-pear/
Arduino UNO R4 Minima — official documentationhttps://docs.arduino.cc/hardware/uno-r4-minima
Renesas RA4M1 — official datasheethttps://www.renesas.com/en/document/dst/ra4m1-group-datasheet
Arduino randomSeed() referencehttps://docs.arduino.cc/language-reference/en/functions/random-numbers/randomSeed/
TRNG Arduino libraryhttps://github.com/embarquech/trng
TM1637 display libraryhttps://github.com/avishorp/TM1637












_3u05Tpwasz.png?auto=compress%2Cformat&w=40&h=40&fit=fillmax&bg=fff&dpr=2)
Comments