Random Number Generator - F-J's Physics - Video167

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
welcome back to the home lab and I've got a fun little experiment to show you today by means of a demonstration really what I'm going to show you is a piece of electronics that can produce an absolutely massive range of binary random numbers and I think it looks quite pretty too it's my blinking lights supercomputer [Music] thank you so these things have been all over YouTube recently and I got my idea from Big Clive who built one uh what it is it's an array of LEDs but the LEDs are flashing LEDs and what's slightly unusual about the flashing LEDs is you'll notice that when I first turned it on they all lit up at the same time and then slowly but surely they go out of phase with each other what this means is the little timer chips inside them are a bit like a sort of 555 timer I suppose um flashes the LEDs are not quite the same rate they're very cheap LEDs I haven't spent a lot of money on them so they won't all flash at exactly the same frequency so after a short period of time they all go out of phase with each other and you get these wonderful varied random patterns and it's that we're going to use to generate very large binary random numbers so let's have a quick look at the construction and then I'll show you how I use it to Generate random numbers they're really quite easy to build and actually not that expensive at all I just started off with a piece of Ferro type board and this sort of breadboard printed on one side and the holes each have a little dot of copper on them but nothing's connected so it allows us to solder on the components and then join them in any way we want um you also need a lot of LEDs and I bought a great big bag of these LEDs from China and you can see that it's still this full um I haven't used them all um and these were blue LEDs and they're a flashing type so um they've got the Flasher unit built in them already and then just to limit the current a whole load of I use 330 ohm resistors and again they're cheap as anything so what I needed to do was spend a couple of evenings doing very repetitive work putting the LEDs into the board and soldering them on so I'll show you what that looks like now so here you can see a close-up of the kind of Vero board that I used with its little copper pads on it and the components I use so the bag of LEDs and lots and lots of 330 ohm resistors um I might just mention here you might be wondering why didn't I just use one resistor feeding all of the LEDs well if you think about it they're not all on all of the time so the current here is constantly changing so it occurred to me to make sure they were always all the same brightness they always need the same current and therefore the same voltage on them so to do that they each have to be on their own little parallel circuit with their own current limiting resistor anyway um I potent through the board and began to solder on the components so nothing's going to work of course because they're not joined and then the next phase was to bend as many of the wires downwards as I could and put in little joining bits um it's not meant to be a professional job but the whole point is that you can just build it on your workbench without having to make a printed circuit board and then um the final bit was adding a little switch and I actually put a little inline fuse in as well but the most important bit was how to power it and thanks to uh big Clive again here for that great idea of I think you have to do it safely but collecting those disposable Vapes I mean I don't smoke but people have these Vapes that they just Chuck on the street after one use and inside them is a lithium ion rechargeable battery so um pulled a few of those out and so on the back of the board is a vape battery and I've a little lithium-ion charger that I built so I can charge that up and keep this powered up I'd love to have it solar powered but the solar panels that I was working on seem to have to be bigger than the actual device and I quite like using it at night anyway so uh finally a quick look at the the front of it and you can see how the LEDs and resistors are laid out and then if we turn it over you can see the wiring behind so there we go 112 LEDs and resistors to make our little blinking lights supercomputer okay so let's talk very quickly about how we can use this device as a random number generation and it was one of my colleagues actually at where I work who was talking to me about random number generating devices and how difficult they were to make so I thought okay here we go let's see what we can do and let's make one so we've got our flashing LEDs and what I've done is taken a snapshot so you could just take a snapshot after it's been running for quite a while and then you can look at the pattern that you've got and one presumes this isn't going to repeat in a very long period of time and what I thought we'd do to keep it simple is we just look at the top row of LEDs so if we convert those to a binary number so I'll just put that on top what I've done is I've called every LED that's on a one and every LED that's off a zero so we've got one one zero zero zero one Etc and that is 14 bits so it's a 14-bit long number now all you need to do is convert that number if you want it in decimal to decimal so if you convert this 14-bit random number to decimal you get one two six six eight twelve thousand six hundred and sixty eight in decimal and of course you could use the next line if you wanted to or you could leave it running for a while and then take another snapshot of it look at the top row if you wanted a 14-bit number I mean obviously you could do a three bit number if you wanted it's entirely up to you which section you look at but it will just constantly keep generating random numbers for you now just before I remove this bit of paper so you can see it again I'll come over here there are a hundred and twelve LEDs okay I nearly said 121 there but it can't because it's a it's a grid so 112 LEDs and if you take two to the power 112 that gives you well it's a number that's just so phenomenal I can't even think about it 5 times 10 to the 33 different variations that should be possible with this so I guess that the number you're going to generate if you leave it flashing for a while is definitely going to be random and I haven't even begun to just peel that off to work out what number that would be in binary and then in decimal if I used all 112 LEDs so there you go that's how you could use it as a random number generator so there we go that's how you would Generate random numbers with this system now I'm sure there are mathematicians out there who'd say well actually it's not properly random and when do you select the time to take the snapshot and the photograph Etc but I think it's a pretty good uh way of generating random numbers uh with a really simple device I'm reminded that there's a video somewhere on YouTube of a computer company using lava lamps um in a big array not dissimilar to this and they use those to produce random numbers anyway I think it's rather nice as it form follows function is it that way around but I think this is also quite a pretty device it's quite beautiful and I think um good Electronics um should look good um if you don't know about ym I think big Clive and others call them super computers or blinken lights well you need to go and look online at blinken lights and some of the older computers or even some of them more modern ones in fact that have these great panels of flashing lights on them like something from the movies and they got sort of nicknamed blinken lights I suppose it's some trying to be a little bit German there and um you can see these on the sides of super computers I'm reminded of the cray 2 supercomputer I don't remember if it had lights on it but there was an example of a piece of electronics that really looked beautiful and also did an incredible job in calculating mathematical formally incredibly rapidly back in the day so I do hope you liked my blink and light supercomputer and even if you don't need to Generate random numbers I think it's just a thing of beauty regardless and as an aside of course you can make little small ones um my partner teaches modern languages and I made this one for her class so um French flag there we go and it does exactly the same thing so after a while all the LEDs get um out of phase and you get this wonderful sort of flashing thing and I just um put it into a photo frame with a couple of AA batteries on the back so she can have that on her desk when she's teaching French so thank you very much for joining me for this video on my blink and light super computers and I hope you enjoyed it do subscribe and like the video if you want to but of course you don't have to but the one thing I will ask is please come back and join me when I make another video and that'll be very soon [Music] thank you [Music] thank you
Info
Channel: Anthony Francis-Jones
Views: 1,844
Rating: undefined out of 5
Keywords: Anthony Francis-Jones, Anthony Francis Jones, FJ, F-J, FJ's Physics, F-J's Physics, FJs Physics, F-Js Physics, Fun experiments, home experiments, Wrekin, Wrekin College, GCSE, A Level, A Level Physics, GCSE Physics, Ideas for school physics experiments, Physics Experiments, Ideas for physics experiments, LED experiments, Blinkenlights, Super computer, Random number, random number generator, Simple electronics projects, Big Clive
Id: T3lTyI6UmOQ
Channel Id: undefined
Length: 11min 19sec (679 seconds)
Published: Fri Apr 14 2023
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.