Model and simulate a biological neuron as an electrical circuit
Planet style · 56 slides · 70 teaching minutes + 5 minutes for questions
Open the lecture · Download passive Python
The long-term goal is to simulate brain activity in response to input. Slide 2 presents the instructor-supplied 33-second video. The introduction moves through regions and cells, uses a real neuronal micrograph on slide 7, and asks students to guess neuron counts on slide 8. The quantitative goal today is a passive single-cell model and a threshold/reset extension for spike timing. Detailed channel kinetics remain for later lectures.
| Slides | Focus | Minutes |
|---|
| 1–12 | Brain-simulation goal, regions, cells, and neuron-count activity | 11.75 |
| 13–24 | From membrane to circuit | 13 |
| 25–30 | Candidate circuits | 7.5 |
| 31–36 | Current balance and equation | 8.5 |
| 37–41 | Equilibria and time constant | 6.25 |
| 42–45 | Forward Euler and passive Python | 6 |
| 46–50 | Five passive experiments | 10 |
| 51–53 | Leaky integrate-and-fire | 5 |
| 54–56 | HH preview, exit question, and references | 2 |
Presenting and interacting
Arrows/Space navigate, O opens overview, N opens notes, F toggles fullscreen, and R reveals answers. Home/End jump to first/last. Esc closes overlays. Play the video with its controls; it pauses when leaving slide 2. Reveal neuron counts independently or use R for all, then use Hide all counts to repeat the activity. Sliders and reset buttons operate the simulations. Video, micrograph, fonts, and simulation code are embedded in each presentation HTML file for offline use. The Python download remains the passive exercise.
Numerical conventions
V in mV, time in ms, current in nA, capacitance in nF, and conductance in μS. Default Cₘ=0.1 nF, gₗ=0.01 μS, Eₗ=−65 mV, τ=10 ms. Applied current is inward positive and leak is outward positive. Passive labs 1–4 use exact piecewise exponential solutions. Lab 5 compares Euler with exact unforced decay. The LIF lab uses analytical threshold crossings, immediate reset, and separate spike-event marks; it does not generate a physiological action-potential waveform.
1 / 56 · From brain activity to one cell · 0.5 min
Model and simulate a biological neuron as an electrical circuit
Begin with the long-term goal of simulating brain activity in response to input. The video on the next slide makes that goal concrete. Today develops a testable model of one cell’s electrical response, which later models can connect into circuits. One passive cell model does not explain a whole brain. The opening takes about 12 minutes, including the short video and a neuron-count guessing activity.
Source connection: NIH/NINDS Brain Basics (accessible introduction to brain function); W. Gerstner, EPFL Neuronal Dynamics, Week 1 (motivation for modeling neurons)
Open this slide
2 / 56 · From brain activity to one cell · 1.25 min
Can we simulate a brain’s response?
Play the supplied 33-second video. Ask what changes with time and what information a simulation would need to reproduce that change. The visible color scale is labeled voltage. Use it as motivation for the long-term goal, not as proof that this lecture’s passive model already explains an entire brain. The file is visual_stimuli_TC.MP4, supplied by the instructor; its model provenance, cell resolution, and anatomical details were not supplied, so do not infer that each visible mark is a neuron or name a specific biological recording method. The 1.25-minute allocation includes playback and a short discussion. Playback starts on demand and pauses when leaving the slide.
Source connection: Original teaching explanation or instructor-supplied media.
Open this slide
3 / 56 · From brain activity to one cell · 1.25 min
Brain regions have different, overlapping roles
Spend only about a minute orienting students. This is a simplified lateral view with front to the left and back to the right; only selected external regions are shown. The colored zones are approximate, not atlas boundaries. Cortex is the folded outer part of the cerebrum, not the entire brain. Mention frontal contributions to planning/movement, parietal contributions to spatial/body information, occipital visual processing, and temporal contributions to sound/memory. Cerebellum and brainstem are distinct structures. Other important deep structures are omitted. Do not ask students to memorize the labels or infer that a region owns a single function.
Source connection: OpenStax Biology 2e, §35.3: the central nervous system (cerebral cortex, cerebellum and brainstem)
Open this slide
4 / 56 · From brain activity to one cell · 0.75 min
A brain region contains cells and local circuits
Move deliberately through levels: whole brain, region, local tissue, individual cells. The inset is an illustrative network, not a measured reconstruction or a claim that one visible patch contains only these cells. Blue and amber shapes are neurons; green shapes represent glia. A complete model may need connectivity, cell diversity, glia, and interactions with the body. We will choose one part we can understand quantitatively today.
Source connection: OpenStax Biology 2e, §35.1: neurons and glial cells (neurons, glia, and diverse cellular structures)
Open this slide
5 / 56 · From brain activity to one cell · 0.75 min
Neurons are signaling cells
Avoid describing neurons as identical wires or claiming that one model represents every neuron. The shapes are illustrative, not a taxonomy lesson. Glia have several roles, including maintaining extracellular conditions, myelination, and regulation of neural communication; give a brief acknowledgement without adding new equations. Do not repeat obsolete fixed glia-to-neuron ratios or make a claim about new neurons explaining all learning.
Source connection: OpenStax Biology 2e, §35.1: neurons and glial cells (neuron diversity and glial roles)
Open this slide
6 / 56 · From brain activity to one cell · 1 min
A neuron has specialized parts
Trace the branches into the soma and along the axon to terminals. Introduce only the names used later. The soma is the cell body and contains the nucleus. This common direction of signaling is a useful introduction, not a universal rule for all neuron types or synaptic locations. The diagram is an original schematic, not microscopy.
Source connection: OpenStax Biology 2e, §35.1: neurons and glial cells (parts of a neuron); W. Gerstner, EPFL Neuronal Dynamics, Week 1 (introductory neuron structure)
Open this slide
7 / 56 · From brain activity to one cell · 1 min
A real neuron receives input at many synapses
This is a real fluorescence micrograph, not a drawing or generated image. It shows dendritic branches of a rodent hippocampal neuron, with fluorescent markers revealing spines at excitatory synapses. The colors identify labeled structures; they are not natural tissue colors or a voltage recording. The image does not show the whole cell, and not every synapse is located on a spine. Connect the branches to the parts introduced on the preceding slide. Distinguish messenger movement across the synaptic cleft from ion movement through the receiving membrane. Synaptic input often changes conductance; our controlled injected current will simplify this. Credit: Shelley Halpain, UC San Diego, via NIGMS Image Gallery 3686. Educational image use with source credit.
Source connection: Shelley Halpain, UC San Diego · NIGMS image 3686 (real dendrites and excitatory synaptic spines); OpenStax Biology 2e, §35.1: neurons and glial cells (neuronal communication); W. Gerstner, EPFL Neuronal Dynamics, Week 1 (chemical synapses)
Open this slide
8 / 56 · How large is the modeling problem? · 1.5 min
How many neurons would we need to model?
Invite estimates in powers of ten or ordinary numbers, then reveal each count independently. C. elegans: 302 neurons in the complete adult hermaphrodite nervous system, including its somatic and pharyngeal systems; this is not a count of a vertebrate-like brain. Adult female Drosophila: 139,255 neurons in the 2024 FlyWire whole-brain reconstruction, rounded here to about 140 thousand; this excludes the ventral nerve cord. Mouse: about 71 million, rounding 70.89 ± 10.41 million from adult male Swiss mice in Herculano-Houzel et al. (2006), Table 1; strain and measurement differences matter. Human: about 86 billion, from the 86.1 ± 8.1 billion estimate in Azevedo et al. (2009); it is a sample estimate, not a universal exact total. These are counts of neurons, not all brain cells. Do not interpret the numbers as a simple intelligence ranking. The comparison motivates model scale, while neuron types, synapses, connectivity, and dynamics also matter. The animal silhouettes are schematic and not to scale. Use individual buttons, R to reveal all, or Hide all counts to repeat the activity.
Source connection: Cook et al. (2019) · C. elegans connectomes (adult hermaphrodite nervous system: 302); Dorkenwald et al. (2024) · Adult fly brain connectome (adult female brain: 139,255 reconstructed neurons); Herculano-Houzel, Mota & Lent (2006) · Rodent neuron counts (Table 1: 70.89 ± 10.41 million neurons); Azevedo et al. (2009) · Human neuron counts (whole-brain estimate: 86.1 ± 8.1 billion neurons)
Open this slide
9 / 56 · From brain activity to one cell · 1 min
Electrical activity appears as changing voltage
Read the axes aloud: voltage versus time. The displayed trace is schematic, not an experimental recording or output from the passive model. Point to baseline, a graded excursion, and a spike. Define graded as varying continuously in size. A real recording uses electrodes to compare electrical potential at two locations. Later in the lecture, students learn the voltage reference and meaning of negative values. A threshold-and-reset rule will give a simple spike-timing model at the end. The active conductance mechanisms that generate the physiological waveform are reserved for later lectures.
Source connection: W. Gerstner, EPFL Neuronal Dynamics, Week 1 (membrane recordings, graded changes and spikes)
Open this slide
10 / 56 · From brain activity to one cell · 0.75 min
A connectivity map is not yet a simulation
A connectivity graph supplies structure, but a simulation also needs state variables and rules for how those states change over time. Two models can share the same connections and still produce different time courses. This is why the first quantitative step is a model of one neuron’s response. Later, such models can become components in a network simulation.
Source connection: Original teaching explanation or instructor-supplied media.
Open this slide
11 / 56 · From brain activity to one cell · 1 min
We choose one cell and a measurable prediction
Introduce current injection as a controlled, testable first step toward brain simulation. The experimenter supplies an input current and measures the neuron’s voltage relative to outside. We are not yet reproducing all properties of a synapse, a network, or sensory processing. The passive model predicts voltage, and the closing LIF extension also records firing times. Parameters and an initial condition will be introduced gradually.
Source connection: MIT 9.40, Lecture 2 (2018) (current injection and passive response); Neuronal Dynamics, §1.3: passive membrane and integrate-and-fire (one-compartment passive model)
Open this slide
12 / 56 · From brain activity to one cell · 1 min
A first model of the cell membrane
Narrow the scope from a brain simulation to one cell membrane. Use one electrical compartment with a single voltage, fixed capacitance and leak, and a prescribed input current. After deriving and simulating the passive model, add a threshold/reset rule for firing times. The following slide starts from the two ionic solutions separated by a membrane. Detailed channel gates and sodium/potassium/chloride dynamics remain for later lectures.
Source connection: Neuronal Dynamics, §1.3: passive membrane and integrate-and-fire (single-compartment passive membrane); MIT 9.40, Lecture 2 (2018) (membrane-to-circuit interpretation)
Open this slide
13 / 56 · From membrane to circuit · 1 min
The membrane separates two ionic solutions
Introduce ions as atoms or molecules with net charge, for example Na+, K+, and Cl−. Do not teach channel-specific dynamics. Both solutions contain positive and negative ions and are nearly electrically neutral in bulk. The diagram is symbolic: it does not show actual proportions or scale.
Source connection: MIT 9.40, Lecture 2 (2018) (biophysical origin of membrane circuit)
Open this slide
14 / 56 · From membrane to circuit · 1 min
Current and voltage describe different things
Use a pause to distinguish quantity and flow: charge is measured in coulombs, current in coulombs per second, and voltage in joules per coulomb. The direction of conventional current is the direction positive charge would move. Negative ions moving in the opposite direction contribute the same conventional current. No microscopic calculation is needed.
Source connection: MIT 9.40, Lecture 2 (2018) (current, charge, capacitance)
Open this slide
15 / 56 · From membrane to circuit · 1.25 min
Membrane voltage is a difference
Choosing outside as zero is a reference convention, not an assertion that the outside has no charges. The voltmeter compares two locations. A cell can have negative voltage without the bulk interior carrying a large net negative charge. Ask the sign question and reveal the answer to check understanding before proceeding.
Source connection: MIT 9.40, Lecture 2 (2018) (membrane potential and circuit reference)
Open this slide
16 / 56 · From membrane to circuit · 1 min
Ion concentrations differ across the membrane
This figure deliberately illustrates tendencies rather than numerical concentrations. Do not imply that Na+ is absent inside or K+ absent outside. Chloride and other ions exist on both sides and affect the real cell, but their dynamics are deferred. Concentration gradients represent stored chemical free energy. We will summarize their electrical effect by an effective reversal potential.
Source connection: MIT 9.40, Lecture 2 (2018) (origin of battery and ion gradients)
Open this slide
17 / 56 · From membrane to circuit · 1 min
The lipid membrane blocks easy ion crossing
Explain the drawing: round head groups face the aqueous solutions and the tails form the hydrophobic interior. This is a simplified cross-section, not a structural molecular model. The barrier matters electrically because charge can build up on opposing surfaces instead of immediately flowing across. Channels will provide the parallel pathway in a few slides.
Source connection: MIT 9.40, Lecture 2 (2018) (membrane as insulator and capacitor)
Open this slide
18 / 56 · From membrane to circuit · 1 min
A tiny charge separation creates voltage
Explicitly correct a common misconception: negative inside voltage does not require the entire cytoplasm to be strongly net negative. Only a tiny fraction of the ions is needed to produce the surface charge separation. The plus/minus excess layers are schematic. Most positive and negative charges remain balanced in the surrounding bulk solutions.
Source connection: MIT 9.40, Lecture 2 (2018) (capacitance and separated charge)
Open this slide
19 / 56 · From membrane to circuit · 1 min
The membrane acts like a capacitor
Relate the circuit plates to the two membrane surfaces. For a constant capacitance, a change obeys Δq=C_m ΔV; this incremental form helps avoid overinterpreting an absolute reference charge. Capacitance is positive. A negative V corresponds to negative signed inside surface charge in the simple capacitor convention. Mention that larger membrane area generally gives larger total capacitance.
Source connection: MIT 9.40, Lecture 2 (2018) (q = CV and membrane capacitance)
Open this slide
20 / 56 · From membrane to circuit · 1.25 min
Leak channels provide pathways for current
The arrows show possible current directions across pathways, not a quantitative ion-specific prediction. Real channels have selectivity and complex behavior; today we approximate the near-rest aggregate by an ohmic, constant-conductance leak. This effective leak may summarize several microscopic contributions. Avoid describing leak as always outward: its net direction depends on driving force.
Source connection: MIT 9.40, Lecture 2 (2018) (resistive membrane pathway); Neuronal Dynamics, §1.3: passive membrane and integrate-and-fire (leak current)
Open this slide
21 / 56 · From membrane to circuit · 1 min
Conductance measures ease of current flow
Keep the reciprocal relationship concrete. An effective membrane with more parallel paths allows more current at the same driving force. Conductance is preferred because the currents through parallel branches add. The diagram is an analogy for open channel availability, not a claim that the number of channels changes in our fixed-leak model.
Source connection: MIT 9.40, Lecture 2 (2018) (resistance and conductance); Stony Brook Neurotext: resistor, capacitor, RC tutorial (resistive current pathway)
Open this slide
22 / 56 · From membrane to circuit · 1.25 min
Two tendencies influence ion movement
Use a hypothetical positive ion more concentrated inside with diffusion tending outward. A negative inside voltage gives an electrical attraction inward. The diagram is qualitative, not a statement of the sign of every real ion current. These tendencies can balance. We will use a reversal potential to describe the balance without deriving the Nernst equation in this lecture.
Source connection: MIT 9.40, Lecture 2 (2018) (diffusion and electrical forces)
Open this slide
23 / 56 · From membrane to circuit · 1.25 min
A reversal potential shifts the zero-current voltage
Point out that the resistor and battery form one series branch between inside and outside. They are not independent parallel elements. For an illustrative E_L=−65 mV, the drawn battery polarity is negative toward inside and positive toward outside. The battery is a model of electrochemical driving forces and maintained gradients, not a literal device inside the cell. At aggregate leak reversal, individual microscopic fluxes need not each be zero.
Source connection: MIT 9.40, Lecture 2 (2018) (battery origins); Neuronal Dynamics, §1.3: passive membrane and integrate-and-fire (leak reversal potential)
Open this slide
24 / 56 · From membrane to circuit · 1 min
Pumps maintain the gradients over time
The schematic shows Na+ transport outward and K+ inward, powered by ATP. It is qualitative and does not depict stoichiometry. Pumps do contribute current in real cells, but we do not add a pump equation today. Avoid telling students that the pump rapidly resets each action potential. Our fixed-reversal-potential approximation assumes the concentration reservoirs do not change appreciably during these short simulations.
Source connection: MIT 9.40, Lecture 2 (2018) (ion gradients and pumps)
Open this slide
25 / 56 · What circuit matches the experiment? · 1 min
An experiment gives us an input and a response
Introduce ideal current clamp: the experimenter controls injected current and observes voltage. This is distinct from voltage clamp, which is not needed today. Our traces are generated by the passive model, not digitized experimental data. The experiment is the motivating thought experiment for comparing candidate circuits.
Source connection: Stony Brook Neurotext: resistor, capacitor, RC tutorial (response to current pulse); MIT 9.40, Lecture 2 (2018) (current injection)
Open this slide
26 / 56 · What circuit matches the experiment? · 1 min
A passive response has a shape to explain
Ask students to name what changes at t=10 and t=60 ms. Voltage is continuous for a finite current step, although its slope changes. During input it approaches a plateau; after input it returns toward the baseline. Keep this reference shape in mind as we test simpler circuit candidates.
Source connection: Stony Brook Neurotext: resistor, capacitor, RC tutorial (passive RC response comparison)
Open this slide
27 / 56 · What circuit matches the experiment? · 1.25 min
Candidate 1: a resistor and a battery
Keep the circuit visible while students predict the voltage response. The source injects a 0.1 nA pulse from 10 to 40 ms through the resistor–battery branch; R=100 MΩ and E_L=−65 mV. Reveal the immediate jump and return. The circuit captures the long-input level but has no charge-storage element, so it cannot explain a gradual time course.
Source connection: Stony Brook Neurotext: resistor, capacitor, RC tutorial (resistor-only candidate)
Open this slide
28 / 56 · What circuit matches the experiment? · 1.25 min
Candidate 2: a capacitor alone
Keep the isolated-capacitor circuit visible during the prediction. Start at −65 mV, inject 0.1 nA from 10 to 40 ms, and use C=0.1 nF. Reveal the linear voltage ramp followed by a constant voltage after input stops. With no discharge pathway, the capacitor cannot return to baseline. Its starting voltage is an initial condition, not a value selected by a battery.
Source connection: Stony Brook Neurotext: resistor, capacitor, RC tutorial (capacitor-only candidate)
Open this slide
29 / 56 · What circuit matches the experiment? · 1.5 min
The capacitor and leak branch share one voltage
Trace the two branches from the inside node to the outside reference. The capacitor and the whole leak branch experience the same membrane voltage V. Within the leak branch the resistor and E_L battery are in series. This distinction prevents a common incorrect circuit drawing. The ideal current source supplies applied current into the inside node.
Source connection: Stony Brook Neurotext: resistor, capacitor, RC tutorial (parallel RC model); MIT 9.40, Lecture 2 (2018) (equivalent membrane circuit)
Open this slide
30 / 56 · What circuit matches the experiment? · 1.5 min
Three candidates, one current pulse
Use the common voltage scale to make comparison fair, even though the RC curve appears smaller. All models start at −65 mV, receive 0.1 nA from 10 to 40 ms, and share R=100 MΩ/C=0.1 nF where relevant. This comparison follows the pedagogical idea of Stony Brook’s applet but uses original charts and implementation. Ask which added mechanism explains each missing feature.
Source connection: Stony Brook Neurotext: resistor, capacitor, RC tutorial (three-candidate comparison)
Open this slide
31 / 56 · From circuit to equation · 1.5 min
Applied current splits between two branches
Explain signs precisely: I_app is inward positive, while I_C and I_L are branch currents from the inside node toward the outside. Capacitive current is the circuit representation of changing surface charge, not ions crossing the insulating lipid interior. The plotted exact RC step begins at V=E_L; I_C=I_app exp(−t/τ) and I_L=I_app[1−exp(−t/τ)]. Their sum is constant. At steady state I_C=0. At pulse offset the applied current becomes zero but the branch currents can remain nonzero and cancel.
Source connection: Stony Brook Neurotext: resistor, capacitor, RC tutorial (capacitive versus resistive current during charging); MIT 9.40, Lecture 2 (2018) (current conservation)
Open this slide
32 / 56 · From circuit to equation · 1.5 min
Changing voltage requires capacitive current
This is the first explicit use of calculus: differentiate q=C_m V, holding C_m constant. Name the derivative as a rate in mV/ms. In the circuit sign convention, outward-oriented capacitive branch current equals C_m dV/dt; it represents the increase of signed charge on the inside capacitor plate. Use the net-current language to avoid saying all applied current always goes to the capacitor.
Source connection: MIT 9.40, Lecture 2 (2018) (capacitive current derivation)
Open this slide
33 / 56 · From circuit to equation · 1.5 min
Leak current depends on the driving force
Use the slider to compare V above, equal to, and below E_L. At −55 mV, driving force is +10 mV and outward I_L=+0.1 nA, so leak alone lowers V. At −75 mV, I_L=−0.1 nA, which is inward conventional current and raises V. At −65 mV, net leak is zero. The interactive arrow reports conventional aggregate current rather than the movement of a specific ion. This is why leak is restoring rather than always outward.
Source connection: Neuronal Dynamics, §1.3: passive membrane and integrate-and-fire (ohmic leak current); MIT 9.40, Lecture 2 (2018) (conductance and reversal)
Open this slide
34 / 56 · From circuit to equation · 1.25 min
Substitute each branch current
Make the substitution visibly, one branch at a time. The differential equation is not a new empirical formula inserted without explanation: it follows from conservation plus the capacitor and leak assumptions. Check that the signs match slide 32. Do not introduce gated conductances yet.
Source connection: MIT 9.40, Lecture 2 (2018) (derivation of the passive membrane equation); Neuronal Dynamics, §1.3: passive membrane and integrate-and-fire (current conservation)
Open this slide
35 / 56 · From circuit to equation · 1.25 min
Our complete passive membrane model
Move leak to the right to get the equation we will simulate. State, input, parameters and initial condition are different roles. Emphasize that a positive inward input and a negative inward leak both raise the signed voltage through the equation. This is one first-order ordinary differential equation. The full HH model later adds active current branches and equations for their state variables.
Source connection: Neuronal Dynamics, §1.3: passive membrane and integrate-and-fire (passive membrane equation §1.3.1)
Open this slide
36 / 56 · From circuit to equation · 1.5 min
Choose a consistent set of units
A frequent programming error is mixing mV with volts or ms with seconds. These chosen prefixes are mutually consistent: 1 nF·1 mV/ms=1 nA and 1 μS·1 mV=1 nA. The illustrative C=100 pF and R=100 MΩ correspond to these defaults and τ=10 ms. Do not mix these total values with capacitance density such as μF/cm².
Source connection: Stony Brook Neurotext: resistor, capacitor, RC tutorial (illustrative 100 pF / 100 MΩ membrane); Neuronal Dynamics, §1.3: passive membrane and integrate-and-fire (parameter conventions)
Open this slide
37 / 56 · What the equation predicts · 1.25 min
Without input, voltage moves toward Eₗ
Ask students to determine the derivative sign without solving the equation. The two trajectories start above and below E_L and return to the same stable equilibrium. Restrict the equality “rest=E_L” to this passive leak-only zero-input system. Real resting voltages reflect multiple conductances and active transport.
Source connection: Neuronal Dynamics, §1.3: passive membrane and integrate-and-fire (unforced passive membrane)
Open this slide
38 / 56 · What the equation predicts · 1.25 min
A constant input sets a new equilibrium
Set dV/dt=0, then solve the algebra. The plateau depends on input and leak conductance, but not capacitance. The battery sets the baseline offset. A finite pulse may end before the curve reaches this limit, so distinguish the asymptotic plateau from the observed peak during a short pulse. The dashed guide marks −55 mV.
Source connection: MIT 9.40, Lecture 2 (2018) (steady state of RC circuit); Stony Brook Neurotext: resistor, capacitor, RC tutorial (resistive final voltage)
Open this slide
39 / 56 · What the equation predicts · 1.25 min
The time constant sets the response speed
Connect the ratio to the physical story: more charge to move means slower voltage change, while a stronger leak means faster relaxation. The units nF/μS are ms. R_L=1/g_L gives the familiar RC product. τ describes decay of a voltage deviation from equilibrium, not the duration of a spike or the time needed for exactly complete recovery.
Source connection: MIT 9.40, Lecture 2 (2018) (RC time constant); Neuronal Dynamics, §1.3: passive membrane and integrate-and-fire (membrane time constant)
Open this slide
40 / 56 · What the equation predicts · 1.25 min
After one τ, 63% of the voltage change is complete
Present the exponential solution as a useful check, not a derivation requirement. The start of time is reset to the onset of a constant current segment. In one τ the remaining gap is e^-1≈37%, so the completed change is about 63%. Show that the plotted initial value and final target agree with earlier slides. Students will use this reference to evaluate their code.
Source connection: MIT 9.40, Lecture 2 (2018) (exponential charging); Neuronal Dynamics, §1.3: passive membrane and integrate-and-fire (analytical passive solution)
Open this slide
41 / 56 · What the equation predicts · 1.25 min
After input stops, 37% remains after one τ
There is no active “reset switch” in this passive model. Leak current changes the capacitor’s charge and voltage relaxes toward E_L. The formula begins from the actual voltage at offset, which need not have reached the charging plateau. This slide uses exactly −55 mV as a clean initial condition for a no-input example.
Source connection: MIT 9.40, Lecture 2 (2018) (exponential relaxation); Stony Brook Neurotext: resistor, capacitor, RC tutorial (passive recovery)
Open this slide
42 / 56 · From equation to program · 1.25 min
A derivative gives a small-step prediction
Bridge calculus to a loop. The derivative is local; forward Euler approximates the next short interval with that tangent slope. The approximation becomes better as the step is reduced for this smooth dynamics, provided input discontinuities are handled appropriately. We will later use a no-input decay to isolate numerical error from pulse timing.
Source connection: Original teaching explanation or instructor-supplied media.
Open this slide
43 / 56 · From equation to program · 1.25 min
Forward Euler gives an explicit update
Read the update aloud in plain language, matching the user’s preferred endpoint. The next voltage is the current voltage plus timestep times current slope. Highlight that forward Euler evaluates the RHS at the old t and V. The time index k labels samples, not potassium; later HH notation uses K for potassium as an ion label.
Source connection: Original teaching explanation or instructor-supplied media.
Open this slide
44 / 56 · From equation to program · 1.5 min
One step by hand
Give a brief think-pair pause. A common error is to multiply g by V alone and forget E_L. At rest the initial leak is zero. Another is to confuse 0.1 ms with 0.1 seconds. The positive voltage increment is consistent with inward positive applied current. On the next step, the leak partially opposes the input.
Source connection: Original teaching explanation or instructor-supplied media.
Open this slide
45 / 56 · From equation to program · 2 min
The equation becomes a short Python loop
Walk through initialization, time grid, pulse condition, leak, slope, and update. The pedagogical snippet stores 1001 states; its final update is unused. The downloadable program handles the final time explicitly, supports parameters, writes CSV and a standalone SVG, and includes self-tests. The HTML labs run the same ODE in JavaScript so they work offline immediately; the Python program is for students to modify independently.
Source connection: Original teaching explanation or instructor-supplied media.
Open this slide
46 / 56 · Explore the model · 2 min
Lab 1 · Change the current pulse
Spend about two minutes on prediction then manipulation. Increase amplitude at fixed duration, then increase duration at fixed amplitude. Voltage axes remain fixed from −85 to −40 mV, and the current strip uses a fixed 0.2 nA scale, so comparisons are honest. The exact reference solver handles pulse edges at their true times. A short input does not reach the asymptotic target. A long input gives a visible plateau. Negative input illustrates hyperpolarization without introducing inhibition-specific mechanisms.
Source connection: Stony Brook Neurotext: resistor, capacitor, RC tutorial (current pulse experiment); Neuronal Dynamics, §1.3: passive membrane and integrate-and-fire (step response)
Open this slide
47 / 56 · Explore the model · 2 min
Lab 2 · Change the capacitance
Use low, default, and high capacitance. The displayed target remains constant and τ updates. Clarify that changing the capacitance alone here is a controlled mathematical experiment; changing biological membrane area could also change total leak conductance. Holding all other parameters fixed is crucial to the interpretation.
Source connection: Neuronal Dynamics, §1.3: passive membrane and integrate-and-fire (capacitance and time constant)
Open this slide
48 / 56 · Explore the model · 2 min
Lab 3 · Change the leak conductance
Compare g=0.005, 0.01, and 0.02 μS. At 0.005 the long-input target is −45 mV and τ=20 ms; at 0.02 the target is −60 mV and τ=5 ms. The current onset slope is unchanged when starting exactly at E_L, because initial leak is zero, even though the full time course and target differ. State this if students ask.
Source connection: Neuronal Dynamics, §1.3: passive membrane and integrate-and-fire (conductance, gain and time constant)
Open this slide
49 / 56 · Explore the model · 2 min
Lab 4 · Bring two inputs closer together
Introduce the timing question here, after students have developed the passive model. The gap is measured between the end of the first pulse and start of the second, not onset-to-onset. At zero gap the pulses form one continuous 16 ms pulse. The displayed second-peak voltage is computed from the exact solution. There is no threshold or spike here. Summation refers to the linear response to currents and does not imply every real synapse is a prescribed-current source.
Source connection: W. Gerstner, EPFL Neuronal Dynamics, Week 1 (temporal integration); Neuronal Dynamics, §1.3: passive membrane and integrate-and-fire (linear passive membrane response)
Open this slide
50 / 56 · Explore the model · 2 min
Lab 5 · Check the numerical timestep
This diagnostic uses no input pulse and V(0)=−55 mV, so pulse-edge sampling cannot confound numerical accuracy. Exact decay is the reference. Error evolution for Euler is multiplied by 1−Δt/τ per full step. Between τ and 2τ, the numerical deviation alternates sign while shrinking; at 2τ it does not decay; above 2τ it grows. Δt=τ reaches E_L in one numerical step, which is stable but inaccurate. A final partial step ends at exactly 100 ms. The axes autoscale if unstable values require it, and the interface states that clearly.
Source connection: Original teaching explanation or instructor-supplied media.
Open this slide
51 / 56 · From passive voltage to spike timing · 1.5 min
Leaky integrate-and-fire adds a threshold rule
Connect the new model directly to the equation students already simulated. It is the leaky integrate-and-fire model, abbreviated LIF. Explain that a threshold crossing records an event and an immediate reset changes the state. The reset voltage is below threshold. The example has no refractory period. This abstraction is useful for spike timing, while detailed active membrane currents remain for Hodgkin–Huxley in the following lecture.
Source connection: Neuronal Dynamics, §1.3: passive membrane and integrate-and-fire (§1.3.3: threshold firing and reset)
Open this slide
52 / 56 · From passive voltage to spike timing · 1.5 min
Integrate, reach threshold, reset, and repeat
Follow the first blue segment until it reaches the dashed threshold. A gold event mark appears in the separate raster. The next blue segment begins immediately at reset; the green arrow denotes this imposed jump. Sustained sufficient current can repeat the cycle. After the input ends, passive relaxation resumes. No tall spike is inserted into the voltage trace, so the diagram does not suggest a resolved physiological spike shape.
Source connection: Neuronal Dynamics, §1.3: passive membrane and integrate-and-fire (§1.3.3: firing times and repeated integration)
Open this slide
53 / 56 · From passive voltage to spike timing · 2 min
Live LIF model · From no firing to repeated firing
Start with I=0.2 nA and threshold −50 mV, then lower the current to 0.1 nA to show no firing. Increase current and compare the spacing of events. A threshold closer to reset generally requires less charging per event. When the constant-input equilibrium is at or below threshold, an initially lower voltage never reaches threshold in finite time. A brief pulse may also end before a threshold crossing. This lab finds crossing times analytically; plotting resolution does not determine spike times. The downloadable Python example remains the passive membrane exercise.
Source connection: Neuronal Dynamics, §1.3: passive membrane and integrate-and-fire (§1.3.3: threshold model, explored with the lecture’s simulation)
Open this slide
54 / 56 · Where the next lecture begins · 0.75 min
What Hodgkin–Huxley adds
Contrast the modeling goals. LIF retains passive integration and adds a prescribed threshold/reset event rule. Hodgkin–Huxley instead explains the action-potential time course through voltage-dependent ionic currents and evolving channel states. Current conservation and membrane capacitance remain the same framework. Keep the m,h,n equations and sodium/potassium kinetics for the next lectures. The displayed spike is schematic, not a Hodgkin–Huxley simulation.
Source connection: Neuronal Dynamics, §1.3: passive membrane and integrate-and-fire (§1.3.3: imposed threshold/reset); W. Gerstner, EPFL Neuronal Dynamics, Week 1 (active versus simplified spiking models)
Open this slide
55 / 56 · Where the next lecture begins · 0.75 min
Exit question: explain a changed response
Allow students to answer before revealing. A larger g_L is one explanation within the fixed-parameter passive model, not a unique diagnosis of a real experiment. Ask them to name an assumption behind the answer. If time is short, use this as the final verbal question and leave the reference slide visible during discussion.
Source connection: Original teaching explanation or instructor-supplied media.
Open this slide
56 / 56 · References and further exploration · 0.5 min
References for the brain-to-circuit story
The core teaching references remain MIT 9.40, Stony Brook Neurotext, and EPFL Neuronal Dynamics. The comparison slide and microscopy slide include dedicated source links in their notes. The opening video was supplied by the instructor. The neuronal micrograph is credited to Shelley Halpain, UC San Diego / NIGMS. Other diagrams are original schematics, passive curves and LIF events are model computations, and the displayed action-potential waveform is schematic. The downloadable Python is the passive exercise.
Source connection: MIT 9.40, Lecture 2 (2018) (primary teaching reference); Stony Brook Neurotext: resistor, capacitor, RC tutorial (primary teaching reference); W. Gerstner, EPFL Neuronal Dynamics, Week 1 (primary teaching reference); Neuronal Dynamics, §1.3: passive membrane and integrate-and-fire (supporting text); OpenStax Biology 2e, §35.3: the central nervous system (brain overview); OpenStax Biology 2e, §35.1: neurons and glial cells (cells and glia); NIH/NINDS Brain Basics (accessible brain introduction); Cook et al. (2019) · C. elegans connectomes (opening activity or image source); Dorkenwald et al. (2024) · Adult fly brain connectome (opening activity or image source); Herculano-Houzel, Mota & Lent (2006) · Rodent neuron counts (opening activity or image source); Azevedo et al. (2009) · Human neuron counts (opening activity or image source); Shelley Halpain, UC San Diego · NIGMS image 3686 (opening activity or image source)
Open this slide
Current teaching edits live in src/content-revision.js. The original snapshot in upstream/ remains available for comparison. Rebuild with node build.mjs.