Theory of Operation
The idea of this project is to connect multiple audio output devices to one base station, which distributes the audio samples synchronously over the network. Different interfaces are requested:
- USB soundcard to connect to a PC
- Optical S/PDIF for digital audio transmission to hi-fi systems
- Analog connections for headphones and line outputs
- Speakers to directly play audio (will be covered in future product)
The image shows the basic idea and the devices that are intended to be used in the network, although not all devices will be covered with this product.
To reduce PCB production costs (especially high at low volume) all devices are combined on one single board. The different products are represented in assembly variants. The combined board has following features:
- Two RF Transceivers (both can handle up to four satellites)
- One USB to I2C Bridge
- One Analog CODEC with
- One Line Out
- One Line In
- One Headphone Out with Microphone In
- One Optical S/PDIF Out
- One Optical S/PDIF In
- One Expansion Header (containing I2S for audio and SPI, I2C for control)
The general audio settings are (CD quality):
- Resolution: 16 bit
- Sample rate: 44.1 kHz
- Streaming format: PCM
This chapter describes the main components used in this project.
The essential component in this project is TIs Wireless PurePath IC (CC85xx), a 2.4 GHz RF transceiver. It supports audio streaming in 16 bit or 24 bit resolution from an I2S interface or directly via USB. It can run completely autonomous without any microcontroller and it features autonomous configuration of I2S audio devices over I2C. All configuration work can be done in TIs PurePath Wireless Configurator (http://www.ti.com/tool/purepath-wl-cfg) and programmed onto the chip using TIs CC Debugger (http://www.ti.com/tool/cc-debugger).
The CC85xx comes in four different configurations:
|Device||Max number of audio channels||USB Interface|
The number of needed audio channels mostly depends whether the device should stream audio in two or one direction. Devices without USB interface only support I2S as interface. Depending on the requirements the cheaper variant of the device can be used.
IC Block Diagram
The Block Diagram (image from CC85xx Family User's Guide) shows the internal hardware of the CC85xx, it consists of:
- Three Processors
- one for processing and converting the format of the audio samples
- one for processing the packets on the network
- one main-processor to coordinate the co-processors and the peripherals (ARM Cortex-M3)
- On-Chip Memory for storing volatile data and non-volatile firmware
- SPI slave (used to load the firmware or control input in host-controlled operation)
- I2C master (used to configure audio devices)
- CC259x range extender control interface
- Battery voltage monitoring
- Antenna switch control (used with antenna diversity)
- Radio Transceiver operation from 2.4 GHz to 2.483 GHz
- General input/output pins for signalling and control buttons
The CC85xx supports one network structure (image from CC85xx Family User's Guide): One device is the network master (base station) and can handle up to four slaves (satellites), however in bidirectional streaming the base station is limited to two satellites.
The Inter-IC Sound (I2S) interface is used connect the RF transceiver to an audio device. It consists of the following lines:
- Master clock (MCLK): Master clock for sample conversion (is not mandatory)
- Bit clock (BCLK): Bit clock for the transmitted data
- Word clock (WCLK): Defines the audio channel (left or right)
- Serial data (ADx): Data lines for the audio samples (one data line transmits the left and the right audio channel)
The timing diagram (image from CC85xx Family User's Guide) shows the exact correlation between the individual lines.
The analog inputs and outputs are connected to a TLV230AIC3204 from Texas Instruments. This component can drive a stereo headphone and a stereo line output, it also features six analog inputs which can be ether connected to microphones or a line inputs. The IC is connected to RF transceiver via I2S for sound and I2C for configuration purposes (the AIC3204 is natively supported by the CC85xx, the configuration of the audio codec can be done through the Wireless PurePath Configurator).
The block diagram (image from TLV320AIC3204 datasheet) shows the audio mixing structure and the position of the signal processing blocks. Processing blocks for the ADC feature:
- First-order IIR (infinite impulse response)
- Scalable number of biquad filters (up to five)
- Variable-tap FIR filter (finite impulse response)
and the for the DAC:
- First-order IIR
- Scalable number of biquad filters (up to six)
- 3D effect
- Beep generator
These basic signal processing blocks are configured using the I2C interface, which is controlled by the RF transceiver.
S/PDIF Transmitter & Receiver
Two IC are needed for the optical link:
- A S/PDIF transmitter (DIT4096 from TI) in combination with a TOSLINK socket (TOTX1952 from Toshiba)
- A S/PDIF receiver (DIR9001 from TI) in combination with a TOSLINK socket (TORX1952 from Toshiba)
Both ICs configured in hardware.
USB to I2S Converter
The RF transceiver has an integrated USB interface (functions as a soundcard when attached to a computer), but if the USB interface is used, the I2S interface cannot be used. This means that no local playback is possible.
An USB to I2S converter is needed when:
- Audio should be streamed to the network and be locally played back
- A base station with two RF transceivers is used (both transceivers take the I2S interface as input and use timeslot alignment to coordinate packet transmission, this allows to setup two networks with up to four satellites which results in a total of eight satellites)
The interface between USB and I2S is done by the CP2114 from Silicon Labs.
The signal which the CP2114 outputs on the I2S bus is not readable by the CC8531, thus another USB to I2S converter has to be used.
The device uses the 5V USB supply as power source, the components itself need 3.3V. The 5V input is first filtered to prevent noise from the USB source from entering the system. It is then fed into two 3.3V regulators, one step-down regulator (TPS627451 from TI) for the digital supply and one linear regulator (MAX8511EXK33+T from Maxim) with an extra input filter for the analog and RF supply.
A stable power supply with low noise is important for clear audio playback and even further important for the RF transceiver. Ripple measurement will be taken as soon a prototype is available.
In this design several considerations had to be taken into account during the layout process.
This is my first PCB design using a RF transceiver, it may have flaws.
The board uses 4 Layers, two for signals and two as power planes. Layer one is used for impedance controlled tracks, because the ground planes is one layer below. The layer stack corresponds to Seeedstudio 4-Layer PCB service. The total height is 1.2mm. It was assumed that the dielectric constant (er) is 4.4.
There are two differential pairs on the PCB which require a defined with and spacing (both placed on layer one).
|USB||90 Ω||0.258 mm||0.2 mm|
|RF||100 Ω||0.207 mm||0.2 mm|
(The design rule for the differential pairs is missing, because CircuitMaker always delets it)
Impedance Controlled Tracks
Another calculation was needed for the RF tracks.
|RF||50 Ω||0.36 mm||0.2 mm|
* A waveguide (ground plane besides the signal track) design is used, the spacing defines the distance from the signal track to the ground plane
The Saturn PCB Design tool was used for the calculations (http://saturnpcb.com/pcb_toolkit.htm).
The design rules are in line with the specifications of Seeed Fusion PCB service, but they meet most of the standard guidelines of PCB manufacturers.
Besides the PCB only a few external components are needed: an antenna, some cables and a case.
The case consists of a top and a bottom part made from oak as well as a aluminium panel. The design was made in Autodesk Fusion 360 in three steps:
- In CircuitMaker the PCB step model was exported and then imported to Fusion 360
- The case was designed around the PCB (with the complete PCB 3D model mechanical clearance could be checked easily)
- With the built in CAM processor all gcode data for the CNC machine were generated
I manufactured one case on my small CNC machine. The video shows a time-laps of the milling process. More pictures can be found in the gallery section.
Instead of milling the case can also be 3D printed or a new design approach using laser cut acrylic can be made.
At the moment I am using three different variants for my project:
- Base station of the network
- Two CC85xx ICs to support up to eight satellites
- USB sound input (over USB - I2S bridge) → not working as intended
- BOM: https://octopart.com/bom-lookup/qjtPve4j
- Line In, Line Out
- Headphone (supports 4 terminal headsets)
- BOM: https://octopart.com/bom-lookup/cgCjuy4K
- Optical S/PDIF output over TOSLINK connector
- BOM: https://octopart.com/bom-lookup/uGtdEpHW
Assembly files can found in the attachments.
The BOMs on octopart are not completely identical with the ones in CircuitMaker because some capacitors were not in stock and I changed the 2x5P header to a male header. The BOM on Octopart also features the external components (an antenna, caps for the switches and a USB cable).
I've assembled the AnalogIO (on the picture), SpdifOut and UsbDualRf variants. Because the CP2114 on the UsbDualRf variant did not work, I had to change the assembly in order to connect the USB port directly to the CC8531.
However, some issues have been found already and will result in a slight redesign in the schematics. Known issues:
- C404 has a wrong footprint assigned
- U300 (CP2114, USB audio interface) is wrongly supplied with power (major issue)
- UsbDualRf Variant: R625 should be assembled
- depending on the noise of the USB power supply some noise is hearable on the analog output
- the DIT4096 was wrongly supplied with power and the HW-configuration had to be changed to 24-bit I2S
Changements: VDD (pin 19) and VIO (pin 7) connections were switched and the traces were accordingly separated, FMT0 (pin 9) was connected to +3.3V
The firmware for the three devices was configured in Pure Path Wireless Configurator (http://www.ti.com/tool/purepath-wl-cfg). A special confguration was made for the AnalogIO in order to mix the line input with the wireless audio stream and put on the line output as well as the headphone output. The firmware was loaded to CC8531 via the CC Debugger (http://www.ti.com/tool/cc-debugger).
For the test setup I connected the modified UsbDualRf to a notebook as network master, the AnalogIO was connected to some loudspeakers and the SpdifOut was connected to a home cinema system. The used configuration file can be found in the attachements.
Finally, the three devices were able to pair and an audio stream was established successfully. More importantly, the sound output was synchronous.
Adapting the Product
This product is a base for projects using TIs CC85xx transceivers. The digital audio transceiver is my evaluation system for a wireless audio network, if it works well, I will add further products.
- USB: OK
- USB Audio Inteface: FAILED
- Power Supply: OK (further noise filtering might be usefull)
- User Interface: OK
- Wireless Transceiver: OK
- SPDIF Out: OK (changes applied)
- SPDIF In: not tested
- Line In/Out: OK
- Expansion Header: not tested
All schematics and the PCB are using the metric system.
Reducing the Costs
With the current design the cost per unit is quite high, but they can be reduced by:
- A SMD or PCB integrated antenna
- No shielding cage
- Cheaper switches
- No range extender
- Normal capacitors instead of three-terminal capacitors
- Only one 3.3V regulator
Review February 2018
After I spent some time using the variants of the Digital Audio Transceiver I would like to share some results.
UsbDualRf (Base Station)
A Raspberry Pi 3 and the UsbDualRf variant is used a base station. The audio connection is being established by an I2S interface.
On the Raspberry Pi runs a Linux derivate called Volumio. This is an Operating System plus some additional software that is designed for audio applications. It features an intuitive web interface to control the audio playback. It also supports I2S audio output. Local soundtracks, web radio stations and Spotify are supported audio sources.
I have connected the S/PDIF output to a home entertainment system. The advantage of S/PDIF is that the audio ouput is digital. This way the Digital Audio Transceiver doesn’t add any noise to the audio signal.
However, the problem is the latency of the home entertainment system. Audio is delayed about 200ms. The Wireless Speaker is in the same room and they are clearly not in sync. Unfortunately, the CC8531 doesn’t have a feature to delay audio. So, I don’t use the S/PDIF-Out that often.
My computer is connected to the Line In while the speakers are connected to Line Out. That allows me to mix the sound of the computer with the sound received by the wireless receiver.
The computer is located one storey above the Base Station. That sometime leads to some interrupts in the audio playback. Especially, when the computer is running the interferences of the 2.4GHz transceiver of wireless mouse and nearby USB 3.0 cables are noticeable.
The Wireless Speaker is placed in the kitchen and works without any problems. The sound lacks some bass due to its small and closed style enclosure.
What would I do differently?
I probably would build a WiFi based audio receiver instead of using proprietary RF chips. At the beginning of the project I decided not to use the WiFi approach, because it would have involved a considerable amount of software development. And syncing playbacks in the Ethernet environment is not easy. On the other hand, the use of proprietary RF chips also restrains the flexibility. And that one got me in the end: I don’t have any hardware support so to sync up all the devices by some audio latency.