It turned out that the original mouse trap wasn’t sensitive enough. Very small mice just didn’t trigger it. So I decided to improve the design.
The case of the trap is clear, so I thought I could have a beam of light going from one side to the other. When the mouse broke the beam, it would trigger a solenoid that would close the door. After some thought, I decided to use a white LED and LDR (so no lasers or signal modulation). The LED was quite bright (even though it was only driven by 5mA) but bright lights don’t seem to put the mice off. The LED illuminated the LDR much more than ambient light (except in bright sunlight - but that’s not the best conditions to catch mice, and even if it did need to work in sunlight the case could be covered to reduce the ambient light falling on the LDR).

