A dispensing apparatus for hot beverages is provided with a device (4,5) to filter hot, pressurized water through ground edible ingredients such as coffee, tea or herbal remedies in a chamber, a controlling unit (16) storing data, and two pistons operated independently by two motors to control the volume and/or the position of the brewing chamber.