A generator section of a fuel cell comprises an electromotive unit, a fuel
tank, a passage through which fluids, including fuel, water, and air, are
circulated, and a valve mechanism in the passage. A control section has a
connector connectable to an electronic device and controls operation of
the generator section. A locking mechanism has a locking member, movable
between a locking position in which the electronic device connected to
the connector is locked in a connected position and a release position in
which the electronic device is unlocked, and an eject member which moves
the locking member to the release position. The control section has a
detector which detects movement of the eject member and a valve drive
unit which closes the valve mechanism of the generator section when the
movement of the eject member is detected by the detector.