Intro: Pet Feeding Recorder
Our cat Penny has an internal clock as accurate as NIST. She starts meowing just a minute before each of her feeding times. We used to leave a note that said "I fed Penny" but this was not always helpful in keeping track. If I saw that note at lunch, I could not be certain that it meant my son fed her breakfast or my wife had just fed her lunch and Penny was trying to scam a second serving.
The Arduino to the rescue! I built a box with a display and one button for each meal. Press the breakfast button and the display will show "At 8:03a Penny had BREAKFAST." The timestamp comes from a Real Time Clock module connected to an Arduino Nano. As added entertainment, the Arduino plays "Warm Kitty" through a piezo speaker.
I developed the circuit and software on a standard solderless protoboard and then transferred the design to a stripboard. True stripboards, sometimes called Veroboards after the originator, have parallel copper strips running the full length or width of the board on one side. A grid of through holes spaced at 0.1-inch (2.54mm) pitch allows mounting standard components on the other side. Interconnections are made by adding wires between strips and cutting strips at selected holes. Stripboards are ideal for Arduino projects as they make a permanent base for projects, can be made in a few hours versus weeks for a printed circuit board, and are very inexpensive.
Step 1: Parts & Tools List
- Arduino Nano
- LCD 1602 display with I2C adapter
- Real Time Clock Module with DS1307 chip
- 12mm tactile momentary contact pushbuttons (4)
- Piezo transducer (passive type)
- Stripboard 94x53mm
- AWG #24 or #26 tinned bare solid wire
- Plastic project box
- 1/8 Watt resistors 470, 820, 1.8K, 4.7K, 2.2K
- Pin headers 2.54mm single row
- Diagonal cutters
- Needle nose pliers
- Soldering iron with small tip
- Rosin core solder
- Small cross-point (Phillips) screwdriver
- Pin vise and 7/64-inch or 1/8-inch (3mm) bit
- Craft knife
- Magnifying lens
Step 2: Build Stripboard
I recommend inserting the parts on the board in the correct positions and double check that there is the correct amount of space between the parts to run the jumpers. Use a fine tip permanent marker to put a tick mark every five rows and columns on the parts-side of the board. Remember that the count starts at 0, 0 in the upper left corner of the board! You may also want to mark the position of the larger parts with tick marks so that you get them back into the right locations if you need to remove them during construction.
I tend to remove all the parts and then start replacing them from left to right, soldering them in place as I go. I install the jumper wires as I move along. Cut the wires about a quarter-of-an-inch (7 mm) longer than needed and bend a right-angled hook on one end. Place the hook in the proper hole for one end of the wire and note where the other end goes. Bend a similar hook in the other end and place the wire on the board. Carefully hold the wire in place with a fingernail or small screwdriver while you solder it in place.
The last step in board construction is to cut the traces. Gently twist a 1/8th-inch (3mm) drill bit with a pin vise at the holes to be cut. Make sure you cut through the trace but do not be too aggressive so as to make a neat job.
A magnifying lens is useful to check the solder joints and the trace cuts.
It is a good idea to use an ohmmeter to check the construction of the stripboard. Check that there are no shorts between positive and negative traces and that each pin of the Arduino connects to the correct component.
Step 3: Power Up and Load the Software
After you are certain the board has all the parts, jumpers, and trace cuts in the right places the project should be ready to program. Plug the USB cable that comes with the Nano into your computer and the Nano. Your computer should install the driver and find the COM port. You may need to use the Control Panel on a PC or its equivalent on a Mac to see which port the Nano is using.
Load the Arduino IDE appropriate to your system from www.arduino.cc.This project was developed using versions 1.6.5 and 1.6.7. It should work with all later versions.
Open the IDE and use the Tools menu to select the correct COM port on your system. Likewise, use Tools to select the board as Arduino Nano. You might want to run the Blink example (File | Examples | 0.1 Basics | Blink) to make sure your Nano is OK.
Step 4: Feed the Kitty!
Putting the parts in a box may be the most difficult part of the project. Careful measurement is the key, particularly in cutting the rectangular hole in the cover for the LCD. There are many ways to cut a rectangular hole as you will find if you do a search. One method is to mark the rectangle by scoring lines with a sharp knife then drill 1/16th-inch holes in each corner. Score diagonal lines between the corners. Drill a 1/4-inch hole in the middle where the lines cross. Now carefully cut from the middle hole to the corner holes along the score lines with a jeweler's saw. Once the lines are cut you can simply break out the triangular shapes left between the corners.
This video shows another approach:
Once you have the device built and put in a box all you need to do is press the correct button each time you feed your pet. If you press the wrong button, the display will show you which meal is due.
Second Prize in the
Hack Your Day Contest