How a bicycle dynamo works