The motion sensors are Westec brand, purchased from Amazon. The base
plugs into an electrical outlet and the fan cord plugs into it. Attached is a cord with the motion sensing device on its end. I’ve had them 5 years and no problems.
This is a picture of the sensor mounted in the corner of the stall over the feed bucket, and a product link.
My fans are in the same corner, blowing from the aisle down into the stalls, and luckily there are electrical outlets there too, one for each stall.