I’m not sure forums like this are useful for what I need to know
Welcome to the Forum! You’ve got a really interesting project on the boil, and I’m sure we’ll be able to help out (especially when the Core staff get here. everyone else, me included, are just makers in the community).
is Arduino the best option (reliability is a big requirement)?
The Arduino ecosystem is very mature, it’s one of the most documented and used platforms, and is about as reliable as any microcontroller if you treat them right. But that’s about where the benefits run out. There are more modern microcontrollers that are often cheaper and easier to use like the Raspberry Pi Pico. Which programming languages are you familiar with?
if Arduino then what board would be best (considering future possible applications)?
The three considerations I can think of so far are:
- Can it easily talk to Max?
- Can it talk to sensors/other microcontrollers over a long-range communication medium?
- Does it interface easily with the sensors you want to use?
Elaborating on those points (click to expand):
Can it easily talk to Max
This mainly depends on the interfaces Max has available. I’ve only used it in the context of Max for Live, but some quick digging in the docs suggests that there are 4 candidates: HMI, Serial, UDP, and MIDI.
- Serial - This would likely be the easiest to find compatibility for. Any microcontroller will have serial lines, but you’ll likely want one with a separate serial line to its USB connection, that way you can debug and communicate with Max at the same time.
- HMI, or Human Machine Interface, usually refers to stuff like keyboards and mice. If your Microcontroller can act as a HID (most with native USB, that doesn’t pass through a USB-to-serial converter can. If you’re already familiar with dealing with keystrokes, say, this might be easier than serial.
- UDP - Things get a little interesting here. With a single CAT5e/CAT6 cable, you can send messages from a microcontroller attached to a sensor (eliminates the whole distance problem), as well as provide power to it via a PoE splitter. A small PoE switch could power all the sensor “nodes”, and facilitate communication between the nodes and the PC running Max. It’d be trickier to implement for sure, but would be really neat in the end I think. Some extra gear would be required to get a microcontroller that can interface with Ethernet, but not too much. I can elaborate on this if you’re interested
- MIDI - This would be useful if you already made heavy use of MIDI in your setup, and you perhaps wanted the sensors to trigger MIDI gear without Max intervention
Can it talk to sensors/other microcontrollers over a long-range communication medium?
This is a tricky one, and is pretty much covered by @Robert93820 and @Jeff105671, RS485 is super resilient and common. You could even consider hardware on the PC side that talked RS485 and expressed itself as a COM port. I’m sure Max would be happy to deal with that. I’d say a PCIe or USB device on the PC side would do here. You’d need an RS485 shield or similar on the sensor nodes as Jeff said.
Does it interface easily with the sensors you want to use?
The only noteworthy board feature I think would be worth exploring is native capacitive touch. Most boards powered by the Cortex M0 processor can do this:
Adafruit Trinket M0 - for use with CircuitPython & Arduino IDE | ADA3500 | Core Electronics Australia
are motion sensors reliable for the length of time that the project runs?
My understanding is that PIR sensors can be more susceptible to interference during the day, but other than that they are pretty much completely reliable, they get used on burglar alarms and motion-activated lights pretty much exclusively, so I’d say they’d work well enough if tuned properly
what other sensors would be worth considering?
There are some nice new ones in the Core range now that you might want to check out, but you’d have a better idea whether they’d fit into your installation
can sensors be connected to an Arduino with 40m cable and if so what cable should I use?
Again, this was covered by Bob and Jeff, and mostly depends on whether you’re comfortable running RS485/Ethernet to a microcontroller 40m away attached to a sensor.
Anyway, probably deeper than I needed to go, but should give you something to chew on and spark some more questions.
Happy to go over anything I brushed over if it doesn’t make sense.