To build this project you'll need the following hardware and tools:
- Arduno Uno, Mega, or Nano
- You need to use an Arduino which is compatible with the CC3000--check the product page for the latest compatibility information. An Uno is best
- CC3000 shield or breakout
- Infrared light sensor and Infrared LED
- Make sure the IR sensor and LED are matched to the same light wavelength (usually 940nm). The IR sensor should be one tuned to detect 38khz signals.
- LED (any color) as an indicator of the IR sensor receiving signals.
- Two 1/4 watt resistors:
- R1: ~100 to ~1000 ohm resistor to limit the current to the IR LED.
- R2: ~200 to ~1000 ohm resistor to limit the current to the indicator LED.
- Power source for the Arduino, such as a 9-volt battery or wall wart.
- Solid core hookup wire
- Breadboard or perf-board
- Pet food dish you can mount the IR sensor and LED within.
- Because you need to drill into the bowl to mount the sensor and LED, a plastic bowl will be the easiest to use with this project.
- Drill to make mounting holes in the bowl for the sensor and LED.
- Hot glue to secure the sensor and LED inside the bowl.
- Soldering tools to attach wire to the IR LED and sensor
WiringConnect your hardware as follows:
- Arduino 5V to CC3000 VIN
- Arduino ground to CC3000 ground
- Arduino digital pin 13 to CC3000 CLK
- Arduino digital pin 12 to CC3000 MISO
- Arduino digital pin 11 to CC3000 MOSI
- Arduino digital pin 10 to CC3000 CS
- Arduino digital pin 5 to CC3000 VBEN
- Arduino digital pin 3 to CC3000 IRQ
For the IR sensor, again solder long wires to each leg. Connect the Vs leg to 5V power, the ground leg to ground, and the output leg to both Arduino digital pin 7 and the negative leg of the indicator LED. Check the datasheet if you're unsure which pin is which on the sensor. Finally, hook up the positive leg of the indicator LED through the R2 ~220 ohm resistor to 5V power.
As a quick test, with the Arduino powered on you should be able to aim a remote control at the IR sensor and press buttons to see the indicator LED flash.
The Arduino will flash the LED on one side of the bowl and then see if it can detect those flashes on the IR detector side. This is easier to do than a laser-type break beam sensor, and the light isn't visible to you or the pet so it isn't distracting.
Pet Food DishFor the pet food dish you will want to drill a small hole just big enough to show the top of LED in the bottom center of the dish. Drill a hole up on the side of the dish just big enough to hold the IR sensor. Hot glue the LED and sensor to the bowl from the back.
Note: You might need to cover the back of the IR sensor with black tape to prevent stray IR light bouncing up from below the bowl and erroneously being detected.
Finally route the wires outside the bowl to the breadboard and hook them up appropriately. You will likely want to hide the electronics and wires inside of a small box to prevent your pet from getting to them.
Look at the pictures to the left to see how I constructed my pet food dish.