A limit switch on an electric wire hoist, is a security switch that stops the motor after the wire reaches it's limits.
If this switch be destroyed (it can easily destroyed), it is a pain to replace it, as you have to take down the hoist and remove the old switch. This is a problem i had and i wanted to make another limit switch, but without any big cost or to take down the hoist.
So i decided to use a photoelectric sensor. A photoelectric sensor, is an equipment used to discover presence of an object by using a light transmitter, often infrared, and a photoelectric receiver.
The sensor by default, allows the voltage to go to the motor relay (the relay that moves the motor upwards) every time the button is pressed. When the crane reached the transmitter, it cuts the light from the receiver, so it cuts the voltage to the motor. So, the motor stops there, as it originally did with it's limit switch.
In red circle the sensor. I made it easy to move it up and down.
A very simple and cheap solution, and can be used by anyone who have problems with the original limit switch.