Hardware

You’ll have some options for batteries and other parts…more on that in a moment…but the board-to-DotStar connections are always the same:

Feather M0 or Arduino Pin #

DotStar

11

DI (Data In)

13

CI (Clock In)

GND

GND or –

Make sure you’re connecting the board to the input end of the DotStar strip or matrix. It should be labeled DI and CI. Don’t connect the board to DO and CO…that’s the output end.

As written, our Arduino code can support up to 512 DotStar LEDs. This is to mimic Fadecandy’s 512 pixel support, so existing examples for that device might carry over. However…

  • The LED topology will be different. This project uses a single long DotStar chain vs. Fadecandy’s 8 concurrent NeoPixel chains.
  • Our hardware isn’t as powerful as Fadecandy…with 512 LEDs, you’ll probably need to reduce the frame rate to 30 FPS or less (we’ll cover this later). But shorter runs work fine with fast frame rates.

Powering large numbers of LEDs in portable projects also presents challenges. So…though we can handle 512 LEDs, for practical reasons you’ll most likely run fewer than that. One or two meters of DotStar strip should work well, or an 8x8 matrix (maybe 16x16 with a large enough battery).

We’ll illustrate with some 8x8 DotStar matrices, but the real power of this system is that it can take any shape, whatever you might assemble from sections of DotStar strip.

Battery Power

The Feather M0 board has a battery charging circuit built in. It works great for circuits using sensors and small displays…but DotStars use a lot of power, and batteries for this project will tend to be large. So for practical reasons, you’re best served foregoing the built-in charger. Physically disconnect the battery when not in use, and use a dedicated LiPoly charger (such as our MicroLipo USB charger) to top it off. (If the battery’s over 500 mAh, bridge the pads on the back of the MicroLipo with a dot of solder to enable 500 mA charge rate.)

Power from the battery needs to be split to both the DotStars and the Feather M0 board. Use a JST socket breakout board (don’t use the version with a switch, it’s not rated for high current), or you can hack one end off a JST extension cable and split power two ways.

Battery

DotStars

Feather M0

or Arduino Zero

+

5V

BAT

Vin

GND

GND

GND

With smaller projects, the Feather M0’s built-in charger becomes more practical. It provides about a 200 mA charge…so it depends on the battery size and your patience whether this is worthwhile…500 to 1200 mAh seems reasonable. Also it requires one extra part which isn’t sold by Adafruit: a double-pole, double-throw (DPDT) switch. You can order something from DigiKey or might find one at Radio Shack if you still have one nearby. Just make sure that the switch you use is rated for at least a couple Amps of DC current.

Follow the diagram below for switch wiring; only 4 of the 6 pins on the switch are used. When in the “off” position, you can connect a USB cable to charge the battery. In the “on” position, the Arduino sketch runs, or you can upload new code to the board.

Don’t use this scheme for large projects…the Feather M0 can pass through about 1 Amp of current, with occasional higher surges. With lots of LEDs, you’ll do better with the first circuit layout.

In tests, the 1200 mAh cell works well with the 8x8 matrix (and should also accommodate an equivalent amount of DotStar strip). Scaling up gets challenging…you could try a 16x16 matrix with a 2500 mAh battery (direct, as in the first circuit, not using the Feather as a pass-through), but that’s 4X the pixels with only about 2X the battery capacity. For large installations, you may want to step up to a 4400 or 6600 mAh lithium ion battery pack…or, if really large, add a DC jack and plug into a 5V wall supply, though this sacrifices portability.

Alternately…plan your animations to limit the overall brightness and the number of LEDs lit at any one time.

Here’s a small widget built with an 8x8 matrix and 1200 mAh LiPoly cell, along with an old DPDT switch I had on hand. As a quick prototype, this just uses foam tape and hot glue…but for something more durable and presentable I’d be inclined to make a 3D-printed enclosure.

Look closely and you’ll see the switch connects the board’s En (enable) pin to one of the unused GND pads on the matrix when in the “off” position. There’s continuity between all three GND pads, so I exploited this to simplify the soldering (rather than the three-way splice shown in the diagram). Get creative!

This guide was first published on Feb 01, 2016. It was last updated on Sep 20, 2018. This page (Hardware) was last updated on Feb 01, 2016.