News for hackers. Stuff that matters.
Re:Digital Audio 101: Playing Audio from a Microcontroller by dvh on Thursday April 15, 2021 @03:33PM (#26825132)
I'm using this for guitar pickup (2.5H 5kOhm, 30pF, 50mV@440Hz), you can modify it to be more like dynamic speaker (e.g. 8ohm Rs, smaller L0 which you measure from actual speaker)

    .subckt sub_pickup_1 a b
    L0 a 1 2.5 NT=1
    Rs 1 b 5000
    Cp a b 3.0E-11
    Rp a b 10000000
    V1 a 2 DC 0 AC 0.01 0 SIN(0 0.05 440 0 0 0)
    R1 2 b 1
    .ends sub_pickup_1
    xL1 7 0 sub_pickup_1
Re:Digital Audio 101: Playing Audio from a Microcontroller by amelius on Thursday April 15, 2021 @06:14PM (#26826827)
Thanks, but it's not clear to me how/if you modeled the electrical losses related to emitted acoustic power.
Re:Digital Audio 101: Playing Audio from a Microcontroller by dvh on Friday April 16, 2021 @05:38AM (#26831684)
Rp is large parallel resistor across that can simulate loses I think.