How to add content programmatically to a field collection that it's in an entity (build with eck)
The problem here is that entity_load returns an array, not the single entity. So you should do something like this :

$entities = entity_load('formulario',array($id));
$entity = end($entities);


and then the rest of your code ...