20,000 LEDs sounds like an amazing amount of blink. When we start to consider the process of putting together 20,000 of anything, and then controlling them all with a small piece of electronics the size of a postage stamp, we get a little bit dizzy. Continue reading “Lots Of Blinky! ESP32 Drives 20,000 WS2812 LEDs”
The trend in video games is toward not being able to differentiate them from live-action theatrical releases, and games studios are getting hard to tell from movie studios. But quality graphics don’t always translate into quality gameplay, and a lot can be accomplished with minimalist graphics. Turn the clock back a few decades and think about the quarters sucked up by classics like Pac-Man, Space Invaders, and even Pong if you have any doubts about that.
But even Pong had more than 64 pixels to work with, which is why this dungeon-crawler game on an 8×8 RGB matrix is so intriguing. You might think [Stolistic]’s game would be as simple as possible but think again. The video below shows it in action, and while new users will need a little help figuring out what the various colors mean, the game is remarkably engaging. The structure of the dungeon is random with multiple levels to unlock via the contents of power-up chests, and there are mobs to battle in a zoomed-in display. The game runs on an Arduino Uno and the matrix is driven by a bunch of 74HC595 shift registers.
16-button keypads have a clever method of encoding their data into 8 pins. Pins are mapped to four rows and four columns on the keypad. A user reads the keypad by bringing each row up to logic: HIGH, and reading the corresponding column values, (HIGH or LOW). Keypad scanning can be farmed out to a microcontroller with a simple finite-state machine and some button debouncing techniques. [Mario], [Glen], and [Paul] on the Netduino forums took an entirely different route: they’ve designed and implemented a Keypad Scanner using any microcontrollers SPI peripheral and a 74HC595 Shift register.
The trio’s solution is an elegant adventure into circuit design. With two diodes and a voltage divider, they devise a simple circuit that pulls the SPI MISO line LOW if a button in the corresponding circuit’s row is pushed closed. Copied four-fold, this circuit joins the rows and columns of the 74HC595 to the keypad matrix. To scan across the four columns, the microcontroller performs an SPI transfer of the key value: 0x01. To decode which button is pushed, the value received back from the SPI bus encodes which button was pushed out of the 16 possible buttons. Note: some cases for ambiguity as to “which button was pressed” do exist if multiple buttons are pushed at the same time, but for the general case where we’re punching in values one-by-one, this circuit works perfectly.
The team’s hack is a clever use of existing hardware to outsource a microcontroller’s software problem to hardware while leveraging the SPI peripheral to cleverly decrypt and retrieve data back from the keypad. Kudos to the team of three over at the Netduino Forums, and we’re always thrilled to see and idea grow from one person to the next. In case you want to take a step lower and build up the keypad itself, here’s a blast from the past that does just that.
This is a truly hands-on approach to learning. [Kevin Darrah] ditched the microcontroller and is using push buttons to learn about 595 shift registers. The test rig uses two of the serial-in, parallel-out chips. These are cascading which means that as data from the first chip overflows it feeds the input of the second. The parts are commonly used to drive LEDs, or reduce the number of pins needed to drive peripherals like this character LCD.
The five push-buttons give you a chance to intuitively learn how the chip logic works. The blank button is also commonly called Output Enable (OE). Driving it high shuts off the outputs of the chips but doesn’t clear the data. That task is performed by the clear button which is driven low to set all of the shift register memory to zero. The other three buttons set the logic level, shift it into the chip using the clock signal, and push the stored values to the outputs using the latch.
To get a visual approximation of what’s happening inside of these chips you should check out the shift register tutorial linked to in this post.
Sure, it may be two and a half months until Christmas. That doesn’t mean we can’t start building a few Christmas decorations. Last year, [RB] over at Embedded Lab made an animated Christmas sign using a simple microcontroller setup. This year, [RB] is adding a blinking LED border and doing the entire project with 74xx ICs.
The letters for this year’s sign were recycled from last years’. This time, however, two strings of 12 LEDs are used for the blinking border. The blinking circuitry uses a 74hc14 Schmitt trigger to provide the clock. A pair of 74hc595 shift registers turn each letter on one at a time. The speed is controlled with a small trim pot.
Using ICs to drive a series of lights in a pattern isn’t a new thing – you’d be hard pressed to not find a similar setup in the blinking panels of sci-fi shows of the 60s and 70s. Of course this sign doesn’t compare with what can be done with a
microprocessor a lot of patience, it’s still a very nice build. Check out the video after the break to see the X-mas sign in action.
Clocks made from blinking LEDs always make for fun projects. [Earthshine] built a clock that displays time abstractly using an 8×8 RGB LED matrix. The video embedded after the break illustrates how to read the time but here’s the gist of it: One LED is illuminated in the outside box of LEDs and moved in a clockwise motion to approximate seconds. Inside of this, there are four quadrants; upper left indicates hour-tens digit, upper right hour-ones, lower left minute-tens, and lower right minute-ones. This certainly makes for an interesting conversation piece!
There is no schematic and no code available but it’s really the concept that we’re interested in. If you must know, [Earthshine] bases this build around an Arduino. A DS1307 real time clock keeps the time, while four 74HC595 shift registers are utilized to control the three LED colors and the multiplexing.