09/24/2019 at 05:06 •
The finished product:
(the colors in this photo aren't great - the background animation is more of a teal color and the time is in white)
The animation is a simple Perlin Noise scroll, with the frame rate limited in steps by one of the encoders. I took a few swings at the height field water simulation but I'm not much of a programmer and I wasn't able to get anything to look very good on the matrix. Maybe I'll come back to it in a few months/years.
The animation plays smoothly, but I've been leaving it turned down to 1 frame per minute so the the motion isn't distracting out of the corner of your eye. The time moves up and down the display twice over the course of a day, too. At first I set a static brightness that looks good during the day or with the room lights on, but that level lights up practically the whole room by itself at night - so the potentiometer controls the brightness of the matrix.
05/30/2019 at 04:45 •
I started by buying a Feather M0 Express from Adafruit when it was brand new, enticed by the then new-ish CircuitPython because I knew a little Python from a college. The feather sat around for almost 6 months while I researched components, read Adafruit's NeoPixel guideguide cover to cover (as it were), and thought about the design of the display. As it turns out, if I had waited to buy the micro controller I could have saved a lot of work by buying an ItsyBitsy M0 Express with a 5V digital output made to control NeoPixels...
I bought the 16x16 WS2812B (NeoPixel) matrix from ALITOVE on Amazon, and the rest of the components from Adafruit. The frame came from Ikea, and I bought two kinds of gray acrylic from TAP Plastics. The first kind I tried was a transparent 36% gray, but the clear transparency wasn't the look I had in mind and I wasn't able to diffuse the NeoPixels well after trying a few kinds of paper. Then I bought a black LED acrylic sheet that has a polished side and a matte side that diffuses the light from the NeoPixels nicely. This was the acrylic I used to improve the contrast on my small desk clock project.
In the spirit of "measure twice, cut once," I sketched the Feather M0 Express' pinout and laid out my own FeatherWing on a Perma-Proto Breadboard PCB.
(please ignore the spaghetti wiring, this was my first electronics project... for something more aesthetically pleasing, see here)
The controls for the clock are a pair of rotary encoders, a potentiometer with built in switch, and a SPST switch. The encoders have probably been more trouble than they're worth - I never figured out if it's possible to use interrupts for the encoders alongside Adafruit's DMA Neopixel library, so they're unreliable. The SPST switch is used to cut off the external 5V power supply from the Feather when it's being programmed via USB, to avoid potentially back powering the computer. Having the physical controls were extremely useful when programming the clock, making adjustments to colors, timing, and other values easy to see visually before hard coding some of the parameters.
Time is kept by an PCF8523 RTC and the 3V logic from the Feather is level shifted to the 5V the NeoPixels need by a 74AHCT125 level shifter.
05/30/2019 at 04:22 •
This is/was my first electronics project. I had done a ton of research in Adafruit's guides trying to decide on something useful to build when inspiration struck during a trip to the pier:
I had seen a few projects online with LED matrices and I thought that trying to emulate the waves and ripples on the surface of the ocean in a grid of LEDs would look really cool, then decided to put the time over the waves to make something for the computer desk at home. I did some research and found Matthias Müller-Fischer's 2008 GCD slides about height field simulation of a water surface, figured out the pseudocode of the main loop (exercise for the reader: find the error on slide 3), and decided to go for it. As of right now, the jury's still out over whether I'll simulate the height field waves or fake it with a series of sine waves and some random sparkles.