He built this set of no-contact limit switches using a hall effect sensor. The small black package sticking out past the end of the protoboard is the sensor. It is used to detect a magnetic field.