We propose that the non-perturbative part of the fragmentation function describing the transition from a heavy quark to a heavy meson is proportional to the square of the produced meson wave function at the origin, taking into account hyperfine interactions. We analyze the effects of this proposal on the number of pseudoscalar mesons compared to the number of vector mesons produced and find a good agreement with experimental data. Finally, we discuss further experimental checks for our hypothesis.Facultad de Ciencias Exacta