Signal Simulation Request

Below is a starter SPICE net-list that exercises the audio path from the electret microphone input at MK1 to the switch node at SW2.
It intentionally:
  1. Models only the blocks that form a continuous signal chain between the two points (MIC → MAX9814 pre-amp → two op-amp gain stages → output switch).
  2. Uses vendor-supplied macromodels where available (MAX9814) and generic ideal op-amp models for the three ADA4807 stages (replace with proper macro-models if you have them).
  3. Applies an AC-sweep stimulus so you can view frequency response, plus a quick transient test to see waveform shape at one representative frequency (1 kHz).

Spice


* === Bone Conduction Hearing Aid v2.1 – Simplified Audio Path ===
* Units: V, A, seconds, Farads, Ohms, Henry
*---------------------------------------------------------------
* 1) AC source (simulates acoustic pressure on electret element)
VIN  N_MICIN_GND  0  AC 1 SIN 0 1 1k

* 2) Electret bias resistor (R3 2.2 k nominal)
RBiasMic  N_MICBIAS N_MICIN_GND 2200

* 3) MAX9814 pre-amp (IC4)    
*    Download “MAX9814.SUB” from Maxim → File must be in same dir.
XMAX9814 N_MICIN_GND N_MICBIAS N_MICOUT N_MAXVDD N_MAXGND MAX9814

* 4) Coupling capacitor C1 (1 µF)  
Ccouple1  N_MICOUT N_OP1_IN 1u

* 5) 1st op-amp stage – [U1](https://www.flux.ai/:handle/:documentSlug?fit=U1)  
*    Non-inverting gain set by R11 and R1/1
R11 N_OP1_IN   N_OP1_OUT 100k
Rfb1 N_OP1_OUT N_OP1_FB   10k
EOP1 N_OP1_OUT 0  N_OP1_IN N_OP1_FB  999k

* 6) Coupling / EQ network (C2/1 etc.) – simplified as single cap
Ccouple2  N_OP1_OUT N_OP2_IN 470n

* 7) 2nd op-amp stage – [U2](https://www.flux.ai/:handle/:documentSlug?fit=U2)  
EOP2 N_OP2_OUT 0  N_OP2_IN 0  400k
Rload2 N_OP2_OUT 0 100k

* 8) 3rd op-amp stage – [U3](https://www.flux.ai/:handle/:documentSlug?fit=U3)  
EOP3 N_OP3_OUT 0  N_OP2_OUT 0  200k
Rload3 N_OP3_OUT 0 10k

* 9) Output coupling cap to headphone jack / SW2
Ccouple3  N_OP3_OUT N_SW2 4.7u

*—- Power rails (5 V and 2.5 V virtual rails) ——*
V5   N_MAXVDD 0  5
V25  N_V25    0  2.5

*—- Ground references ——*
.PARAM ac_in=1  
*---------------------------------------------------------------
* AC frequency sweep 20 Hz → 20 kHz, 20 pts/dec
.AC DEC 20 20 20000
.PROBE V(N_SW2)
.PROBE V(N_MICIN_GND)
*---------------------------------------------------------------
* Transient check: 1 ms to 10 ms at 1 kHz
.TRAN 0.01m 10m
.PROBE V(N_SW2) V(N_MICIN_GND)
*---------------------------------------------------------------
.END
How to run it in Flux with Copilot
  1. Place the MAX9814.SUB file (or any other macro-models you add) in the same directory as your project’s exported net-list.
  2. Copy the entire block above into the chat after the @simulator keyword, for example:
@simulator
<paste-the-netlist-above>
  1. Copilot will parse the net-list and launch the Ngspice engine.
    • The AC analysis returns a Bode plot of magnitude & phase from MK1 to SW2.
    • The TRAN analysis provides the actual waveform at SW2 for a 1 kHz tone.
  2. If Ngspice reports missing models:
    • Replace EOPx ideal op-amps with real ADA4807 macromodels once you obtain them.
    • Verify every passive in the list exists (capacitance & resistance values).
  3. Rerun @simulator after model fixes; Copilot will display the plots and let you download raw CSV data for further processing.
Feel free to tweak component values (e.g. gain-set resistors, coupling caps) or analysis settings (different frequency spans, input amplitudes) and re-run to examine performance.
Run AC sweep
Add noise analysis
Import op-amp models
Sweep feedback gain
Import SPICE netlist
C2/2
Capacitance
10nF
PowerNet1 - 5V
R1/1
Resistance
100kΩ
PowerNet1 - 5V
C2
Capacitance
10uF
C3/3
Capacitance
10nF
R1/2
Resistance
100kΩ
R3
Resistance
2.21kΩ
PowerNet1 - 5V
C1/3
Capacitance
10nF
PowerNet1 - 5V
PowerNet2 - 2.5V BIAS
R2/3
Resistance
225kΩ
R2/2
Resistance
225kΩ
C2/1
Capacitance
10nF
R5
Resistance
150kΩ
C3/1
Capacitance
10nF
R9
Resistance
1KΩ
PowerNet2 - 2.5V BIAS
PowerNet1 - 5V
C3
Capacitance
10uF
R6
Resistance
500 Ω
PowerNet2 - 2.5V BIAS
C5
Capacitance
470nF
R7
Resistance
0.4 Ω
PowerNet1 - 5V
R1
Resistance
500 Ω
C3/2
Capacitance
10nF
C2/3
Capacitance
10nF
C4
Capacitance
0.47uF
CHRG net
C6
Capacitance
2.2uF
PowerNet2 - 2.5V BIAS
R2
Resistance
500 Ω
Rbias
Resistance
100kΩ
Rbias
Resistance
100kΩ
PowerNet1 - 5V
C7
Capacitance
1uF
C1/1
Capacitance
10nF
C1/2
Capacitance
10nF
R4
Resistance
100kΩ
R8
Resistance
1KΩ
R1/3
Resistance
100kΩ
U2
U1
U3
LED2 - Blue
J2
SW2
R11
Resistance
1MΩ
J1
MK1
U4
LED1 - Red
IC4
BATT
D1
Capacitance
12pF

To get started, talk to Flux or create a New Document.

Documents

    Documents are markdown text files which describe project goals, capture details, or even simulation outputs.

    Assets

    signature.svg

    signature.svg

    signatureDefault

    Bone Conduction Hearing Aid v2.1

    Welcome to your new project. Imagine what you can build here.

    Properties

    Properties describe core aspects of the project.

    Pricing & Availability

    Distributor

    Qty 1

    Controls