WS28212b with ATtiny85 250718

Using the excellent instructions at

produced schematic

and
circuit on prototype PCB Datak 21-114

Photos


Applied 5v DC from Belkin USB hub and
tested red and white leads at male JST plug
from PCB which mates with female JST plug
to JST male plug to BTF strip.
Result: 5.2 v DC

By accident two RGB LED strips were ordered:
BTF-Lighting WS2812B SPI RGB LED Strip white tape
SKU: WS2812B5M60WLW00 Needs three conductor JST to USB C adapter
and
SEZO
WS2812E LED Strip black
Model:BTF-5V-WS2812B-300L-B-L

These tests done on the BTF-Lighting WS2812B.

Using Arduino IDE V2.3.5
loaded sketch using Sparkfun Tiny Programmer SKU: PGM-1180:
loaded the the sketch offered in the Instructable.
attiny_pixel_switch.ino
Result: compiles, loads but when power applied: Negative, no operation

Tried
WS2812-simple_turn_on_off_Dec31.ino
Have worked RGB LED
strips using this program. Have used this sketch to operate
LED strips using microcontroller XIAO SAMD21.
Result: compiles, but will not load. Returns
'data section exceeds available space in board'
uses FastLED library. Library to big for ATtiny85?

Tried
strandTest_240116_rainbow.ino
Result: compiles, loads but when power applied: Negative, no operation

Tried
strandTest_240116.ino
Result: compiles, loads. Operated LED strip six times. Only operates the
first four or five LEDS in irregular patterns. After sixth test strip
fails to react.

Tried replacing ATtiny85 and running
strandTest_240116_rainbow.ino
Result: compiles, loads but when power applied: Negative, no operation

Perhaps someone has connected WS28212b with ATtiny85 and could offer an
idea about where I came off the rails.

Thanks.

Allen Pitts
Dallas TX

How many LEDs? Please post your code for each.

ATtiny85 8k bytes
ATtiny88 8k bytes
NanoR3 32k bytes

I found max WS2812 for ATtiny85 and ATtiny88 to be "around" 60. I could add more, but memory would freeze while the code was running (heartbeat is an LED toggling every loop). I use tin88 because it has "Serial" ability. Nano can hold 622xWS2812.

Sorry, @xpfd, but the question was for the OP, to clarify his needs. Unless you have a new, second account?

I was using your question with my findings (i made small neopixel signs/icons, with APA106, 5050 and 2020 neopixels) for reference for the OP's question.

Educated guess is that you're using de Adafruit NeoPixel library. That library uses dynamic memory allocation for the NeoPixels. So if the memory report of the IDE reports 100 bytes RAM used (as an example) you will have to add the memory used by the library for the pixels; that is 3 (RGB) or 4 (RGBW) bytes per pixel.

And add a 100nF capacitor as near as possible between Attiny85 VCC and GND pins

Apparently, the question in post#2 is beyond our OP’s ability to respond to, nor could they post code. Since they were back yesterday but failed to respond, I’m out.

I just noticed: your PCB has USB VCC going to ATtiny85 PB2.

Hello @xkpd @camsysca @sterretje @robby77 and the Arduino forum,

Corrected error in PCB image dated 250717 posted July 18 in
post #1.

After working with the ATTiny85b for some weeks in strip and
Neopixel ring projects some facts have been captured.
Of the microcontrollers investigated the ATTiny 85 is
the smallest, least expensive Arduino IDE compatible
microcontroller that has been found.
0ther microcontrollers investigated:

  1. Arduino Uno Rev3 $27; Op V: 5V; Memory: 32kb; SRAM: 2kb
  2. Arduino Nano $24; Op V: 5V; Memory: 32kb; SRAM: 2kb
  3. Arduino Nano Every $27; Op V: 5V; Memory: 48kb; SRAM: 6kb
  4. DFR0282 $11; Op V: 5V; Memory: 32kb; SRAM: 2kb
  5. XIAO SAMD21 $7; Op V: 5V; Memory: 32kb; Flash: 256kb
  6. ATtiny85 $2; Op V: 5V; Memory: .5kb; SRAM: 8kb

While price is an important factor in microcontroller selection
other aspects are germane. In running the Adafruit_NeoPixel.h
to operate Neopixel_16 and Neopixel_24 rings ATtiny85
struggles to operate normally.

Another element in evaluating the ATtiny85 is not found
in specifications or circuit operations but rather in
programming and construction. That is, the ATtiny85 is
the only MC that cannot be connected to the PC via USB
and therefore, requires a device into which the ATtiny85
is fitted.

This points to an important facet of using the ATtiny85:
construction. Using the ATtiny85 requires moving the
ATtiny85 from the programmer, like

and the circuit under construction. Because, like
all the MCs listed, the only way to know for sure
which program is on the MC is to upload a sketch,
often the MC is moved between circuit and programmer
several times. Even using a chip pulling tool it
almost impossible to keep from bending the Tiny's
tiny legs. After bending and straightening the
more than couple times metal fatigue sets in and
the device must be discarded.

For these reasons the use of the ATTiny85
will discarded except for in small space
lighting projects like

For mutli-color strips and rings the focus
is on the XIAO SAMD21.

The search for an MC superior to XIAO SAMD21
continues.

Thanks.

Allen Pitts

Zero Insertion Force sockets pinch/clamp the DIP legs when the lever is lowered, and release when the lever is raised. You can make your own programmer with a couple capacitors, wires and a connector on a copper perf board.

If you order from AliExpress, you can get a complete Arduino Nano for less than some of those single-chip processors, and it would come with a USB port and enough memory to handle more WS2812's than you're ever likely to want. Maybe that gives you a larger unit than you'd like, but it's hard to beat for cost and convenience.

I prefer the ATtiny88 with native USP/Serial and half the cost of ATtiny85.

I puchase on Amazon, which is generally higher in price, but quality is not a big issue. I have had only one dodgy decice (an "Uno" with spurrious Serial port burps) in a decade over thousands of items.

Hello @xkpd @camsysca @sterretje @robby77 @Beminetonight and the Arduino forum,

The product prices at AliExpress are superior.
Shipping costs and time to delivery are negative factors.

@AllenPitts

On the contrary, shipping cost from AliExpress is absurdly low. I don't know what the economics of that are, but they can send stuff from China quite a bit cheaper than a typical US vendor can manage, without any international transfer involved. You're right about the delivery time, though. You do have to wait a couple of weeks for packages to arrive.

Is that true AFTER Trump's tariff and de minimus changes? :frowning: