
Hodgkin Huxley Model
, 7 min read
I had such a poor understanding of some of the background needed for neurodynamics such as electricity, circuits (hey I’m a software person), biochemistry, and dynamical systems, that I watched several Youtube videos about this model of the neuron before I finally admitted that I needed to read up on the basics of those topics, because I really just didn’t understand anything. Here’s what I found was missing in my understanding.
Current
“Current” broadly refers to the movement of charged particles and is measured in amps. It tells us how much electric charge (measured in Coulombs) moves past a certain point in space per second. I kind of liken it to water flowing in a stream, where if you have a very deep stream you will have more water flowing, and thus more current. In neurons, current can be injected, synaptic, or ionic. Ionic current is ions passing into and out of the neuron through channels in the cell membrane.

Voltage
I didn’t know this before, but “voltage” and “volts” refer to different things. “Volts” are a unit of electric potential, which basically means the amount of work (measured in Joules, or kg·m²/s²) it takes per Coulomb of charge to move a charged particle from some reference point to where it is. So electric potential is actually a property of space, and one point of space will have a different electric potential than another based on the charges around it. “Voltage” refers specifically to the difference in electrical potential between two points in space.
So in the context of neurons, you can have an electric potential on one side of the cell membrane, and a different electric potential on the other side, and the voltage is the difference between these potentials. It is also called the membrane potential. I personally find this a little confusing because this thing we call the “membrane potential” is itself a difference between two potentials, but that’s the nomenclature.
Resistance / Conductance
Resistance is a measure of how much a material opposes the flow of electric current. For example, a copper-nickel wire has a lower resistance than a nickel-chrome-iron wire of the same size, just because of the material.
In the context of neurons, resistance’s inverse, conductance, is used more often. Each kind of ion channel has a conductance, which is basically how easily ions can pass through it.
Current and Voltage
In a simple circuit, current, voltage and resistance are tied together by Ohm’s Law, V = IR. You can play with it here:
Interactive Circuit Demo
Current: 0.050 Amperes
Following Ohm's Law: I = V/R = 5V/100Ω = 0.050A
Raise the voltage with the resistance held fixed and the current goes up. Raise the resistance with the voltage held fixed and the current goes down.
Capacitance
Another thing I had to wrap my head around was capacitance. I think of it like a rubber balloon that can stretch to hold stuff temporarily. The cell membrane holds charge separation, meaning different amounts of charged particles (ions) on either side.
The membrane is made of fatty molecules called phospholipids that repel water, so ions can’t easily cross it. When ions build up on either side, you get a voltage across the membrane, a bit like a tiny battery. The capacitance sets how quickly that voltage can change. A bigger balloon takes longer to fill.
Ion Channels
The green, blue, and orange shapes in the first image are ion channels, proteins embedded in the membrane that let particular ions through. The two kinds in the picture are:
-
Voltage-gated channels (the green sodium and blue potassium ones), which open and close depending on the voltage across the membrane. It’s like a door that opens on its own once enough pressure builds up on one side.
-
Mechanically-gated channels (the orange one), which open when they’re physically pushed or stretched. Think of those push-to-open doors at supermarkets.
Ions
The second image shows the main ions involved:
- Sodium (Na⁺), mostly outside the cell
- Potassium (K⁺), concentrated inside the cell
- Chloride (Cl⁻), mainly outside
- Large negative molecules (A⁻), stuck inside
Because they’re unevenly distributed, it’s a bit like having a bunch of compressed springs. When channels open, ions move through them, pushed by two things:
- Their concentration gradient (from where there’s more to where there’s less)
- Their electrical gradient (positive charges are drawn toward negative areas and vice versa)
The Model
Now imagine the neuron’s membrane as a circuit, where each part stands in for something biological.
-
The membrane is a capacitor. It stores charge separation. Current flowing into a capacitor changes its voltage according to:
where is the capacitive current, is the membrane capacitance, and is how fast the voltage is changing.
-
Ion channels are variable resistors. Or, flipping it around, variable conductors. The current through a channel is:
where:
- is the conductance (how easily ions can flow)
- is the membrane voltage
- is the equilibrium voltage for that ion (the voltage at which there’s no net flow)
-
There are three kinds of channel in the model.
-
Leak channels are always open, with a constant conductance. They’re basically holes that always let a small trickle of ions through.
-
Voltage-gated sodium channels have two types of gates:
- Activation gates (‘m’) open quickly when voltage increases
- Inactivation gates (‘h’) close slowly when voltage increases The combined conductance is , where is the maximum possible conductance.
-
Voltage-gated potassium channels only have activation gates (‘n’):
-
-
The total current is the sum of the parts.
where and are the leak conductance and voltage.
-
Each gating variable has its own dynamics. The variables m, h, and n follow:
where x is m, h, or n, and and are rate constants that depend on voltage.
Here’s the order things happen in:
- When voltage starts to increase, sodium channels begin to open (m increases)
- This lets more sodium in, which pushes the voltage up further
- Then the sodium channels start to inactivate (h decreases)
- Meanwhile, potassium channels slowly open (n increases)
- Together these bring the voltage back down
- The cycle can then repeat
Hodgkin and Huxley also measured the parameters themselves. They worked on the giant axon of the squid (hence the squid in the cover image), using a voltage clamp to hold the membrane at fixed voltages and record the current. By replacing the sodium in the surrounding solution, they could separate the sodium current from the potassium current and fit each one on its own.
Running the Model
With the right parameters, the model produces an action potential when enough current is injected:
- A rapid upstroke (sodium rushing in)
- A peak around +40 mV
- A rapid downstroke (sodium channels inactivating, potassium channels opening)
- A stretch where it’s harder to fire another spike (the refractory period)
I was surprised that a handful of equations, each about one kind of channel following fairly simple rules, is enough to get the all-or-nothing spikes neurons use to signal.
Coming from software, I noticed a couple of other things. A continuous, analog system (the membrane voltage) ends up producing something close to digital output, since a spike either happens or it doesn’t. And the gating variables reminded me of the gates in LSTMs and other neural networks, even though they work quite differently.