Connected to the pi is a PIR (motion) sensor. Motion is detected by a python program using interrupts.
When the sensor detects motion, it sends a signal via WiFi to a receiver which gives a visible and audio signal.
That all works well on a breadboard.
When I put the configuration neatly in a plastic box, the motion sensor becomes unstable. (sending motion while there is NO motion).
When I put it out of the box, all is well again.
So I'm expecting (?) some form of RFI and/or EMI. May be because of the WiFI ?? I'm not quit sure what the reason is.
(in an earlier stage I had the same problem with a Arduino Uno (standalone) + ESP8266-01. that's why I changed to a pi, but that didn't help)
Any solution?