A simple model for the solar cycle