Capacity detection