Mouse Trap Sprung With Hall Effect Sensor 3D Printer Model

Author: @
License: CC BY-SA
File formats: step,stl,ino
Download type: zip
Size:692.3KB

The file 'Mouse Trap Sprung With Hall Effect Sensor 3D Printer Model' is (step,stl,ino) file type, size is 692.3KB.

Summary

This is an addon to this mousetrap: https://www.homedepot.com/p/Harris-Catch-and-Release-Humane-Mouse-Trap-2-Pack-2EMT-LIVE/306929732 It will sit on top of the trap, can hold a DFRobot Firebeetle 2 ESP32 C6 development board (https://www.dfrobot.com/product-2771.html), 18650 battery and a DFRobot hall effect sensor (https://www.dfrobot.com/product-1310.html) to detect when the trap has closed. Just needs a couple of small magnets glued to the top of the trap door so then when it's closed, the hall effect sensor can detect that and I have written some code to send a message via MQTT to my Home Assistant which then sends a message to my phone via Telegram.

I used the Arduino IDE to write the code, a copy of which I attached here for you to modify as you like. You'll need to edit at least the wifi name and password, as well as the MQTT server name and password. You might also want to change the topic it writes. It also outputs battery voltage, although TBH I haven't found this particularly useful yet as it needs to be calibrated and I have not done so yet. ;]

The code will read the hall effect sensor state, attempt to transmit it via MQTT, and then go to sleep for 10 minutes to conserve battery power. It's not perfect, but I've had this running for over 4 weeks on a single charge.

Mousetrap_sprung_sensor.step 101.9KB
Mousetrap_sprung_sensor_-_Mousetrap_sprung_sensor_case.stl 2.0MB
mouse_trap_sprung_public.ino 4.4KB