If you've played around with generating random numbers on Arduino, you probably know about the floating analog trick. Yesterday I decided to build a true random static display. I went to do the floating pin trick with a Raspberry Pi, but with the digital GPIO instead. I had every GPIO port connected to a floating breadboard wire, adding up to 17 in total.For the display, I simply had an Arduino connected to an Adafruit NeoPixel 8x8 grid. To generate the image, the RPI would read from a pseudo-randomly chosen set of 8 pins, creating an octal. As one octal ranges from 0-255, three octals must be used to code one RGB LED. It would then add this octal to a string, along with any special characters to inform the Arduino of what's what. This string is then sent over to the Arduino via serial. All the Arduino does is parse it and display it.Everything went according to plan on the first test, although something was bugging me. You could see sort of a wave pattern on the NeoPixels. I thought it must've been some sort of illusion or something, but it persisted. It wasn't until today that I tried to figure out what was going on. The first thing I tried was disabling the pseudo random pin picker and just use the same pins every time. The pattern persisted. After a few more tests, and the pattern persisting through all of them, I realized this method for random numbers, isn't random. The wires were actually picking up electromagnetic waves! After talking with a friend about it, he suggested that I cover the wires in tinfoil. After I had bundled them up in a thin layer of tinfoil it proved to be working, kind of. At first, it seemed to be blocking all radio waves. Unfortunately, it also showed that those waves are the only actual source of data. The display was completely blank.Just to be sure I went to adjust the wires and see what happened, but as my hand approached the NeoPixel suddenly lit up. I moved my hand closer, slowly. As I got closer the pixels got much brighter, and the wave pattern came back, clearer than ever. If the signal got to strong, the program would crash, likely due to overloading the GPIO. So I put the bash command on a while true loop for some more testing. I found a few interesting things. First of all, unplugging my laptop made it go crazy. I didn't even have to be using it. Also, while the human detection was a relatively low range, it would detect my unplugged laptop from down the hall. If you'd like to try it for yourself then here is the source code:Arduino:http://ift.tt/2oK8zAJ thoughts and explanations welcome, I'd like to see what other people think may be going on. Especially with the laptop. I've read that power supplies can emit a small amount of EMR, but it doesn't seem to be enough to be picked up by something like this.
Submitted April 05, 2017 at 10:29PM by Triforcey
No comments:
Post a Comment