Go Down

Topic: Two Arduinos with various sensors (Read 1 time) previous topic - next topic


Hi guys,
I am about to start sound installation project where visitors will be interacting with sound by touching various objects in the workplace. 20 different sounds needs to be triggered in few different rooms.
My aim is to make it as simple as possible but also diverse enough to be interesting for the audience. I want them to interact with the sounds in different ways.
I don't know the size of the space yet. I am thinking of using two Arduinos for it, connected to two computers running max/msp and Maxuino.
Each Arduino would have few buttons connected to the digital ins (for sensing moving objects like books, files) and pressure sensors to analog ins. I would like to use them for sensing door opening for example. Two cameras with built in mic for motion or colour tracking that will be done in max, same for mic input.

Am I right thinking there is no point of going with Xbee for this project? Is it really time consuming and hard to set up? I guess I wouldn't need more then 2 Arduinos to use 20 sensors with would I? I am concerned about the processor or memory size, will it handle all that?. I'm not very experienced with coding which doesn't help. I am happy with max thats why I think maxuino is easiest option. I can use camera to trigger few sounds, do it all in max, same with mic level input.
So far I came up with setup like this:

2x arduinos
4x pressure sensors/piezo mics
10x buttons
2x camera with mic (Sony Eye webcam)

I was thinking of using IR emitter acting as a remote for hifi cd player. Is it feasible to do? Might be neater then using PC.

I'm not sure which buttons would be best to use, to put under book for example, if someone lifts the book it would trigger the sound. Same for pressure sensors and door. What is the maximum length of cable that connects lets say button to arduino? 5m usb cable that goes from Arduino to PC might be not long enough for the space?
I would really appreciate your advice on it.

My budget is around £200 it would have to cover arduinos, sensors, cameras, cables. I have few speakers, two amps, audio interfaces and 3 pcs to use.

Cheers for your help,


Is it really time consuming and hard to set up?

Oh, incredibly time consuming. You have no idea how time consuming it can be to set up.

Of course, neither do we, since we (at least I) have no idea what "it" is.

I guess I wouldn't need more then 2 Arduinos to use 20 sensors with would I?

If the sensors only include the switches and pressure sensors, 2 Arduinos (or one Mega) would be plenty.

If the sensors were to include high speed rotary encoders, then things change.

For the switches and pressure sensors, processor speed and memory size won't be issues that need worrying about.


Thanks for your response.
Sorry if I haven't made myself clear. By 'it' I was referring to configuring XbeeShield and Xbee module which would allow me wireless connection between arduinos and PC. I am wondering if its just easier to use 2 or 3 pcs and connect arduinos via usb instead.

Thanks for the info about the switches, I wont need any fast rotary encoders so thats good news. Can you recommend any buttons, pressure sensors that are cheap and would do the job? I just want to attach them to quite light things like books, files, maybe cups or doors.
Do you have any experience with IR emiters?


Configuring XBees is easy using the X-CTU application from digi.com, the manufactures of the XBee modules.

The only real issue of choosing the right XBee modules for the application. To have two Arduinos communicate with each other, Series 1 radios are the best choice. They come, then in regular and Pro versions. The Pro versions have longer range, but consume more power. Once the version is selected, there is still the choice of antenna type. They come with 4 different kinds of antennas. The choice of antenna affects range.

Attaching the XBee to the shield, and attaching the shield to the Arduino is trivial.

I am wondering if its just easier to use 2 or 3 pcs and connect arduinos via usb instead.

You can't do that. The USB port on the Arduino allows the Arduino to act like a USB slave. The PC that is at the other end of the USB cable is the USB master.

Two slaves can not talk to each other, and one Arduino can not be reconfigured as a USB master.

You can use the serial port on each to communicate via a wire, but that does not involve the USB port.

Choosing appropriate switches will probably need to be done on a case-by-case basis. The weight of the object, the placement of the switch, and the sensitivity of the switch are things to consider. Also whether you can actually acquire the switch.

In general, switches are the least expensive part of a project. It's not worth trying to shave 3 cents of the price of 20 switches. Find something locally available that you can hold and evaluate before you buy.

Switches report either off or on. All switches. The Arduino won't care what type of switch is connected to it.

No direct experience with IR emitters, but there are plenty of posts on the forum about them.


Thanks PaulS for valuable info.

I was thinking of using PC and arduino instead of Xbee.  So the options are:
1. 3 pc's reading data each from one arduino  via usb directly (not talking to each other).
2. 1 pc and say 3 Xbee module equipped Arduinos in few spaces talking to that PC. I'm a bit confused here now as I'm not sure how Xbee module would talk to pc. I thought you connect it to arduino with shield and then via usb to pc.

I need to use at least one PC as I'm gonna trigger samples probably in wav or aiff format. I don't know of anyway arduino would keep them in the memory. Would have to be equipped with sort of pendrive or sd card. That would be nice solution actually. The less pcs involved the better for me as I wouldn't have to hide them, less things to transport etc.

Cheers for the tip about Series 1 radio have to research that.


You can attach a XBee to the PC using one of these:

The red box people have them, too.

The series 1 radios are typically point-to-point. That is one XBee talks/listens to one other XBee. This is quite straightforward.

I've read that the series 1 XBee can be used in broadcast mode, with multiple receivers, but I've never done this. The drawback is that communication is then only one way. One XBee can talk to several other XBees, but one XBee can only listen to one other XBee.

But, with the limited number of sensors that you are talking about, two Arduinos with XBees should be plenty to collect all the input and control all the output. One Arduino would be hooked to the PC, too, via the USB cable to get instructions from the PC (coming from the camera) and would talk to the other Arduino using the XBees.

While your looking at adafruit.com, check out this:
Pretty inexpensive way to add sound to an Arduino - pre-recorded only, but that doesn't seem like it would be a problem for you.


Might be better to use individual recording/playback chips at each location. Record into the chip what you desire, and have it play back when a button is pushed. The chips are apparently inexpensive as they are used in birthday cards and such now.
Google forum search: Use Google Search box in upper right side of this page.
Why I like my 2005 Rio Yellow Honda S2000  https://www.youtube.com/watch?v=pWjMvrkUqX0


Wow these are really cool suggestions guys. Thanks a lot for that!

I really like the wave shield. I think I might go with that.

I'm not sure if recording chip is an option as I will use prerecorded samples. Recording might be interesting though, ideally I would like it to go through computer then process it with max. Maybe its asking for too much... Do you have any idea of their names zoomkat? I guess I would use that instead of arduino? If its really inexpensive it might be interesting option.

Thanks again, I really appreciate your input!
Now i have to add it all up and see if I'm within the budget :)


A google search will probably turn up the audio recording chips (they even carried them at Radio Shack many years back). Have you gotten a single pc to play more than one audio track at a time?
Google forum search: Use Google Search box in upper right side of this page.
Why I like my 2005 Rio Yellow Honda S2000  https://www.youtube.com/watch?v=pWjMvrkUqX0


yeah after googling I found these: http://www.talkingproducts.co.uk/recordable_sound_chips.htm
seem ok not sure what the sound quality is but if I search a bit might find something that is not too bad. I guess a bit of lo-fi sound wont hurt :)

I have 3 pcs in my disposal, would like to use only one if possible. Will see if I have enough money to buy few arduinos and Xbee modules for them.
Actually I can record sound with the sony camera as well, it has mic attached to it. Initially I wanted to use it as loudness sensor only.

Go Up

Please enter a valid email to subscribe

Confirm your email address

We need to confirm your email address.
To complete the subscription, please click the link in the email we just sent you.

Thank you for subscribing!

via Egeo 16
Torino, 10131