Introduction: Off the Counter Kitty! Air-puffer Training Aid

The new kitty needed to learn to stay off the kitchen counter. Yelling at her to get down was only training her to get off the counter when I came around... A puff of air whenever she jumps up taught her that the counter is always off limits!

I've seen commercial versions of air-puffer-trainers but was always turned off by the cost of the air refills and the so-so reviews about the PIR detection mechanism. On another Instructable (https://www.instructables.com/Pet-Deterrent-keep-them-away-from-those-off-limits/) the author built a PVC air tank with an air valve which inspired me to come up with this variation.

My version replaces the ultra-sonic sensor with a laser-range-finder (worked better with our very fluffy target) adds a range adjuster for easier positioning, and packages the whole thing in an old CD case to make it portable.

Pump up the air tank with a bike pump, turn on the box and adjust the range knob. There are two zones. One zone will activate only the buzzer. If you get 50% closer then you trigger a puff of air. The range knob lets you set the outer detection limit. I've only got it set to detect out to 1023mm. The range finder can work further than this (out to about 2 meters), so feel free to tweak the code if you want to detect further away. I was being lazy and just reading the range-pot directly into the Arduino ADC, using the resulting 0-1023 count directly as the range value.

The air tank is good for about 12-15 puffs and the LED will flash blue when the maxCount is reached. The LED flashes red when the air-puffer is enabled, and green if only the buzzer is enabled.

Supplies

Here are the main parts I used for the build:

  • Arduino Nano
  • 5V relay board
  • VL53L0X laser range finder module ( https://www.amazon.com/gp/product/B08RRT1KJ6/ref=ppx_yo_dt_b_asin_title_o02_s00?ie=UTF8&th=1 )
  • 12v air-valve (Search Amazon for: Beduan 2 Way Normally Closed DC 12V Electric Solenoid Air Valve 1/4" NPT )
  • RGB LED (four-pin common cathode)
  • 5v continuous sounding Piezo-Buzzer
  • 12v/1A wall-wart power supply
  • Old CD storage case
  • 50K potentiometer for range-control
  • Common Resistors/Caps/Diodes/Switches
  • 2" PVC with reducers to get to 1/4 NPT fittings for Schrader-filler-valve and air-valve

Step 1: The Schematic

The circuit is pretty simple. The laser-range-finder uses the Nano I2C pins, a potentiometer is read to control the detection distance, three outputs drive the status RGB LED, one output drives the buzzer, one drives the relay that controls the air valve and one input monitors an air arm/disarm switch.

The diodes don't need to be the exact ones I'm using. Just some 1A/24V variety. The LED is a single RGB type, but you could use three separate LED's if you wanted.

Make sure the buzzer is the type that generates it's own sound when connected to power. Some require you to generate your own pulses. You actually could use either, however my code isn't set up to generate the audio-pulses so you'd have to add that.

Step 2: The Air Tank

The air "tank" is built from some 2" PVC (Schedule-40) pipe with 2" to 1/2" NPT reducers followed by 1/2" NPT to 1/4" NPT adapters that connect to a Schrader valve on one side and the air-switch and a 1/4" NPT/barb connector. It actually cost me as much for the pipe and fittings as it did for all the electronics! You can get cheaper plastic fittings but brass was all my local hardware store had at the time. I used both Teflon tape and pipe-sealant on the joints to ensure it was leak free. The air valve I'm using is working out perfectly. Only requires about 500mA to energize and hasn't leaked.

I used 2" PVC to get as much volume as possible and still fit into the old CD case I had. You can modify the pipe size/length to fit whatever enclosure you plan to use. With my 2" pipe setup, I'm getting about 12-15 100mS puffs of air with the tank initially filled to 70psi. I didn't want to use higher pressure as some of the cheap air valves aren't happy working with high pressure and I didn't want to stress the PVC.

One note: Be sure to use PVC cleaner, primer, cement to join the fittings and let the whole thing dry/air-out for a day before adding the Schrader valve and air-switch. If you don't your puffs of air will smell like PVC cement for weeks...

Step 3: The Proto Board

There really isn't much on the proto board. Just the Arduino Nano and the handful of components. Most of the wiring is done to connect the pins of the Arduino to the various valves, switches, LED, etc.

Step 4: Putting It All Together

Once I had cut the holes for the switches/Pot/LEDs, mounted the parts and soldered all the components and wiring, I just hot-melt-glued the boards/components to the top of the CD case and tie-wrapped the wires to keep things somewhat neat and tucked away.

The barbed air nozzle sticks out the end of the CD case right under the laser-range-finder. You point the case in the detection direction and the air-blast will be in line with it.

If you have a 3d printer, the included file "cover.stl" is the cover I printed to house the VL53L0X laser-range finder, else you could just hot-glue it to the outside-end of your case.

Step 5: The Code

I wrote the code in VSCode. If you are using the Arduino IDE, just grab the main.cpp and move/rename it to something like airPuffer/airPuffer.ino in your Arduino directories. You'll also need to get the adafruit/Adafruit_VL53L0X library for the laser-range finder.

You can download all the files from my git-hub at: https://github.com/dfreitas-git/AirPuffer but I've also include the main.cpp in this Instructable if you just want to copy it.

The code is commented and should be pretty self explanatory. Feel free to tweak to your liking and let us know what improvements you make!

Attachments

Step 6: Wrap Up

I'm using a cheap 12v/1A wall-wart to power the box as I didn't want to deal with recharging batteries. The range-finder can consume 20-40ma when ranging. The Nano and LED is taking around 20mA and when the air-switch fires it's another a 0.5A load.

The puffer has been a total success. After one air-puff, our kitty only tried one more time and bailed off the counter the instance the buzzer went off. She has since abandoned jumping up on the counter (though she stares at the box from across the room surely contemplating how to out fox it some day...).