I once taught an Arduino class where we built up an led "dice roller" in steps. The dice project we used put a piece of wire on the ADC pin and we read the noise to seed the random number generator... A contrived example, but useful for teaching the concepts! 😊
@andymouse8 ай бұрын
Awesome !
@DerekWoolverton8 ай бұрын
A couple companies made noise based random number generators way back when. Mostly based on AM radios that would then just sample the input for a zero or one. Got used in some secure cryptographic applications, as well as gambling machines (which is where I ran into them).
@8antipode98 ай бұрын
Yeah, I also used an ATTINY (don't remember which specifically) and made a "dice roller" out of it, using LEDs arranged in a "dice-dot" pattern. It would roll a 1 to 6 on each push of the button, and come up with a random seed and store it so that every time to powered it on, it would start at a different seed. It was a fun little project, running off of a lithium pouch battery with one of those battery management boards.
@KeritechElectronics8 ай бұрын
Ha. I remember using a Tiny85 (or was it Tiny13?) for decoding RC5 remote control codes and controlling a motorized volume pot & selector relay in the "Little Red Devil" tube amp I built at the end of 2021. Debugging that thing was a pain in the ass until I realized what exactly went wrong - the chip's fusebits were set to expect an external crystal oscillator! Lessons learned.
@YSoreil8 ай бұрын
I wrote a gameboy emulator a few years back, that console also included a similar shift register based noise generator. You had a few control flags to select how it generated the noise and a 15/7 bit selector. The noise generator was mostly (only?) used for sound and quite a lot of games made very good use of it. Thinks like explosion sounds etc.
@farzadb828 ай бұрын
If you have more than one Arduino, it's also possible to use another Arduino as an ISP programmer to program an Arduino. There's an example sketch in the IDE called ArduinoISP with instructions on how to hook that up.
@ericwazhung8 ай бұрын
Interesting thing about ATtiny85: It has a high-speed Timer/PWM peripheral that runs significantly faster than, but synchronized with, the uC clock... In case you need a random bit generator at upwards of 85MHz ;) (beware: cycle-counting, dead-timers, and assembly) With some careful
@charlesdorval3948 ай бұрын
I'm literally currently building myself an ISP programmer :) Basically your board and the programmer into one hehehe I'm glad to see you sharing that sort of information!
@Hellhound6048 ай бұрын
I love the ATtiny85. You can run them and their timers at quite a high speed (64Mhz reliably to 80Mhz) from the internal PLL. I use them in all sorts of weird single-chip projects.
@GeorgeGraves8 ай бұрын
I like the heavy chunk of plastic you have that mounted to - nothing worse the PCB's flopping around on your workbench. Also - RANT OF THE WEEEEEEEEEKKKKKKKKKKKKKKKKK!!!!
@jimomertz8 ай бұрын
Those ATTINY85 are used EVERYWHERE! I’ve always preferred microcontrollers over Arduino things, just for the size factor. Arduinos are too gigantic to put into any real project.
@andymouse8 ай бұрын
Arduino is an 'Ecosystem' not a gigantic thing there are hundreds of MCUs you can utilize from 8 pin and up "I’ve always preferred microcontrollers over Arduino things" that statement is bizarre as Arduino is microcontroller (MCU) how can you prefer an ATTiny85 ? It is one !!
@nyppy8 ай бұрын
There's actually no need to buy a dedicated programmer. Any Arduino can be used as a programmer for another chip by flashing the ArduinoISP sketch to it and then selecting "Arduino as ISP" from the programmer menu.
@bayareapianist8 ай бұрын
But you need to know what you're doing and find out the exact wiring.
@silverXnoise8 ай бұрын
@@bayareapianist…and Lord knows learning is a deal breaker in this hobby.
@bayareapianist8 ай бұрын
@@silverXnoise So does Google search engine.
@andymouse8 ай бұрын
@@bayareapianist Jeez, that is the whole reason Arduino exists 'Learning' this aint the hobby for you try trainspotting.
@BaldurNorddahl8 ай бұрын
@@bayareapianist just ask chatgpt. No need to know what you are doing anymore 🙂
@davidareader8 ай бұрын
commonly random bitstream generation is done by sampling avalanche noise in a reversed-biased p-n junction .. i've seen several designs using discrete transistors, but never encountered a "single chip" implementation .. so now i'm wondering if there is a reason why, or if such a thing does in fact exist?
@byronwatkins25658 ай бұрын
What feedback scheme are you using for the pseudorandom numbers?
@jonathancocaud8 ай бұрын
And you can add "delay(analogRead(A...));" in the loop() to control the bitstream frequency with a potentiometer :)
@sdp84838 ай бұрын
I really like the newer Attiny212 for simple projects with minimal flash requirements. Its bigger siblings that includes the attiy416 are also great.
@ats891178 ай бұрын
I guess the ATTINY85 must have pretty good protection against ESD. You were giving it a very rigorous test at the end of the video!
@jeffspaulding98348 ай бұрын
They seem pretty resilient as far as that goes. I played with ATTINY13s a lot a couple years ago, didn't take much care about ESD at all (they're cheap), and never noticed a problem with any of them.
@jonathancocaud8 ай бұрын
If you want it to be even more random, you can add "randomSeed(analogRead(A1));" in the setup() ;-)
@edgeeffect8 ай бұрын
I made my own programmer... only problem was, as the programmer is based on an ATMega chip.... so I needed a programmer to program it! :)
@cmuller14418 ай бұрын
It's not really "random" because it can be predicted... It's "pseudo random".
@johnpawlicki11848 ай бұрын
This is not still not random nur psuedo-random. Trjuly random generally requires a noise source. Still good video.
@jonathangriffin34868 ай бұрын
ive always liked the 328 because i could program asm on it. I perfered external crystal timing for hardware control.
@andymouse8 ай бұрын
me too still love it !
@synthnerd45398 ай бұрын
This is good to know, because I just bought an ATTiny 85 and programmer to teach myself how to do exactly this for the same kind of circuits! But as someone who doesn't know C (presuming that's C there) I'd have liked a quick rundown of the code - though a healthy amount of Z80 back in the day means I can hazard a guess. Also, how does that random generator actually source its choice? What's the basis for the randomisation? How random really is it?
@IMSAIGuy8 ай бұрын
there are a million videos on how to program. I suggest you use chat-GPT and ask for simple code. then you can look at it and then ask for modifications. chat "write an arduino sketch for the ATTINY85 that blinks an LED connected to pin 2." then "modify code to blink the LED twice each time" then "make the led blink slow and speed up over 4 seconds" ..... the random function is pseudo random and will repeat after several millions.
@synthnerd45398 ай бұрын
@@IMSAIGuy so this is flipping bits at full speed, I take it? And I also guess it would be simple to add a delay, or divide the clock speed down to run this in the same kind of speed ranges that the old shift register blocks worked..?
@edgeeffect8 ай бұрын
If you did some Z80 back in the day, I heartily recommend getting into AVR assembly language... it's a rather nice instruction set that will remind you of the good ol' days.