A bad cable or a loose or corroded connection can cause a perfectly good alternator to not charge the batteries. With the engine running, take a volt meter and start at the battery and work backwards until the point of the voltage lose is found. Dont overlook the ground cables. They are 50% of the electrical circuit.