This article describes the hardware design of the iCub humanoid robot. The iCub is an open-source humanoid robotic platform designed explicitly to support research in embodied cognition. This paper covers the mechanical and electronic design of the first release of the robot. A series upgrades developed for the second version of the robot (iCub2), which are aimed at the improvement of the mechanical and sensing performance, are also described.