Sunspots vary in number over the 11-year solar cycle. Since they are magnetic with alternating polarities each cycle, the actual periodicity is roughly 22 years. In 1919 Larmor suggested that the Sun was possibly acting as a self-excited dynamo, and since then the aim has been to find mechanisms which can generate magnetic fields with this periodicity. Over the last forty years, a theory known as mean field electrodynamics has risen to prominence. Recently however there has been debate about the theory’s applicability to the Sun, and about the way in which nonlinear feedback limits the growth of the field. Here we present a new model for the solar cycle in which magnetic fields are generated in a layer of shear at the base of the Sun’s convection zone (the so-called tachocline). The magnetic field is circulated by a meridional flow to present a time-varying bottom boundary condition to the overlying convection zone. The latter brings some of this field to the surface, where we show many observed aspects of the solar cycle are reproduced. This new mechanism provides an alternative to the mean field approach. Its advantage is that it is not necessary for the whole magnetic system to be regenerated from scratch every 22 years. This is joint work with Robert Cameron.