A generator for a human powered vehicle comprises a hub shaft structured
to be mounted to the human powered vehicle, a hub shell mounted to rotate
relative to the hub shaft, a power generating mechanism including a coil
and a magnet that rotate relative to each other, and a rotating member
structured to rotate relative to the hub shaft, wherein at least one of
the coil or the magnet rotate together with the rotating member. A
transmission communicates rotation from an input member to an output
member corresponding to a plurality of gear ratios, and a switching unit
couples the rotating member to the transmission so that the rotating
member rotates at a plurality of speeds relative to the hub shell.