$wpdb
is a global variable. You have to take it into your function’s scope first …
global $wpdb;
$wpdb->insert();
… or access it per $GLOBALS
…
$GLOBALS['wpdb']->insert();
And I would use always lowercase keys; this is just a useful convention.