A pneumatic compressor capable of supplying compressed gas to a pneumatic
tool. The compressor can be powered alternatively by either a battery or
an AC power source. The compressor comprises a permanent magnet DC
electric motor and circuitry for converting the AC power source to DC
power. The compressor includes a receptacle for accommodating one or more
of a plurality of batteries and includes circuitry for using batteries
having different voltages. The AC power source may also be used to charge
a battery connected to the compressor.