Arachnouphobia

Catchy title aside, this one is actually about deterring spiders. This small project started with my mother’s observation that a corner of her basement was spider-free since I had set up a NAS there. Rather than assuming that the vibrations/noises generated by the hard drive put the spiders off (like I would), she made a connection the Banana Pi’s irregularly flashing LEDs. That had to be investigated.

A RGB LED, a breadboard, an ATTiny, and some batteries to test the hypothesis.

A breadboard with an RGB LED and a small microcontroller was set up to deliver random, short light flashes. This setup could be easily moved around, and indeed it was successful in deterring spiders! Looks like spiders don’t like to have their eyes flashed, after all (who would have thought).

Noticeably though, there doesn’t seem to be an adaptation and the spiders still shun the device after some time with it around. Understandably, the spiders take the path of least resistance and just hide behind some beam or something else providing a safe shadow. To get a larger area spider-free, it would take light flashes from multiple directions, so there’d be as little shadowing as possible.

The full schematic. R3 has to be adjusted if you use a different phototransistor.

What I ended up with is a small controller for WS2812B LED strips. Powered by a standard phone charger this’d be the easiest version to install. I made a single-sided PCB with an additional phototransistor for deactivating the device during the night and a small DIP switch to configure the flash frequency.

Switch state Effect
↓··· Only active during the night
↑··· Always active
·↓↓↓ Flash frequency x1
·↓↓↑ Flash frequency x2
·↓↑↓ Flash frequency x4
·↓↑↑ Flash frequency x8
·↑↓↓ Flash frequency x16
·↑↓↑ Flash frequency x32
·↑↑↓ Flash frequency x64
·↑↑↑ Flash frequency x128
The PCB was designed to fit in a Hammond 1551P. The DIP switch is socketed to bring it up to the correct height—so it is easily accessible through a hole in the front. Also notice the ancient phototransistor: If you build this yourself, please don’t actually try to source these just because I had a whole bag of them. Almost any phototransistor will do!

Changes I’d make to this schematic if I were to redesign it:

Other than that, it’s already pretty minimal and works well enough.

Schematics, board layout and code are available in the project’s git repository.