Inductive proximity sensor--how does it work?
I have this device: QS18-05N-1 Proximity Switch.
I use it to detect the presence/absence of a steel ball, as shown at 53s in this video. Note that the ball is not magnetized.
I have two questions:
1. How does it work? I'd love someone to explain like I'm 5.
2. Does anyone know of a similar device that's shorter (in the vertical direction when oriented as in the video)?
I'm primarily interested in question 2 but I figure I should also try to learn something!

Comments
There's a link to the datasheet right on the sales page. In that datasheet you'll find a circuit diagram -- I clipped and edited.
That device is NPN/Open-Collector. What this means is that pin 4 (black wire) is either floating (like an open switch) or connected to ground. If you want to monitor that with a microcontroller like the Propeller, connect a pull-up (e.g., 10kl) to pin 4 and the other side to 3.3v. When the sensor is idle, the Propeller input pin will see a high; when the sensor is active, that pin will go low. Easy peasy. Note that the sensor is powered by 12v, and the ground on the sensor and the microcontroller must be connected together for this to work.
https://www.balluff.com/en-us/blog/the-basic-operating-principle-of-an-inductive-proximity-sensor
https://www.baumer.com/int/en/service-support/function-principle/working-principle-and-technology-of-inductive-sensors/a/Know-how_Function_Inductive-sensors
"... creating an alternating electromagnetic field that emerges from the active surface of the sensor. Any metal object approaching the front will induce eddy currents draining energy from the oscillator."
As for size and shape, it looks like you've got it sitting sweet as is. I wouldn't change what you've got.
Here's a Q&A along the lines of Jon's answer - https://www.ifm.com/gb/en/gb/landing-page-uk/proximity-sensors-explained-types-applications-and-benefits
Thanks, I did manage to wire it up. I was actually hoping for more insight into the mysterious "Proximity Sensor main circuits" box
Ah, that is the sort of information I was hoping for. Thank you!
Well, I would much prefer something that takes up less vertical space, so if anyone has any leads, LMK!
How about this one?
https://dfrobot.com/product-2025.html
Sensing distance is 4mm (I think the one you use has 5mm), but it's quite small.
Andy
smallest, cheapest with 4 MM sense distance in my goto parts list is https://www.automationdirect.com/adc/shopping/catalog/sensors_-z-_encoders/inductive_proximity_sensors/small_rectangular/aps4-12m-z-d
I'm guessing there's an RF coil inside and it monitors for a change in the resonant frequence of the LC circuit...
I'm imagining it's like those old AM radio kits where you move a ferrous part in and out of a coil to change frequency...
Whoa, Andy, that's perfect! Since I want the detector to be underneath the "detectee", this will take up only 6mm of vertical space.
Assuming, that is, that the little crosshair symbol indicates the detection area.
That's the front-sensing version; I'd go for the top-sensing version so it would be 12mm "tall" in my application; a good second option.
Thanks everyone!