Contact charging occurs when two materials are brought into contact and then are separated. As a result of the contact, charge is transferred such that one material becomes charged positively and the other becomes charged negatively. Everyone is familiar with this effect, even children who have ‘experimented’ by rubbing a balloon on their hair and seeing the balloon and hair become highly charged. But which material charges positively and which charges negatively? The answer to this simple question is not really known. In contrast to the tremendous progress in most fields of science, the understanding of contact charging is not much better now than it was 2500 years ago. In our research, we use a combined experimental-theoretical approach to study the factors affecting contact charging, with a focus on the charging that occurs as granular materials flow. We show that the particle size distribution can in some cases direct charge transfer, such that smaller and larger particles tend to charge to opposite polarities. We also show that material stress can play a dominant role in the charging process, and in some cases reverse the direction of charge transfer.