Electronic – Detecting proximity (< 15cm) to a linear device

proximity-sensorsensor

Problem: my dogs constantly counter-surf (stand on their back legs to get stuff off of the counter), but they're smart and only do it when nobody is around; it's very difficult to catch them in the act.

Before I try to implement some way of deterring them (but I don't want to shock them), I need to be able to accurately detect when they're doing this. Given their height, I think the best way would be to somehow detect when their collar is within 10 or 15cm of the edge of the counter.

I'd considered RFID but that would require readers every 20cm or so with their range/power turned way down.

Is there a way to detect when something is within a certain range of a linear device? I'd like to mount something under the edge of the counter top and when it detects a collar that's in its range, do something (in the short term, that 'do something' will probably be take a picture with a webcam.)

Best Answer

In my opinion, the solution you are looking for is the wrong solution. Doing this sort of thing will be expensive and/or not work well due to the amount of "tweaking" required. Either way, you won't be super happy with the results. I suggest a completely different approach (or two).

  1. Instead of triggering when the dog gets on the counter, trigger when the dog goes in the kitchen. This is going to be very kitchen-dependent, and won't work for all situations. But in my house, for example, the kitchen has a tile floor and there is carpet near by. We've trained our dogs that they can be on the carpet but not the tile. On that boundary, there is a "natural" place to put an RFID or other sensor that would trigger when the dog goes by. This would be a LOT easier than putting a sensor on the entire counter edge.

  2. Go super low tech. Put a simple bar across the front edge of the counter (1/2 round moulding or half a pipe). Connected to the bar are some micro-switches. When the bar is pressed, the switches close, and whatever you want is activated. Super easy, super cheap, and super reliable.

  3. If you must put a sensor across the entire edge of the counter I suggest using an IR beam. If something blocks the IR beam then the alarm goes off. The most reliable way to do this would be to use an IR LED that is pulsed at 38-40 KHz for the emitter. The sensor would be a simple IR remote control that outputs a digital signal when 38-40 KHz is received. Using a remote control sensor greatly reduces the effects of ambient light and other nasties. Of course, this won't discriminate between the dog and you, but those are the breaks.