Pixel Grid converted to APA102 style RGB strip

techElder

Well-known member
What I would like to see is a way to go from a pixel grid diagram of "something" to code that will make an APA102 style RGB strip display that grid.

It would be like those moving signs, but perhaps most of it doesn't move. Certainly not a video display, but something admittedly slow.

newplumber's seven segment display commented on by hippy made me bring this up because I've been thinking on it.

This should be something that can be done by a PICAXE.
 

techElder

Well-known member
As far as a grid is concerned, 60 dots horizontal x 34 dots vertical is about a 16:9 ratio. That seems to be a good place to start.

60 dots horizontal x 34 dots vertical = 2040 bits. That's purty close to an 8 bit x 3 bit array (2048.)

That seems to be a really course graphics display.
 

premelec

Senior Member
Could think of it like parallel flying sky writing airplanes [34...] with strips of APA102s [34 x 60?] up date rate might be ok with 34 PICAXEs ;-0
 

hippy

Technical Support
Staff member
I would select 64 x 32 bits, because they are nice multiples of 8. So 32 rows of 8 columns of 8 bits. Assuming a SendAPA102(R,G,B) macro, just white or off, with the bitmap in scratchpad ...

Code:
SendFrame:
  ptr = 0
  SendHead()
  For row = 0 To 31
    For col = 0 To 7
      colBit = 1
      Do
        pixel = @ptr & colBit Max 1 * $FF
        SendAPA102(pixel,pixel,pixel)
        colBit = colBit * 2
      Loop Until colBit = 0
      ptr = ptr + 1
    Next
  Next
  SendTail()
  Return
Everything else would be an extension or variant on that theme.
 

techElder

Well-known member
So, mechanically speaking, one can purchase a common APA102 strip of 144 LEDs per meter.

That is about 7mm center-center for the LEDs. I didn't find a good number on the width of the strip, but the LED package itself is 5mm square.

So, by overlapping edges, one probably won't attain a 7mm center-center spacing, but it could be close.

So, using hippy's 64x32 array size, then physically the LED array could be about 500mm horizontal by 225mm vertical (2048 pixels.) That's about 20" horizontal x 9" vertical.

The aspect ratio there is about 20:9 versus the more typical 16:9, but who really cares?

Physically, that is larger than the monitor that I am working with right this moment. Obviously, not the same resolution, but who really cares? :D

The meter length 144 LED strip is about $30US. That wouldn't quite make two 64 LED strips, but there wouldn't be much waste in toto.

The individual LEDs (w/controller) cost about $0.25US each. That works out to about $512US for the 2048 LEDs.

Probably not going to sell one of these to anyone! :D (especially not to newplumber! :D)

EDIT: This commercial sign is interesting. Selling for about $150US on eBay, but about $300US at their site.

EXTERNAL LINK: TECK32X64P10FC
 
Last edited:

hippy

Technical Support
Staff member
Abstraction will allow any size display to be virtualised from however many LED's one has, or define how many LED's one needs. The order in which data is sent out. how any hardware is wired or ordered, can be different to the order or way any data is stored.

For maximal optimisation having the bitmap closely match the hardware helps but it's not always essential.

The APA102 LED strip I have to hand has LED's on a roughly 17mm pitch. Each LED carrier board butts up to the next which sets the pitch. About 60 LED's per metre. All are in a transparent flat tube about 15mm wide.

So just over a square metre would be 64 x 64 LED's, 4096 LED's.

Probably most easily wired so alternative rows run in opposite directions for shorter wiring rather than a zig-zag scheme. Software can sort that out easily enough.

Watching the Pyeongchang winter paralympic closing ceremony, the displays which wrapped around the inside of the stadium appeared to be in blocks of about 24 x 24. Two tiers of 36 blocks perhaps. So maybe 50 x 1200 or something which is quite close to 65,536.

For a 7-segment display, I would simply use strips of however many LEDs per segment and chain them together. The data held within the PICAXE can be the same as for a MAX7129 or similar. One just needs to send a block of data out for each set of LED's per segment. The code shouldn't be much more complicated than for a MAX7219.
 

techElder

Well-known member
Seems like the APA102 stuff is way out of the price range for this kind of project.

I'm reading Old Marty's and Buzby's project with great interest, though.
 

premelec

Senior Member
@Tex... advertising signs are around my town for several years that are much larger than the one you referenced; by law they are only allowed to update once a minute so they don't distract drivers... Don't know the cost - just the distraction: I've heard of whole buildings covered using OLEDs in the Orient
 

techElder

Well-known member
Not to blow up the project that I started myself, but I started looking at APA102 stuff for Christmas decorations. Not after I priced it!

Maybe OLED is the way to go, but then I'll have to look into the pricing for that, too. There is new tech in that area, so perhaps OLED will get price lower.

I'm always looking for LARGE displays (for viewing at a distance) and most people are building TINY things. :D
 

hippy

Technical Support
Staff member
Large projects always face a cost issue. Even if one could get individual LED's for 1 cent each a 64x64 display is going to cost $40 and and that's probably far short of what one would actually have to pay unless ordering a lot more and getting good bulk discount.

It may be possible to use 8x8 LED modules more cheaply but they are smaller, and will be less bright.

Most large displays will be intended to generate revenue which covers their cost or will be funded as part of an installation project. They will likely also be buying direct from manufacturers so can avoid costs of going through intermediaries who also want their cut of profit.
 

Buzby

Senior Member
A 50" plasma TV costs about $99 on eBay, combined with a $40 rPi ( or any picaxe and a tellymate, cheaper still ), and you've got huge digits at a lot less cost than reams of LEDS.

I suppose it depends on if you want the 'LED look', or just big digits !.

Cheers,

Buzby
 

newplumber

Senior Member
texasclod said:
The individual LEDs (w/controller) cost about $0.25US each. That works out to about $512US for the 2048 LEDs.

Probably not going to sell one of these to anyone! (especially not to newplumber! )
I'll wait till it goes on sale :)
512? ya thats alot of money for some leds
If you get none water proof you can get it for .214 a piece
https://www.ebay.com/itm/APA102-30-60-144LED-RGB-Dream-Color-Individually-Addressable-LED-Strip-Light-5V/401280169333?hash=item5d6e297575:m:mKtIfgg6eAi1mR5Ydsgm6Xg
which still comes to 462....thinking if you buy 15 of the 144per meter
I'll wait till you build it (64X32) and then I will copy and paste :)
 

newplumber

Senior Member
Well for right now its going to be .....with sound ...but the this will be a big test for me on how the APA102s cooperate...maybe rgb apa102s are way better then just white ones
and if after i manage to get it working ...I like texasclods idea with the 64X32 display ...and of course it would be a piece of cake just buying one ...BUT..then theres no
fun on things going wrong :) I just have to save up a little for that project
 

techElder

Well-known member
Hippy, (and I) have suggested to wire parts of an APA102 strip into each of your digit segments. Then each digit has seven-segments that are addressed like any other APA102 segment.

The good part is you still get your RGB, and your wiring and circuit is simplified.

If you set it up your programming properly (I know, I know, what are the chances that will happen? :D ), you'll just be reusing a couple of subroutines to address as many digits as you please.

I'm no longer sure about using APA102s at this price point en masse. Even if newplumber is paying for it! :D
 

Bill.b

Senior Member
This is a 64 * 32 RGB LED display I have used. They are 320 * 160mm and priced at AU $50 from ebay.

I do not think a picaxe will drive these displays, I used a PIC32MX470 to drive it.

rgbLED64x32.jpg


Bill
 

newplumber

Senior Member
I am doing just that putting my apa102s in each segment
I changed my mind again texas....its going back to the 14.5 inch display the apa102s fit better
so 5 rgb leds per segment ...which is a piece of cake compared to my other schematic

btw I suffer from IAOTB....which means I'm All Over The Board

I'm no longer sure about using APA102s at this price point en masse. Even if newplumber is paying for it
Oh come on texas....they make VISA for a reason lol (joking)
The way I figure ...college cost lots of money....with only a certificate at end results
So spending a little and learning alot in here is the best way to go for me.

Someday Texas....with your help on the code and stuff we are going to build that display...just need a few years for the premeetings


Hi Bill didn't see your post till now but do you know how it communicates with it? I2c...wifi?
 

Bill.b

Senior Member
Extract from the adafruit website.
How the Matrix Works
by Phillip Burgess
There's zero documentation out there on how these matrices work, and no public datasheets or spec sheets so we are going to try to document how they work.

First thing to notice is that there are 512 RGB LEDs in a 16x32 matrix. Like pretty much every matrix out there, you can't drive all 512 at once. One reason is that would require a lot of current, another reason is that it would be really expensive to have so many pins. Instead, the matrix is divided into 8 interleaved sections/strips. The first section is the 1st 'line' and the 9th 'line' (32 x 2 RGB LEDs = 64 RGB LEDs), the second is the 2nd and 10th line, etc until the last section which is the 7th and 16th line. You might be asking, why are the lines paired this way? wouldn't it be nicer to have the first section be the 1st and 2nd line, then 3rd and 4th, until the 15th and 16th? The reason they do it this way is so that the lines are interleaved and look better when refreshed, otherwise we'd see the stripes more clearly.

So, on the PCB is 12 LED driver chips. These are like 74HC595s but they have 16 outputs and they are constant current. 16 outputs * 12 chips = 192 LEDs that can be controlled at once, and 64 * 3 (R G and B) = 192. So now the design comes together: You have 192 outputs that can control one line at a time, with each of 192 R, G and B LEDs either on or off. The controller (say an FPGA or microcontroller) selects which section to currently draw (using A, B, and C address pins - 3 bits can have 8 values). Once the address is set, the controller clocks out 192 bits of data (24 bytes) and latches it. Then it increments the address and clocks out another 192 bits, etc until it gets to address #7, then it sets the address back to #0

The only downside of this technique is that despite being very simple and fast, it has no PWM control built in! The controller can only set the LEDs on or off. So what do you do when you want full colour? You actually need to draw the entire matrix over and over again at very high speeds to PWM the matrix manually. For that reason, you need to have a very fast controller (50 MHz is a minimum) if you want to do a lot of colours and motion video and have it look good.

How quickly can we feed data to the matrix? Forum users Andrew Silverman and Ryan Brown have been posting their progress driving the 16x32 matrix with an FPGA, and the limit appears to be somewhere between 40 and 50 MHz. Ryan writes: “I haven't validated 100% pixel correctness, but 50 MHz seems to work for me […] 67MHz definitely did not work.” He also provided this graph showing current draw relative to clock frequency:

Bill
 

techElder

Well-known member
One version of that 64x32 LED module on eBay shows some mighty impressive "video" screen samples that could be misconstrued as having RGB PWM capabilities. Could it be that good after all? :D

1x RGB P5 HD led screen display module 64x32 led display module dot matrix 5mm

There are individual dot-matrix LED modules that can be "glued" together to make a larger screen (as hippy has proffered above), but there are many drawbacks to that method of increasing display size.
 

newplumber

Senior Member
@ Bill.b...thanks for that info seems you put some time into reverse engineering it all



texasclod said:
Could it be that good after all?
for you it would be I bet.....but for me as soon as I slide my mouse closer to the "buy it now" ..picture starts flicking and going beserk :)
 
Top