Recommendations for making sensors for a sound installation

Hi Makers
I’m a sound artist and I’m making a multichannel installation with a Mac mini and a simple multichannel sound system. It’s called “Bird Child Spirit” and will feature sounds of young children imitating birds which will be played in a bushland setting. It will run for about a month.

I’ve written software to run it (Max MSP for anyone interested) but I would like to have sensors that tell the computer when someone is visiting the space and so the sounds will start playing (and stop after an elapsed time). I’m thinking that it would be easy for my system to talk to an Arduino that manages the sensor signal. Note that the Arduino might be used in the future for expanded applications beyond this project. I’ve included a plan of the installation from which you can see that the sensors will need to be (as the cable runs) about 40 m from the computer.

While my plan assumes the use of motion sensors, I would like to experiment with different sensors to find out how people respond to different triggering methods. For example a motion sensor will magically turn on the installation but maybe a touch plate that requires a commitment from a visitor would be better. Maybe a series of pressure sensors that require constant activation would be good for kids (of any age).

So some questions:
is Arduino the best option (reliability is a big requirement)?
if Arduino then what board would be best (considering future possible applications)?
are motion sensors reliable for the length of time that the project runs?
what other sensors would be worth considering?
can sensors be connected to an Arduino with 40m cable and if so what cable should I use?

thanks in advance for your help.

5 Likes

For maximum flexibility and reliability your Arduino should be adjacent to the sensors. That way you can easily change to different sensors or add more sensors to see what works best for the installation, and your choice of communication link is not dictated by the sensors that you select.
The connection to the computer can be any suitable short distance comms arrangement, such as RS485.

3 Likes

Thanks Jeff,
given the two sensors would be 40m apart I would prefer to have the Arduino with the computer. Also having the arduinos outside would require additional housings and security issues that come with that. Is there a way to beaf up the signal passing between the arduino and the sensors? If having the Arduino/s close to the sensors is the only option, would you need an Arduino for each sensor (if they are far apart)? Also would the arduino’s need power to be run out to them (not a good option for outdoors) or can they function for a month on a battery?

3 Likes

Hi All
Surely the output of a proximity sensor would be a simple contact closure or something like that. If so what is all this about RS485 etc. Surely a simple pair of wires would do the job and if power is required 2 pairs.

Sometimes I find it difficult to understand all the introduced complication. Firm believer in the KISS principle.
Cheers Bob

4 Likes

Hi Jeff
Just found a schematic for that shield you linked.
It has a 120Ω termination built in which I suppose is fair enough asif plugged onto an Arduino it would have a fair chance of being on the end of a cable.
BUT it has a pull up resistor from A to 5V and a pull down resistor from B to ground. What are these for do you know. Other boards in this category have these for some reason and this discussion has come up before. This practise will unbalance the transmission line and thus lose all the advantages of RS485 which is a balanced system capable of being used over relatively long runs (1200M).
Cheers Bob

1 Like

A sensor capable of communicating over 40m is going to require pretty much the same power as the Arduino, so you will be up for running power and data whatever option you choose. You could go with a sensor designed for outdoor use over a long distance, so that security and weatherproofing are taken care of, but that would limit your options for the types of sensor you could use. In that case no Arduino is needed, as an integrated unit would communicate directly with the PC.

The distance a sensor used with an Arduino can communicate over depends on the device. Something you can connect to the Arduino GPIO without some sort of interface is going to be either TTL or I2C, and that won’t run more than a few metres. A sensor wired for RS232 or RS485 would communicate over a longer distance. Sensors are available that communicate by wireless, but they will need their own power.

You can run anything for a month with big enough batteries or solar recharging, so you have lots of options there, apart from running power cables. But if you are running data cables then including a power supply is only a little extra effort.

You can certainly run multiple sensors from one Arduino, but just how many again depends on the type. Up to about 4 or 6 is fairly straightforward. Many more are possible with an I2C bus or multiplexers. Shields are available that do this for you.
Examples include:

2 Likes

Hi Jeff thanks for you’re detailed advice, most appreciated. I understand what you are saying but Im not at all sure what to do next. I’m not sure forums like this are useful for what I need to know. Maybe I need to employ a consultant.

1 Like

I would recommend looking at projects that people have already tackled. There is a lot of information about ‘remote’ sensing, ranging from weather stations to animal observations to tank water levels to security monitoring and more. While you may not run into projects the same as yours, you will see that there are common issues that will be relevant to what you are trying to do, and you will see what solutions have been created for those issues. When you have an idea of what’s possible, forums will be useful for translating what you find in other projects into the specifics of your project.

3 Likes

Hi Peter,

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:

  1. Can it easily talk to Max?
  2. Can it talk to sensors/other microcontrollers over a long-range communication medium?
  3. 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.

-James

4 Likes

Hi James
thanks for your careful response. As far as communication with Arduino goes I’m confident that I can cover that (very used to Processing, Openframeworks and Max which has javascript capability as well as communication via a wide range of protocols). Many years ago I did program an Arduino using a variant of Processing so that is. good fit.

As far as sensors I think for now I’ll focus on motion or light beam etc. If that can be done without ethernet that would be great (for a bunch of design consideration further down the track) if not thats OK. I’m looking at some off the self solutions here as Jeff suggested (outdoor gate sensors etc) - they can run on batteries . I’d still have to work out how to take the sensor signal and convert it to something the computer can understand.

4 Likes

Hi Peter
As I said before if your chosen sensor does or can be made to provide a closed contact (or an electronic closed contact) I would not see a problem with just 2 wires. Twisted pair probably better. If you need power to the sensor another pair would be the go. 2 twisted pair cable is readily available. Screened if you are worried about interference. BUT only connect the screen to ground at one end. The Arduino end would be best and most convenient.

Voltage drop should not be a problem. I have just looked up the resistance tables in a Hartland catalog for a couple of common strandings. Remember you have 80M to consider, 40M there and 40M back.

7/0.2 = 0.219sqmm = 24 AWG = 87.24Ω/KM .
Voltage drop @ 20mA = 140mV.

16/0.2 = 0.502sqmm = 20 AWG = 38.2Ω/KM.
Voltage drop @ 20mA = 56mV.

With 10kΩ pull up resistors on Arduino inputs your current around the loop is going to be something like 0.5mA so the voltage drop should be pretty negligible.
Hartland and MM suggested current rating for 16/0.2 stranding is 3.0A which should be enough if you need to power a sensor. If you go down this path that is the size I would use to save possible heartache in the future.
My advice, keep it as simple as you can.
Cheers Bob

5 Likes

Thanks, thats very helpful Robert, I very much subscribe to the KISS principle also. I tried to message you to find out if I could engage you as a consultant - the message facility doesn’t seem to be there or at least very hard to find). The next project after this one will be to build a self contained sound system run off solar for installations off grid. I need someone who can spec out requirements and be sensitive to design considerations. Would that be of interest?

2 Likes