Maker Pro
Maker Pro

Second WS2812B strip stops MCU

TokyoDave

Feb 17, 2023
9
Joined
Feb 17, 2023
Messages
9
I am using an ATTiny85 to control a WS2812B strip of maybe 50 beads, **which works fine**. The problem comes when I added a second 'strip' of 1 pixel to act as a fancy indicator light instead of an LED. Regardless of whether I enable the code for the second strip, the code will not run (first thing it would normally do is turn on an LED, which is how I know) if the DataIn lead of the 2nd strip is connected. However, if I connect the second strip DataIn after the code starts, everything works.
I suspect there is something about the load from the two strips that is causing issues at startup. I've added resistors from 470 to 10k to the data lines with no improvement. I also put a decoupling capacitor on the MCU VCC/GND. The strips already seem to have capacitors.

Since this is a startup issue, I should mention that I am using ATTinyCore with Micronucleus, and the 2nd dataline is going to PB3. D+/D- are isolated by a jumper pin block when running.

Any feedback or ideas are welcome.
 
Last edited:

Delta Prime

Jul 29, 2020
2,036
Joined
Jul 29, 2020
Messages
2,036
Have you tried this?
If so, you have to show your work.We cannot see what you are doing from your description.
 

Delta Prime

Jul 29, 2020
2,036
Joined
Jul 29, 2020
Messages
2,036
Darn it! Your edit did not show up until after I responded.
Since this is a startup issue, I should mention that I am using ATTinyCore with Micronucleus, and the 2nd dataline is going to PB3. D+/D- are isolated by a jumper pin block when running
No fair! I want a do over. Mulligan.
 

TokyoDave

Feb 17, 2023
9
Joined
Feb 17, 2023
Messages
9
My bad. I'm now strongly suspecting the bootloader, which also seems to take a variable amount of time to exit. So, now I have to figure out how to reconfigure, etc.
 

Harald Kapp

Moderator
Moderator
Nov 17, 2011
13,758
Joined
Nov 17, 2011
Messages
13,758
First thing we need is a circuit diagram and the code. We have no idea how you connected the parts and what your code does / is supposed to do.
 

kellys_eye

Jun 25, 2010
6,514
Joined
Jun 25, 2010
Messages
6,514
Have you tried a different piece of LED strip? Could be the 'add-on' section is faulty.
 

TokyoDave

Feb 17, 2023
9
Joined
Feb 17, 2023
Messages
9
I concur. I am confident you will do well.
Yep, that did it. I reconfigured the bootloader to only run on reset. It appears it really doesn't like running with D+/D- not connected to a USB, or to other stuff.

For reference: to upload, I cut the USB and jumper the D-/D+ to the MCU. Then invoke Upload from the IDE; when it says 'connect', I turn on the USB port and hit reset on the MCU. When the upload finishes, I cut the USB again and jumper the PB3/PB4 back to their running configuration. Turn on the USB power, and the code runs immediately. I will investigate for final version is using a data cable for flashing, and a charging cable for running.
 
Last edited:

bidrohini

Feb 1, 2023
169
Joined
Feb 1, 2023
Messages
169
Since the problem occurs after adding the second LED strip only, I think it's an inadequate power supply problem. I think your whole setup is not getting sufficient voltage and current to light up both neopixel strings. There can be an insufficient memory issue too. Because the Attiny85 has only 8KB flash. I looked at some tutorials. All of those have used less number of LEDs than what you have mentioned. Instead, you can use ATmega328P like this clock shown here: https://www.pcbway.com/project/shareproject/NeopixelQuarterRing_cbc70e1a.html
See if it solves the problem.
 

Harald Kapp

Moderator
Moderator
Nov 17, 2011
13,758
Joined
Nov 17, 2011
Messages
13,758
@bidrohini : have you read te latest post #9 by the op? He resolved the issue as being due to a bootloader problem.
 

TokyoDave

Feb 17, 2023
9
Joined
Feb 17, 2023
Messages
9
Since the problem occurs after adding the second LED strip only, I think it's an inadequate power supply problem. I think your whole setup is not getting sufficient voltage and current to light up both neopixel strings. There can be an insufficient memory issue too. Because the Attiny85 has only 8KB flash. I looked at some tutorials. All of those have used less number of LEDs than what you have mentioned. Instead, you can use ATmega328P like this clock shown here: https://www.pcbway.com/project/shareproject/NeopixelQuarterRing_cbc70e1a.html
See if it solves the problem.
Thanks, but the problem was actually to do with the bootloader.
I now have a variant packaging of this project using a Tiny824 (8KiB), which runs 200 pixels + an indicator pixel + supports loads of cool patterns. I feed power from both ends. The UPDI uploading experience is much better with these newer chips, and no space taken up by a bootloader.
 
Top