Posts Tagged Arduino
At 200 mA/div, the top trace shows a bit under 1.2 A, a bit under the 1.68 A = 28 × 60 mA you’d expect; in round numbers, each RGB pixel draws 43 mA. Actually, the WS2812 specs don’t specify the maximum / typical LED current and, on belief and evidence, I doubt these units meet any particular specs you’d care to cite.
Also, the supply voltage (measured across the LED array “bus bar” wires) hits 3.37 V, well under the 5 V you’d expect from a USB charger and less than the 3.5 V called for by the WS2812 specs. Although the WS2812 nominally limits the LED current, there’s no telling how it varies with supply voltage.
A cheap USB 1 A wall-wart charger produced far more hash:
That’s with an additional 20 µF of tantalum capacitance across the power bus bars. The peak current looks like 1.4 A, with marginally more supply voltage at 3.56 V.
Bumping the trace speed shows the wall wart produces nasty current spikes, at what must be the poor thing’s switching speed, as it desperately tries to produce enough juice for the LEDs:
The step over on the right looks like a single RGB LED going dark, as it’s about 50 mA tall.
The output voltage doesn’t show the same spikes, so the LED array acts like a constant-voltage load. Given that the WS2812 probably connects all the LEDs pretty much straight across the supply, that’s not far from the truth: we’re looking at the forward drop of those blue LEDs.
Now, to let it cook away in the cool and the dark of the Basement Laboratory…
Mounting the ungainly WS2812 LED test fixture seemed like a Good Idea to keep the electricity out of the usual conductive litter:
The solid model shows more details:
The power wires along the array edges slide into the rear (thinner) slot, with enough friction from a few gentle bends to hold the whole mess in place.
The knockoff Arduino Nano rests on the recessed ledge in the pit, with M2 screws and washers at the corners holding it down (the PCB’s built-in holes might work with 1 mm or 0-90 screws, but that’s just crazy talk). I soldered the power wires directly to the coaxial jack pins under the PCB; they snake out to the LEDs through the little trench. There should be another cutout around the USB connector for in-situ programming, although the existing code works fine.
The front (wider) slot holds a piece of translucent white acrylic to diffuse the light:
It’s painfully bright: a few layers of neutral density filter would be appropriate for a desk toy.
The array runs hot enough at MaxPWM = 255 to produce a gentle upward breeze.
It looks even better without the flash:
You’ll find many easier ways to get RGB LED panels, but that’s not the point here; I’m waiting for these things to die an unnatural death.
The OpenSCAD source code as a GitHub Gist:
Given that I no longer trust any of the knockoff Neopixels, I wired the remaining PCB panel into a single hellish test fixture:
The 22 AWG wires deliver +5 V and Common, with good old-school Wire-Wrap wire passing to the four LEDs betweem them. The data daisy chain snakes through the entire array.
It seems only fitting to use a knockoff Arduino Nano as the controller:
The code descends from an early version of the vacuum tube lights, gutted of all the randomizing and fancy features. It updates the LEDs every 20 ms and, with only 100 points per cycle, the colors tick along fast enough reassure you (well, me) that the thing is doing something: the pattern takes about 20 seconds from one end of the string to the other.
At full throttle the whole array draws 1.68 A = 60 mA × 28 with all LEDs at full white, which happens only during the initial lamp test and browns out the supply (literally: the blue LEDs fade out first and produce an amber glow). The cheap 5 V 500 mA power supply definitely can’t power the entire array at full brightness.
The power supply current waveform looks fairly choppy, with peaks at the 400 Hz PWM frequency:
With the Tek current probe set at 200 mA/div, the upper trace shows 290 mA RMS. That’s at MaxPWM = 127, which reduces the average current but doesn’t affect the peaks. At full brightness the average current should be around 600 mA, a tad more than the supply can provide, but maybe it’ll survive; the bottom trace shows a nice average, but the minimum hits 4.6 V during peak current.
Assuming that perversity will be conserved as usual, none of the LEDs will fail for as long as I’m willing to let them cook.
The Arduino source code as a GitHub Gist:
The 5U4GB side lighted dual rectifier looks pretty good after I increased the phase between the two LEDs:
A gaggle of glowing vacuum tubes makes for a rather static display, though, so I conjured a color mixer so folks could play with the colors:
Three analog potentiometers set the intensity of the pure RGB colors on the 8 mm Genuine Adafruit Neopixels. A closer look at the circuitry shows it’s assembled following a freehand “the bigger the blob, the better the job” soldering technique:
The blended RGB color from a fourth Neopixel backlights the bulb to project a shadow of the filament on the front surface:
It’s worth noting that the three Genuine Adafruit 8 mm Neopixels have a nonstandard RGB color layout, while the knockoff 5050 SMD Neopixel on the bulb has the usual GRB layout. You can’t mix-n-match layouts in a single Neopixel string, so a few lines of hackage rearrange the R and G values to make the mixed colors come out right.
An IR proximity sensor lets you invert the colors with the wave of a fingertip to send Morse code in response to (some of) the vacuum tubes on display nearby. The sensor glows brightly in pure IR, with all the other LEDs going dark:
The switch sits in a little printed bezel to make it big enough to see. The slight purple glow in the visible-light picture comes from the camera’s IR sensitivity; you can’t see anything with your (well, my) unaided eyes.
The “chassis” emerged from the wood pile: a slab of laminate flooring and two strips of countertop, with a slab of bronze-tint acrylic from a Genuine IBM PC Printer Stand that had fallen on hard times quite a while ago. Bandsaw to size, belt-sand to smooth; nothing particularly precise, although I did use the Sherline for coordinate drilling:
That’s laying it all out by hand to get a feel for what it’ll look like and drilling the holes at actual coordinates to make everything line up neatly.
Hot melt glue and epoxy hold everything together, with foam tape securing the two PCBs. Those cap screws go into 10-32 brass inserts hammered into the laminate flooring strip.
There’s no schematic. Connect the pots to A0 through A2, wire the Neopixels in series from D8 with the bulb LED last in the string, wire the prox sensor to D9, and away you go.
It’s fun to play with colors!
The Arduino source code as a GitHub Gist:
This obviously wasn’t ready for prime time, but it demonstrated feasibility with a socket on a base assembled for something else:
I recently salvaged a heavy aluminum lid that looked like a perfect complement for that bulb:
The light comes from a rectangular knockoff Neopixel in a sidelight mount:
That’s epoxied to the rear of the bulb, below the equator, where it casts the best-looking shadow of the filament and support structures on the inside of the bulb. Actually, it’s taped in place for a week’s worth of burn-in to see if it survives.
The Arduino Nano fits inside a small base below the ceramic Mogul socket:
The braid exits through a hexagonal trench recessed into the top surface, with a dollop of epoxy holding it in place:
The underside has holes for three 10-32 brass inserts:
The center insert is the only thing holding the entire assembly to that aluminum base; I’m not convinced that’s enough, but it’ll suffice for now.
The “computer” certainly gets lost under the ceramic:
The base is slightly smaller than the ceramic to match the flat part of the lower surface; if it came all the way to the OD, you’d see an unsightly notch.
The two screw heads buried down in the recesses thread into the outer brass inserts in the printed base. The ceramic Mogul socket mounts atop that connection block, with another pair of screws making both electrical and mechanical connections to the metal plates-with-screws that used to terminate the incoming power wires.
It’s running the same Morse code firmware as before, with the Morse output turned off, because who needs a giant blinking bulb?
The OpenSCAD source code of the base as a GitHub Gist:
The original doodles with some dimensions:
Having accumulated a set of octal tube base clamps, it’s now a matter of selecting the proper clamp for each tube:
The process of shell-drilling the tube base, drilling the hard drive platter, printing a tube socket and case, wiring up the Arduino and base LED, then assembling the whole thing requires a bit of manual labor, assisted by some moderately exotic shop machinery.
The getter flash atop this small 6H6GT dual diode tube rules out a cap and there’s not enough space for a side light:
Fortunately, the base LED completely lights the internal glass:
The slowly changing color would make a fine night light:
It must be Art!
The evacuation tip nearly touched the inside end of the base spigot!
I had to cut the shaft and half the body off the shell drill in order to fit it into the space above the tube base and below the chuck:
A slightly larger shell drill would still fit within the pin circle, but the maximum possible hole diameter in the base really isn’t all that much larger:
The getter flash covers the entire top of this tube, so I conjured a side light for a rectangular knockoff Neopixel:
There’s no orientation that doesn’t require support:
A little prying with a small screwdriver and some pulling with a needlenose pliers extracted those blobs. All the visible surfaces remained undamaged and I cleaned up the curved side with a big rat-tail file.
I wired the Arduino and Neopixels, masked a spot on the side of the tube (to improve both alignment and provide protection from slobbered epoxy), applied epoxy, and taped it in place until it cured:
The end result looks great:
It currently sends Morse code through the base LED, but it’s much too stately for that.