Dependence of Barkhausen noise on grain size in ferromagnetic materials