Designers of medical devices have typically focused on building hardware and software that is technically reliable, but far less attention has been paid to making sure that devices are compatible with human needs and capabilities. The result can be devices that are counterintuitive to use, leading to user errors that contribute to patient injuries and deaths. To address this problem, I will describe a framework for conducting human factors evaluations of medical devices that relies extensively on simulation methods. The framework will be illustrated using a case study of a patient-controlled analgesia infusion pump. This research suggests that human factors techniques can be used to create safer devices, and that simulation can complement more traditional research methods. Some cultural obstacles to adopting this type of design approach will be briefly described.