In this work is developed a method for the project of train pantograph; in particular we focused on the cam mechanism, typical of the railway pantographs; in fact the cam profile affects the whole behavior of the machine, making the link between the actuation system and the rest of the pantograph; which is why we can regulate the functioning of the pantograph acting only on this particular component; will then be shown, in general, the setting of the problem, the method of calculation and optimization of the cam and the results obtained.