Rgb led 3x3x10 tower of color (3-d)

Status
Not open for further replies.
You guys have the original idea posted in the begining. This is our baby and there is plenty of flexibility. The ultimate question is if you were to make such a project how would you do it to simplify, reduce cost, reduce PCB real estate and make it practical. I have a fascination with lights and thought this would be a neat project. I share the passion with all of you for electronics and love for you to share your brilliant ideas.

Along the way if we need to modify the original project then be it. We might have to branch off at a later time but for now let's talk it out and put the pieces of the puzzle together.
Example: One may suggest reduce 9 RGB base to 8 and then can work out a simple structure with latches. One might say lets multiplex the whole thing level by level as plug in modules and expand on baby steps to make something even larger as needed. And yes we might have to go with a more powerful PIC and use specific LED drivers. I am open to suggestions.
 
Friends:
It is rather obvious if the implementation of the project gets too complex and costly, no one will be interested to follow thru with it. Let us modify the original project to simplify. After all we are not trying to build a tv set. Expecting a high definition, high resolution system with high contrast ratio is out of the question. There are way more advance systems out there for that. These common PIC's are way too weak to do such a thing. With that in mind I would like to propose to modify the original project to these specification for simplicity:
Tower of RGB Light
1- Base of the tower 8 RGB (Round or Square Configuration with no Core)
2- Height of the Tower: 8 Floors
3- Number of Colors Produced per LED: 13 (Red, Orange, Yellow, Pastaccio, Green, Teal, Aqua, L.Blue, Blue, Purple, Magenta, Fusia, White)
4- The system to be Modular i.e.: Each Floor will be Plugged in as a card. The system can easily and quickly be converted from one floor to 8 floors per choice
5- Minimize number of chips used, size of the project, cost, simplify wiring, simplify programming
6- System to be able to move patterns and colors with ease across all floors using the hardware and software
7- May use different PIC, shift registers, latches, LED drivers per your needs (not limited to 16F628A, 16F88)
8- All concepts to be presented as diagrams or schematics so everyone can follow and modify as needed
9- Once hardware is worked out, we enter the phase of writing the code for it and optimize it as we go.
There will be many creative codes for different patterns and effects. I like to welcome all of them.

If you guys are ok with this, please present your thoughts, comments, and schematics.
Many thanks! Rom
 
Last edited:
Here is my first attempt in hardware and software implimentation: Attached Diagram
Hardware
8 output ports of PIC act as 8 serial input for individual board (level)
In turn these serial inputs are entered into 3 seried latch shift registers (serial-parallel-serial). "data in - parallel out -data out"
All clocks and latches to registers are tied together to synchronize

Software
Software reads 8 data tables (for 8 levels)
Put out 3 strings of 8-bits data (wave1)
Put out another 3 strings of 8-bits data (wave2)
Put out the final 3 strings of 8-bit data (wave3)
In a loop command repeat wave1, wave2, wave3, 60 times (this would put in specific colors for 8 RGB on one level (Repeater)
Do the same at the same time for the other levels (parallel program: read table, wave1, wave2, wave3, Repeater)
Clocking and Latching is done in between in the program, conditioning each register and fixing color.
It takes 3 waves to produce 13 colors as specified. (Example: RG, R, R will produce Orange, while RG, RG, RG will produce Yellow, and RG, G, G will produce Pastaccio...)

Please comment on hardware and software concept...
 

Attachments

  • Tower 8X3X8 -Schematics VER2.pdf
    104.4 KB · Views: 206
Last edited:
'Wizard,

One thought would be determine the number of board levels in software. Cascade every level of the rgb shift registers, or just one serial input, to save on pins. Clock out all the data up to the number of levels, then latch. Not sure how the clk and latch pins would work for upper levels from the pdf schematic.

9 bits of color data is a little awkward, a word table would cut down on some program space. Sort of like:
table data would be b'0xxx0xxx', shift out 3 bits, then use swapf on second time thru, shift out 3 bits. Third time thru table_h data would be b'00000xxx', and final 3 bits shifted out.

Looked back on what I thought was an interesting 16 bit mono color display pattern. And using 8 different pattern generators (i.e. subs), and a single 16 bit I2C (PWM) led driver, the program compiled to 7k words
 
I am not sure what you mean on this one. Elaborate or post a diagram please.
 
Last edited:
Nickel:
One other thing to remember we are not just turning LED's on and off but we demand a specific color from it(one of 13 colors for simplicity). Going your route you still need to make 3 complete passes thru the entire levels and all registers to produce one color then repeat it POV number of times to produce a color without flickering. If you do not do that then you will only have 7 colors. (R, RG, G, GB, B, BR, RGB)
 
Last edited:
ChipWizard,

O.K. I see what you are doing now, thanks for the extra explanation, very interesting. Took me a bit to grasp the port strobe part. Table/pattern construction should prove to be an interesting exercise.

Yea, my way takes more data and time, whoops. Time might not be a big problem, because a certain "on time" is needed anyways. Got stuck on the idea of pushing rgb "pixel" data in a more linear fashion. Meaning it would actually take 3 parallel data lines (not the one as previously stated) to push out the pixels, or 8/3 more time.

I understand about your color generation, we just have a different way of saying it. When I said 9 bits of color data, I meant per pixel. I was adding up wave1/column1 (3bits), wave2/column1(3bits), wave3/column1(3bits), to arrive at my "9bits" of color data (per pixel).
 
Nickel,
We can speed up your idea with 8-bit parallel loading (instead of one serial in or 3 serial in). But still the fact remains that we have to scan 8x3xN bits into the registers, clock them, latch them, then repeat as many times as needed for color stabilization and then go to the next color pattern and repeat the process. We would use parallelin-parallelout-parallelout registers if there is such a thing.

I modified the diagram to show more details. If you are ok with my method suggest ways to make it more efficient.
We are going to need the following for the software:
Subroutine for reading individual tables
Variables to hold these values
Setup loops for repeating these variables (create color mapping)
Subroutine for bit generation on each port of PIC. (covert read data from table into the variable into string of bits fed into the serial in of the registers)
Clock subroutine to advance the bits across each register
Keep count of 24 clocks when reached call
Latch subroutine (latch all registers)
.
.
.
Go to tables once again for next effect (next color selection for all RGB)...
 
Nickel I thought about the words "on time" you used.
Please note I am not putting your idea down but from my past experience: If we hold color (extend latching time) or put a time delay when uploading data in our registers, it will cause flickering.
In order to achieve what you call "on time" or "hold time" you have to repeat the routine many times over. Again "holding" will limit us to 7 colors. Think about it a bit and let me know if I am clear...
 
The method I am suggesting I call "Psuedo PMW". You can use this method with different application. If you are familiar with brilliant work of "Pete's Rainbow9" it uses 9 PMW multiplexed 3. (9 channels RGB). While mine will give you crips vivid colors and the speed of movement can be totally controlled. (Not limited to PWM speed and speed can be changed in the middle of the program)
I did the same project with "Psuedo PWM" x multiplexed 3 (9 channels RGB) then expanded to 12x3 (12 channels RGB) and working on 12x4=16 x 3 (16 channels rgb). If you are not familiar with Pete's Project look up "Rainbow 9". Pretty neat!
I admit as you said it is a bit "awkward" and unfamiliar. But once you grasp the concept it is rather a powerful method!

We can eliminate one 8-bit line and use only total of 2 8-bit lines. Doing so will give you 13 colors. (R-R, RG-R, RG-RG, RG-G, G-G, GB-G, GB-GB, GB-B, B-B, BR-B, BR-BR, BR-R, RGB-RGB)
<Setting aside pastel colors: RGB-R, RGB-G, RGB-B, RGB-RG, RGB-GB, RGB-BR>

Using 3 8-bit lines will allow for 19 colors.
 
Last edited:
Something unusual I noticed playing around with bit sequence. I am not sure if my eyes are playing tricks on me or everyone would see it like I do. If you change the sequence of color bit (ie: RG-R vs R-RG), you get two different colors! First set tends toward red more while the second one tends toward green more. Scratching head here. Someone confirm please...

If it is so then this adds another 6 colors to our 13 colors using 2-8-bit. Giving us total of 19 colors for 2-8-bits!
 
Last edited:
Bit Generation From Table INTO SERIAL IN
If we shift right each variable, LSB should fall in Z. Do a simple check for zero or 1 then push it out as first bit into a specific port. (Example RB1) Then clock it into the first register(Blue Register). Do shift right again and repeat until 8 bits are read from that variable "Red". Move to the next 8-bit variable and push it out the same way until first bit red from "Red" variable lands at most right bit of "R" register. i.e.: First set of 8-bit variable read from data table denotes "R". When pushed out 24 times it will fall where the "R" register is sitting on first level. Sounds like it would work out just fine. Check me...
 
Last edited:
DATA FORMAT INTO THE DATA TABLE
Original idea of writing 2 sets of 3-8-bits into the table is still a strong method. However I thought about a twist on the idea that might work better.
Instead of 0 and 1 for data table, reading 6 lines then serial out, I was thinking of using Alphabetic Letters for Colors ("R","O","Y","P","G","T","A","L").
<Choose 8 out of 13 color letters>: Red, Orange, Yellow, Pastaccio, Green, Teal, Aqua, L.Blue, Blue, Violet, Magenta, Fusia, White
This set of 8-bit letters generates 8 colors on 8 RGB on one level. Repeat this line for Level2, Level3, .....Level N. (i.e.: We are reading all colors for all RGB's on all level at once)
Now read one line at a time from the table, enter into 8 temp variables. Test-compare against color map instruction and goto the correct bitmap color generator. We still produce 6, 8-bit line codes but rather than reading it from the table 6 times, we read it once and have the program figure out the color with simple subroutines. Once all the colors on all levels are mapped and saved into the variables, we push them out. Send to "BIT GENERATOR" subroutine.
 
Thinking about "Bit Generation", I see a bottle neck as we are entering everything one bit at a time into the serial in of registers. I have need, the need for speed.
What if we change the registers to parallel-in, parallel-out. (8-bits in, 8 bits out) Now tie all 8 bits of Red register to 8 bits of Green and Blue registers on one level. (8 common lines)
Use chip select (Enable) to select which register we are talking to on each level. (total of 16 lines out for each level board=8 data, 3 enable, 1 from 4017, 2 for clock and latch of registers, 2 for Gnd, Vcc) This would allow PIC to push 8 bits out at once! Tie all latches and all clocks of all registers together.
Now use a 4017 decade counter to select chip enable on each level(maximum of 10 levels). Use two ports of PIC to Clock and Reset 4017. Also tie the 8-bits of one level to 8-bits of the other levels.
Use 3 transistors on each level. Tie all bases together and connect to one output of 4017. (Row)
Connect collector of transistor 1 level 1 to transistor 1 level 2 and so on...collector of transistor 1 level N. (Column)
Connect emitter of transistor one level one to enable register red level 1, connect emitter of transistor 2 level one to enable register Green level 1 and E of T3 to Enable of Reg Blue level 1. We have multiplexed all enables of all registers. We can now isolate and talk to (Hand Shake with) each register individually. Doing so one shot we can do our 8-bit output on 8-bit PORTB of PIC and send it to exact register on the matrix. Repeat until all registers have their 8-bits in them. Now latch. Do the entire thing one more time and you have all your colors in all registers. (loop repeat 60 times for POV)
Now go to the next set of colors for all registers and repeat this process.....This will create movement...
I will try to post a diagram for clarity.
 
Last edited:
A few modifications are made to the schematics above:
Since we are using parallel-in, parallel-out registers there is no need for clocking the registers! That has been eleminated. Now only 15 pins are needed for each LED module.
Also Register Enables require logic LOW to be enabled. For that reason each enable has been weak pulled up with resistors. (Disable them until we are ready for them)
As the main transistors (bottom right of schematics) are fired with logic High, these transistors pull down the emitters of the transistors on LED boards. (Invertors) Hence producing a logic LOW on enable of that particular register's enable.
For latching these registers require the Enable to be low while firing the latch. There is an extra transistor added to produce enough juice triggering all latches on all registers. To satisfy "Latch" criteria, 3 buffering diades are connected to "Latch" line to driver the Base of the main transistors (bottom right transistors). This will allow the 3 Enable lines from these transistors to be set high while we LATCH all the registers. (i.e.: all registers are enabled while we latch them)
I also released RA4 from usage at this time. I have other future plans for this port of the PIC. <mad scientist grin>

I have attached a new schematics and a datasheet for the registers used:
 

Attachments

  • SN74AHC573-8Bit Parallel in-Parallel out latch.pdf
    755.9 KB · Views: 150
  • Tower 8X3X8 -Schematics3.pdf
    113.4 KB · Views: 179
Last edited:

Nickel I read your post again. If you are pursuing I2C, there is a product called "ShiftBright" for single RGB LED and "OctoBright" for 8-RGB LED. I read the description and general concept. Interesting concept, more color resolution. (10 bits per each R, G, B, total of 30 bits colors, 32 bit shift format PWM). I am going to read up more on that while finishing this project. It is a bit expensive for my taste but might consider it in the near future.
 
Last edited:
 

Attachments

  • Tower 8X3X8 -Schematics4.pdf
    104.5 KB · Views: 251
Last edited:
ChipWizard:

There seems to be lots of valid ways to get the data out to the leds, and different levels. The way the data is transported to the different levels seems to be a real challenge. The couple of cubes that I have looked at, keep all the shift registers on the first level, and end up multiplexing the upper levels. Paralleling the upper level leds to the first level is done either with the bare led leads, or pcb type "scaffold" like the SeedStudio cube, neither of which looks like much fun.

This is not a project I'm going to build.

You seem to have a firm grip on things, and plenty of enthusiasm. I have little to add without the additional insights gained, by actually trying to simulate or build the project.

Best of luck.
 
Status
Not open for further replies.
Cookies are required to use this site. You must accept them to continue using the site. Learn more…