Rummys Blog An world of endless Monday

Saturday, 3 November, 2018

Mousetrap ASH

Filed under: — Andrew.Rowbottom @ 4:21 pm

Mousetrap ASH is my first “Internet” Connected Mousetrap.

The hardware hasn’t gone through many changes, though the software has.

Hardware:

  • Mousetrap
  • Some wires
  • An AA 700mAh LiFepO4 battery
  • A lower current voltage regulator (70µA)

First few iterations have the ESP 32 go into deep sleep in “ext 0” mode with a pullup on the input GPIO. This wakes it up as soon as the trap is sprung or set.

The early iterations had it wakeup every hour (or later 2) and send data to Thingspeak via the https API.

Another iteration used MQTT to send to Thingspeak, though this had issues with packet length.

The next iteration gave up on a full WiFi connection and used ESPNow to send data to an ESP8266 connected to my Raspberry Pi which then forwarded the data to an internal MQTT and then onto Thingspeak via Node-Red

A Future iteration will use a Full Deep Sleep mode and a wakestub to poll every 5 second.

2018-11-04

For baseline testing ASH is running the pre-change code with a smaller battery, I expect it to run for about a month (instead of three).

  • Mode: EXT-0 mode with internal pullup
  • Battery: 200mAh AAA LifePo4.
  • Input Pin: GPIO2
  • Output Pin: N/A
  • mousetrap wiring: GND and GPIO2

Once that is complete it will be switched to polling mode and the test repeated to see how much of a difference this has made.

 

Test Completed

For a battery rated at 100mAh it didn’t last long

Nov 4th 8:36 -> Nov 9th 19:41 (5d 11h 5m)
BootCount: 68
Cumulative On Time: 29,267ms

 

 

Polling Test

  • Mode: Polling, no pullups
  • Battery: 200mAh AAA LifePo4.
  • Input Pin: GPIO13
  • Output Pin: GPIO2
  • mousetrap wiring: GPIO13 and GPIO2

No Comments

No comments yet.

RSS feed for comments on this post.

Sorry, the comment form is closed at this time.

Powered by WordPress