I'm looking into making a wireless instrument system, used mainly for guitar. It seems like the easiest solution is just to establish a connection between the microcontroller and my laptop and then stream the audio. I have read that wifi shields take up a lot of memory. Would this be feasible with any of the Arduino controllers? If not, what else could I use? I would like a relatively cheap solution if possible ![]()
Sorry I can't help....but if you find out, do report back- I would be interested!
Hi,
A cheap fm-transmitter and radio attached to the PC could already do that, no arduino or shield needed.
I don't know what you've got in mind, would you like to do more as that ?
Those cheap fm transmitters are pretty interference-prone, aren't they? I would like a clean signal without static. I am guessing that a 54 Mbps connection could afford nearly lossless audio without squelch or static. I have noticed that the more expensive wireless systems use 2.4 Ghz digital transmission. Also, using a wireless router would give me excellent range.
histind:
Those cheap fm transmitters are pretty interference-prone, aren't they? I would like a clean signal without static. I am guessing that a 54 Mbps connection could afford nearly lossless audio without squelch or static. I have noticed that the more expensive wireless systems use 2.4 Ghz digital transmission. Also, using a wireless router would give me excellent range.
I was gonna say, Bluetooth would be pretty clear I would think. Wifi is getting pretty jammed, but is better than an FM transmitter by leaps and bound.
Doesn't Bluetooth operate in the same frequency as 802.11g? I'm not sure if Bluetooth 2.0 or 2.1 would have enough bandwidth. I think they're around 2 Mbps. Bluetooth 3.0 should be fine, but does Arduino have a 3.0 compatible module?
I also just read something that says the atmega328 has a maximum serial rate of 10 Mbps. So, how would I take an audio signal and send it through bluetooth to a receiver?
Your not going to, the arduino is not fast enough for this application.
Doesn't Bluetooth operate in the same frequency as 802.11g?
Yes but its frequency-hopping spread spectrum so it finds spare bandwidth automatically...
If you need 2Mb/s bandwidth you are going to need something more powerful than an Arduino...
Any suggestions on the cheapest platform that would work for this application? And thanks for the responses so far!
Also, what about using a separate ADC?
And is the real problem the number of analog samples the arduino can take per second? I read that it can take up to 10,000 readings a second which would be a 10 Khz sample rate. I would need something more along the lines of 44.1 Khz, right?
You definitely want a a 16 or 32bit microcontroller, preferably one that has DSP instructions as that gives you the option of digital filtering and other such processing in real time. Standard hifi digital audio is usually sampled at 48k or 96k samples/second at 16 or 24 bits per channel. There's a digital audio interface 'standard' called I2S for shuffling such data between chips which uses 3 related clocks... For guitar I presume you only need one channel, can stick to 16 bit resolution because of the limited dynamic range, and maybe get away with the CD sample rate of 44.1kHz.
There surprisingly cheap I2S compatible ADCs and DACs of high performance (all surface mount chips I fear) - look at the ones from Wolfson Microelectronics for instance.
But I've not played with DSP uControllers so can't recommend a good choice, except that one with I2S support is going to be handy.
Would this board work?
http://www.robotshop.com/leaflabs-maple-32-bit-arduino-compatible-microcontroller.html
It has an ARM 32-bit Cortex processor, which specifically supports I2S and ADC in the datasheet. I think it also has DSP instructions. Not too pricey either ![]()
As far as surface mounting the ADC, what does that entail?
histind:
It has an ARM 32-bit Cortex processor, which specifically supports I2S and ADC in the datasheet.
That is, it supports the components. It does have 2 ADCs on the board, but I doubt they'd be sufficient.
Ooh, that looks v. powerful. Its internal ADC is only 12bit, which is a little limited for hifi audio (but handy for proof-of-concept of course). It ought to be plenty powerful enough - just check if its pins are 5V compatible (if so many shield options are possible ![]()
Check out the software to see how similar to Arduino system (for instance any Arduino library using low-level registers or interrupt handlers will be incompatible, but things like digitalWrite() and millis() may be supported).
I guess your first step is to get an audio sample stream read in, possibly filtered in some way (volume control perhaps) and piped out to a WiFi or whatever shield.... I'd be looking to see if there are some open-source digital filtering and effects projects already out there compatible with that processor...
Surface-mount chips require tricky soldering (you can either go for custom PCB design or use adapter boards that bring out the pins to a bread-board-friendly 0.1 inch spacing). I've recently used the WM8783 ADC from Wolfson Microelectronics soldered onto a little SOIC8 adapter board and its worked nicely (3.3V supply, 24bit stereo samples) FYI I've been playing with the Propeller uController, not the Arduino, for this.
It says it's compatible with Arduino Duemilanove or Diecimila shields. Although, it's also compatible with Arduino-style IDEs, so I suppose that means it is at least somewhat compatible with the API. As far as soldering the ADC, couldn't I just use a regular breadboard? If the pins don't fit, I can just solder rails or wires to the ones that I need. I'm not going for anything fancy ![]()
I noticed that Wolfson has mono ADCs, but one has a pre-amp and one doesn't. Which would be best?
Another thing I've considered: What about using a pico-ITX motherboard? Would I even need an ADC with that much horsepower?
KE7GKP:
No data-based communication scheme is capable of zero-latency, real-time audio transmission. Even hard-wired ethernet, much less WiFi. End of story. Full stop. You aren't the first to ask. But if you insist, you will be the next to discover that it is impossible. You would never notice if your web page or tweet arrived 127 ms late, but for audio, that is a show-stopper.
I haven't suggested that I'm looking for zero-latency audio. But there is such thing as acceptable latency, and the faster the better. The best wireless instrument systems in the industry are digital, so it is feasible. I just don't have $400-500 to blow on one.
Lets look at audio latency - sound travels about 1 foot per millisecond. Assume an orchestra is the largest group of musicians that can play together without latency being a show stopper (yes the conductor is using visual cues to help keep synchrony, but lets go with this). An orchestra is say 40 feet across or so. Thus we can infer that latencies of upto 40ms are not show-stoppers.
A 40ms latency may easily be a problem even if not a show stopper, however. Lets play safe with a safety factor of 4 - thus I suggest a latency of 10ms or less is something that can be lived with. This is equivalent to saying a band on a 10 foot wide stage can work together.
Ethernet ping (UDP) latencies are of the order of 0.5ms in a 100Mb local network. WiFi will definitely be worse, I don't know how bad. TCP will be slower than UDP, direct RF link will be better (packet handling overhead only, assume packets not huge).
So back-of-the-envelope calculation suggests Ethernet (esp UDP) is OK, direct RF is OK, Wifi is unknown quantity...