How to create field collection item fields programmatically?
This works for me (my field collection is called field_fc_test). I imagine the problem is with the way you are calling field_create_instance. 

$new_field = array(
  'field' =&gt; array(
    'field_name' =&gt; 'name_of_my_field',
    'type' =&gt; 'text',
    ),
  'instance' =&gt; array(
    'field_name' =&gt; 'name_of_my_field',
    'entity_type' =&gt; 'field_collection_item',
    'bundle' =&gt; 'field_fc_test',
    'widget' =&gt; array('type' =&gt; 'text_textfield'),
  ),
);
field_create_field($new_field['field']);
field_create_instance($new_field['instance']);