The generation of an action potential occurs in 4 main steps (resting potential, depolarisation, repolarisation and hyperpolarisation). At resting potential, the membrane potential is about -70mV. A stimulus will cause voltage-gated sodium ion channels to open, so sodium ions will diffuse into the neurone, which raises the membrane potential above -70mV. When the membrane potential reaches the threshold level (around -55mV), more sodium ion channels open, so that more sodium ions diffuse into the neurone and the membrane potential is raised even more. This is an example of positive feedback. Depolarisation occurs when the inside of the membrane becomes more positively charged than the outside, due to the positive charge of the sodium ions. This reversal of potential creates the electrical impulse. When the membrane potential reaches around +30mV, the sodium ion channels will close and the voltage-gated potassium ions will open. This causes repolarisation, as the charge of the inside of the membrane causes potassium ions to diffuse out of the neurone, reducing the membrane potential. The voltage-gated potassium ion channels will only close when the potential reaches around -80mV, below resting potential. The ionic balance (resting potential) is restored by the sodium-potassium pump, which pumps 3 sodium ions out of the neurone for every 2 potassium ions it pumps into the neurone. This is an all-or-nothing response, so impulses of different magnitudes are not produced. If the stimulus reaches the threshold potential, an impulse will be generated. The refractory period is the span of time where a second stimulus will not be able to cause an impulse.