Whazon, a S/PDIF switch built around WM8805

A couple of questions. 1) What is the purpose of capacitors C36-C39, which are bridging the S/PDIF input transformer primary and secondary windings? 2) Since the schematic doesn’t appear to show a coupling capacitor in series with the input transformer primaries, I presume you have otherwise made certain that those windings are not subjected to D.C.? I say appear to show, because it’s not immediately clear to me the function of the many J1-J4 header pins.
 
Last edited:
A couple of questions. 1) What is the purpose of capacitors C36-C39, which are bridging the S/PDIF input transformer primary and secondary windings? 2) Since the schematic doesn’t appear to show a coupling capacitor in series with the input transformer primaries, I presume you have otherwise made certain that those windings are not subjected to D.C.? I say appear to show, because it’s not immediately clear to me the function of the many J1-J4 header pins.
C36-C39 tie the PCB GND to the metal enclosure at RF frequencies. The current revision schematic and PCB layout, rev.3, has a DC blocking capacitor in front of the input transformers. They probably could be made out in this Rev.3 layout picture.
Rev.3 Layout
 
Hi Nattawa, amazing project!
I am looking at building a spdif switch, controlled by either a raspberry pi 4b or a raspberry pi pico (via a python script). I just need manual source selection via remote control.
I know there are other ways to achieve this but i would like a wm8805 based solution.
I am a complete noob in electronics, but i can more or less read an schematic.
Do you think it is feasible to build such a switch? what do you recommend to start with?
I think what is struggle to understand the most is how to send the command to select the source from the raspberry pi / microcontroller. Can you share more details (and or the code) that you use with the Arduino?
thanks a lot!
 
Hi MRamone,

Thanks for your kind words and enquiry.

There are a few ways to control a wm8805
1) I2C. The SPDIF switch part of Whazon is as simple as reading/writing a few control registers inside the WM8805, by communicating via a two-wire serial interface called I2C bus. It is a popular and widely used I/O port that I'm sure Raspberry pi boards are all equipped with, and readily available for Python to access.

It is possible to replace the Arduino Nano in Whazon with a pi. If you don't feel like designing your own PCB layout, you can build a Whazon and leave the Arduino Nano board uninstalled, and tap the I2C wires off the socket for the Arduino, and hook them up to the pi (along with a common ground wire).

2) Serial port on Arduino. Alternatively, instead of I2C interfacing the wm8805 directly, you can have the pi talk with the Arduino in Whazon, through a serial com port, and send control characters. Whazon is capable of sending back certain wm8805 internal status info as well. This serial port in Whazon was designed to work with a HC-05 Bluethooth-Serial module as a remote transceiver. But you can hookup with your pi/Python in place of a HC-05 module.

3) Use your pi/python as a Bluethooth remote. This is about the same as 2) above. Difference is the python is now making the pi a Bluetooth transceiver, much like what the Android phone does as a Bluetooth remote controller, as describe in #13. In this case, the pi pairs up with the HC-05 module to establish a communication link.

I'll send you a file package and hope that will explain a lot more in detail.
 
Hi Nattawa, thanks for your answer and additional information!

Actually, the part of the project i feel more comfortable with is PCB layout. The idea is to build a sort of hat for the raspberry. I was thinking on taking your design as start point and eliminate the parts i don't need to keep it as simple as possible. But first i need to understand which parts i don't need! :) which i think are basically the Arduino/bluetooth module, voltage converters (the pi can supply 3.3V) and a few of the inputs i dont need (2 toslink and 1 coax inputs are enough, maybe i add one more input in case).

I believe your proposed option 1) is the best for me to try in order to keep things simple and small.

Something i did not think of yesterday but that i favor now is to use, besides the spdif inputs, the i2s audio signal from the pi as one additional input. I have a streamer (squeezelite) up and working in the pi. It would be great if i can use the wm8805 to select in between i2s/spdif1/spdif2/spdif3/spdif4 sources. Have you ever looked at this? it does not seem evident to my noob eyes looking at the wm4405 datasheet...

looking forward to receiving your code.

regards,
M.
 
I see, @MRamone . I stripped the Whazon schematic down and made it suit your description.

I'm pretty sure WM8805 can take I2S feed and put it out at its SPDIF output. The datasheet does hide it somewhere in the software control area, and needs some digging and shoveling. Although Whazon does not use I2S as input, I do have a pi hat HiFi Digi+, that operates exactly that way with WM8804, same chip as WM8805 less SPDIF mux.

I tried to send you PM but it seems I was not allowed to. Can you PM me for the Whazon file package?
 

Attachments

  • SPDIF-HAT.pdf
    63 KB · Views: 90
Hi, I've answered your pm.
Thanks for this!
Yes i know the Digi hats and wm8804. Actually when I started thinking on this project the idea was to use a wm8804 for i2s to spdif (that is well documented) and then a separate mux to select between this and the other spdif sources. Until i came across your project :D
 
hi Nattawa,
I have been looking at the schematic you very kindly drafted for me and i have a few questions. Sorry in advance if some of them are a bit dumb... :)

- in a different project i was following before finding yours, they use a wm8804 as a i2s -> spdif interface. As mentioned before, this is a very common use of wm8804. In any case, the guy says that in order to use the standard drivers that all these wm8804 hats use, it is mandatory to use a 27MHz crystal with the wm8804. In your design the crystal is 12MHz. Do you see any issue using a 27MHz crystal instead?
here a link to the wm8804 project:

https://github.com/opiopan/sonopi-digi

- In the schematic that you drafted to adapt your project to raspberry pi, wm8805 pin 16 DOUT seems to be left unconnected. I think in your original design this pin goes to the i2s interface. Is it correct to leave it unconnected?

- the DA100C transformers you use. I don't have an easy way to get them. Do you think a Murata DA101C will do the job?

- The circuit to connect the 3.3V to the pi 3.3V. Is it necessary? what is its funcion?

- The capacitors C36 andC37 in the input coax are "DNI", but the equivalent C46 in coax output is mandatory. Is this correct?

Thanks again for your help!
 
*edit: regarding the DOUT connectivity. Could it be that DIN in wm8805 needs to be connected to DOUT at the raspberri pi side and not to DIN as indicated in the schematic?
1677419130785.png
 
- in a different project i was following before finding yours, they use a wm8804 as a i2s -> spdif interface. As mentioned before, this is a very common use of wm8804. In any case, the guy says that in order to use the standard drivers that all these wm8804 hats use, it is mandatory to use a 27MHz crystal with the wm8804. In your design the crystal is 12MHz. Do you see any issue using a 27MHz crystal instead?
That could be seen as a limitation on part of the "standard driver", for not being able to support all crystal frequencies WM8804/5 allows. If you are to use that standard driver as is, hence subject yourself to its limitation, you'll need to use a 27MHz crystal in stead of a 12MHz one.
- In the schematic that you drafted to adapt your project to raspberry pi, wm8805 pin 16 DOUT seems to be left unconnected. I think in your original design this pin goes to the i2s interface. Is it correct to leave it unconnected?
Original Whazon uses the audio interface as output, so Dout goes to a connector (although a jumper is provided so that Din can go to that connector as well as an option).
- the DA100C transformers you use. I don't have an easy way to get them. Do you think a Murata DA101C will do the job?
Yes, DA101C is the correct part number. DA100 meant to be referring to that entire series of Murata transformers from DA101 through DA103, through-hole or SMT, as Whazon PCB layout supports them all.
- The circuit to connect the 3.3V to the pi 3.3V. Is it necessary? what is its function?
That is a noise filter on power supply. 3v3 from a SBC can be "dirty". It may not fail you if you don't use that filter, but if you ask me if it is necessary to use it, the answer is always yes. ;)
- The capacitors C36 andC37 in the input coax are "DNI", but the equivalent C46 in coax output is mandatory. Is this correct?
I must have hacked wrong capacitors when pruning the schematic....these three should be 1nF up to 100nF, installed always. Thanks for spotting that.
- *edit: regarding the DOUT connectivity. Could it be that DIN in wm8805 needs to be connected to DOUT at the raspberri pi side and not to DIN as indicated in the schematic?
"DIN" is named as seen by WM8805. It is a label given to a net, rather than an implication of its origin/target. However, I agree it could have been named "neutrally", such as "data" simply.
 
  • Like
Reactions: 1 user
C9, C10 are not critical. That filter is more like better have it and not need it than need it and not have it. Since it's a hat board, just use the most compact package you can handle. Reduce value to 10uF, voltage rating to 6.3V if needed. Get rid of C9 if out of room in layout. Aluminum, ceramic, tantalum are all good.
 
  • Like
Reactions: 1 user