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.
That’s the subject of the second video below, which uses a different Hall sensor — an Allegro A1304 — and is mainly concerned with getting the output of a non-motorized but considerably ...