© 2016 The Institution of Engineering and Technology. In this study, a sliding mode controller is designed for the regulation of robotic arms with unknown behaviours in the deadzone and gravity. The sliding mode strategy is employed to compensate the unknown behaviours. Furthermore, the asymptotic stability of the controller is guaranteed by the Lyapunov technique. The application in two robotic arms shows the effectiveness of the proposed technique.