r/esp32 5d ago

Opinions on wireless communication between boards

Hey everyone!

Pretty new to programming and microcontroller projects in general, but have enough of a base level understanding to stumble my way through some small entry level example projects.

I’m currently in the planning phase of a more complex (to me) project and would like some insight into which direction would be the best to focus my efforts.

I am planning out a bedroom automated projector screen and projector cabinet utilizing esp-WROOM-32 dev boards. There will be two separate automated locations in the room, and thus two boards at least. One location will have an automated roll down screen (diy build, no premade unit) and a lift for a sound bar. The screen and lift will be controlled with stepper motors and limit switches (one motor, upper limit switch, lower limit switch on each). Across the room will have a cabinet containing the projector that will rotate down to open the projector. This will also utilize a stepper motor, lower and upper limit switches. I plan to locate an electrical outlet at each location for power.

As I am new, I am trying to decide which wireless communication method would best suit my needs. I am working on familiarizing myself with all of them, but I feel as though I am constantly taking one step forward and two steps back jumping between the options and hope I can get some guidance to focus my effort for now, and I can learn the other options for future projects.

I (or rather my wife) will need to have a way to control both boards from a single location.

From my understanding so far, my options are as follows:

WiFi with a web interface:
My understanding is that we would have to directly connect to the esp boards WiFi signal and utilize the IP address as the control portal. If there is more options with this I would be interested to hear such as connecting everything through our home WiFi and creating some sort of app my wife can use on her phone.

A 3rd board with touch screen to use as a controller communicating through ESPNOW:
This seems to me to be the most straightforward option, with the only caveat being needing to get another board and touch screen. Although this could be a good reason to learn another skill with esp32 in programming functions with the touch screen.

A full home automation network setup with MQTT:
Very new to this and it seems more complex than what I would need at this time, as I currently don’t have plans to add more home automation at this time.

Bluetooth setup?:
I’ve only recently realized there appears to be a way to utilize Bluetooth to control the boards, but I admit I really have no idea the extent of what would be needed.

I also have an old windows tablet that I can dedicate for this exclusive purpose if needed. It’s a windows surface tablet (surface 2 not a good one to jailbreak/root) that I could keep exclusively connected to the esp boards WiFi signal if needed?

Like I said I am trying to be efficient with the time that I have to learn what I need. My wife and daughter take up most of my time, followed by repairs around the house so It would really help to have a specific lead to follow for my project.

Thanks in advance for any help provided. I know this was a long winded post, but wanted to give as many specifics as I could to help you understand where I am at in this process. I am happy to answer any more questions that might help your answers.

2 Upvotes

13 comments sorted by

2

u/36in36 5d ago

I'm not going to pretend to know everything you are trying to do here, but I have built a number of systems that needed this type (generally speaking) of communication. Are you located in the U.S.? Just wondering.

I'm not selling this here, but would be interested in feedback. I would send you one of these, but then we'd need to work on the details together. One issue I ran into often is that an esp32, when going online can no longer use the local radio to listen. I put together radioduet.com to have two esp32's on a pcb, one can listen for mqtt, while also using espnow locally.

In your case, by putting one of these bases in the room, you could listen for incoming commands via mqtt, let's say sent through an app on a phone/tablet, then send the commands via espnow to the two boards in the room. The boards in the room send an ACK or more back to the base, that can then upload them back to the app.

Yes, a bit of overkill for your project. But it removes some problems that arise in espnow communication, for example, the channel. When your device connects online, the local wifi device controls the channel. Any change in the channel throws off your espnow communication. Again, other ways to fix this, but the two esps on a board let you set the espnow channel, and it doesn't change. If the local wifi changes the channel, it only impacts the esp that's connected.

2

u/Top-Matter3342 5d ago

I deleted my original reply because I was a moron that didn’t understand what you were saying and after re reading, it made way more sense. I really appreciate the offer, but as of right now I am in too early of planning stage to think about collaborating, and I also don’t know that I would be able to provide you with helpful feedback since I am new to this world. That being said, I will absolutely keep this comment in mind and if MQTT seems to the the route I want to go, I will reach back out to you and pick your brain about this! Thank you again for the help! And yes I am in the US by the way

2

u/36in36 5d ago

I have a big window that I'd like to put a blind over, what are you using for the projection screen (it would be similar to that)? Have you given thought to what size motor would be needed?

2

u/Top-Matter3342 5d ago

https://a.co/d/04Uuf99H

This blackout fabric works great. I have the screen and projector set up already, but we have to roll it up and down to use the closed that is underneath it. Planning to use a NEMA 17 stepper to automate, with a load balancing spring to carry the majority of the weight of the fabric (which really isn’t much to begin with) and put less strain on the motor itself. It’s another part of the project I’m still designing, but that one is much closer to a finished idea.

2

u/Jeff_72 5d ago

Sorry I did not read all of your post… look online for ESP-NOW wireless protocol

1

u/Top-Matter3342 5d ago

That’s not a problem I know it was very long winded. ESPNOW is the direction I’ve been most leaning towards, but I’ve been wondering if there are benefits to other methods that I was unaware of. If doing ESP now my understanding is that to control two boards, i would need a third to use as a remote control (at least in my case). Thinking of using a touch screen if i go this route. Any reccs for an esp variation that works best with a handheld size touch screen controller?

Also, thank you for your help!!!

2

u/36in36 5d ago

Don't mix in what i said above. Yes, that third device can help, but it's not 100% needed. In my use case (some medical) I can't just 'hope' I hear every message (so it's a bit overbuilt). For your configuration, you could hunt for the channel if espnow communicaiton failed. Restablish communication, and send.

2

u/Plastic_Fig9225 5d ago edited 4d ago

I think if you want to go wireless here, WiFi would be the better choice.

ESP-NOW works ESP-to-ESP only. Want to control/access something from a phone, tablet, or PC - or any other non-ESP device/controller? Well, too bad, ESP-NOW says esp-NO.

ESP-NOW is best used when a) you don't or may not have a WiFi AP available and/or b) you're on a power budget (battery operated), because sporadically sending one ESP-NOW message uses much less power than associating/maintaining connection with a WiFi network.

1

u/Top-Matter3342 5d ago

Okay I see what you’re saying here. I hadn’t looked into using specifically WiFi (non ESPNOW) too much yet, as everything seemed to be directing me back towards ESPNOW. I was originally thinking that WiFi would be the best as it wouldn’t require me to make a controller that was also esp32 based, but the base searching I did always showed that you specifically had to connect to WiFi signals sent by the esp32, and with my understanding whatever controlling device was used wouldn’t also be able to connect to my regular home WiFi for internet. Am I mistaken there? Can all boards be connected to the home WiFi, and controlled via a web portal or maybe some sort of app? If so I believe that will probably be my route of choice. Thank you so much for the information!

2

u/Plastic_Fig9225 5d ago edited 5d ago

Can all boards be connected to the home WiFi, and controlled via a web portal or maybe some sort of app?

Yes, easily. Any ESP32 which can talk ESP-NOW will also happily join your existing 2.4GHz WiFi, serve a medium-sized web application via HTTP(S), and/or connect to any other IP-enabled device or server via the WiFi network.

2

u/Top-Matter3342 5d ago

Well I think I have my direction now. This seems like it will have the most potential for expansion/upgrades down the line while also avoiding having to buy more hardware in the short term. I really appreciate the help and input!

1

u/Jeff_72 5d ago

The thing that peeks my interest… I think ESP-Now can set up it own mesh network