how to comunicate with sensors? wifi, bt, xbee...

Hi.
I want to make a project, with some lasers and photoresistors to check when someone interrupt the beam.
laser and resistor will be not so close to arduino, so I plan to use batteries and some kind of wireless communication.
And... what will be the best solution?

what I need:

  • low energy cost
  • small dimmensions/weight (whole system will be mobile, I plan to use photo heads for laser/resistor calibration, so it can't be too big)
  • 1 to 3 active pins
  • reaction time - as quick as possible, but it's not rocket science. I can accept something about 1/2 second if necessary.

My idea is to use ESP modules, connect it via WIFI, and use some their pins:

  • 1 laser and/or 1 for resistor (still considering what to choose: make two types of nodes - laser and resistor, or universal one with both and programatically choose its function)
  • 1 one for ws2812 (or similar) diode, for status signal etc. I can avoid it, but only if it is impossible to use.

I want it working for few hours, maybe with battery replacement etc. But, the most important question is here:
is WIFI the best solution here?

I don't have any experience with networking yet, so those are doubts of my mate:

  • does WIFI need too much time to communicate (maybe link negotiation etc)?
  • how about energy consuption?
  • and - does it need additional activity to hold communication up in case of inactivity for some time?

Maybe xbee or Bluetooth is better?
As far as I can see xbee modules don't provide pins I can use for my use, so it means additional module and grow of dimmensions, is that right?
What about BT?

Any advice here?

Look at some NRF24L01 modules for communication, extremely low power consumption but the range is limited, especially if there are obstructions like buildings in the way. For the sensors, instead of using ESP or Arduino, you could use a barebone chip (ATmega328P, ATtiny85 or alike), which would allow the sensors to run for months or even years on a set of batteries.

The ESP32 and ESP8266 are convenient because they include the wireless and the microprocessor on a single board. The ESP8266 can be implemented in a small space.

The downside is that they consume a lot more power than a 16MHz Arduino IF you need them to be active all the time. They do have some very effective low-power sleep modes, but I have no experience of using them.

If you just want communication between ESPxx devices then it may be more convenient to use the ESP NOW feature rather than WiFi. (I have not tried ESP NOW with ESP32 devices but I believe it (or an equivalent) is available.

For the application I have I needed the wireless to be active all the time and the combination of an Atmega microprocessor and an nRF24L01+ module uses a lot less power which (for me) justified the extra complexity of using two components. If you want to go that route this Simple nRF24L01+ Tutorial may be of interest.

...R