apple pencil gen one temperamental for charging

has anyone else had this issue? i’ll plug my apple pencil into my ipad to charge it, but sometimes it won’t charge. it will indicate that it is connected and charging, but the battery will stay at the same value. the only constant i have noticed is that it charges when my airpods are connected.