Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

Wireless Digital Volume Control

Status
Not open for further replies.

Davik

New Member
I'm currently working on a project in my electronics class in sixth form, which is essentially a wireless mixer for band practices (i.e. each guitar/bass player plugs through it and you can control their individual volumes on the go, with a seperate unit).

I have almost the whole project sorted, using a seperate wireless channel for each instrument, resulting in up/down singals on each channel, which are decoded into seperate outputs.

I am trying to figure out a way of turning these up and down signals (limited from 0 - 15, ideally) into effective volume control - i.e. varying resistance. My most solid idea at the moment is that the signal is converted into a binary signal, with each bit controlling a relay, passing the signal through a resistor, or not. The idea was that as the bit size increased (1, 2, 4, 8), the resistance would decrease, so as to give a increasingly lower resistance, and therfore higher volume. However due to the way resistors work in parallel, this gives an uneven resulting pattern in current. It does provide a range of volumes, however the gaps between each level are not consistent.

I can use this method if no other can be found, but does anyone have any ideas?

Actually I've just thought about applying the resistors in series, in ascending resistance instead. I'll try that.

Still, if anyone has any other suggestions, please chime in.

Thanks
 
THere are ICs that are digital potentiometers with that accept up/down digital signal (and serial versions as well like I2C or SPI) that have logarithmic resistance that are made to serve as volume controls (since the human ear has a logarithmic response to volume increase, so you need a logarithmic increase to make it sound like it is increasing linearly). BUt if you must make the digital pot yourself...

...then a better way to arrange it is to use a string of series connected resistors. Each resistor has a switch in parallel with it to "short it" effectively removing it from the chain. YOu can customize your desired resistance increase with this method more easily than with the "accumulated parallel resistor method".

If equal resistances are used, this allows for a linear change in resistance.

1. If you use pick the resistor values so they add up logarithmically (ie. resistors of values 1R, 9R, 90R). The result is as you unshort them to add them to the chain of resistance they accumulate in a log manner (1R, 1+9R, 1R+9R+90R -> 1R, 10R, 100R). You can figure out the resistances needed if you just map out the resistance range you want logarithmically on the Y-axis of a graph, and then divide the X-axis up equall into the number of steps you want. Then just pick the resistances so that as they add up, they accumulate onto the resistance value located at each step. With a log graph you get a linear change in perceived volume since the human ear has a logarithmic response to changes magnitude.

2. Of course, you could also just use the "non-accumulated parallel resistor method", where instead of adding resistors into the parallel connections, where you have only one resistor representing the resistance per step and only have one resistor connected at one time. Every time you connect one resistor, you disconnect all the others. This also allows easier customization of the resistance response of the pot because you literally just pick one resistor value for each step (ie. 100R, 200R, 300R, ...for a linear response or 100R, 1K, 10K,... for a logarithmic response). As this method only ever has one switch on at any one time, the control signals of the switches are using 1-hot encoding (ie. 0001, 0010, 0100, 1000) while you are probably using sequential binary (ie. 00, 01, 10, 11) to represent your volumes. A priority encoder can be used to convert your sequential binary bit stream representative of the desired step to 1-hot encoding- very simple.

Parallel methods might be easier than the "accumulated series method (#1)" I just described because if you use MOS transistor switches, they are all stacked up onto each other, resulting in each gate having a different reference (source pin) voltage making it more complex to provide drive circuitry. With parallel resistors, all the MOS sources share the same node and just one gate drive supply can be used, using this node as the reference. If you use relays though, it's not a problem since relays don't work this way. Also, with the parallel methods, you also do not experience the problem of accumulating switch resistance. Since you do have a chain of imperfect (non-zero ohm switches) forming imperfect shorts across the resistors ,and these resistances can add up and make a difference, especially if your pot is trying to express a low value.

If you don't know what a priority encoder is, it just takes the binary number placed on the input parallel bus and enables the one output whose label matches that binary number, and disables all the other inputs. Enable/Disable can be active HI or active LO depending on the priority encoder.
 
Last edited:
Crikey I'd completely forgotten about the logarithmic volume thing...

I'm dealing with the signal straight from a guitar or bass here, so talking in ranges from about 10mV up to perhaps 1V rms. We're reasonabley limited in resources, but if needed we can order in any parts we need from Rapid Electronics. The main issue with ICs would be whether they deal with low enough values of resistance so as to not cut out the signal entirely, or severely damage it.

What values of resistors would be ideal, for a logarithmic scale? Would it be possible to do a logarithmic scale, or something that approximates that, whilst still using a binary set up of resistors, so that 4 are used, rather than 15?

Edit: I didn't really read the reply fully, at least not the edited version. I'm afraid I don't quite understand what you mean, to be honest.

My binary signal is in a 4 digit, 0 - 15 set up, if that's of any use.
 
Last edited:
What values of resistors would be ideal, for a logarithmic scale? Would it be possible to do a logarithmic scale, or something that approximates that, whilst still using a binary set up of resistors, so that 4 are used, rather than 15?

Not really...4 resistors seems to be 4 steps. It does not matter whether they are in series or in parallel, or whether you are accumulating the resistances or only have one connected at a time. THe only way I can think of you getting more steps out of 4 resistors is to use 4 resistors of different values and then connect them together in various combinations, but then your control logic is more complicated (not overly so if it's MCU controlled).

For example, 100R, 200R, 300R 400R resistor can be connected in the following combinations to produce the following resistances:
100R
200R
300R
400R
400R +100R = 500R
400R +200R = 600R
400R +700R = 700R

This is using linear increments and you don't even get double the possible number of combinations as resistors. But you can see there is more than one way to get a certain accumulated resistance value (ie 400R+100R = 300R+200R = 500R). If you do not used linearily spaced resistors, you can turn that redundancy into more combinations, but you still lose a lot of control over what resistance values you can get compared to other methods.

For example:
10R
100R
1K
10K

So every possible combination of these base resistors produces a unique resistance without the redundancy of linearly spaced resistors giving you 2^N combinations:
110R, 1010R, 1100R, 1110R, 10.01K, 10.10K, 10.11K, 11K, 11.01K, 11.10K, 11.11K
Obviously, there are a lot of very similar values here since the range between resistances was too large...Choose carefully...
 
Last edited:
I was actually meaning setting them up in a binary fashion, so that with resistors of values 1, 2, 4 and 8 Ohms, you can get any combination of resistance from 0 Ohms to 15 Ohms. Of course this doesn't translate to the logarithmic scale, but I just thought I should clarify my previous point.

I'll have a go with the other method tomorrow.
 
Well then there's your answer :) I wasn't able to think of a combination that would allow some scale that actually had a name. I guess doubling every step works better than x10 every step since the smallest and largest values get too far apart too quickly.
 
Last edited:
Status
Not open for further replies.

Latest threads

New Articles From Microcontroller Tips

Back
Top