Collaborative robotics is a field of growing industrial interest, within which understanding the energetic behavior of manipulators is essential. In this work, we present the electro-mechanical modeling of the UR5 e-series robot through the identification of its dynamics and electrical parameters. By means of the identified robot model, it is then possible to compute and optimize the energy consumption of the robot during prescribed trajectories. The proposed model is derived from data acquired from the robot controller during bespoke experimental tests, using model identification procedures and datasheet provided by manipulator, motors, and gearbox manufacturers. The entire procedure does not require the use of any additional sensor, so it can be easily replicated with an off-the-shelf manipulator, and applied to other robots of the same family.