Detect metal going through rubber hole

I was wondering what kind of sensor I need to use to detect a 4mm steel rod that goes through a 20 mm rubber hole. (grommet) . See pictures please. Any help is appreciated. The metal cylinder pivots at the grommet.


Does it leave the hole completely and reenter, or does it just more around in the whole?

This would imply the grommet is mounted to something.  Can you provide more context?

Inductive prox comes to mind.

1 Like

Magnetise the steel rod and use a Hall effect sensor ?

Really depends on the context. You can detect the rod with a simple trap door type switch, or with light beam, or really any number of ways. Which one is right or even possible in the context we are unaware of, we can’t know.

Enter re-enter in the whole, the grommet is 20mm in diameter mounted on plastic, the cylinder translates rotates and the pivot point is the grommet

Enter re-enter in the whole, the grommet is 20mm in diameter mounted on plastic, the cylinder translates rotates and the pivot point is the grommet

Obviously the first question would be “what is it”. Then “why do you need to detect it”. Etc etc. try to provide the information that anyone might require to give a sensible answer

If you want to detect when the rod enters the gromet a simple magnet wire coil and a 1 or 2 transistor amp would probably do the trick, but I also like @pmagowan suggestion of a trap door switch too.

I could detect it with my eyes but the OP probably wants more than that!

1 Like

Optical sensor.

Micro switch.

Magnet and reed switch.

It is quite complex, i have used an IR beam brake sensor and it is does not work well, because the pivot point is offset to the beam because of the grommet. The pivoting of the shaft of the metallic cylinder makes the sensor to loose detection. This is for a surgery simulator prototype.


I was considering of attaching a conductive rubber on the grommet, but I do know not how to connect it to Arduino

You are probably detecting all or nothing. Any light beam sensor will work if you detect the true value as the beam will be interfered with by the metal shaft even if offset. You need a wide beam. A simple light sensor would work fine. Reading should be relatively static when shaft is not inserted and could be anything when shaft is in and will likely vary wildly if moving about. Code some debounce around the ‘non inserted’ range.

You could achieve a circuit continuity detector using sprung wire very easily and cheaper. Take 2 small lengths of copper single core with say 1 inch exposed core and 1 inch still in protective sheath. Use heat shrink tube to connect the two wires side by side at the protected end so you will have a small tuning fork appearance. With the exposed ends held very slightly apart by the thickness of the sheath. Attach to arduino as you would a button wiring from the protected end. The exposed ends can be manipulated to make perfect shape over the grommet but the insertion of the metal shaft will join the contacts. Likely best shape will be slightly curved Hard to describe but I can draw later if you don’t get it

This is a possible solution. Does this wide beam need to be entirely blocked by the shaft of the cylinder to trigger the sensor? Right now I am using a shutter -pin holes to narrow the beam so the 4mm shaft can block the beam entirely. Otherwise the sensor does not trigger.

Can you please so a simple drawing? Much appreciated

Hold in bare hand then use capacitive sensing at the grommet to detect it.

Arduino as a capacitive sensor.

Any light sensitive sensor will give a signal relative to the light received. You can detect this as an analogue value and the metal rod will affect it. So not an I/O sensor, analogue.

The introduction of a metal tube at the exposed copper end will create contact and act like a switch. the natural elastic properties of the wide will maintain the connection but adjustments could be made with extending the sheath or adding rubber etc

1 Like