You will need a paperclip to reset the controller.
Take the PS3 controller and turn it over so the back is facing you.
Above the sticker you will see a round screw hole and next to the screw hole is a smaller round hole. This is the reset hole.
Unbend a paperclip and insert it into the reset hole. Push it until you feel the reset button move and hold it in the reset position for five seconds.
Now take the paperclip out and turn the controller over.
Plug the USB charging cable into the PS3 controller and press the round PS button to resync the controller with the playstation 3.