Action Potential Simulator
Equations in this simulation
| V | membrane potential (inside minus outside) | rests at −65 mV; a spike takes it to about +40 mV for a millisecond | |
|---|---|---|---|
| C_m | membrane capacitance | 1 µF/cm²: the thin lipid layer stores charge like a capacitor | |
| I_stim | Stimulus current I_stim (µA/cm²) | injected while the pulse lasts | |
| g_Na, g_K, g_L | maximum conductances | 120, 36 and 0.3 mS/cm² in the squid giant axon, scaled by the share of channels working | |
| I_Na, I_K | sodium and potassium currents | negative is inward: sodium rushes in on the way up, potassium flows out on the way down |
With the current values:
| E_Na | sodium equilibrium potential | Na⁺ is about 8 times as concentrated outside, so it is pulled in until the inside reaches about +50 mV | |
|---|---|---|---|
| E_K | potassium equilibrium potential | K⁺ is about 24 times as concentrated inside, so its channels pull the voltage toward −77 mV | |
| T | Temperature T (°C) | raises RT ÷ F a little and speeds every gate by 3 times per 10 °C |
With the current values:
| m | sodium activation gate | opens fast as the voltage rises: the positive feedback that makes the spike | |
|---|---|---|---|
| h | sodium inactivation gate | closes more slowly and stays shut for a few ms: the refractory period | |
| n | potassium activation gate | opens slowly and brings the voltage back down, overshooting below rest | |
| φ | temperature factor 3^((T − 6.3) ÷ 10) | Hodgkin and Huxley measured at 6.3 °C |
| I_threshold | found by trying stimuli | a spike is all or nothing: below the threshold the membrane recovers, above it the full spike fires whatever the stimulus |
|---|
With the current values:
How to use the action potential simulator
- The membrane starts at rest, about −65 mV, and receives one stimulus pulse. Sodium channels (blue) open, yellow Na⁺ ions pour in, the voltage spikes, then the potassium channels (orange) open and purple K⁺ ions flow out to bring it back down. The membrane strip glows red during the spike.
- Lower the stimulus current below the threshold shown under the picture and press Stimulate: the voltage bumps up and falls back with no spike. Above it, the full spike fires every time, whatever the strength. That is the all-or-nothing law.
- Tick Repeat the stimulus and raise the rate to see the refractory period: past a few hundred pulses per second the membrane cannot fire for every one. Block the sodium channels (TTX) or the potassium channels (TEA), or warm the membrane, and watch the spike change shape on the charts of the voltage, the gates and the currents.
Frequently asked questions
What causes an action potential?
Voltage-gated sodium channels. A small depolarization opens a few of them; sodium flows in and depolarizes the membrane further, which opens more: positive feedback that drives the voltage up toward the sodium equilibrium potential, about +50 mV. Within a millisecond the sodium channels inactivate and the slower potassium channels open, so potassium flows out and the voltage falls back, briefly below rest.
What is the threshold?
The voltage, or the stimulus, at which the sodium inflow outruns the potassium and leak currents that oppose it, so the positive feedback takes over. Here it is given as the smallest stimulus current that fires a spike for the chosen pulse length; a shorter pulse needs a stronger current.
What is the refractory period?
For about a millisecond after a spike no stimulus can fire another, because the sodium channels are inactivated (the h gate is shut): the absolute refractory period. For a few milliseconds more a stronger than usual stimulus is needed, while h recovers and the potassium channels are still open: the relative refractory period. It limits how fast a neuron can fire and makes spikes travel in one direction along an axon.
What are the Hodgkin–Huxley equations?
The model Alan Hodgkin and Andrew Huxley fitted to their measurements on the squid giant axon in 1952, for which they shared the Nobel Prize. It treats the membrane as a capacitor with sodium, potassium and leak conductances in parallel, with gates m, h and n opening and closing at voltage-dependent rates. The simulation integrates their equations, with their original parameters, in steps of 0.01 ms.
It says WebGL is turned off.
The 3D view needs WebGL, which every current browser has. It can be switched off by hardware acceleration being disabled in the browser settings, or by a very old graphics driver. Turn hardware acceleration on, or try another browser.
Is anything uploaded?
No. The simulation is drawn by your own browser with WebGL; nothing is sent anywhere, and it keeps working offline once the page has loaded.