How to make relais volume control

Status
This old topic is closed. If you want to reopen this topic, contact a moderator using the "Report Post" button.
I built the volume control from
http://www.passlabs.com/pdf/aleph/apserv10.pdf
with the ADC0804.

I don´t like the clicking noise when tuning the volume.

Does anyone have a hint how to program the controler for a click avoiding microcontroler relais volume control?
http://www.passlabs.com/pdf/aleph/apserv17.pdf

I want to use a PIC, should it be like

if OldVol (not =) newVol then:
[
- search for the lowest bit toggeled to 0 and write it if found one.
- search for the lowest bit toggeled to 1 and write it if found one.
- if none found quit.
loop for 7 times [
- search for the next bit toggeled to 0 and write it if found one.
- search for the next bit toggeled to 1 and write it if found one.
- if none found quit. ]
oldvol:=newvol
]

whats a better way? this would make large jumps when going from 1000 to 0111 or so.
 
AX tech editor
Joined 2002
Paid Member
There are two sources of clicks:

- Mechanical. Solution: get a better relay or put sound insolation around it;
- Electrical. Solution: Make sure that there is no DC across the relay when switching, because that is 99% the cause.

- General solution: look up the other threads where this has been discussed ad nauseatum

Jan Didden
 
- the relais are very good

- there is no DC (coupling cap)

- the noise is because the ADC0804 from alephp1.0 switches from 0to1 and 1to0 bits at the same moment, so there is a timespan during switching all the contacts are flying. Solution is a switching algorythm to avoid this, like in alephp 1.7.

I did not find the algorythm to do like alephp1.7 volume control.
 
AX tech editor
Joined 2002
Paid Member
Well, looks to me that you don't really know what causes it, but you have already a solution. Suits me, but in case it doesn't solve it:
Coupling cap doesn't mean there is no DC. What about the other side of the relay stuff, the side that carries the amp bias current? You have a schematic you can post?

Jan Didden
 
I know exactly what causes it. In the moment i change the byte that is writen to the relais from one old value to a new one, lets say 00010000 to 00001111, the ADC circuit simply switches from one value to the other and the relais contacts change according to this. In the time the contacts fly from on position to the other there is no contact, so there is a very large change in resistance of my ladder beween these 2 values 00010000 and 00001111. This very strong change inbetween the both defined states causes the click.

The circuit is linked above, you can see it in apserv10.pdf.

instead of the alephp gainstage i use a BOZ gainstage at the moment, the bias is not affected by this relais, there is of corse a C from drain of my gain Fet to the volume control and output.

The reason for the clicking noise is exatly the same reason that made passlabs change the way of control the relais from rev 1.0 to rev. 1.7.

All i need is a flowchart how i have to programm the microcontroller so it doesn´t pop that much when changing volume.
 
till said:
I know exactly what causes it. In the moment i change the byte that is writen to the relais from one old value to a new one, lets say 00010000 to 00001111, the ADC circuit simply switches from one value to the other and the relais contacts change according to this. In the time the contacts fly from on position to the other there is no contact, so there is a very large change in resistance of my ladder beween these 2 values 00010000 and 00001111. This very strong change inbetween the both defined states causes the click.

A simple change of resistance shouldn't cause clicking. If you've music playing, it should only result in a change of volume. If you've no music playing, it shouldn't result in anything.

So if you're getting the clicking even if you've no signal present, then you've probably got some DC current flowing through the switches and when they're changed, you get a bit of an inductive voltage kick due to the inductance of the wiring.

This will also result in clicking while the signal is present.

Contact bounce can make the clicking worse, but again, only if there's some sort of current flowing through the contacts when switched.

The way other digitally controlled analog attenuators deal with this (such as the Crystal CS-3310) is they use zero crossing detection of the input waveform so that the switching is done when there is effectively no voltage present and subsequently no current with which to cause the inductive voltage kick.

se
 
No, there is of corse no noise when no signal / music goes trough the volume control and i turn the volume up and down.

I know the PGA2310 etc. switches in the "Nulldurchgang" sorry, don´t know the english word(zero crossing?).

But in the PGA there are no relais, and relais contacts are real world material and so they are somewhat slow compared to a silicon switch.

It would make no sense to programm a zero crossing detection with the microcontroller, because the relais contact needs some mor time to change position that the audiosignal to be not anymore at zero crossing. And i don´t want to use a PGA,. i have one, its working, controlled by the PIC. I want relais and i want this special, mentioned by Nelson, kind of make before break but different characteristic to switch the relais.

If you don´t belive there is a good reason, (the noise) why don´t you look in the both alephp service manuals, the change they made is exactly because of this reason i point on.
 
Make-before-break circuits with relays are tricky. With my two-bank realy volume control (one for the top three bits and another for the bottom three bits) there are many cases where making before breaking would result in the volume spiking up 10dB. This is bad. So one solution I came up with was to have two lookup tables. One table is for going up, the other table is for going down. Each row of the table contains 8 bytes for my four banks of relays. The first four bytes engages relays for make-before-break, if appropriate. The second four bytes turns off the relays from the previous volume level. So the flow looks like this:

Code:
if (up) 
  command <- table.up.level
else
  command <- table.down.level

send command[0 .. 3]
sleep 10ms
send command[4 .. 7]

You may be interested in the hardware make-before-break circuit used by ftorres in his volume control

However, in the end I just let the contacts fly wherever they want and don't worry about make-before-break. There's no audible transient from this.
 
ok, it works. The crackling noise appear loud and clear at the change from 10000000 to 01111111 and back. If anyone has a good suggestion how to avoid please tell. Or passlabs tells us the magic algorythm used in alephp 1.7.

For those interested i started to write documentation, here is the preview:
http://home.arcor.de/dddddd-/relais/relais.html

A PGA2310 volume control documentation will follow.
 
JOE dirt i believe it was you that posted a simple schematic in the digital pot form for the gain clone. You got that from a site that i cant find the www. address. they have a simple circuit for a power on switch one touch turns the relay on and the other turns the relay off. Can you get me that link please : O ) ive been looking for the link for the past 4 hours now.
 
Status
This old topic is closed. If you want to reopen this topic, contact a moderator using the "Report Post" button.