To control the sprinkler, we need a motion-activated AC outlet. These can be purchased from some hardware stores or online. I made one from an old motion-activated security light.
Start by disconnecting the motion sensor unit and removing it from the original housing. Now you need to identify each of the connecting wires; in this case, the green wire was ground, the white wire was neutral, the black wire was the hot input to the sensor, and the red wire was the hot output from the sensor. This color code may vary depending on where you live.
Now you need to connect the wires from the motion sensor to the appropriate wires on the power cord(s). Start by cutting the power cords and separating each of their internal wires, then strip the insulation off the ends of each of the wires. When connecting the wires, all the connections should be made with insulated twist-on wire connectors. Start by connecting all of the green wires and any bare wires together. Next, connect one wire from the male power cord and one wire from the female power cord to the white wire on the motion sensor. Then connect the third wire from the male power cord to the black wire on the motion sensor. Lastly, connect the third wire from the female power cord to the red wire from the motion sensor.
As a safety precaution, I enclosed all the connections in an insulated plastic housing. Now you have an AC outlet that can be activated by a motion sensor. To use it, just plug the male power cord into a wall outlet and plug your appliance into the female power cord. The motion sensor should be able to power appliances that are rated as high as the original lights. In my case, the original lights where three 100 watt halogen lights, so it should be capable of driving circuits up to 300 watts.