Tomo
DIY tube amps can be SHOCKING
- Joined
- Jun 22, 2001
- Posts
- 1,067
- Likes
- 14
Hello,
Getting the exact logarithmic values shown here is NOT necessary. Do few linear approximations and curve fit the function.
This is actual calculations that I have made.
Requirements: 50K 12 steps -> 11 resistors
50 = C * (Exp(r * 11) - 1)
Minus 1 is required since Exp (r * 0) = 1 and we want Zero here.
Ln((50 / C) + 1) = r * 11
r is some arbitary constant associated with my requirements. C is some constant that control the steepness of the graph.
r = Ln((50 / C) +1) / 11
The stepped attenuator's resistance must change according to this rule.
A(x) = C*(Exp(r * x) - 1)
where
r = Ln((50 / C) +1) / 11
Note this resistance is the total resistances of all resistors between signal-out and ground. So calculate the values of resistors appropriately.
I only had 2.2K and 7.5K in the number I needed. So I had to set C to 4 ~ 5 after doing some additions and subtrations.
50k = R1 * Y + R2 * Z
where Y + Z = 11
For ease of calculation, I decided to have Y = 5 or 6. After staring at graphs for a while, I decided if Y = 6, the graph look more logarithmic.
If you curve fit this experimental results, you get C ~ 4.8. Clearly C must be experimentally determined. However, I am very certain that C cannot be small. Small C will give you very low values except close to 11 and that ain't good. My curve fit is attached.
I guess I got super lucky and hit the sweet spot. The attenuator sound very good and natural. (Natural I mean is that decay over steps are natural)
Tomo
Getting the exact logarithmic values shown here is NOT necessary. Do few linear approximations and curve fit the function.
This is actual calculations that I have made.
Requirements: 50K 12 steps -> 11 resistors
50 = C * (Exp(r * 11) - 1)
Minus 1 is required since Exp (r * 0) = 1 and we want Zero here.
Ln((50 / C) + 1) = r * 11
r is some arbitary constant associated with my requirements. C is some constant that control the steepness of the graph.
r = Ln((50 / C) +1) / 11
The stepped attenuator's resistance must change according to this rule.
A(x) = C*(Exp(r * x) - 1)
where
r = Ln((50 / C) +1) / 11
Note this resistance is the total resistances of all resistors between signal-out and ground. So calculate the values of resistors appropriately.
I only had 2.2K and 7.5K in the number I needed. So I had to set C to 4 ~ 5 after doing some additions and subtrations.
50k = R1 * Y + R2 * Z
where Y + Z = 11
For ease of calculation, I decided to have Y = 5 or 6. After staring at graphs for a while, I decided if Y = 6, the graph look more logarithmic.
If you curve fit this experimental results, you get C ~ 4.8. Clearly C must be experimentally determined. However, I am very certain that C cannot be small. Small C will give you very low values except close to 11 and that ain't good. My curve fit is attached.
I guess I got super lucky and hit the sweet spot. The attenuator sound very good and natural. (Natural I mean is that decay over steps are natural)
Tomo