Approximate calculation of the potential profile in a graphene-based device