A charging system for a peripheral device, such as a stylus, including orientation control. The charging system includes charging circuitry and magnets. The magnets are configured so that they attract the peripheral device to an engagement surface when it is in a first orientation relative to the engagement surface so that charging circuitry in a peripheral device portion couples with charging circuitry in a charger portion. The magnets are configured so that they also repel and rotate the peripheral device when it is in a second orientation relative to the engagement surface.