The waterproof magnet-switch

A project log for Openthing 2 - RepTrap

Openthing 2 RepTrap is a detection device and camera trigger for capturing images of relatively small animals, including lizards, frogs etc.

mirkoMirko 03/18/2024 at 11:350 Comments

For my project, I sought switches or buttons to control the device's power while ensuring its protection against moisture in wet conditions. Despite my efforts to find IP68-rated switches and buttons, I encountered a challenge: the available options were either prohibitively expensive or excessively bulky, designed to handle amperage far beyond the requirements of my project. After several hours of research, my disappointment mounted, leading me to explore alternative solutions. That's when I discovered the DRV5032 digital switch.

The DRV5032 sensor is capable of detecting the presence of a magnet and toggling its output accordingly. It presented the ideal solution. Moreover, the DRV5032 is known for its extreme low power consumption, which perfectly suited the energy-efficient demands of my project. However, I faced a new question: how could I integrate a switch on the exterior of my device that not only functioned like a traditional switch but also housed the magnet internally, while maintaining aesthetic and tactile qualities?

Turning to my friend Fabian from Formfjord for assistance, I tasked him with designing the enclosure and devising a method to incorporate the magnet seamlessly into a switch-like interface. Initially, he proposed two concepts: a circular switch and a ball switch (refer to images below).

ball switch
Ball Switch
circular switch
Circular Switch

The challenge lay in relocating the magnet away from the sensor to prevent detection while also incorporating haptic feedback into the switch. Neither of the initial solutions appealed to us. The circular design was too large, and we struggled to conceptualize how the ball-switch could function or provide the desired tactile sensation.

Fabian then proposed a novel concept: a conventional switch supplemented with two additional magnets to provide haptic feedback.

The light grey component represents the switch, while the green component denotes the magnet, which moves along with the switch. The red circles depict the two additional magnets that are attracted by the green magnet to generate haptic feedback. While this solution seemed promising, I harbored concerns that the sensor might inadvertently detect one of the red magnets permanently.

Then, an idea struck me: why not incorporate small metal plates on the left and right sides behind the switch? This design would enable the switch and the moving magnet to snap into position, potentially preventing the sensor from registering the metal plates as magnetic fields. With this in mind, we developed the following solution:

The green part are the two metal plates and the blue part represents the magnet. 

With this concept in mind, we proceeded to create a preliminary prototype through 3D printing for testing purposes. The prototype comprises five components: the main enclosure with its insets, the movable switch part housing the magnet, a switch shell part designed to be affixed onto the enclosure to secure the movable component in place, and the metal plates for snapping into position. The resulting prototype appears as follows:


Despite the need for some fine-tuning, this solution has proven to be exceptionally effective! It offers a tactile sensation akin to a traditional switch while maintaining complete waterproofing, as there is no penetration into the enclosure. Moreover, the cost-effectiveness of the components is remarkable: the sensor costs approximately $1, the 3D printing process is straightforward and affordable, and the metal plates and magnet amount to just a few cents.