logo elektroda
logo elektroda
X
logo elektroda

Wireless digital audio transmission.

piotr_go  59 45384 Cool? (+102)
📢 Listen (AI):

TL;DR

  • A wireless digital audio link uses Nordic Semiconductor NRF24L01 radios to stream compressed MP3 audio between an AT91SAM7S64 transmitter and an AT91SAM7S512 receiver.
  • The transmitter encodes system sound with LAME at 320kbps and exposes a PulseAudio output module, so desktop audio can be redirected to wireless speakers with adjustable buffering.
  • The link runs in the 2.4GHz band and the NRF24L01 provides about 400kbps with acknowledgment and error correction.
  • The receiver uses a Helix decoder and TDA1543 DAC, while the newer version switches to a CS4344 DAC and can measure supply voltage.
  • A micro-sized version based on a reprogrammed Logitech Unifying receiver reaches only 128kbps, but the larger setup works through walls with the right antenna arrangement.
Generated by the language model.

I used Nordic Semiconductor's NRF24L01 as wireless communication systems, they operate in the 2.4GHz band. Audio is compressed to MPEG1 layer3 format.

Transmitter:
It was built on the AT91SAM7S64 microcontroller.
As the transmission speed of NRF24L01 is about 400kbps (with acknowledgment and error correction), the LAME MP3 Encoder was used as the audio encoder. Bitrate set to 320kbps. Compression is done on the computer. As an output module for PulseAudio has been written, all sounds from the system can be redirected to the wireless speakers. You can also adjust the buffering delay.
The transmitter is seen by the system as a serial port / dev / ttyUSBx


Receiver:
Procek is AT91SAM7S512 (decoder requires a lot of ram), Helix decoder, I used TDA1543 as DAC.


Scheme:


Range:
Works through the wall, diagonally across the load-bearing wall between the floors, with the appropriate antenna arrangement.




Here is a test version of the transmitter in micro size:



A reprogrammed Logitech Unifying receiver was used.
Unfortunately, I didn't manage to squeeze high speed out of it, so its bitrate is only 128kbps. The range is also correspondingly smaller.

You might ask "Why not A2DP?".
I know from my own experience that A2DP is not very stable, LAME also has better sound quality.




================================================== ==
================== UPDATE 31.08.2010 =====================
================================================== ==

Photos of the newer version with the DAC CS4344:


Here is a comparison of the dimensions with the older one with an external DAC:


The transmitter is a reprogrammed Logitech Unifying with an antenna added:


PulseAudio screen:


The newer version has the ability to measure the supply voltage.
Power consumption:
~ 60mA during playback
~ 14mA while waiting for transmission
Available on the connector are: I / O, PWMy, RS, I2C, LEDs, USB.
Instead of the audio jack, you can mount the standard 4x goldpin.

Receiver diagram:

About Author
piotr_go
piotr_go wrote 2904 posts with rating 3336 , helped 94 times. Been with us since 2003 year.

Comments

mateusz77892 05 Jul 2010 16:15

I'm impressed :D I like :D full professionalism! Well done :) and what range of such a gem ?? how many meters in the open space ?? [Read more]

piotr_go 05 Jul 2010 16:22

9m, I still did not check. I also checked whether it would break through 2 floors. When I set the antennas properly, it worked. [Read more]

piotrva 05 Jul 2010 16:53

and what are the costs of implementation? [Read more]

piotr_go 05 Jul 2010 17:00

Prototype? Don't even ask. With a few pieces, it will probably be PLN 150-200 per set. [Read more]

KJ 05 Jul 2010 17:09

I've always wanted to build something like this. I will ask why so expensive in the sense of what raises the price the most? and is it planned to go into production? ;) Because I would like to buy... [Read more]

piotr_go 05 Jul 2010 17:23

What drives the price up the most is the fact that you have to buy items in several stores. To get some of them you have to do some research. So far I have not been able to find a suitable RP-SMA connector,... [Read more]

KJ 05 Jul 2010 17:27

I am most interested in the set with a micro transmitter ;) Is it possible to replace the SMA connector with a fixed antenna or with another type of this connector - in the case of a device, such as an... [Read more]

Mat_91 05 Jul 2010 17:33

You write that the whole thing works on 2.4GHz, hmm interesting ... It does not interfere with Wifi? For example, I would like to put it in an amplifier, and I keep a router on the amplifier, how will... [Read more]

piotr_go 05 Jul 2010 17:35

Still regarding this price. I recommend looking for the price of the "SAM7-nRF24-64" Olimex kit. Similar structure, but no signals from Prock are available. A transmitter would be fine. Micro transmitter,... [Read more]

Mat_91 05 Jul 2010 17:43

I missed that in the description:] Thanks. [Read more]

KJ 05 Jul 2010 17:44

I can buy AT91SAM7S64B-AU for PLN 23, AT91SAM7S512 for PLN 40 ... design and making tiles for this is probably not a bigger problem, unless there is a top-down order to use double-sided boards. The problem... [Read more]

Mat_91 05 Jul 2010 17:49

NRF24L01 is available from farnell.com [Read more]

piotr_go 05 Jul 2010 17:58

On one-sided it is better not to do this, the manufacturer of the NRF does not recommend it. Added after 5 [minutes]: @ Mat_91 And they sell single pieces to ordinary mortals without foreign... [Read more]

Mat_91 05 Jul 2010 18:01

piotr_go you still write that you have not found the right sma connector and that you have been up to something with the pin inside. Whether the connector you are looking for is not something like that... [Read more]

KJ 05 Jul 2010 18:01

They do not sell, but I had the opportunity to buy from them through a friend. Payment by credit card only and charged in British pounds. [Read more]

piotr_go 05 Jul 2010 18:08

@ Mat_91 These are a bit too big, it needs something edge-on, in SparkFun they have but I am not happy to pay several times more for a transfer and shipping as for connectors. [Read more]

pawelr98 05 Jul 2010 21:08

I could use a nice gadget to make sound 4.0 with computer speakers and you used my favorite movie for the presentation [Read more]

arcichowski 05 Jul 2010 22:54

A very interesting structure. Have you made any radio measurements? (network analyzer, spectrum analyzer) How did you choose the elements in the radio path? [Read more]

DooBLER 05 Jul 2010 23:16

Wow nice design. I wonder how latency is there. Can't see lag in videos between audio and video? After all, it has to go through these compressions and decoders. I mean when you don't regulate... [Read more]

FAQ

TL;DR: DIY 2.4 GHz audio link streams 320 kbps MP3 up to 9 m indoors; “The latency can be set freely” [Elektroda, piotr_go, post #8264643] Range and delay are user-tuneable via PulseAudio on Linux [Elektroda, piotr_go, post #8262996]

Why it matters: Makers can build low-cost wireless speakers that beat unstable Bluetooth A2DP in sound quality and control.

Quick Facts

• Link speed: ~400 kbps raw, 320 kbps payload using NRF24L01+ with ACK enabled [Elektroda, piotr_go, post #8262444] • Verified range: 9 m LOS; penetrates two floors with antenna alignment [Elektroda, piotr_go, post #8262996] • Receiver draw: ≈60 mA playing, 14 mA idle [Elektroda, piotr_go, post #8262444] • BOM cost: PLN 150–200 per Tx/Rx pair (≈€35–45) in small runs [Elektroda, piotr_go, post #8263100] • Tuneable channels: any 2 MHz slot between 2.400–2.5 GHz to dodge Wi-Fi [Elektroda, piotr_go, post #8263220]

What hardware makes this 2.4 GHz audio link work?

The transmitter uses an AT91SAM7S64 MCU driving an NRF24L01+ transceiver; audio is pre-encoded to 320 kbps MP3 on the PC. The receiver runs an AT91SAM7S512, decodes via the Helix MP3 library, and outputs through a TDA1543 or CS4344 DAC [Elektroda, piotr_go, post #8262444]

How far can the signal travel in real homes?

Open-space reach is about 9 m; with antennas aligned it played through two concrete floors. Mis-alignment or walking between devices can cause dropouts, especially with the micro-sized transmitter [Elektroda, piotr_go, #8262996; #8281663].

Will it clash with my 2.4 GHz Wi-Fi router?

You can program any 2 MHz channel inside 2.400–2.500 GHz, so selecting an idle slot avoids Wi-Fi overlap [Elektroda, piotr_go, post #8263220]

Is latency noticeable when watching movies?

No. PulseAudio lets you set buffer delay so audio matches video; users can even advance sound ahead of picture if desired [Elektroda, piotr_go, #8264643; #8310001].

What power supply do I need for the receiver?

Expect roughly 60 mA during playback and 14 mA while waiting for packets, so a 3.3 V source with ≥100 mA headroom is safe [Elektroda, piotr_go, post #8262444]

How much will a DIY set cost to build?

Prototype parts sourced from multiple vendors cost PLN 150–200 per pair. Bulk buying or PCB panelisation lowers the figure [Elektroda, piotr_go, #8263100; #8263180].

Can I etch a single-sided PCB to save money?

Not advised. Nordic’s layout guide calls for a solid ground plane and plenty of vias; single-layer boards hurt RF performance [Elektroda, piotr_go, post #8263270]

Why skip Bluetooth A2DP modules that cost only PLN 70?

The author reports frequent audio dropouts and lower SBC codec quality, whereas LAME-encoded MP3 remains stable at 320 kbps [Elektroda, piotr_go, post #8265434]

Is there Windows software, or only Linux support?

Only a custom PulseAudio output module for Linux exists. Porting to Windows would need recompiling PulseAudio with LAME and writing a USB endpoint driver [Elektroda, piotr_go, #8291351; #10008786].

Can the system transmit 5.1 surround sound?

No. The receiver’s MCU and stereo DAC limit throughput; PulseAudio can down-mix 5.1 to two channels, but full 5.1 exceeds processing and bandwidth limits [Elektroda, piotr_go, post #8495332]

What’s an edge-case failure I should plan for?

The micro-transmitter stutters when a person blocks the path because its PCB antenna lacks gain. Mounting a quarter-wave whip or rotating 90° reduces the issue [Elektroda, piotr_go, post #8281663]

How many decoupling capacitors are really necessary?

Place a 100 nF ceramic at every Vcc pin; this lowers supply ripple and prevents audible “beats” in audio output [Elektroda, piotr_go, post #8269582] "Less disturbance equals cleaner sound," notes the designer.

Does the NRF24L01+ support lossless audio if I skip MP3?

Practical payload is ~370 kbps after overhead. CD-quality stereo PCM needs 1.4 Mbps, so compression (MP3, AAC, or ADPCM) is mandatory unless you drop sample rate or channels [Elektroda, piotr_go, post #8369847]
Generated by the language model.
%}