Neopixel Ring + Trinket m0 Pixel 0 Always Full Green

EL Wire/Tape/Panels, LEDs, pixels and strips, LCDs and TFTs, etc products from Adafruit

Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.
Locked
User avatar
evermorian
 
Posts: 3
Joined: Sun Feb 25, 2018 6:56 pm

Neopixel Ring + Trinket m0 Pixel 0 Always Full Green

Post by evermorian »

I am having an odd problem with the 12 Neopixel rings ( https://www.adafruit.com/product/2851 ) and the Trinket m0 (running CircuitPython). For most hardware test configurations, when I power on, the first Neopixel turns green at full brightness, even before the board finishes starting up. It stays on and unchanged the whole time power is on.

I figured the ring was defective. I ordered another one and, it does the same thing. I must be doing something wrong.

Things I have tried with the same result:

- Different pins on the board for the data, using both the A and D names for them (D3, D4, D2, D1, A1, A0)
- Powering from an external power supply (4.89v, with a ground between the ring and the board’s GND pin)
- Powering from the board using the USB and GND pins
- Providing only 3 parameters to pixels.fill (e.g. pixels.fill((0,255,0)) instead of pixels.fill((0,255,0,0)) )
- Connecting leads directly to the pins to eliminate the breadboard
- Different test leads
- Different Neopixel ring

I am not sure what to try next. Any suggestions?

The code I am using is the most simplified version of something from the tutorials:

Code: Select all

import time
import board
import neopixel

pixel_pin = board.D2
num_pixels = 12
ORDER = neopixel.GRBW

pixels = neopixel.NeoPixel(
    pixel_pin, num_pixels, brightness=0.2, auto_write=False, pixel_order=ORDER
)

pixels.fill((0, 0, 255, 0))
pixels.show()
Here is a pic of the wiring:
IMG_9082.JPG
IMG_9082.JPG (186.71 KiB) Viewed 962 times

User avatar
dastels
 
Posts: 15653
Joined: Tue Oct 20, 2015 3:22 pm

Re: Neopixel Ring + Trinket m0 Pixel 0 Always Full Green

Post by dastels »

To address some of your point:

- If you are controlling Neopixels directly with a 3.3v pin (no level shifter) you should power them with 3.3v. Powering with 5v will likely not work, or at least not well.
- They are RGBW Neopixels. They require a byte for each LED (i.e. 4 values).
- trying different pins, different rings, etc are all things I would have asked you to do, so thanks for saving time :)

Sometimes NeoPixels will come up in a random state (as opposed to off) when power is applied. Typically the code turns them off asap.


I have to ask... you are connecting to the Din connection to the ring?

Are you using the latest build of CP for the board? That would be 7.0.0 now. And neopixel.mpy from the matching library bundle?

Dave

User avatar
evermorian
 
Posts: 3
Joined: Sun Feb 25, 2018 6:56 pm

Re: Neopixel Ring + Trinket m0 Pixel 0 Always Full Green

Post by evermorian »

Thank you for the suggestions!

I adjusted the power supply to 3.3v and tried several configurations where that powered either just the ring or both the ring and the trinket m0. Same result as before in all cases (pixel 0 stays on all the time). I don’t have a logic shifter on-hand to try that with 5v.

I was using the CircuitPython 6.x from 27 August along with the matching libraries. I have now changed to 7.x from 25 September with the matching libraries. Same result (pixel 0 stays on all the time).

Pixel 0 blinks off at power on but, turns right back on to full brightness within a second (or less).

I am definitely connecting to the data in pin on the ring with the data out pin not connected to anything.

I am calling pixels.fill with 4 values. I tried it once with 3 values because someone locally suggested the library might not actually handle the 4th value.

The rings seem to be GRBW. If I tell the library they are RGBW in the config line, the red and green are swapped in the quad when setting the colors (of the other 11 pixels which work as expected). That is:

Code: Select all

[ … ]
ORDER = neopixel.GRBW
[ … ]
pixels.fill((255, 0, 0, 0))
… sets the other 11 pixels to red, while:

Code: Select all

[ … ]
ORDER = neopixel.RGBW
[ … ]
pixels.fill((255, 0, 0, 0))
… sets the other 11 pixels to green.

I have the same trinket m0 board running a piece of Dotstar strip now (in like 5 minutes) but, that is a different thing (different library, different LED hardware).

Locked
Please be positive and constructive with your questions and comments.

Return to “Glowy things (LCD, LED, TFT, EL) purchased at Adafruit”