A spin-filter device based on armchair graphene nanoribbons