Things You'll Need
Instructions
Review the documentation supplied with your components. Review the specifications for the proximity switch, the counter circuit to that will take the switch inputs.
Connect the proximity switch to the counter circuit. Follow all directions in the product documentation for connecting the proximity sensor to the counter circuit. Whether the switch leads plug into a socket or is connected via screw terminals, make sure you follow these instructions carefully. Correct connections now will minimize any need for troubleshooting.
Test the magnet and proximity switch. Turn on the power to the counter circuit. You will need to follow the directions supplied with your counter circuit if you don't already know how to switch on its power. Run the magnet by the proximity switch a few times to see if those passes translate to counts on the counter circuit readout. Vary the swipe distance to determine about how far the magnet can be from the switch and still register. When you're done with your testing, reset the counter according to the directions and switch off the circuit.
Attach the magnet to the shaft. Find a location that will not impede the normal operation of the mechanism. Dry fit the magnet to the shaft. When you're satisfied with the location, secure it in place with a adhesive. An epoxy is a good choice. Make sure that the adhesive you choose is strong enough to keep the magnet fastened securely to the shaft. The magnet should not be allowed to shift about the shaft, since this could affect the ability to obtain an accurate reading.
Place the proximity switch near the shaft. Having previously determined the acceptable range of distance between the magnet and motor shaft, mount the proximity switch so that it is stationary. Only the magnet should move, and that's when the shaft is turning. Use a mounting bracket or mount the proximity switch somewhere within the acceptable range with screws.
Test the configuration. Turn on the power to the counter circuit. Get the shaft with the magnet turning. This requires starting the motor or mechanism connected to the shaft, so you will need to follow the directions to this as well. Once the shaft starts turning, the shaft rotation should register on the readout.