Here we study the factors affecting the foam generation in a planetary mixer with a series of surfactant solutions, having different dynamic surface tensions, surface dilatational moduli and bulk viscosities. The foam generation in this device consists of three well defined periods: (1) Induction period during which very slow increase of the foam volume is observed. The duration of this period depends significantly on the shear rate during foaming and on the volume of the surfactant solution; (2) Fast increase of foam volume; the rate of this process depends primarily on the shear rate and dynamic surface tension of the solutions; (3) Plateau region in which the foam volume remains constant. The experimental results show that the processes of air entrapment ends when a certain critical (dimensionless) shear stress of the foam is reached. Depending on the bulk and surface properties of the surfactant solutions, this critical stress is achieved for foams with different air volume fractions and mean bubble sizes. Thus, when solutions with higher bulk viscosity and/or higher surface modulus are used, the critical stress is reached at lower air volume fraction and with smaller bubbles. Power-law equations are shown to describe very well the effects of the foaming shear rate and solution viscosity on the final foam volume and mean bubble size.