Analog voltmeters and ammeters are modified galvanometers, that can measure current. A galvanometer consists of a coil, wrapped around a magnet, to which a pointer is attached. When electricity passes through the coil, an opposing magnetic field is created, which makes the coil move. The moving coil compresses a spring attached to it, which subsequently deflects the pointer attached to it. Thus, a galvanometer can be calibrated to measure current and voltage, with some modifications.