Strange behavior with output expander

Alright, this is a hack and I guess I had it coming, but hear me out because it’s driving me crazy.

First of all, this is part of this ongoing project. I needed a lot of analog inputs plus the ability to control led count, battery usage etc, so I’m using an ESP32, and feeding all the info I need to PB by sending a stream of bytes in the RX pin, like the one the sensor board sends.

Everything is working great so far, I’m sending values of 12 pots and buttons in the frequency bytes, and led count and other bits in the analog input bytes. Led count is quite crucial, as the light is modular and I need to know how many leds are connected at any moment.

If I use PB’s single output, everything is fine. If I use the expander, the leds flicker randomly. This is not an electrical issue, I actually see the values in vars watch fluctuate. I am checking the esp32’s stream outside PB and there is nothing wrong there, it seems that PB is somehow messing the incoming bytes when the expander is activated, but I can’t figure out why, or how else to debug.

The bytes are sent every 40ms, I tried dropping and raising the interval but had no effect.

I removed all other pins, pots etc and left only the RX and GND cables connected between the boards, still no luck.

Any ideas?

It couldn’t possibly be a power issue, could it? I’ve occasionally had this sort of thing happen due to inadequate current when chaining multiple microcontrollers. Does it still flicker if the Pixelblaze and expander are powered separately (via a different battery or USB cable, but still w/common ground) from the other ESP32?

Edit: Oops – meant the Pixelblaze and the other ESP powered separately, not the expander. As @Wizard says, the expander should be fine.

The output expander itself uses very little current. If it was only that and no LEDs I would be very surprised!

Does anything power related change with the single output vs the expander?

Nothing power related changes, I unplug the leds from PB, and plug them to the expander. The expander is always connected, I have two cables coming out of PB, one to the expander, one for the leds when the expander is off. Other than that, I just enable/disable the expander in settings.
PB/expander/leds have their own 24v 6A adapter with voltage regulators, ESP32 from a power bank or my laptop. I tried powering it from the same source as well. Always common ground.
The leds are connected with a 2m cable, I don’t remember what gauge it is(I put them in sleeves) but it’s relatively thick, both power and data cables(don’t ask me why I used thick cables for data!).
If the leds are not connected but the cable is, the fluctuations are still there, I see both vars and the bar on top flicker. If I unplug the cable, it goes away.

Without the expander, no fluctuations regardless if the cable is plugged or not.


I’m about to order a new PB as this is used for a different project and is inside a case with many wires around-all soldered so I can’t really remove it- and will try anew. I still don’t get how the bytes can get altered, or why it only happens with the expander!

This topic was automatically closed 120 days after the last reply. New replies are no longer allowed.