Hi! I wrote a small program for the atmega328 that controls a WS2812B ring

Hi!

I wrote a small program for the atmega328 that controls a WS2812B ring for a clock. It currently just uses the Adafruit Neopixel library, and I am pretty satisfied with how the ring looks and functions, however, I wanted to make the controller board smaller, and I’ve redesigned it using an attiny84 SOIC chip.

The reason I’m looking into FastLED is that with all the arduino libraries, the RCTLib library for the ds1307 RTC, the adafruit neopixel library, and my code, the resulting .hex file is too big to upload to the attiny84 chip.

Is it possible to use FastLED as a straight AVR library, and leave out the arduino stuff? Looking through the code, I don’t feel like I see any Arduino specific bits, but maybe I’m just missing something.

Any information on this would be appreciated, as well as other ideas about how to reduce the size of my program.

You do realize that you can get the 328p in a 4x4mm package, right? How much smaller do you want to go?

Can I hand solder that package? I’ve done a bunch of tssop-20 and lqfp64 without issue, and I do have a hot air station and solder paste.

FastLED pretty aggressively tries to cull out arduino specific bits (fallbacks for pin operations being one that sticks around, but shouldn’t get used if you’re building for a platform/target that has gpio pin definitions to allow bypassing DigitalWrite.

Some folks here have managed to build FastLED outside of the arduino environment, and on my long list of things I’d like to do is making that easier.

In addition, the compiler is pretty good about not including the pieces of FastLED that aren’t being used, to minimize size. Also - there are some things that can be done to make FastLED compile even smaller than normal - there’s a post here I the community where I document that (it isn’t finalized which is why it isn’t on the wiki yet), but short version it involves creating led controller instances directly and sidestepping the FastLED object entirely.

Uh, if you have very steady hands and a fine tipped soldering iron. You could also use a hot air work station but you would need either a flat or square tip for that. The round one wouldn’t work. You can also use a skillet reflow to get it done, in fact, it’s recommended to reflow it.

Since you said you want to make it smaller, I made the assumption that you were already using reflow and all SMD packages. I reflow stuff down to 0402 size.

Well, I did some more research. There are mixed reviews of success. I think I’ll just order a few boards and try it.

Anyway, thank you for the suggestion.

P.S. It doesn’t really need to be smaller. I just wanted to see if I could do it.