Documentation
¶
Index ¶
- Constants
- Variables
- func CathodeBypassCapacitor(Rk, F float64) float64
- func Choke(C, F float64) float64
- func FormatUnit(v float64, precision int, unit string) string
- func LEDResistor(VAC, DCForwardVoltage, I float64) float64
- func Load(DC, power float64) float64
- func PowerCurrent(v PowerValve, topology string, n int, DC, Rload float64) (Ia, Is float64)
- func PowerRI(R, I float64) float64
- func PreampCurrent(v PreampValve, U float64, n int) float64
- func RectifierDiodeRating(U1, U2 float64) float64
- func SmoothingCapacitor(R float64) float64
- func Tolerance(v float64) float64
- func TransformerCurrentFWC(Uac1, Uac2, Iac float64) float64
- func Vpp(U float64) float64
- type Currents
- type PowerValve
- type PreampValve
Constants ¶
const PreampValveTypicalVoltage float64 = 250
Variables ¶
var ( UnitPico = math.Pow(10, -12) UnitNano = math.Pow(10, -9) UnitMicro = math.Pow(10, -6) UnitMilli = math.Pow(10, -3) UnitNone = math.Pow(10, 0) UnitKillo = math.Pow(10, 3) UnitMega = math.Pow(10, 6) )
Unit multiplier.
var PowerValves = map[string]PowerValve{ "EL34": { Power: 25, SingleEnded: Currents{ Ia: 100 * UnitMilli, Is: 14.9 * UnitMilli, }, PushPull: Currents{ Ia: 100 * UnitMilli, Is: 14.9 * UnitMilli, }, If: 1.5, }, "6L6GC": { Power: 30, SingleEnded: Currents{ Ia: 72 * UnitMilli, Is: 5 * UnitMilli, }, PushPull: Currents{ Ia: 134 * UnitMilli, Is: 11 * UnitMilli, }, If: 0.9, }, "6V6S": { Power: 14, SingleEnded: Currents{ Ia: 45 * UnitMilli, Is: 5 * UnitMilli, }, PushPull: Currents{ Ia: 70 * UnitMilli, Is: 13 * UnitMilli, }, If: 0.5, }, }
PowerValves characteristics. Based on https://www.jj-electronic.com/en/power-tubes
var PreampValves = map[string]PreampValve{ "ECC81": { Ua: 300, Wa: 2.5, Wat: PreampValveTypicalVoltage * 10 * UnitMilli, If: 0.3, }, "ECC83S": { Ua: 300, Wa: 1, Wat: PreampValveTypicalVoltage * 1.2 * UnitMilli, If: 0.3, }, "ECC803S": { Ua: 300, Wa: 1.2, Wat: PreampValveTypicalVoltage * 1.2 * UnitMilli, If: 0.3, }, "6SL7": { Ua: 300, Wa: 1, Wat: PreampValveTypicalVoltage * 2.3 * UnitMilli, If: 0.3, }, }
PreampValves characteristics. Based on https://www.jj-electronic.com/en/preamplifying-tubes
var Rectifiers = map[string]float64{
"DIODE": 1.37,
"GZ34": 1.36,
"EZ81": 1.30,
"5U4B": 1.28,
"5Y3": 1.25,
}
Rectifiers' coef. SQRT(2) = ~1.4 is the ideal coef. Based on https://thesubjectmatter.com/calcptcurrent.html
Functions ¶
func CathodeBypassCapacitor ¶
CathodeBypassCapacitor computes an approximation of the cathode bypass capacitor value according the given cathode resistor Rk in Ohm and the wanted frequency F in Hertz.
For full baypass, use F = 5Hz
func Choke ¶
Choke computes the choke value you should use in your power supply unit.
C is the capacitor value after the rectifier and before the Choke, usually ~47µF.
F is the resonant frequency that we want to keep below 10Hz.
http://www.valvewizard.co.uk/smoothing.html -> Don't forget that the choke must handle the poweramp screen current and preamp current.
func FormatUnit ¶
FormatUnit returns a pretty print version of the given value.
func LEDResistor ¶
LEDResistor computes the resistor value to put in series with the LED.
func PowerCurrent ¶
func PowerCurrent(v PowerValve, topology string, n int, DC, Rload float64) (Ia, Is float64)
PowerCurrent computes the maximum current consumption for the given n triode.
http://www.valvewizard.co.uk/pp.html http://www.valvewizard.co.uk/smoothing.html (Design Example)
func PreampCurrent ¶
func PreampCurrent(v PreampValve, U float64, n int) float64
PreampCurrent computes the maximum current consumption for the given n triode.
func RectifierDiodeRating ¶
RectifierDiodeRating computes the Reverse Repetative Maximum (Vrrm) rating that excess the peak AC voltage. For a tap-center transformer like 350-0-350, U1=350 and U2=350. For a normal transformer like 0-350, U1=0, U2=350.
http://www.valvewizard.co.uk/bridge.html
The popular 1N4007 is rated for 1000V. This corresponds to an AC voltage of 1000V/1.4 = 714Vrms. However, we should knock off 10% to allow for variation in mains voltage, and knock off another 10% to allow for the transformer voltage being high if loaded only lightly. Therefore, we can't use the 1N4007 if the (advertised) transformer voltage is greater than 580Vrms.
func SmoothingCapacitor ¶
SmoothingCapacitor computes the capicitor value to put after a voltage dropping resistor.
func TransformerCurrentFWC ¶
TransformerCurrentFWC computes an approximation of the transformer's DC current after Full Wave rectifier with a Capacitor input load. https://www.hammfg.com/electronics/transformers/rectifier