logo elektroda
logo elektroda
X
logo elektroda

Wireless digital audio transmission.

piotr_go 45378 59

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.
ADVERTISEMENT
Treść została przetłumaczona polish » english Zobacz oryginalną wersję tematu
📢 Listen (AI):
  • Wireless digital audio transmission.
    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
    Wireless digital audio transmission. Wireless digital audio transmission.

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

    Scheme:
    Wireless digital audio transmission.

    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:
    Wireless digital audio transmission. Wireless digital audio transmission.

    Here is a comparison of the dimensions with the older one with an external DAC:
    Wireless digital audio transmission.

    The transmitter is a reprogrammed Logitech Unifying with an antenna added:
    Wireless digital audio transmission. Wireless digital audio transmission.

    PulseAudio screen:
    Wireless digital audio transmission.

    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:
    Wireless digital audio transmission.

    Cool? Ranking DIY
    About Author
    piotr_go
    DIY electronics designer
    Offline 
    piotr_go wrote 2904 posts with rating 3336, helped 94 times. Been with us since 2003 year.
  • ADVERTISEMENT
  • #2 8262977
    mateusz77892
    Level 17  
    Posts: 311
    Rate: 547
    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 ??
  • #3 8262996
    piotr_go
    DIY electronics designer
    Posts: 2904
    Help: 94
    Rate: 3336
    9m, I still did not check.
    I also checked whether it would break through 2 floors. When I set the antennas properly, it worked.
  • #4 8263070
    piotrva
    VIP Meritorious for electroda.pl
    Posts: 6409
    Help: 625
    Rate: 734
    and what are the costs of implementation?
  • ADVERTISEMENT
  • #5 8263100
    piotr_go
    DIY electronics designer
    Posts: 2904
    Help: 94
    Rate: 3336
    Prototype? Don't even ask. With a few pieces, it will probably be PLN 150-200 per set.
  • #6 8263133
    KJ
    Level 31  
    Posts: 2370
    Help: 68
    Rate: 945
    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 such a set and built the receiver into my future amplifier.
  • #7 8263180
    piotr_go
    DIY electronics designer
    Posts: 2904
    Help: 94
    Rate: 3336
    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, I had to use the standard + pin to put it inside.
    Sale of kits? I'll think about it.
  • #8 8263187
    KJ
    Level 31  
    Posts: 2370
    Help: 68
    Rate: 945
    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 amplifier, the best option would be the cable screwed to the housing - if it is to work within one room, it's probably not a problem. How is the programming of these ARMs? You need a programmer for ~ several hundred zlotys or you can do it yourself? Honestly, I don't sit in ARM at all.
  • #9 8263212
    Mat_91
    Level 25  
    Posts: 908
    Help: 77
    Rate: 16
    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 it work together?
  • #10 8263220
    piotr_go
    DIY electronics designer
    Posts: 2904
    Help: 94
    Rate: 3336
    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, I do not recommend, too slow transmission. You would have to design something of your own not on nRF24LU1 +

    @ Mat_91
    You can program any 2MHz channel in the 2.4-2.5GHz range.
  • ADVERTISEMENT
  • #11 8263243
    Mat_91
    Level 25  
    Posts: 908
    Help: 77
    Rate: 16
    piotr_go wrote:

    You can program any 2MHz channel in the 2.4-2.5GHz range.


    I missed that in the description:] Thanks.
  • #12 8263249
    KJ
    Level 31  
    Posts: 2370
    Help: 68
    Rate: 945
    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 is these NRF24L01 bones, there is nowhere to buy from what I can see. Apart from the housing, which is quite difficult to solder, there is probably no problem with printing, even though it is 2.4G.
  • #13 8263260
    Mat_91
    Level 25  
    Posts: 908
    Help: 77
    Rate: 16
    NRF24L01 is available from farnell.com
  • #14 8263270
    piotr_go
    DIY electronics designer
    Posts: 2904
    Help: 94
    Rate: 3336
    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 transfers?
  • ADVERTISEMENT
  • #15 8263295
    Mat_91
    Level 25  
    Posts: 908
    Help: 77
    Rate: 16
    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 Link ?? Is there something I don't understand?

    As for the sale in farnell, yes, they sell to mere mortals, payment is made by credit card with the possibility of making foreign internet transactions as far as I know.
  • #16 8263297
    KJ
    Level 31  
    Posts: 2370
    Help: 68
    Rate: 945
    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.
  • #17 8263324
    piotr_go
    DIY electronics designer
    Posts: 2904
    Help: 94
    Rate: 3336
    @ 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.
  • #18 8263970
    pawelr98
    Level 39  
    Posts: 6461
    Help: 413
    Rate: 1152
    I could use a nice gadget to make sound 4.0 with computer speakers and you used my favorite movie for the presentation
  • #19 8264468
    arcichowski
    Level 12  
    Posts: 17
    Rate: 1
    A very interesting structure. Have you made any radio measurements? (network analyzer, spectrum analyzer) How did you choose the elements in the radio path?
  • #20 8264569
    DooBLER
    Level 12  
    Posts: 82
    Help: 1
    Rate: 5
    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 the delay.
  • #22 8264643
    piotr_go
    DIY electronics designer
    Posts: 2904
    Help: 94
    Rate: 3336
    I did not take radio measurements, I have nothing. Elements according to PDF.
    The latency can be set freely in the output module so that the delay cannot be seen.
  • #23 8264765
    Uszol 1990
    Level 29  
    Posts: 1570
    Help: 41
    Rate: 72
    Hello
    really interesting design, congratulations on the idea and performance, not so long ago I was looking for something similar, but I was wondering if you could play audio via bluetooth?
    many laptops have built-in bluetooth, which would significantly reduce costs.
    greetings, Marek
  • #24 8264971
    avatar
    Level 36  
    Posts: 4138
    Help: 159
    Rate: 407
    Uszol 1990 wrote:
    Hello
    really interesting design, congratulations on the idea and performance, not so long ago I was looking for something similar, but I was wondering if you could play audio via bluetooth?
    many laptops have built-in bluetooth, which would significantly reduce costs.
    greetings, Marek

    You can, in the first post, the author writes about a2dp - this is sending via bluetooth, ready modules cost about PLN 70
  • #25 8265315
    master_pablo
    Level 16  
    Posts: 276
    Help: 11
    Rate: 30
    Elegant design!

    I think that if it does not use an antenna on a PCB, the NRF24L1 + should work well even on a single-layer board.

    What problems did you have with A2DP? Just dropping calls? I don't quite understand the statement that LAME has a better sound. Isn't it that the same data is sent to it irrespective of the selected audio playback device (e.g. a decoded MP3 stream)?

    How did you reprogram this Logitech Unifying receiver to work as a transmitter?
  • #26 8265434
    piotr_go
    DIY electronics designer
    Posts: 2904
    Help: 94
    Rate: 3336
    Quote:
    This PCB has a ground plane on the bottom layer.
    Additionally, there are ground areas on the component side of the board to ensure sufficient grounding of
    critical components. A large number of via holes connect the top layer ground areas to the bottom layer
    ground plane.

    From PDF

    In A2DP, it breaks off the sound, sometimes for a few seconds, sometimes permanently, the frequency of breaks depends on the device to which the connection is made. Surprisingly, with just one phone, I was able to get sound without any clipping.
    A2DP uses the SBC codec. http://soundexpert.org/encoders-320-kbps
    I also have a Nokia headset that only works with one "receiver" on the computer, I connected several others to the same computer and there was no sound at all :(

    I made a usb programmer for atmega8 for reprogramming. Programming after SPI, description in PDF from nRF24LU1 +
  • #27 8267216
    master_pablo
    Level 16  
    Posts: 276
    Help: 11
    Rate: 30
    I understand that this Logitech receiver only contains the nRF24LU1 + chip :) . A very clever dice must be admitted!

    What's the deal with the development environment for this built-in '51? Did you use SDCC for compilation?
  • #28 8267356
    piotr_go
    DIY electronics designer
    Posts: 2904
    Help: 94
    Rate: 3336
    Wireless digital audio transmission. Wireless digital audio transmission.
    As the SDK was under Keila, I wrote soft in it. It was possible to register and extend the demo to 4KB of the program for free.
  • #29 8267997
    wilkolaski
    Level 18  
    Posts: 508
    Rate: 16
    I have a question.
    Why are there so many 100nf capacitors connected in the diagram for the legs (7,59,18,45,58) and (8,64,12,24,54)?
  • #30 8268055
    piotr_go
    DIY electronics designer
    Posts: 2904
    Help: 94
    Rate: 3336
    Power filtration.
📢 Listen (AI):

Topic summary

✨ The discussion revolves around a wireless digital audio transmission system utilizing Nordic Semiconductor's NRF24L01 module operating in the 2.4GHz band. The transmitter is based on the AT91SAM7S64 microcontroller, employing the LAME MP3 Encoder for audio compression at a bitrate of 320kbps. The system allows for audio redirection to wireless speakers via PulseAudio, with adjustable buffering delay. The receiver uses the AT91SAM7S512 microcontroller and the Helix decoder, with TDA1543 as the DAC. Users inquire about range, costs, potential production, and compatibility with existing devices, while the author shares insights on component sourcing, programming challenges, and latency management. The conversation also touches on alternatives like Bluetooth A2DP and the feasibility of using different microcontrollers for similar applications.
Generated by the language model.

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.
ADVERTISEMENT