Get information from many sensors over a "longer" distance

Dear all,

I’m seeking your insights on the following project:

I’ve constructed a bed with three night lights. Each nightstand features six TP223 touch sensors: one for selecting each light, two for dimming, and one for on/off control. In the past, I used individual signal wires for all 12 TP223 sensors, along with a common ground/power connection to an MCP2307. From there, the signal traveled to a nodeMCU, which controlled the LED drivers.

However, this setup was unwieldy, unreliable, and aesthetically unappealing. I’m determined to enhance it and reduce the wire clutter. Here’s my idea:

  1. Install an Arduino Nano in each nightstand to handle sensor inputs.
  2. Connect these Nano boards to the main microcontroller (such as a nodeMCU) that suits the use case.
  3. I am considering the following connection options:
  • SPI
  • I2C
  • RJ45 (Ethernet)
  • CAN (Controller Area Network)**

Issues I’ve identified:

  • The transmission length is up to 2.5 meters (potentially reduced to 1.5 meters if necessary).
  • Having two input devices means the main controller must connect to two sub-controllers.

Desired features:

  • Simplified wiring: Ideally, the Nanos could be powered via the signal wire (similar to PoE).
  • No repeaters within the wire (although adding one to a PCB is acceptable).

Feel free to propose alternative approaches or ideas. Your input is greatly appreciated!

Consider putting an ESP8266 or ESP32 in each nightstand and use ESP-NOW to communicate wirelessly to the base station

That's actually a great approach I haven't been aware of. Thanks!

An older approach would be making standalone AVR's with I2C or IR remote comms. But ESP8266 is so cheap and dependable and contains a 32 bit processor.

What is the mechanical assembly going to look like. I would consider CAN or wireless as you will have to run a wire to each node anyway. If you can tolerate some latency then consider using a zero current standby for a wireless solution. You push the button it powers up the processor, it sends the command then shuts itself down. You could get over a years life out of a few batteries.

Yeah, without the batteries there's going to some wires as wireless power is very wasteful over much range. Tesla had that wrong!

Thank you guys. I am likely going to try the (partly) wireless approach. (Only power cables). Or maybe even the standby one.

Check out IR remote, the way TV remotes work as a cheap in-room solution. ESP8266 kind of makes that moot but an IR led and IR detector or tiny IR receiver board that handles the high frequency signal are all old cheap DIY.