Hardware advice for wireless (& sound-reactive) LED system

Hello everybody,

I have been reading up on this subject for almost a full week now, and just don't know what I should buy/not buy. I need some advice for a project I'll quickly summarize: I want to build a system consisting of 10x (microcontroller + Neopixel strip), synced by a "main" microcontroller. I would like the LED's to react to sound, and sync a light pattern now and then. I want to put some LED's in balloons too.

Background: I've had 2 semesters electronics in school, but no microcontroller part(s). I've been reading up about radio/wifi/BT as well, that's new to me.

My current idea as to how to do it at the moment: Get an audio signal to a microcontroller (I'll try Adafruit's Metro M4 - with SAMD51 since I have one), do a FFT, program some reaction to the signal. WIth an NRF24 + antenna module, I'd send instructions to ~10 Arduino Every boards (with an NRF24 module + voltage adapter for NRF24) attached to the LED's.

Is this choice of microcontrollers/radio modules a good pick? I've looked at HUZZAH with ESP8266, but the wireless implementation looked harder to implement than the NRF24 to me (especially after reading Robin2's excellent guide to the NRF24), and they'd be more expensive. I looked into BT modules as well, for example the Arduino Nano 33 Iot. I just don't know if I'd get the sync part right with those.

I also read that the Arduino Every had problems with the NRF24, although that seems to have been fixed. Does anyone understand that thread?

The reason I'm asking this is that I've been trying to figure out how to do this for a while: -the Neopixels Data line & power requirements, -putting a mic on each board vs an audio cable on one and syncing over radio, etc. Now that I've got a good picture of how I want to do the wiring/power side, I just don't know if I'd be making a mistake with these controllers by overlooking another obvious choice or plain non functionality of them.

  • The SAMD51 Cortex M4 runs at 120MHz 32-bit, vs the Nano Every's Atmega4809 8-bit, 20MHz. Does processor speed matter between sender/reciever with NRF24?

  • Is the NRF24 + Nano Every with atmega4809 combo a good choice, and would the 8-bit Atmega4809 be fast enough to do on the fly FFT's for LED modulation?

Thank you for your time. First time posting after a long lurking time, hope the question is posted properly.

All the best,

Michael

You don't say what your budget is but it would be simple to do the radio part of this with ESP32s running ESP-Now with no extra radio hardware

Oh, yeah. Thank you. My budget is about 200-300 euros, give or take.

I looked at the esp32, especially the Huzzah, then I could take Neopixel featherwings to put on top of them, but I was afraid the range wouldn't work out, since I couldn't find an ESP32 with antenna for the tranmitter board. And with the ESP32, can I give the 10 boards the same address, and make them listen on it, to send the same message to all of them quickly enough for sync? The LED's would be at 50m (= 164 feet) max from one another, no obstacles in between.

I read this tutorial for my scenario with ESP32, but somehow it looks more error-prone than NRF24 modules (hence my posting here ^^)

Another thing, for power in balloons, I will put 12 or 24V on wires on the ground, and use a buck converter to get to 5V for the neopixels (not necessary if I take the Neopixel boards), and solder these 5V to a usb plug as well to power the boards (if I go over the micro-USB port of the boards the voltage regulator would downregulate it to 3.3V if the boards requests that, and use a logic level shifter for the LED data signal in case of a 3.3V operating board). Hope this isn't stupid...

The thing with the Nano Every is I can get them for about 8-9 euros a piece, the Huzzah Feather ESP32 for 18 euros, but that would already have wifi. I keep revolving around these options, thank you for your input!

Michael

A board such as the Adafruit HUZZAH32 has the antenna built in. What sort of range do you need to work over ?

Take a look at Getting Started with ESP-NOW (ESP32 with Arduino IDE) | Random Nerd Tutorials to see how you can use ESP-Now for one to many communication

That is the tutorial on mentioned website for my scenario, I was afraid that I'd have a timing issue, as mentioned on github here and here.

  • That issue seems to hav been addressed here, but it is talking about RMT drivers, GPIO API and I'm not sure I can deal with that in the space of a month if it doesn't work. This is just all very new to me.

Thank you!

Michael

Anyone else knows about this? With ESP-Now, it seems I have to register each MAC address to broadcast to, meaning that to send a message to all boards, it will send the message to each board (address) sequentially.
However with the NRF24 modules, we can assign the same listening address to all boards, and broadcast on that address, making the communication faster, or more "in sync", would it not?

Thanks for your help.

How in synch do you need the messages to be ?

If required you can change the MAC address of an ESP32 so you could make them all the same

Well, 30ms or 30 refresh/sec would be good enough to not have noticeable lag with music or another input. If the message gets sent to all boards one after the other, they'll never do something at the same time (I think?).
I'd like to have them do something all together at the same time at least. For example, i tell them all "do function white light", I'd like to have them do it at the same time.

Didn't know that. That would then be as good as NRF24s listening on one address then.

And thank you Bob!

You don't even need to change the MAC addresses.

If you use a target MAC address of FF:FF:FF:FF:FF:FF then all boards added as peers will receive the data, or so I have read, but I have not tried it

Ok, thank you. I will try that when I get the parts.

All best,

Michael

Hey UKHeliBob, I've got my ESP32 boards, and I got them to communicate this way super easily!
I didn't try the target MAC address FF:FF:FF:FF:FF:FF, since I need to use the boards MAC addresses to add them as peers anyway. I put a 0 as the first argument in the esp_now_send function, that seems to work.

I'm going to hook up LED's now, I'll see whether it's reactive enough to look in sync with audio.

Thank you for your input!

Cheers,

Michael

I am glad you got it working

Good luck going forward with the project

1 Like

This would be great to have.

Where can I get it?

What do you mean? The code?

I'm still figuring things out, when I use the wifi chips the neopixels seem to refuse to work. I'll try to add level shifters tonight. I also need to test how reactive it is to ausdio sampled & transmitted from the master unit. So lots left to do :wink:

Once it's working and set up, I'll share all the code. (I need this ready in 2 weeks, for a timeline estimate)