DIY DAC with input switchingon a budget?

Status
This old topic is closed. If you want to reopen this topic, contact a moderator using the "Report Post" button.
Been busy again. Today I finished the coaxial output around the 74HCT04. That's a lot of work on a stripboard because the whole IC needs to be wired to drive just one coaxial output.

I've also been experimenting with the rotary switch. As you can see in the attachment I "borrowed" the rotary switch from a four-to-one switchbox.
It works fine, but I noticed a (half expected) side-effect of the use of a rotary switch. These switches have gaps in between the positions where the contacts are not connected to anything. While turning (slowly), this leads to a short period where A and B on the multiplexer are undefined, i.e. neither connected to GND, nor to Vcc. In practice this leads to A and B becoming high enough for the 74LS251, that I used instead of the 74HCT251, to be interpreted as a logic 1 and thus selecting the source on input 4 (A=1, B=1 -> Y=D3). If your DAC, like my Micromega DAC1, locks very quickly to the incoming source, you will shortly hear input 4 until the switch clicks into the next position.

How "bad" this gets may depend on the switch used. A switch with a wide gap between the contacts will be worse than one with a narrow gap.
It also depends on the speed of locking onto the S/PDIF signal of the DAC. My old Pioneer CD-recorder needs about a whole second to lock on while my DAC1 is lightningly quick.

It's not a real problem, just an annoyance (and only if the source on input 4 is playing). I'm going to experiment with some capacitance on A and B to try and slow down the transition of 0 to 1 enough for the effect not to occur in normal use.
 

Attachments

  • image9.jpg
    image9.jpg
    97.6 KB · Views: 727
Very good! I'm sure the underside isnt as messy as it looks when seen close up. When I come to build this can you send me a full size high-res photo fo the bottom side please?

Have you tested it with music yet, was there any degradation of the sound qulaity or distortion etc?

Looking forward to the next update! :)
 
I spent the better part of a day trying to come up with a simple solution to prevent the "annoyance" I mentioned a few posts ago. But after a while I decided on living with it. It's going to be more complicated than I thought and I realised that it needs more space than I have left on the board, and I'm not going to add another one.

That leaves me with some fine-tuning to do (installing 47 uH inductors between Vcc and pin 3 of the optical recievers) and thinking about what housing to use, how to mount the pcb, etc.
 
mikesnowdon said:
So the caps didnt work?

Is it possible to use a dual rotary switch so you can get some overlap between positions?

No, while experimenting with delay circuits I found out that the switch does not have gaps, as I thought, but it actually has overlaps. It's the overlapping that's undesirable.

I use a laboratory power supply for the breadboard circuit which has the possibility to limit the current to anywhere between 0 A and max output. A red LED indicates when the set current limit has been reached.
I noticed the red LED on the PSU flashing while I was switching between the sources. From that moment on I knew the rotary switch shortly overlaps between the positions. The overlaps between positions that are wired for high (Vcc) and those that are wired for low (GND) create a short circuit! This should be avoided at all costs as it leads to a drop in Vcc that affects all circuits.

It's not a problem if you use the 10k resistor between Vcc and the rotary switch as in post #16. It simply limits the current to an acceptably low level in the overlaps (if I hadn't removed it, I would not have noticed the overlaps at all!). With the switch I'm using right now that resitor is not optional but mandatory. The 10k resistor will limit the effects of the overlap to the annoyance.

I'm thinking that a switch with gaps - if it exists - will present similar problems, but those might be solved by a simple delay circuit. As I don't have that kind of switch, I can't experiment. I'm not planning to either. The 4-to-1 switchbox has been unused for years so I will mod it to take the S/PDIF switch and, of course, make use its rotary switch (keeping things on a budget). The board should just fit in.
 
In post #21 I wrote that in the undefined position A and B go high and hence Y=D3. Thinking back, that was wrong.

I just experimented some more and it turned out that what seemed to be a gap at first and an overlap later on is actually a short to GND. I think that was done deliberately to prevent pops, this switch is meant for analogue sources.

With all four inputs receiving music, if I turn slowly, between every position the first input will be heard. If the positions were overlapping, that would not be possible. E.g. turning the switch from pos. 3 (LH) to pos 4 (HH) has one pole that stays high in both cases. An overlap would not cause that one to go low, and yet I hear the source on pos. 1. That MUST mean that the contacts of the switch travel over GND pulling A and B low -> selecting input 1 (D0).

Measurement with DMM on the switch revelealed this to be the case indeed.

Good chance that another switch will not do this... Maybe an overlapping switch (WITH 10k resistor between Vcc and switch) is a good solution after all - if they exist.
 
I'm not sure what exactly you mean, but there is only one ground in this S/PDIF switch.

If you mean to use the switch to select between the inputs and do away with the multiplexer, I don't think that's a good idea. You don't want mechanical stuff in the signal path of some HF digital signal. OK, S/PDIF isn't very HF, but still more than 5 MHz. I'm not saying it won't work, but it's not desirable.
Mechanical stuff (e.g. dip-switches, jumpers) is usually limited to setting modes, adresses or channels (like we do with the multiplexer) and things like that in digital circuits.

The switch you link to is a four pole/two position, so no, it won't work. You're not going to be able to produce four different states with just one flick of the switch. You need two pole/four position.
 
Just disassembled the switch-box to have a closer look at the rotary switch. My first and last ideas of a gap and short to GND were wrong. It actually has overlaps between positions.

So why hearing input 1 in every overlap? As I wrote, that should not be possible between certain positions. But I just realised that it is possible because of how I wired the poles of the switch.
Look at the schematic in post #16 and you'll see that I wired all poles that need to be low together to GND and the same thing for the other poles to Vcc, behind the 10k current limiting resistor.
The implication is that any transition from L to H or vice versa will lead to all "high" wired poles becoming momentarily low and thus selecting input 1, until the switch clicks in the position.

The solution to get rid of the "annoyance" is elegantly simple: do not wire all "high" positions together, but keep a separation between the poles, giving them two 10k resistors. When one positive pole is pulled down in the overlap, the other one will stay as it was (i.e. if there is no transition in that one).
The end result is that the overlap will go unnoticed. No more input 1 popping up!

Or so I thought at first. Look closely at the transitions, and you'll see that going from pos 2 to pos 3 the overlap will pull both poles down shortly as both poles undergo a transition (and thus input one will pop up in the overlap). The others should be fine though.

So, now I'm going to think about a solution to get rid of this too.
 

Attachments

  • image2.gif
    image2.gif
    11.2 KB · Views: 537
And here it is. I shifted the wiring on the switch so that no more than one pole goes from low to high (or vice versa) at a time. To achieve that I swapped the "coding" of the rotary switch between the last two positions (3 and 4).
To compensate for this I just swapped inputs 3 and 4 (D2 and D3) on the multiplexer. This way the outputs on the outside of the S/PDIF switch stay in chronological order without rewiring of the RCA connectors (in my case, as inputs 3 and 4 are coaxial).
 

Attachments

  • image6.gif
    image6.gif
    9.7 KB · Views: 547
Thanx!

I just made the changes to my board to see if my reasoning was correct...and it was! Every switch between inputs is a clean one.

Earlier today I also made some changes, as you can see in the attachment.
One of them is the change to the TOTX173 transmitter. Until now I used a no-name transmitter (TOTX177-clone) that I soldered out of a cheap DVD-player. The LED in this thing was off-centre. Whenever I inserted the optical cabe fully, there would be no sound. Leaving it a few mm back...sound.
The original design uses TORX177 (receiver) and TOTX177 (transmitter). These are easier to implement than the '173s because they have less connections and need less extra components.

I'm getting close to finishing this project...
 

Attachments

  • image10.jpg
    image10.jpg
    98.9 KB · Views: 527
mikesnowdon said:
Just ideas, I dont even understand how the circuit works so I'm just shooting ideas in the sky! :)

I'll try to explain how the S/PDIF-switch works. Please open and enlarge the schematics of the original design.

As you can see the designer drew the parts with the different functions separately. In reality the traces with the same names are connected, they are not drawn to keep it looking neat.

Lets start at the top:

Coax in 1 to TTL:
This circuit takes the 0.5 Vpp (at 75 ohms input impedance) from the coaxial S/PDIF signal from a digital source and amplifies it to TTL-levels (i.e. 0 V for low and 5 V for high). Then it's ready to be fed to the multiplexer.

Coax in 2 to TTL:
Same thing for the other coaxial input.

Both coaxial S/PDIF inputs share the same IC (a 74HCU04). The unused inputs of the IC (pins 11 and 13) are connected to ground. It's good designing practice not to leave unused inputs floating as it can lead to undesirable results.

To the left:
top: the schematical representation of the RCA connectors
below: the optical receivers (TORX177). These convert optical pulses directly into an electrical signal (TTL-level) which goes straight to the multiplexer.

To the right:
TTL to Coax out:
this circuit converts TTL levels to S/PDIF levels and makes sure the output impedance is 75 Ohms. The whole IC (74HCT04) is needed to drive one coax output.

To the right:
top: the optical transmitter (TOTX177). It converts the electrical pulses to light pulses using a LED. The pulses are too fast for our eyes to see, to them it's just as if the LED is continuously on, which in reality it is not.
below: The multiplexer (74HCT251) is the device that switches between the inputs. It has eight, but we use only four. A binary pattern on A, B and C "tells" the multiplexer which input to select. It's these inputs (minus C) that I connected the rotary switch to. Again, unused inputs are connected to ground.
TTL-out is the signal that drives the already mentioned coaxial and optical output circuits.

The lower part of the schematic can largely be disregarded, as we're not using this. The only interesting bit is far left: the power supply, probably based on a 7805 voltage regulator. What I find strange is the absence of electrolytic capacitors (he did draw the small 100 nF bypassing caps, though). I used 220uF parallel to C14 and another one parallel to C13. Since the S/PDIF switch doesn't draw much current this is probably overkill (but I had them lying around). Somewhere in the region of 47-100 uF should be OK.
 
Thank you jitter!

I get it now. It seems to be quite simple really. You convert the light pulses to electrical signal, switch it via a multiplexer, and convert back to light.

My amp uses a TC9163 micro switch array for input selection, am I right that we could use something like this if we wanted to instead of the multiplexer?

I have an idea, will PM you.

Rgds,
Mike.:)
 
I had a look at the datasheet of the TC9163 and I don't think it's suitable for digital signals. As it's specified as an analogue device, the bandwidth will probably be far narrower than the required > 5 MHz for the S/PDIF signal.

But it would be usable to create the different states for A, B (and C) of the multiplexer. That would still give you push-button and remote control functionality, albeit a bit more complicated to implement than with the rotary switch.
 
Finished!...well, nearly. Only some cosmetics needed for the rear of the housing because it's like Swiss cheese now.

Today I spent most of the time modding the housing of the 4-to-1 switchbox to take the pcb. This meant drilling, grinding filing and lots of soldering.

Originally the switchbox had three RCA inputs, one 3.5 mm jack input and one RCA output. I reused three RCA connectors for the coaxial in- and output(s) and the 3.5 mm jack to connect a 12 V adapter. Biger holes were needed for the opticals.

I used a lot of shrink tube on the solder joints of the wiring to the pcb because I knew it would be a very tight fit. The bottom of the switch was going to sit very close to the board, so close that I had to relocate the voltage regulator to the housing. Some careful routing of the wires while putting the two halves together and it was possible (barely) to close the housing. If I were to build one again, I might go for a slightly bigger housing...
 

Attachments

  • 100_4415kl.jpg
    100_4415kl.jpg
    97.8 KB · Views: 530
Status
This old topic is closed. If you want to reopen this topic, contact a moderator using the "Report Post" button.