I want to build a passive attenuator which will attenuate an input signal. I want the to have 12 steps, starting with no attenuation and with each subsequent step having a 0.5dB attenuation (so down to -5.5dB). I will use a 12 way 2 pole rotary switch.
Because this is a passive attenuator the input voltage is unimportant, so for ease of calculation I will assume this will be 1V.
My work so far: I decided to have 13 resistors in a simple resistor divider configuration. I have worked out the percentage of Vin I wish to appear at each point. So 100% for the first point (direct connection, Vout = 1 V), 94.4% for the second point (Vout = 0.944 V), 89.13% for the third (Vout = 0.8913 V) and running down accordingly.
I was opting for 13 resistors to that the point under R12 will be 50% of Vin therefore R13 will equal the sum of R's 1-12
My question is: How I calculate the values of the resistors required because there are so many of them?
Do I just pick a value for Rtotal and work them all out from that, or can I formulate this mathematically and perhaps write some code to do this for me. Is there a way of exploiting the common resistor values to my advantage?