Industry Online Support
Technical Forum
12/21/2017 1:25 PM | |
Posts: 1 Rating:
|
Hi all, I just want to share with you a little project we did at the Siemens Professional Education and with which we are taking part in the IoT innovation challenge. We built a 8x8x8 LED matrix with 512 LEDs in total, the programm was written in the Arduino IDE, everything used we designed on our own. The cube is soldered together in a way that the cathodes of the LEDs of one layer are connected together, so each layer has a common ground which can be switched to system ground with the help of mosfets. The anodes of the leds are connected to the one below and above of them, resulting in 64 what we call columns. To help building that, we designed and 3D printed a solder aid which ensures that the LEDs have a constant 2cm inbetween them. The cube and the program are built in a way that only one layer at a time is lit up. by applying 5V to one of the 8 layer mosfets, which connects the layer to ground, and 5V to the corresponding columns, the LEDs of one layer can individually light up. to archieve a nice and smooth looking cube, the layers need to be cycled through faster than the human eye can see, very similar to an old cathode ray tube TV. in our case the maximum cycle rate was about 30 Hz, mainly limited by the speed of the SPI - interface between transmitting 2 bytes. To adress the 72 pins of our cube, we designed an output port expander PCB using 74hc595 shift registers that can be adressed via the IoTs built in SPI - functionality, which means that only 3 pins of the IoT are required. The pcb also includes current limiting resistorsm and the mosfets to pull the layers to ground. This all is realized by the buildCube method of the arduino sketch, since its not using interrupts yet, it needs to be called every few milliseconds though, so the rest of the code must not contain any sort of bigger delay (i.e. IO - acces - loops, serial port, delays), otherwise a smooth cube is imposible to archive. If this is kept in mind though, the snake game can be replaced by basically anything, another game or some fancy animation for example. The buildCube method gets its data from the two dimensional byte array Cube(8)(8), where each LEd is represented by one bit. The first dimension resembles the x - axis, the second dimension the z - axis, and the bit position within a byte the y - axis. The snake game gets its data from a controller with 6 pushbuttons for the direction and a potentiometer for the speed of the snake. It also includes a bot that takes over command if no key is pressed for some time, as soon as a key is pressed the player is in charge again. If the snake eats itself (the only way to loose), there is a little animation and the game restarts. Attached you find the arduino code, the pcb (pdf and gerber), the schematics and all the 3D models we used, feel free to use and adapt everything attached, if you have any questions about the project feel free to leave them below.
AttachmentLED cube.zip (306 Downloads) |
This contribution was helpful to
5 thankful Users |
Follow us on