There are 3 main problems that occur with the ps3 controllers.
1 - Sync Error - If turning off the power to the ps3, plugging the controller into the USB port, and turning on the ps3 console. OR turning off the ps3 console, plug in the controller to the USB port, turn on the ps3 console and hold the pin - sized reset button on the middle upper right hand portion of the back of the controller for 3-5 seconds then move to step two. This is a common problem especially with other blue tooth devices available for the playstation to read. Also try plugging the ps3 controller into a computer (desktop or laptop or mobile device via USB port) then repeat the reset button steps.
2 - Battery - (This takes a little skill and an eyeglass repair kit) Remove the back of the ps3 controller, being careful not to strip or overpower the screws. Once the back portion of the controller is removed there should be a battery (watch batery) ,approximately the size of a penny/dime, located on the left upper back-side portion of the motherboard. Remove the battery for 30 seconds, leaving untouched and away from any power source, then reinstall. If this does does not work, also try another battery from a functional ps3 controller. If problem 2 still brings either 4 blinking red lights or no function at all the move on to step 3.
3 Dirty motherboard/connections - As in step 2 remove the back side of the controller. Unplug the motherboard (green plate in center of controller) being EXTREMELY careful of the USB plug in and cpu ribbon, 1/4 inch ribbon connecting the motherboard to the power source (the usb plugin in this case). Use only aerosol duster and blu ray disk brush. DO NOT FREEZE MOTHERBOARD by holding aerosol duster too close or brush any soldered (silver) connections too hard as this may cause hardware malfunction. Gently clean the ribbon, USB connection, and all button pallets (use front of controller as reference). After cleaning all connections and reassembling the controller repeat steps 1 and 2 to eliminate all other possibilities. After following these 3 steps then there is one other option, which I do not recommend unless you have proper equipment and a hardware engineering degree, replace the transmitter or the microprocessor or both.
Normally after following steps 1 and 2, most problems will be fixed. After steps 1 and 2, usually means there is a hardware malfunction either in the power source or one the processors in the motherboard.
Hope this helped all you gaming guys/gals.