Cat Scratch Recognition

Hello,

This is an audio processing for audio sensor topic that didn't look like it belonged in either of those fora.

So, I want to "recognize" when my cat scratches on my rug.

I am a real electronics newbee, but I think I understand signal processing at the conceptual level (feel free to correct me here). So I came up with a simple (low bandwidth) attempt to do this (on a pc with matlab I would think about convolution and discriminant analysis) on a arduino on the cheap this is what I cam up with.

cheap microphone => passive high pass filter => rectification => op amp integrator => comparator to some reference voltage (normal low level output of this processing stream encountered in my living room)

The idea is the scratching causes a lot more high amplitude high frequencies than are normally going on in my living room. If I can detect a sum for some time window (100-500 msec?) where that noise is happening I trigger a high on a digital-in on the arduino. Then of course I trigger the relay so the 220 flows at 10 amps... no, no, no I love those furry bastages. I buzz a buzzer and send a puff of canned air in their direction.

So, I'm thinking in-the-pieces: filter, rectifier, integrator, comparator etc. This could get expensive no? Do you gurus hear this and say "Hell thats just a TI666 shebang" IC or am I on the right track? Or if not an IC is this a circuit that is used regularly in some field? Is it just one of the pieces on that led equalizer display I had on my boom box in the 80s? Can I steal this from something I can buy at a thrift shop? (Like I will with actuating the canned air)

Also what am I failing to consider? I have never put together a filter, wired an op amp for integrator, and I'm just guessing about the comparator. Can I really just put the individual pieces together and expect the whole thing to work. Remember I'm too used to thinking at too abstract a level. So things like: "Am I integrating and comparing voltage or current" often are completely missed by my detail attenuating brain.

Using an OpAmp and creating a voltage for the sound level to the Arduino is not a problem. But I think it is almost impossible to detect the 'scratch' sound. Some voice recognition chips are able to detect someone saying "left" and "right", but a 'scratch' is so much harder.

White noise is the most random sound: http://en.wikipedia.org/wiki/White_noise The 'scratch' is almost like white noise and I think it is very hard to distinguish it from other noises.

I'd start by recording the cat scratching the carpet using several different sensors, then analyze the results. It seems to me that there is a staccato quality as the claws stick and release.

Maybe I should have said I was also going to AND the scratch recognition signal with a IR proximity sensor so only if something (MaryJane scratching cat) is within range and high frequency sound is present do you trigger.

I do know scratching will be like white noise (so I'm not really trying to recognize it as a specific sound) but I thought it will be an unusual amount of high frequency audio for our living room so relatively simple to discriminate.

polymorph:
I’d start by recording the cat scratching the carpet using several different sensors, then analyze the results. It seems to me that there is a staccato quality as the claws stick and release.

My plan was actually to make the circuit I describe above (if it is really worthwhile) then get down on my hands and knees with a couple of forks and scratch on my rug while recording all the output. Then turn on the tv loud, have the kids run around and scream, etc. I think that staccato will be present after a high pass and the rest of the noises won’t.

A PIR sensor is a good idea. You can use black tape and leave a small horizontal opening.

I think the fastest way is make something that the cat is allowed to scratch and spent some time to train the cat not the scratch the rug XD http://drsophiayin.com/blog/entry/june-is-adopt-a-cat-month-training-your-new-cat-not-to-scratch-furniture

https://www.adafruit.com/catsofengineering

Caltoa: think the fastest way is make something that the cat is allowed to scratch and spent some time to train the cat not the scratch the rug

Yep, maybe I'll build two things. The punishment sprayer to keep kitty from scratching rug, and a food dispensing scratch auto rewarding scratch and with a ir remote to dispense food for shaping/training kitty to approach post. She just doesn't like the post right now.

I've not found cats responding to food rewards like dogs do. In any case, you may just train your cat to scratch when she is hungry. But if she isn't scratching the post now, how will she find out it dispenses food?

We use this cat attractant spray on the scratching post. It smells a bit like catnip. Just a couple of times, and now he uses the scratching post. Well, I also scratched at it and then scratched his neck.