using semiconductor body comprising at least one PN junction as detecting element