This circuit uses a microcontroller (ATTiny85) to generate pseudo-random action potentials with adjustable frequency (probability) and afterhyperpolarization (AHP).
circuit schematic and microcontroller code:
https://www.swharden.com/wp/2017-08-20-microcontroller-action-potential-generator
fully analog action potential generator:
https://www.youtube.com/watch?v=MBwQrIVJqfs
https://www.swharden.com/wp/2017-08-12-analog-action-potential-generator-circuit/