A miniature, battery-like device is described for the generation of gases or as a power source or battery. The generation of carbon dioxide and hydrogen by electrochemical decomposition of an aqueous oxalic acid solution is detailed. One of the electrodes of the internally located electrochemical cell is in intimate contact with the cathode cap of the device, while the other electrode is under compression from an internal spring of variable length which is in electrical contact with the anode cap. The low-cost device is easy to fill and assemble. It can be used for the controlled release of small quantities of fluid, delivered at low flow rates for long periods of time, such as pheromones, fragrances, insecticides, pesticides. It can also be used as power source using liquid fuels such as methanol and ambient air as a source of oxygen.