Martin's corner on the web

My dog as smart wireless DVR sensor

I live in a small village ~25km from Sofia, Bulgaria and commute daily to the city. My house’s alarm system would occasionally ring me and I would rush back home to see if all is fine, that can be pretty inconvenient. For that reason, I installed a basic home security CCTV surveillance DVR system, so in case the alarm goes on, I could take a look online and decide if I need to go back or if it is a false alarm.

The DVR has inputs for external sensors, I take that as an opportunity for improvement. I’d love to know about anything suspicious going on in my garden, before alarm event actually happens (at the time of breaking-in the house). The project idea is very simple – I’ll attach a shock detection sensor to my dog’s collar and it will register unusually high activity that is associated with the dog being upset about something and barking intensively.

Each of the eight alarm inputs can be configured as normally open or normally closed circuit and any change triggers an alarm event. I configured mine for normally open type of sensor and used a Sharp 817 optocoupler to interface with it:

2014-01-05 13.40.23

Back of the DVR, 8 inputs for sensors and lots of dust I admit.

A Funky v3 is used as front end, it is powered from the USB port that the DVR has and continuously scans the wireless packet transmissions floating my house for trigger events:

2014-01-05 13.39.08

The PC817 optocoupler connected to the Funky v3

In case a trigger packet is captured, the Funky v3 briefly pulses the optocoupler and this way makes contact of the alarm input. The DVR is configured to email me with pictures from the cameras as attachment upon that event.

The trigger sensor itself is a Funky v1 with a shock detection sensor attached to it. It is enclosed in a Kinder Surprise toy shell for waterproofing, then the shell is firmly attached to my dog’s collar:

2014-01-05 13.42.25

The Kinder Surprise shell with sensor installed inside, mounted on dog’s collar

2014-01-05 13.22.20

A 150K resistor pulls up the pin change interupt line, the shock sensor will pull it to GND when the thingie is shaken

 

The shock sensor was scavenged from an old toy, it is a fine spring that makes contact with a metal pin when shaken:

2014-01-05 12.50.49

The sensor runs on a CR2032 battery and will power down until woken up by shaking. If it registers more than 10 wakes within a minute, my dog is unhappy about something (read a cat is passing by) and it is jumping around violently. When that happens, the sensor will send a trigger event and my DVR notifies me by email with some pictures from several angles of my house.

2014-01-05 12.51.23 2014-01-05 12.51.45 2014-01-05 12.52.09

2014-01-05 12.53.18

Only 8 grams of weight, including the battery

2014-01-05 12.10.58

Screenshot of what I get on my phone 5 seconds after the alarm has triggered

 

I expect to see lots of “cats running for their life” pictures in these emails, lets see how it goes 🙂

6 thoughts on “My dog as smart wireless DVR sensor

  1. Pingback: Doggy DVR Alarm Sensor | Hack The Planet

  2. Pingback: Собака в качестве датчика тревоги для домашней охранной системы. | С SQL Raspberry Arduino Cubieboard etc

  3. Casimir

    Won’t have though using a dog this way 😉

    On my side, my home alarm will be based on a combination of PIR sensors, RPi’s camera with custom motion detect algo and some arduino as long-range remote I2C devices (PCA9600)

    Cheers