An ear plug (200), and a method of producing an ear plug, which includes a shell (206) with at least one electrode (201-205) adapted for measuring brain wave signals, the electrode (201-205) being connected to a processor for processing the measured signals, wherein the contours of the outer surface of the ear plug (200) and the electrode (201-205) are individually matched to at least part of the ear canal and the concha of the user.