Flash of brilliance! Or maybe a flash of stupid…

A project log for CUBEx8

An 8x8x8 RGB LED cube kit using addressable LEDs!

burkethosburkethos 05/09/2019 at 23:350 Comments

Getting back to the product design, I now have constraints to work with and the major component of the product (WS2812) determined. Now comes the fun part! Now is when I take out plain old pencil and paper and start sketching ideas. This is by far – for me -- the fastest way to iterate designs, bar none. Using pencil allows me to quickly sketch and modify ideas. It requires zero electrical power and can be done anywhere an idea strikes you.

I can quickly discard ideas as impractical and move on. Once my ideas are solidified I move them to the computer.

So what did my first sketches look like? My first inclination was to try to minimize the amount of soldering required to build the kit. Maybe even eliminate it. The only way I could think of to eliminate it and still have a three dimensional object was to use connectors.

Lots of connectors.

I would need a small, thin circuit board for the LEDs. These would be mounted horizontally and stacked vertically. In order to stack them, I'd need small, thin boards on each end of the horizontal LED boards. These vertical boards would have to mount into some sort of base board that handled connections to the outside world, LED control, and power distribution. It looked like this:

On one end of each horizontal was a connector for power, ground and serial data input. On the other end of the horizontal was a connector for power, ground and serial data output. I could polarize these connectors such that they could only be plugged into the verticals one way -- it would eliminate the possibility of plugging the horizontals in backwards which could potentially destroy the LEDs.


Each vertical would then have the appropriate mating connectors as well as connectors to plug into the main board.

A little more thought and I realized that with a connectorized solution, I could actually make the cube expandable, or perhaps even allow non-square shapes. For example, stacking two vertical boards would allow an 8x8x16 cube to be built. I just had to ensure that the connectors and power planes were capable of handling more current than just an 8x8x8 cube.


Now for the type of connector. Many a designer will curse at the mention of connectors, myself included. They can be one of the most unpleasant aspects of a design to contend with. Frequently the perfect connector doesn’t exist, or it is unobtanium, or uber-expensive. Ugh. Connectors suck.

In an attempt to keep it simple, stupid (KISS), my first thought was pin headers. There are many suppliers so second sourcing should be easy. Headers come in both genders and in a variety of pin pitches so that it should be fairly easy to find what I needed. They are ubiquitous.

A horizontal board needed to handle current for eight LEDs and potentially more if multiple horizontal boards are connected together. At 60 mA per smart LED, times 8 LEDs, this works out to .48 A per horizontal. Each vertical therefore needs to handle 8 (or more) horizontal boards, so the verticals need to handle at least 8 x .48 = 3.84 A.

Referring back to the sketch, each horizontal input end would need +5V power at 0.48A, a ground connection and a serial data input signal = 3 pin connector. The opposite polarity of that connector would be needed to plug the horizontal into the vertical board.

One vertical cube assembly would be comprised of 8 horizontal boards plus 2 vertical boards. Each horizontal would require one 3-pin male header and one 3-pin female header. Each vertical would require 4 male headers and 4 female headers for the horizontal boards. The verticals would also need a connector to attach to the main board.

The total number of connectors for a vertical assembly works out to be 16 male + 16 female of the 3-pin headers. Don't forget the 2 male and 2 female headers connecting the verticals to the base.

A x8 cube requires 8 vertical assemblies, so the full cube connector totals are 128 male + 128 female of the 3 pin headers + 16 male and 16 female headers connecting the verticals to the base.

This is a lot of connectors....

Let's see what they will cost us using Digi-Key pricing. Note: regardless of the component supplier you are using, always try to search for parts that are "active" (not obsolete etc.) and "in stock" (readily available and not on allocation). I searched for both male and female headers, first looking at the most popular size, i.e. 0.1" pin spacing.

This brought up yet another thing to consider. With headers you can buy them with exactly the number of pins you need or you can buy them in longer lengths in a "breakaway" style. Breakaway headers require you to cut them into the desired length. Buying ones the exact size you need tends to cost more as the supplier or manufacturer is cutting them to length for you. This is called a "value added" operation. You can save money on a per-header basis by purchasing the longer breakaway sizes and cutting them yourself. But, the time you take to cut them has to figure into your COGS number.

Always remember: Your. Time. Isn't. Free.

Another thing to consider is aesthetics. My personal experiences with breakaway headers is that it is hard to get clean cut edges when I cut them myself. Pre-cut headers generally have clean edges which are more aesthetically pleasing.

Back to header pricing. I searched Digi-Key for rectangular connectors, header male pins, unshrouded, 0.1" spacing, single row, 3 positions. Filtering on these selections left me with still more decisions. Did I want through hole or surface mount components? Surface mount has the benefit of allowing reflow soldering techniques to be used for everything, i.e. LEDs + capacitors + headers.

On the other hand, surface mount (SMT) headers are more expensive than thru hole headers. On the other, other hand, thru-hole headers would require wave soldering in addition to reflow, so assembly would cost more.

For now I chose thru-hole with the hope that the added wave soldering costs would be less expensive than the added cost of SMT headers. Or, as a DIY kit to assemble, the customer could do the connector soldering.

I also realized that I need some connectors to be right angle and some to be straight. Recall from the sketch that the horizontal connectors are all right angles whereas the vertical connectors are all straight. My connector needs for a vertical assembly are now revised to be: 

(8 x male right angle) + (8 x female right angle) + (8 x male straight) + (8 x female straight).

For a full cube this works out to: 64 male right angle + 64 female right angle + 64 male straight + 64 female straight.

The least expensive pre-cut, 3 position, male, thru hole, straight headers cost $0.10 quantity = 1, and $.0252 at quantity = 1000. Clearly volume pricing matters.

Quantity 1000 would be enough connectors for 1000/64 = 15.625 cubes.

The least expensive male right angle connector = $.18 @ qty = 1, and $.0896 @ qty = 1000.

The corresponding costs for the straight female headers = $0.36 @ qty = 1, $.17162 @ qty = 1000.

The costs for the right angle female headers = $0.50 @ qty = 1, $.2552 @ qty = 1000.

Tip: The low quantity pricing factors into your prototyping costs which factors into your COGS. In effect, you are amortizing the cost of your prototypes over the number of production units you sell. Larger quantity pricing is for volume production pricing which helps determine retail price.

Adding them up for 1000 piece pricing shows:

64 male straight:           64 x .0252 = $1.61

64 female straight:        64 x .1716 = $10.98

64 male right angle:      64 x .0896 = $5.73

64 female right angle:   64 x .2552 = $16.33

                                                          $34.66 (In my sketch I estimated ~$36)

When you factor in assembly costs and profit margin, this is expensive. I didn't bother to look into pricing surface mount connectors because in each instance they were substantially more expensive compared to thru-hole parts.

A quick look at the datasheets indicates that each header pin can handle 3A of current so these would be sufficient for the .48A required of each horizontal. In fact, several horizontals could be connected together and still remain under the 3A current limit of the pins.

Then I realized that 0.1" spacing was actually too wide for my intended use. I was using 3.5mm (.138") LEDs. A 3 pin 0.1" header was 0.3" wide (7.62mm). D'oh! This would require horizontal board that was 0.3" wide, i.e. more than twice as wide as the LED, or at the very least a thinner board that flared out at each end to accommodate the wider connectors.

Aesthetically displeasing. <cue the sad music>

So I recalculated connector pricing based on using pins spaced 2mm (.079") apart. These would be not quite as aesthetically displeasing.

At 1000 piece quantity pricing, the 2mm connector pricing is:

64 male straight:           64 x .09 = $5.76

64 female straight:        64 x .2851 = $18.25

64 male right angle:      64 x .1206 = $7.72

64 female right angle:   64 x .4521 = $28.94


Oddly, the smaller connector that uses less raw materials to manufacture costs almost 2x what the larger connector costs. Perhaps it is due to the popularity of 0.1" headers and what I presume to be much higher production quantities.

Tip: When looking at pricing, sometimes the component with the lowest cost single piece price has a higher volume cost price compared to components with slightly higher single piece prices. Don't just assume that the lowest single piece price will produce the lowest volume price. Compare several of the lowest cost single piece prices to see which has a better price in volume.

At this point I started to question the validity of a fully connectorized design approach. I had hoped to have the LEDs be the major component cost driver of the cube. If every other component was much lower in cost, the price of a cube could be compelling. But, it seemed to me that if the connectors cost as much, or more, compared to the LEDs, then the overall cube cost was going to be too large.

Clearly NOT a flash of brilliance...