We thought we’d seen it all. All the ways to drive WS2811/2812 “Neopixel” LEDs, that is. And then [Steve Hardy] comes up with a new one: hacking a computer’s VGA output to drive 500 WS2811s in a string. And it’s quite a hack. You can check out the video (it’s worth enduring the horrible wind noise) below the break.
[Steve]’s big realization was that he could send the digital data that the Neopixels needed by carefully selecting a resolution and clock rate for the VGA to match the timings that the WS2811 modules wanted. A resolution of 840×1000 at 28MHz produces 70 pixels per WS2811 bit, or 12 bits per line. This means two VGA lines need to be sent for the RGB triple for each LED, hence the 1000 rows.
There are some further tricks before [Steve] got around to writing a custom OpenGL shader that converts regular graphics to his strange black-and-white bit pattern to drive the LEDs, but you’re going to have to read [Steve’s] blog for all that. If you’re waiting for a full code write-up, [Steve] says that one’s pending.
We’re just stoked to see the computing power that lies within a video card used for other purposes. Once you think of the VGA output as a general-purpose high speed (analog!) output, it opens up a whole bunch of possibilities if you can write the corresponding video software. As [Steve] points out, he’s only using the red channel right now — he could trivially add another 1000 LEDs just by tweaking his video code.
Thanks [Relight] for the tip!
12 thoughts on “Driving WS2811 LEDs With…VGA?”
VGA is great. I even made a small program to drive the I2C channel present on all VGA ports. That widens the possibilities even more…
Back then when I was fiddling with lasers I always told everybody that it would be doable to use a computer graphics card for displaying data with a laser projector ILDA interface… it was not realistic, but this is a close match… maybe it would be possible with integrators to achieve low speed analog with enormous sampling rate?
“I wanted to use Linux so I could SSH to my christmas lights in the garden.”
That is a really nice way to (ab)use VGA :)
It does not actually use the analog properties of the port.
On the other hand DVI/HDMI use TMDS 8/10 encoding wich will make it harder to use for this purpose.
I’d like to take a look at the complete code. need to get more into OpenGL stuff.
I wonder why the voltage converter stage uses AC Coupling? Does not seem to hurt at that frequencies, but what is the use?
Btw, if you want to abuse VGA in a away that uses the analog properties: Drive an X/Y Mode Oscilloscope with it: https://www.warpzone.ms/perma/vga-vector-graphics-adapter/1859/
Again, I know nothing much about electronics. But since the input signal is only 0.7V at peak, and the forward voltage of the transistor is also 0.7V, no current would ever flow through the transistor. So the AC coupling is there to provide 0.7V forward voltage, on which the 0.7V signal is superimposed, which makes the transistor actually do something.
It’s called biasing the transistor.
Everyone should download an run the “Demo” that I think the guy is playing on the display: http://www.pouet.net/prod.php?which=50131
It is *amazing*. It is just 2D art, but in terms of sharpness, color, and composition, I’ve never seen anything better. In this day and age of highly compressed video where resolution is a higher priority than bitrate, this is (as far as I can tell) entirely vector rendered and thus stands as an absolute testament to how good it *can* be. The YouTube video of it just does not do it justice.
Next Christmas’s lights will be interactive – someone’s sure to use a kinnect as the video source and have a live party/dance wall :)
if you, or author of this hack Steve, ever need this in a mobile form just take a look at rasPee – it has Digital VGA output with freely programmable timings, you can have perfectly timed digital stream at >100MHz out of Pee
maybe even usable as a ghetto signal generator (front/back porch might be a problem)
Looking at the schematic, and assuming 75 ohm termination impedance of the VGA bus, it looks like the pinouts to the VGA666 header are actually at TTL (5V) level, am I right (since (500 / 75) * 0.7 = ~5V) ? That would make things much easier, since voltage conversion would no longer be necessary, plus you have the added benefit of having 18 ws281x channels instead of 3
ah, 3.3V. may work directly, not sure what the minimum voltage is that the ws2811 will need
reminds me of this, http://bellard.org/dvbt/ (still want to see the source..)
Please be kind and respectful to help make the comments section excellent. (Comment Policy)