Chip-bsed single atom detector