Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

Bullet-Time, Matrix Rain, Slow-Mo and Spiral FX by Multiplexing WS2811 with a Microcontroller!

Status
Not open for further replies.

EvilGenius

Member
Hello
Here is another clever circuit that will create cool effects for a large array of smart pixels.
Objective:
Low cost circuitry
Easy to built and implement
No fancy bitbanging and worrying about timing constrains
Utilize any WS2811 based controller for RGB Lighting (Single Wire SPI)
Be able to continue to daisy chain different string lenghts without addditional programming
Avoid messing with re-programming WS controller, avoid bit counting or system slowing down
Create cool Fx on 15 strings of 50 nodes (horizontally and vertically)
Avoid zig-zag connection end to end (save on wiring)
Be stand-alone (no need for a fancy computer software)
Run on 5V or 12V 3-wire system
Circuitry:
The heart of the system is four 4-Bit 3-State Avtice High Non-Inveting Buffers allowing multiplexing of a Microcontroller with Data output from WS2811 Controller. Buffer has individual Enable lines connected to Microcontroller, while all the data inputs of the buffers are tied together and connected to WS2811 Controller Data output. uC controls individual isolated horizontal lines while WS-CNT provides for vertical movement and color FX. Output of the buffers are connected to 15 strings of 50 smart pixels (750 nodes).
BOM:
4 x 4-Bit CMOS Buffers Active High Non-Inverting (SN74AHC126N) $1.20
1 x Microcontroller (PIC16F628A) $1.20
1 x WS2811 SPI Controller with Remote $6.50
6 x 0.1 uF Ceramic Decoupling Capacitors $0.12
1 x 220uF Electrolytic Capacitor $0.05
1 x 5V Voltage Regulator $0.66
1 x Resistor 51 Ohms $0.02
2 x Resistor 4.7K (Pull-up) $0.04
16 x Resistor 100 Ohm $0.32
Total cost not including PCB: $10
Circuit should be able to create amazing FX by varying the sequence of which string(s) comes on (PIC output) at what time and duration, pause, slow down, speed up, rotate, do Bullet time, Matrix Rain FX, Slow-Mo FX, Sprial FX, Random FX, Move Action while doing spiral, freeze vertical and do horizontal or circular movement, Freeze horizontal and move all colors synchronized up or down, and much more.
 

Attachments

  • WS2811 BULLET-TIME FX.jpg
    WS2811 BULLET-TIME FX.jpg
    164.3 KB · Views: 333
Last edited:
Why do you need this extra circuitry? Why can't a pic drive the strings direct?
I just checked and a 20 pin pic could drive 16 strings and only use about 0.3% (3mS) of it's processor time.

Or, am I missing something?

Mike.
 
Why do you need this extra circuitry? Why can't a pic drive the strings direct?
I just checked and a 20 pin pic could drive 16 strings and only use about 0.3% (3mS) of it's processor time.

Or, am I missing something?

Mike.
Hi Mike
I am sure by direct driving you mean the data signal itself. (not the volts and amps).
The objective of this project was to avoid tedious programming of the sensitive and tight timing requirements of WS2811.
WS2811 Controller (inexpensive version with remote (or something similar) can produce 300 color FX) handles all of that. All we are doing with the PIC is to turn on specific string (as a switch).
Direct Drive: Let's say you want to direct drive with the PIC and multiplex the whole thing with your PIC (5o pixels by 15 stings).
1- You don't have enough output ports. You need 15 pins for horizontal and one port for data driving. I suppose you can cut back to 14 outs plus data.
2- PIC16F628A's internal clock is not fast enough to send all the addresses (750 pixels x 24 bit per pixel x time needed for each on/off, plus reset signal for refreshing, plus your overhead). You can add on an external clock to speed up the process, which will burn up two more of your outputs.
3- Then you really need to spend some time configuring the data transfer to the strings for specific number of pixels per string and individual FX. If i want to change from 50 pixels to 40 or 60 pixels per string then you have to completely overhaul the program.
It is doable but as I said I wanted to simplify the project. Buy a WS2811 controller, and programming of PIC is as simple as turning 1 or more outputs on or off without any worries about PWM, timing, interrupts, and so on.
 
Last edited:
Look up geekmychristmastree. It is similar to what you are speaking of. He did it (I believe) with 10x6 matrix. Which is a lot more manageable. He also does this by end to end wiring (zigzag). Height of 6 feet.
50 pixels smart string is about 12 feet long (3.7m). With 15 strings of 50 pixels, you can light up a half circle radius of 12 feet. One heck of a light show!
 
I've obviously miss read the data sheet. I read it that you shift in 24 bits and the LEDs cascade the data - I.E scroll along. I'm now assuming that you shift in 24 bits per LED and then do a reset to latch them. Is that correct? If so, I don't think a pic has enough ram to hold that amount of data.

Mike.
 
I've obviously miss read the data sheet. I read it that you shift in 24 bits and the LEDs cascade the data - I.E scroll along. I'm now assuming that you shift in 24 bits per LED and then do a reset to latch them. Is that correct? If so, I don't think a pic has enough ram to hold that amount of data.

Mike.
You almost go it. You shift in 24 bits (each bit has a high and low timing), once 24 bits is read, WS2811 automatically latches, any subsequent data received is passed on to the next pixel. Once ready for the next set of color bits, you reset it by holding data line low for certain time (50uS I believe). To hold the color you need to hold off reset till you are ready. It is hurry up and wait, then repeat. By the way the datasheet has so many errors and is poorly written as you have noticed. The sequence is 8 Green, 8 Red, 8 Blue from MSB to LSB.
Once WS has all its 24 bits then it PMW (and continue to do so) its appropriate output (R,G,B) at 18.5ma (I measured 16.5ma). Output (OutR) is toggled between 0.63V and Vcc (if 12v system then Vcc=12).
 
Last edited:
Completely different from how I read the data sheet. Thanks for the explanation.

Mike.
 
What I like about it:
1- It holds the colors indefinitely once it has its 24 bits (until you reset it or power down).
2- It is low power driver and is mobile (for stand-alone projects).
The outputs (OutR,OutG, OutB) are constant current sinks (remember they don't go down to ground, 0.63v to Vcc toggle).
I utilized this feature in several projects to convert dumb RGB to smart pixels. In one project I drove a constant current of 300ma/channel for high power LED driving.
3- It is low cost
Example: You can add this chip to drive water solenoids for a smart water show!
Or light up the entire house with WS2811 drivers and one cheap controller.
With a dongle and a DMX to SPI (using term SPI loosely referring to WS2811 protocol), you can connect your PC (using Light-O-Rama software) to run all your smart pixels. They even have wireless and Ethernet controller versions to communicate with these pixels.
 
Last edited:
First automated Xmas and Halloween light show. Wall washers are 12V 10W RGB cans (300ma/ch) and path lights are 12V rectangular tri-RGB. Each pixel has a WS2811 chip for communications. Data input can be connected to any controller out there that communicates with WS2811, WS2812, WS2812B. I can simply expand to 2048 pixels (12 DMX universes) with a $7 controller! But I don't need that many pixels. For PC-dongle-controller you can push to one universe (170 rgb pixel, 510 DMX channels). You can upgrade to Ethernet version (no dongle) and push more DMX universes.

P.S.: The whole project cost me less than $80 USD.
The power consumption of the project is about 80W, cheap price and high efficiency for lighting up the entire front of the house. I calculated by electric bill to go up by $2.50 for one entire month, if the system runs 6 hours a day for 30 days.
 

Attachments

  • IMG_2930.JPG
    IMG_2930.JPG
    934.4 KB · Views: 317
  • IMG_2952.JPG
    IMG_2952.JPG
    982.8 KB · Views: 323
Last edited:
Status
Not open for further replies.

Latest threads

New Articles From Microcontroller Tips

Back
Top