Hello and welcome to AmiBay.
First thing to look for is a leaking battery in the A1500, and in the 500 if you have a memory expansion with a real time clock. Remove them asafp, and treat the area with lemon juice (search the website for why) and clean that with IPA (leave to dry before putting...