4 ms·
I usually settle on this design: https://hackaday.io/project/184643-schrdingers-trigger https://hackaday.io/project/184643-schrdingers-trigger The zener design
by Saigonautica 2y ago
I usually settle on this design: https://hackaday.io/project/184643-schrdingers-trigger https://hackaday.io/project/184643-schrdingers-trigger
The zener design works well, but I find the signal it produces is a little too fast to sample conveniently (it works a bit too well). The two-transistor design produces a similar but slower signal. 2N5551 works nicely.
Then one hex inverter configured as a cheap two-stage inverting amplifier, and another that cleans up the signal into nice 5V with sharp transitions. An optoisolator is another option for the second stage, but adds another part to the design.
Then I shove a Von Neumann extractor on an Attiny261A (high bandwidth parallel output) or Attiny10 (if just true/false output), I have a little assembly program for that. It takes the signal in, and outputs 8 bits out in parallel, plus one bit that toggles every time a new output is ready. It's not power efficient, I never use this design on a battery, so I never optimized for sleep modes and so on. Instead I optimized to push a little more bandwidth out and try to sample the signal in a balanced way.
Finally, I just grab that with something like a Pi Pico or ESP32 and push it out MQTT. I get something like 100-300 bytes per second depending on the voltage I'm driving the transistors at (anything over 13V gets a little spicy for the first hex inverter, but add a heatsink to it, and it's fine).
I have some KiCAD files for a finished board for all this, also has space for a boost converter (the transistors need 10-12V usually to generate a nice signal). I just finished it yesterday, if you leave me your contact I'm happy to let you know when I publish it. Otherwise, just check here in like 1-2 weeks and I'll probably have it up by then: https://github.com/seanboyce/ https://github.com/seanboyce/
- K0balt 2y agoPerfect! Thank you! I’ll check the GitHub in a while.
- Saigonautica 2y agoIt's a long weekend over here, so I managed to load up the code, BOM, KiCAD files, production files, and assembly instructions. Also some scope trace images of what the signal should look like at different stages: https://github.com/seanboyce/TRNG https://github.com/seanboyce/TRNG I didn't specifically design this for other people to easily replicate, but should not be too hard with some solder paste and a hot air rework station. The assembly code is extensively commented-- I realize AVR assembly is not most people's native dialect, haha. I hope you enjoy!