First, define what you mean by "motion detector." A device to detect motion can be as simple as a string...or as complicated as an international network of gigawatt radars and supercomputers.
If you refer to yard lights that are activated by "motion" in front of their detectors: These are called PIR (passive infra red). The sensors inside (disassemble one!) are often a single IC in a transparent package with an integrated lens, sensor, and processing circuitry. Given the right power and a few resistors and caps to set levels and times, it will drive a small relay directly.
Detect a fly? Probably, if it is close enough. Easy enough to test. webpa
ElectronDepot website is not affiliated with any of the manufacturers or service providers discussed here.
All logos and trade names are the property of their respective owners.