In order to get the most out of the batteries connected to your microcontroller, you’ll probably need to put it to sleep, the deeper the better. [Rgrokett] was curious about the nighttime habits of his cat, and came up with a nice little hack to get more battery life out of the ESP8266 that he was using.
[rgrokett]’s cat enters and leaves through a cat-door. He figured a PIR sensor would let him know when there was movement around the door. He could then tell if the cat was around. Leaving the PIR sensor and the ESP8266 microcontroller (an Adafruit Huzzah) on all the time drained the batteries pretty quickly, so [rgrokett] decided to try putting the Huzzah to sleep.
The trick in this build is that the PIR sensor is used to reset the Huzzah when it triggers. The Huzzah requires the reset switch to go from high to low, but the PIR trigger goes from low to high, so a transistor is used to invert the PIR sensor’s trigger signal. When the Huzzah wakes up, it connects to the WiFi network and sends [rgrokett] an email via IFTTT ([rgrokett]’s description goes over the steps to set up a secure connection to IFTTT.)
It’s a pretty simple hack, but it increases [rgrokett] system’s battery life from a couple of days to more than a month (he’s still waiting to see how long they’ll last) and all that was needed was the microcontroller, the sensor and a couple of parts. We have a couple of older hacks about putting the ESP modules into deep sleep, such as this one, and check out this tutorial on PIR sensors.
The bane of IOT’s. CATS!
I have seen it all. And I thought Youtube was bad.
rgrockett could have just used a toggle switch at pivot of cat door? Swing of door keeps the switch open for long enough, then shuts off once door swings shut.
If The idea was to detect when the door opened, a Reed switch mounted to the cat door frame and a magnet on the door would be the cleaner route than a toggle switch
The cat should bekept in a cage and therefore no need of a cat door or any sensors.
Well… I’d definitely argue that they shouldn’t be out at night as they are nocturnal hunters. There are some jurisdictions where keeping the cat indoors is law. (Canberra comes to mind.)
Yeah you don’t want cats to attack the poor venomous deadly wildlife.. or prevent the plagues of mice and other critters tormenting Australia.
If it was an advisory to keep the cat safe it would make sense, but apart from that.. no.
In a battle between a cat and a possum or koala, my money would be on the tree-dwelling marsupial.
Agreed, they are sadistic killers that are very destructive to any environment they are introduced into and anyone who lets them roam about is incredibly selfish and irresponsible. If you don’t care about any of that there is also the fact that they can get diseases from other cats, such as Feline immunodeficiency virus. The moment you let your cat be feral it is no longer a pet, it is just an introduced pest that should be exterminated. Even in the Middle East where they originated from they should be caged so that they do not genetically contaminate the remaining wild cat populations.
Another Aussie being nutty?
Speak for your self fool, the science is very clear, domestic animals harm wildlife in multiple ways, if their owners are irresponsible. Not just cats, but this time the subject was cats.
Another reason to keep the cat indoors. Better chance to stay alive.
I have a pair of hawks that have taken up residence in my area. Since
they are a mated pair, and hunt in pairs. I have noticed a 90% reduction
in squirrels last two years. It’s going to get worse, when the little chicks
hatch and squirrels start getting harder to catch. Cats and small dogs
become next target.
Or.. they find themselves the victims of a unfortunate accident suspiciously close to a catowner.
It sounds like your area has more of a hawk problem than a pet problem.
Perhaps someone should make a call so they can move those hawks to a more remote area where they fit in better.
Schröedinger?
“they are sadistic killers that are very destructive to any environment they are introduced into”, so, just like humans. Applying human behavioral values on an animal that is acting on instinct seems a bit of a stretch.
http://news.nationalgeographic.com/news/2007/06/070628-cat-ancestor.html, Although a mass consumption puff piece, this article seems to indicate the origins of cats is more complicated and even distinguishing between wild and domestics is difficult
They maybe sadistic killers. A study in UK, showed they hunt rats and birds.
In a much larger quantity than realized. They also realized if it was not for
cats. Country communities would be overrun by rats. New York city is a prime
example of too few cats in the streets. Rats bites are a bigger problem than
cockroaches. You can always get a iguana, to handle the roach problem.
Too many renters can’t have pets.
And given that the chances of anyone being there to look at the esp are slim he would save even more power by getting rid of the led flashes!
Make stir-fry solve 10 problems
Hopefully you want to make the stir-fry FOR the cat, mine just get canned food. If you harm the cat then you shall fry in hell for eternity!
Just use a reed-switch with a magnet on the cat-door… and a reed-relais in parallel on the power (switched by a ESP-GPIO -switch the reed-relais on in the first lines of the setup-function and turn it of after sending the message is done) to keep the ESP-powered-up while connecting to Wifi and sending to IFTTT.. this way you don’t need deep-sleep at all because you switch of the ESP completely… 0.00 uAmps between door-usages ;-)
The battery will last forever (depending on how often the cat uses the door it might last several years)
Even better: a magnet and a coil. Give the door more mass, and it swinging will generate a little power.