A ~ E ~ R ~ A

Analogue Electric Toneboard

Various Analogue Electric Toneboard Calculations. (under development)

Building notes, real world discoveries

The astable multivibrator looks like a fairly simple circuit. But it's not. It took ~8 breadboard iterations and 2 destroyed transistors/pots to arrive at a working, understood astable multivibrator.
Lesson: debugging analog circuits is inherently iterative and somewhat destructive - budget spare components (transistors, pots) before starting, expect several rebuilds, and treat each failure as data rather than a setback. The goal of an early build isn't a working circuit on try one, it's a working mental model by the last try

As I discovered, theory and real world are differents things. We can culculate things, but we have to test it to see if it works. 
Lesson: never rely on theory alone - real components have tolerances and side-effects (loading, drift, parasitics) that formulas assume away. Build in margin, then test.

As I discovered, changing a single resistor value in the astable multivibrator changed whether the circuit oscillated at all, not just the oscillation frequency.
Lesson: in RC-timed switching circuits, resistor values don't just set speed - they can determine whether the switching mechanism engages at all. If a circuit isn't oscillating, don't assume it's broken; check whether bias/RC values are pushing it into a stable (non-oscillating) state instead of the intended astable one

As I discovered, potentiometers can be turned down to 0Ω - they don't have a built-in minimum. Used alone, that means a circuit can lose all current-limiting at one extreme.
Lesson: always put a fixed resistor in series with a pot to guarantee a resistance floor, or else it could fry a potentiometer.

As I discovered, some schematics omit a series resistor on a transistor's base, letting excessive current flow and destroying the junction. Also, capacitors (e.g., in astable multivibrator timing networks) can dump their stored charge into a base on switching, causing a current spike even if steady-state calculations look safe.
Lesson: always protect the base with a series resistor sized for worst-case current, not just nominal/average current - this includes transient discharge spikes, not only steady drive current.

Prototype phase: buy 10x, expect losses, treat spares as consumables.
Final phase: buy 2x, draw from prototype leftovers, treat spares as accident-insurance only.

Stable oscillator circuit for toneboard

Based upon real world measurements:
___.______._____.______.______. +9v.
   │      │     │      │ 
   █ r1   █ r5  █ r6   █ r2
   │      │ p1  │ p1   │
  LED     █<    █<     └────── + square out to buffer stage/amp
   │c1    │     |c2    
   .──||──.     .──||──.────── - square out to buffer stage/amp
   |      |     |      |
   |      |     █ r3   │ 
   |      |._▄▄_|__.*  |
   |       r4   |  │   |
T1 (█───────────┘  └──(█ T2
   │                   │
───┴───────────────────. ground.
Where:
r1: 1K
r2: 10K
r3 & r4: 480-680 ohm (can be omitted, but protects the transitor base, useful for testing!)
r5 & r6: 1K
c1 & c2: 330nf (~25hz to 4300hz+)
p1 & p2: 100k potentiometers
t1 & t2: 2N3904 transistors. (emitters to ground)
LED: LED used to test the circuits, it is the square out.
*: Also a square out signal.

NOTE: To protect trim-potentiometers, we use 1K resistors. Which is nothing in compared to a 100K potentiometer. In reality, we will use resistors instead of potentiometers to generate notes. For testing, we use potentiometers.
NOTE: We will use 330nf capacitors, which can range from as little as 1hz to more than 4000+ hz. Enough for our note per note toneboard, which may start at C2: 65hz.
NOTE: The above circuit generates two (actually 4, 2 inverted) square waves, we will only use one, perhaps later on both, but they must be synced then which might be impractical unless we introduce a tiny delay in the first unsynced square.

Result calculations.

Capacitor value

C = ln(2) x R x f, where R is resistance, f is frequency. (ln(2) = discharges through two resistors)

Transistor base resistor value

baseR ~= (vcc - vcc_drop) / max_base_current

NOTE: Use basecurrent = collectorcurrent ÷ 10 for reliable saturation.
A

Transistor collector resistor value

collR ~= (vcc - v_sat) / max_coll_current

A

Voltage Divider Bias Calculator

   +Vcc
   │
   █ R1
   │
───.─── base
   │
   █ R4
   |
 ground
V
V
V
mA



Buffer, small amplification stage

We will use a small buffer to protect the oscillator circuit and amplify it slightly, when it later is used to feed other modules.

Small buffer stage
──────.────.─────────── +9
      │    |
      █ r1 █ r2    c1
      │    |─────||──── out 
in ───┴───(█ T1 
      |    |
      █ r3 █ r4              
──────┴────┴─────────── ground
Where:
r1 ~= 73K
r2 ~= 3.2K
r3 ~= 17K
r4 ~= 1k
C1 ~= 1-10uf

Gain ~= (R_collector / R_emitter)

Ohms Ohms

Cutoff filter calculation

Low pass filter

signal ─────────.
                │
                █  r1 
                │   
     .──||──.───█< p1   
     |      |__________ v out  
     | c1              
─────┴─────────── 0

Where:
r1 ~= 100ohm
P1 ~= 1-25K
C1 ~= 0.010-10uf (rounds a signal, larger = more rounding)

fc ~= 1/2PI * (R*C)1

Ohms uF

Key frequencies

Capacitor value: uf

Root note C2:

Semi-interval value:

R = required resistor. Because of varying resistor values, instead of a fixed resistor, a trim pot for each key is probably required to (fine) tune it. Perhaps 100k trimpots for each key.



Useful Formula's used.

Basics, Ohms law. Often used.
------
V         = volts
A or I    = ampere
R         = resistance
Voltage:     V = A*R
Current:     A = V/R
Resistance:  R = V/A

Resistor (Ω) = (Battery Voltage - LED Voltage) / Desired Current

Astable multivibrator:
---------------------
Frequency:   f = 1.4 x R x C
Resistance:  R = 1.4 x f x C
Capacitor:   C = 1.4 x R x f
1.4 is the constant derived from ln(2) x 2 = 1.386 = ~1.4. (use ~1.44 for 555 timers)

Transistors
-----------
A transistor is a current gate.
Small current into the base -> large current flows from collector to emitter.
Most transitors are rated between 100ma - 200ma.
Minimum base current to start switching: ~0.05–0.1 mA (50–100 µA)
Use basecurrent = collectorcurrent ÷ 10 for reliable saturation.
Transistors can be: amplifier, switch, oscillator, current limiter, voltage regulator, signal modulator, buffer, inverter, multiplexer, current mirror, power control.

Base resistor:
-------------
baseR ~= (vcc - vcc_drop / max_base_current)

Collector resistor:
-------------
collR ~= (vcc - v_sat) / max_coll_current

Diodes
------
Diodes are voltage gates, that block <= 0.6 volts and open >= 0.6 volts
Diodes can be: rectifiers, clipper, gate, blocker, flyback, for protection.

Star Grounding
------------------------
Star grounding means all grounds connect to a single point (like the center of a star). No loop nor daisychains.
Don’t share ground wires between modules! use a thick copper bus or rail for ground, less resistance.

Constants

| Constant                  | Symbol    | Value     | Used For
|---------------------------|-----------|-----------|-----------------------
| Pi                        | π         | 3.14159   | Filter calculations 
| Two Pi                    | 2π        | 6.28318   | Angular frequency 
| Euler's Number            | e         | 2.71828   | Exponential curves
| Natural Log of 2          | ln(2)     | 0.6931    | Oscillator timing 
| Root 2                    | √2        | 1.4142    | RMS calculations
| One over Root 2           | 1/√2      | 0.7071    | -3dB filter point
| Two times ln2             | 2×ln(2)   | 1.3862    | Astable Multivibrator
| One over Two Pi           | 1/2π      | 0.15915   | RC Filter frequency
| Root 3                    | √3        | 1.7320    | State Variable Filters
| Semitone Ratio            | -         | 1.05946   | Equal temperament
| Thermal Voltage           | VT        | 26mV      | Exponential converters
| Double Voltage            | +6dB      | 6.0206    | Audio level
| Half Voltage              | -6dB      | -6.0206   | Audio level
| Ten Times Voltage         | +20dB     | 20        | Audio level
| Half Power Point          | -3dB      | -3.0103   | Filter cutoff
| Golden ratio              |           | 1.634     | Creative ideas