Adafruit NeoPixel FeatherWing -- np.fill(0,0,0) = dim not blank!

All ESP8266 boards running MicroPython.
Official boards are the Adafruit Huzzah and Feather boards.
Target audience: MicroPython users with an ESP8266 board.
Post Reply
ricblue
Posts: 4
Joined: Mon Sep 26, 2016 1:45 am

Adafruit NeoPixel FeatherWing -- np.fill(0,0,0) = dim not blank!

Post by ricblue » Mon Sep 26, 2016 2:11 am

Maybe I'm doing something wrong but I wanted to check here. Maybe this is NeoPixel driver bug, maybe I'm just messing up somewhere

Board = Adafruit ESP8266 Feather, reflashed with 1.8.4 (using NodeMCU flasher - I know that's not the officiial tool)

LED board is Adafruit NeoPixel FeatherWing -- 4x8 matrix of NeoPixels on a Feather layout
https://www.adafruit.com/product/2945
and
https://learn.adafruit.com/adabox001/ne ... eatherwing


Only hardware mod vs stock is to cut the track 16 jumper and solder track 15 jumper instead

Following the MicroPython docs for NeoPixel function ...
http://docs.micropython.org/en/latest/e ... xel-driver
This seems to work just as expected...
>>> from machine import Pin
>>> from neopixel import NeoPixel
>>> pin = Pin(15, Pin.OUT)
>>> np = NeoPixel(pin, 32)

Basic color functions work fine....
>>> np.fill((255,255,255))
>>> np.write()

and pixels are addressable correctly...
>>> np[0]=(100,0,0)
>>> np[1]=(0,100,0)
>>> np[2]=(0,0,100)
>>> np.write()

BUT while I try to set all to off (black) - ALL the pixels are still DIMLY LIT
>>> np.fill((0,0,0))
>>> np.write()

The LEDs appear to be the same brightness as np.fill(1,1,1)

One check: >>>print(np[0]) correctly displays (0,0,0)

Now, really weird...
>>> np.fill((255,255,255))
>>> np.write()
All LEDs go very bright, as expected
But now follow that with the same np.fill(0,0,0)
>>> np.fill((0,0,0))
>>> np.write()
AND NOW THE LEDS ARE ALL OFF!

But now just repeating
>>> np.fill((0,0,0))
>>> np.write()
and they go back to dim !!!

AND EVEN RANDOM COLORS...
>>> np.fill((50,50,50))
>>> np.write()
>>> np.fill((0,0,0))
>>> np.write()

This consistently gives some LEDs off, some dim white, some COLORS - green or purple or yellow

Am I messing up somehow? Possible bug in the NeoPixel library? Hardware fault on my Neopixel Feather board?

Thoughts??

Thanks
Richard

torwag
Posts: 220
Joined: Fri Dec 13, 2013 9:25 am

Re: Adafruit NeoPixel FeatherWing -- np.fill(0,0,0) = dim not blank!

Post by torwag » Mon Sep 26, 2016 2:37 am

I did not observe this behavior but using an older version of the firmware and not explicitly checking this I can't say for sure. What I always did was to overclock the esp, which gives me a much higher reliability.
You could give this a try.
How do you power your neopixels? those very light dimming problem I know from mismatches of the power supply and LED lights, not sure it would apply to neopixels.

ricblue
Posts: 4
Joined: Mon Sep 26, 2016 1:45 am

Re: Adafruit NeoPixel FeatherWing -- np.fill(0,0,0) = dim not blank!

Post by ricblue » Mon Sep 26, 2016 12:39 pm

The Feather board is powered by USB cable to USB3.0 port on my laptop

There seems to be enough juice as the board will happily display (255,255,255) -- all LEDs on full which should draw more current. I've seen insufficient power situations cause the CPU to crash when the current draw goes too high (e.g. my C.H.I.P board does this when HDMI add-on has to run hard)

Also, that I can get the LEDs to turn off with an odd sequence of np.fill() commands suggests to me this can't be a hardware problem and must be something in the software

Thanks for the suggestion. I will try some different power options.

Richard

ricblue
Posts: 4
Joined: Mon Sep 26, 2016 1:45 am

Re: Adafruit NeoPixel FeatherWing -- np.fill(0,0,0) = dim not blank!

Post by ricblue » Fri Sep 30, 2016 2:12 pm

I discussed this with Damian George (the author of MicroPython), via a github bug report.

SOLUTION: Raise the clock speed on the Feather from 80MHz (default) to 160MHz.

Likely this impacts power consumption but this cures this nasty np.fill((0,0,0)) = dim not off problem

Just add these links of code before using NeoPixel on MicroPython on ESP8266, at least on build 1.8.4
>>> import machine
>>> machine.freq(160000000)

Post Reply