A YouTube Subscriber Counter With A Tetris Twist

When it comes to YouTube subscriber counters, there’s not much wiggle room for creativity. Sure, you can go with Nixies or even more exotic displays, but in the end a counter is just a bunch of numbers.

But [Brian Lough] found a way to jazz things up with this Tetris-playing YouTube sub counter. For those of you not familiar with [Brian]’s channel, it’s really worth a watch. He tends toward long live-stream videos where he works on one project for a marathon session, and there’s a lot to learn from peeking over his virtual shoulder. This project stems from an earlier video, posted after the break, which itself was a condensation of several sessions hacking with the RGB matrix that would form the display for this project. He’s become enamored of the cheap and readily-available 64×32 pixel RGB displays, and borrowing an idea from Mc Lighting author [toblum], he decided that digits being assembled from falling Tetris blocks would be a nice twist. [Brian] had to port the Tetris-ifying code to Arduino before getting the ESP8266 to do the work of getting the subs and updating the display. We think the display looks great, and the fact that the library is open and available means that you too can add Tetris animations to your projects.

None of this is to say that more traditional sub counters can’t be cool too. From a minimalist display to keeping track of all your social media, good designs are everywhere. And adding a solid copper play button is a nice touch too.

Continue reading “A YouTube Subscriber Counter With A Tetris Twist”

Buttery Smooth Fades with the Power of HSV

In firmware-land we usually refer to colors using RGB. This is intuitively pleasing with a little background on color theory and an understanding of how multicolor LEDs work. Most of the colorful LEDs we are use not actually a single diode. They are red, green, and blue diodes shoved together in tight quarters. (Though interestingly very high end LEDs use even more colors than that, but that’s a topic for another article.) When all three light up at once the emitted light munges together into a single color which your brain perceives. Appropriately the schematic symbol for an RGB LED without an onboard controller typically depicts three discrete LEDs all together. So it’s clear why representing an RGB LED in code as three individual values {R, G, B} makes sense. But binding our representation of color in firmware to the physical system we accidentally limit ourselves.

The inside of an RGB LED

Last time we talked about color spaces, we learned about different ways to represent color spatially. The key insight was that these models called color spaces could be used to represent the same colors using different groups of values. And in fact that the grouped values themselves could be used to describe multidimensional spacial coordinates. But that post was missing the punchline. “So what if you can represent colors in a cylinder!” I hear you cry. “Why do I care?” Well, it turns out that using colorspace can make some common firmware tasks easier. Follow on to learn how!

Continue reading “Buttery Smooth Fades with the Power of HSV”

Definitely-Not-Neopixel Rings, From Scratch!

The WS2812 addressable LED is a marvellous component. Any colour light you want, all under the control of your favourite microcontroller, and daisy-chainable to your heart’s content. Unsurprisingly they have become extremely popular, and can be found in a significant number of the project s you might read about in these pages.

A host of products have appeared containing WS2812s, among which Adafruit’s Neopixel rings are one of the more memorable. But they aren’t quite as cheap as [Hyperlon] would like, so the ever-resourceful hacker has created an alternative for the constructor of more limited means. It takes the form of a circular PCB that apes the Adafruit original, and it claims to deliver a Bill of Materials cost that is 85% cheaper.

In reality the Instructables tutorial linked above is as much about how to create a PCB and surface-mount solder as it is specific to the pixel ring, and many readers will already be familiar with those procedures. But we won’t rest until everyone out there has tried their hands at spinning their own PCB project, and this certainly proves that such an endeavour is not out of reach. Whether or not you pay for the convenience of the original or follow this lead is your own choice.

The real thing has been in so many projects it’s difficult to pick just one to link to. This Christmas tree is rather nice.

General Purpose I/O: How to get more

The first program anyone writes for a microcontroller is the blinking LED which involves toggling a general-purpose input/output (GPIO) on and off. Consequently, the same GPIO can be used to read digital bits as well. A traditional microcontroller like the 8051 is available in DIP packages ranging from 20 pins to 40 pins. Some trade the number of GPIOs for compactness while other devices offer a larger number of GPIOs at the cost of complexity in fitting the part into your design. In this article, we take a quick look at applications that require a larger number of GPIOs and traditional solutions for the problem.

A GPIO is a generic pin on an integrated circuit or computer board whose behavior, including whether it is an input or output pin, is controllable by the user at runtime. See the internal diagram of the GPIO circuit for the ATmega328 for reference.

Simply put, each GPIO has a latch connected to a drive circuit with transistors for the output part and another latch for the input part. In the case of the ATmega328, there is a direction register as well, whereas, in the case of the 8051, the output register serves as the direction register where writing a 1 to it sets it in output mode.

The important thing to note here is that since all the circuits are on the same piece of silicon, the operations are relatively fast. Having all the latches and registers on the same bus means it takes just one instruction to write or read a byte from any GPIO register.
Continue reading “General Purpose I/O: How to get more”

Simplifying Basic LED Effects

There was a time when having a blinking blue LED on a project was all you needed to be one of the cool kids. But now you need something more complex. LEDs should not just snap on, they should fade in and out. And blinking? Today’s hotness is breathing LEDs. If that’s the kind of project you want, you should check out [jandelgado’s] jled library.

At first glance, an Arduino library for LED control might seem superfluous, but if you are interested in nice effects, the coding for them can be a bit onerous. If you don’t mind stopping everything while you fade an LED on (or off) then sure, you just write a loop and it is a few lines of code. But if you want to have it happen while other things continue to execute, it is a little different. The library makes it very simple and it is also nicely documented.

Continue reading “Simplifying Basic LED Effects”

Marvel at Soviet-era Smart Display’s Tiny Size

The Soviet-era 490IP1 LED. The digit is a mere 2.5 mm in height. Pictured with the Texas Instruments TIL306. [image: industrialalchemy.org]
It’s easy to assume that older components will be less integrated and bulkier than we might otherwise expect. Then something seems ahead of its time, like the teeny-tiny 490IP1 LED which was produced in the former Soviet Union. [AnubisTTP] obtained and shared images of this tiny integrated single digit LED display in which the number measures a scant 2.5 mm tall; in production it was made easier to read with an external bubble lens magnifier clipped to the outside. The red brick the 490IP1 is pictured with is the Texas Instruments TIL306, a relatively normal sized DIP component with similar functionality.

The 490IP1 is called an intelligent LED display because the package contains a decade counter and driver circuitry for the integrated seven-segment LED digit, complete with a carry signal that meant multiple displays could be chained together. It is notable not just due to its size, but because the glass cover makes it easy to see the die inside, as well as the wire-bonded pads.

It’s always fascinating to see glimpses of the development path that display technologies took. It’s easy to take a lot of it for granted today, but back before technology was where it is now, all sorts of things were tried. Examples we’ve seen in the past include the fantastic (and enormous) Eidophor projector which worked by drawing images onto a rotating disk of oil with an electron gun. On the smaller end of things, the Sphericular display used optics and image masks to wring a compact 0-9 numerical display out of only a few lamps at the back of a box.

Supercapacitors In A Servo: The “Forever” Flashlight

The principle is well understood: use a motor in reverse and you get a generator. Using this bit of knowledge back in 2001 is what kick-started [Ted Yapo]’s Hackaday Prize entry. At the time, [Ted] was searching for a small flashlight for astronomy, but didn’t like dealing with dead batteries. He quickly cobbled together a makeshift solution out of some supercapacitors and a servo-as-a-generator, hacked for continuous rotation.

A testament to the supercapacitors, 17 years later it’s still going strong – leading [Ted] to document the project and also improve it. The original circuit was as simple as a servo, protection diode, some supercapacitors, and a LED with accompanying resistor; but now greater things are afoot.

A DC-DC boost converter enables constant power through the LED, regardless of the capacitor voltage. This is achieved by connecting the feedback pin of an MCP1624 switcher to an INA199 current-shunt monitor. The MCP1624 kicks in at 0.65V and stays active down to 0.35V. This is all possible due to the supercapacitors, which happily keep increasing current as voltage drops – all the way to 0.35V. Batteries are less ideal in this situation, as their internal resistance increases as voltage drops, as well as increasing with age.

When testing the new design, [Ted] found that the gears on his servos kept stripping when he was using them to charge capacitors. Though at first he attributed it to the fact that the gears were plastic, he realized that his original prototype from 2001 had been plastic as well. Eventually, he discovered the cause: modern supercapacitors are too good! The ones he’d been using in 2001 were significantly less advanced and had a much higher ESR, limiting the charging current. The only solution is to use metal gear servos

Want to read more about boost converter design? We have the pros and cons of microcontrollers for boost converters, or this neat Nixie driver for USB power.