A method of using radio frequency identification (RFID), in particular ultra high frequency (UHF) RFID, is described, which keeps pets from accessing forbidden areas. The pet wears a device which is preferably powered by the animals own activity, converted to electrical power by a motion harvesting system to recharge a battery. The device uses an RFID reader to detect and identify RFID tags placed at boundaries of areas to which the pet is forbidden to enter, and sets off an alarm to warn the pet if it is approaching such an area. Because the RFID tags are individually identifiable, the forbidden area alarm can be configured to the pet, allowing use in a multiple-pet household.