8000 RMT + Neopixel + WiFi = Flickering · Issue #8161 · micropython/micropython · GitHub
[go: up one dir, main page]

Skip to content
RMT + Neopixel + WiFi = Flickering #8161
Closed
@scoates

Description

@scoates

This is related to #8158 + #7985.

I am experiencing neopixel "flicker"/noise only when Wifi is on.

Some background on my setup (same as what I described in #7985):

  • a 16x16 RGB panel (256 LEDs)
  • connected directly to my LOLIN D32 Pro board on GND, USB (+5V), 25
  • 6AF0
  • I'm using the firmware that @jimno built and shared in esp32/machine_bitstream.c: Replace with RMT-based driver. #7985
  • no capacitors or level shifters (maybe this would help, but this setup seems to work fine in FastLED, so I'm doubtful)
  • I've powered it both through USB on my computer, and by unplugging the USB connection and putting +5V over the panel's connection, which feeds back into the "USB" pin as +5V
  • works fine with FastLED from what I can tell
  • the current amount of flickering (which is signalled with RMT, on this firmware, I assume), is much less than what I experienced in esp32/machine_bitstream.c: Replace with RMT-based driver. #7985
  • it seems to happen only in the "later" part of the panel—I haven't seen any flickering in the first 4 or 5 rows of 16 pixels
  • I've tried this on different ESP32 boards (a second LOLIN D32 Pro, and a different WROOM board); same results
  • I tried a different LED panel that appears to be the same hardware, and the same problem
  • I've taken a short video. It's a bit hard to see, but definitely visible. The 0 pixel is on the right and the 255 pixel is on the left.

Here's the code I'm using (with various timings; all similarly flickery, but only with wifi turned on and connected to a local WLAN in boot.py):

import machine
import neopixel


np = neopixel.NeoPixel(
    machine.Pin(CONFIG["DATA_PIN"]),
    CONFIG["NUM_PINS"],
    # timing=(350, 800, 800, 350),  # , timing=(400, 850, 800, 450)
)
while True:
    print("doing a round.")
    for p in range(CONFIG["NUM_PINS"]):
        np.fill((0, 0, 0))
        np[p] = (64, 0, 0)
        np.write()

in #7985, @odi6331 suggested:

I changed them on my setup to a timing=(350,800,800,350) and all the flickering was gone since then.

I tried this timing on my setup, and it worked fine with wifi off, but when I turned it on, the flickering came back.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      0