Cat and Scratching Post - Long Distance Touch Lamps
by Olivia Chang in Workshop > Lighting
6998 Views, 131 Favorites, 0 Comments
Cat and Scratching Post - Long Distance Touch Lamps
Set to move across the country in a month, I wanted a way to let a loved one know that I was thinking of them. It needed to be portable and befitting a desk. In the end, we decided on constructing two lamps.
It also seemed natural, as cat lovers, that we build two cat-themed lamps. They would be touch-controlled, so that when one person turns on their lamp, the other lamp lights up as well.
We built two touch buttons into our lamps. The first button turns on the lamp and controls the hue and saturation of the color by pressing and holding. The second button sends the color to the other lamp. When both buttons are pressed and held, the lamp’s brightness is adjusted.
The best part about the cat: it has joints so that each piece on the cat can be rotated! It can stand up, sit down, lie down, and move its tail or head.
Inspiration
Long distance lamps have been touched on in this site before, but we made several modifications to the concept. And ours are very cute :)
- We wanted to use the lamps as mood lighting without always turning on the other person’s lamp.
- On most long distance lamps, the color of the lamp is random, and we wanted to be able to adjust the color.
- Other long distance lamps are not standalone, but are instead controlled with a phone or controller. We wanted our lamps to be able to be fully functional just by touching the lamp.
- Many lamps, such as the Filimin, use a very simple acrylic and electrical paint body. We wanted to give our lamps a more finished and upscale look with stained wood with unique designs!
Since we didn't want to use electrical paint (too expensive with limited results) to create a conductive capacitive touch area, we came up with an ingenious method of embedding metal inside the wooden body of each lamp. What are pieces of metal that everyone has? Pennies and dimes! The touch buttons on the cat are the cat's eyes, while the scratching post's buttons are embedded underneath the wood.
Materials
We were able to use scrap wood and existing materials and the total cost came out to about $20, which is significantly cheaper than the friendship lamps on the market ($180 dollars for two)!
Electronics
- 2 ESP8266 Modules: the modules from HiLetGo are my go-to ESP8266 board as the ESP8266 normally runs on 3.3V, but this board is modified to run on 5V and can be programmed with micro USB.
- TTP223B touch sensors: it’s important that these are the “B” version of touch sensors, which are blue and have a metal backing that a wire can be soldered to. The red TTP223 sensors have a plastic touch sensor that can’t be soldered!
- WS2812b Strip: 3.2ft 60 LEDs, but you can opt for more or less dense strips
- Jumper wires: female to female
- 2 screw terminal strips
- 22 AWG wire (3 strand): scrap wire is fine for this
- 2 1000uf capacitors
- 2 5V 2A power supplies
- 2 Pennies and 2 Dimes
Woodworking materials
- Stain
- Shellac
- Wood putty/plastic
- Wood glue
- White spray paint
For the Cat
- 12 washers
- 2 bolts, 2 inches long
- 2 cap nuts
- 2 nails
- Sheet of wood: we used white pine wood leftover from a separate project, approx 50 in x 10 x ½ inch thick
For the Scratching Post
- Long block of wood: we purchased an 80 x 3 x ½ inch block of cheap common board at Home Depot for around $5. Higher quality wood will stain more easily, but are more expensive.
Tools
- Wire cutter
- Wire stripper
- Soldering iron
- Hammer
- Screwdriver
- Drill and drill bits of various sizes
- Clamps
- Coping saw
- Miter saw
- Table saw
- Random orbital sander with 120 and 220 grit sandpaper
Scratching Post - Cut Individual Scratching Post Pieces and Diffuser
Using a ruler, mark the spots where the cuts need to be made, then use the miter saw or table saw to cut the length of wood into five 15 inch pieces.
Then, using a table saw, cut a piece of acrylic which is 3 inches wide and 15 inches tall. This will fit in the opening of the lamp, and both diffuse light coming from the LED strip, as well as hide the messy electronics. Spray this with white spray paint to give it a frosted finish.
Scratching Post - Add Angles and Diagonal Cut With Table Saw
Using a table saw, add an bezel to the following pieces:
- One 23 degree cut on the first and fourth piece (counting from bottom left on the diagram)
- Two 23 degree cuts, forming a trapezoid, on the second and third piece
Depending on the width of your wood, you may find that you want a larger or smaller angle cut. We planned on 23 degrees, but went with a larger angle on some of the pieces (30 and 40 degrees). You can experiment to see which angles form a lamp shape that you like.
Be careful when positioning the pieces as you don’t want to cut too much off of each piece when adding the angle.
Then, use the table saw to add a diagonal cut to the opening piece (the one in the bottom right in the picture). This will allow for more light to show through the opening. Refer to the diagram.
Scratching Post - Add Hidden Capacitive Touch Buttons
Drill a penny sized indentation, slightly deeper than the thickness of a penny, into the 4th wood piece. Then drill a small hole all the way through the center of the indentation.
Solder a piece of wire (at least 4 inches) to the center of a penny. Repeat with the other penny — you should have two pennies, each with a wire attached. Thread the wire through the hole in the indentation, and hot glue the penny into the indentation.
Then, solder a TTP223B sensor to each of the wires. There is a metal area on the back of the sensor specifically for soldering.
Scratching Post - Glue Pieces Together and Hide Buttons With Plastic Wood
Arrange the pieces together and add painter’s tape to the outside so that the lamp begins to take shape. Add tape such that the lamp can be “unrolled,” then draw a line of glue down each exposed bezel.
“Roll” the five pieces back up into their final form and use an additional strip of tape between pieces one and five to provide support and a slight tension to the lamp.
Allow the wood glue to dry and cure for 24 hours.
Add plastic wood over the two pennies so that you can no longer see either penny. Additionally, add wood putty into any obvious holes or cracks in the wood. Let it dry for at least an hour.
Scratching Post - Sanding, Staining, and Shellac-ing
Carefully go over the lamp with a random orbit sander, being sure to sand down the wood glue on the pennies until the pennies lie flush with the face of the lamp. Sand down the edges where the pieces meet. The goal is to create a smooth surface. Hand sanding works as well.
Using a rag, wipe the lamp with mineral spirits and let dry for 15 minutes. Then, with a clean rag, rub the stain into the wood, being sure to reach all outward faces of the lamp (including the top and bottom). Wait 3 minutes, then wipe off the stain with a clean rag.
Finally, go over the lamp with a couple of coats of shellac, waiting 15 minutes in between coats for the shellac to dry.
Cat - Cutting the Pieces
Print out the cat pieces template onto paper (attached as a PDF) and cut them out with scissors. Trace the templates onto your chosen sheet of wood.
There are templates that need to be traced multiple times, and those pieces are marked with the number in the center of the piece. Make sure you trace one neck, one head backing, one tail, two front legs, two back legs, two body parts, two ears, and four head pieces.
Using a coping saw, carefully cut the pieces. If needed, sand down the edges of each piece to ensure that pieces are the same size. If you have a bandsaw, you should use that to cut out the pieces — it was very difficult to cut it with the coping saw.
Downloads
Cat - Drill Holes for Joints
In order for the cat to be able to change positions, we need to add two joints to the cat.
- The first joint is between the first back legs, first body piece, tail, second body piece, and second back leg
- The second joint is between the first front leg, first body piece, neck, second body piece, and second front leg.
To add joints, clamp the necessary pieces together in the correct order (specified above), then drill a hole through all five pieces at once. You will want to make sure that the drill is actually going through all of the pieces. We were able to eyeball this part and got lucky — check before drilling, don't be like us! :)
Cat - Adding Touch Buttons
The electronics will be encased in the cat’s head, so we will want to add touch buttons somewhere along the sides of its head. We decided to make the touch buttons into the cat’s eyes, so the touch buttons would not be hidden underneath the wood. Instead, the buttons were exposed as metal eyes. This turned out to be a super cool choice!
Similarly to the scratching post, drill a dime-sized indentation, slightly deeper than the thickness of a dime, into two of the head pieces. Decide on where you want the eye to be (high or low on its head), but you will want to make sure that both eyes are in the correct spot — we chose to have one eye high and the other low, but mirroring them to match is probably the more popular option.
Drill a small hole all the way through the center of the indentation.
Solder a piece of wire (at least 4 inches long) to the center of both dimes so that you have two dimes with a wire attached to each. Thread the wire through the hole in the dime-sized indentation, and hot glue the dime into the indentation.
Like the scratching post, solder a TTP223B sensor to each of the wires.
Cat - Putting Together the Head
Tape the head pieces together so that it forms a truncated pyramid. Then, add wood glue to the parts where the pieces touch, and allow it to dry for 24 hours.
With the head together, you can cut an acrylic diffuser for the LEDs. Use the miter saw or table saw to cut a piece of acrylic that fits into the head, and spray it with white spray paint to make it translucent.
Drill a hole in the back of the head for the power supply cable.
Cat - Sanding and Staining the Cat
As with the scratching post, carefully go over the cat’s pieces with a random orbit sander. Then, stain the cat using the same staining technique as the scratching post. Finally, add a layer of shellac to the cat pieces.
Putting Cat Pieces Together
Once you have sanded and stained the cat pieces, you can put together the cat! The two joints are as follows:
1: first back leg, first body piece, tail, second body piece, second back leg
2: first front leg, first body piece, neck, second body piece, second front leg
Push a 2 inch bolt (you may need a longer bolt depending on the thickness of the wood) through the holes that you drilled for each joint. Place a washer in between each piece to make the friction between pieces uniform — this makes it so that each part has an equal resistance when you tighten the bolt. Screw on a cap nut on the end of the screw so that the pieces can’t fall off!
To add the ear, hammer in a small nail from through the ear to the side of the head. Repeat on the other side.
Circuits
The electronics for both parts are exactly the same, it’s just a matter of orientating the two sets of parts in their respective lamps.
Where to put the LED strip:
- For the scratching post, we put the led strip on the inner lip of the opening.
- For the cat, we put the led strip around the inside of the head, inlaid half an inch from the outer lip.
Either way, cut the LED strip to a length that matches where you will put the strip. Here's a great instructable on how to do this.
Assembling the circuit:
- Strip the wire on the power supply and connect the supply’s ground to one terminal and power to another terminal on the block.
- Put the 1000uf capacitor between ground and power.
- Connect ground to GND on the LED strip and the ESP8266 (you may need a soldering iron for this).
- Connect power to 5v on the LED strip and VIN on the ESP8266.
- Connect D2 on the ESP8266 to the LED strip. Connect D0 to SIG on one of the TTP223B sensors and D1 to SIG on the other TTP223 sensor.
- It’s easier to power the touch sensors with the ESP than directly from the block (we couldn’t get them working that way), so connect GND with GND on the ESP8266 and VCC with 3.3V on the ESP8266.
The wire for the power supply can be threaded through the back of the cat’s head, and underneath the scratching post.
Now that the circuits are in, you can fit the acrylic diffusers into the cat and scratching post to hide the circuits (there’s a lot of wires!). For the scratching post, we attached the diffuser with hot glue. For the cat, we recommend attaching the acrylic diffuser with easily removable tape or putty so that you can take out the diffuser and debug the wiring if anything comes up.
Uploading the Code
Adafruit.io:
You’ll need to sign up for an Adafruit.io account. There are great instructions from Adafruit on how to do that: https://learn.adafruit.com/welcome-to-adafruit-io
Then, create a new feed in Adafruit named “lamp”. This needs to be spelled exactly this way so that the code can access the Adafruit feed! The feed is where we’ll be sending and receiving color values from each lamp.
Arduino:
You will need to have the Arduino IDE installed to upload the code. Replace a couple of things in the code:
- Replace the Adafruit IO username and key in the code with your IO username and key.
- Replace the WIFI_SSID and WIFI_PASSWORD in the code setup with your wifi network and password.
- Replace the lamp name with the correct lamp name (CatLamp or ScratchingPostLamp).
For the ESP8266, you will also need to install some libraries. Here’s a great tutorial on what you need to install.
Additionally, you will need to install FastLED and ArduinoOTA for the code to work. Here is a tutorial on adding them.
Finally, you can upload the code to each ESP8266!
If all goes well, the lamp will flash green when you turn it on to indicate that it successfully connected to wifi and Adafruit. You can test that it works by turning on one lamp and sending a color to the other lamp.
Downloads
Done!
Enjoy your cat and scratching post lamps! There's so much more that you could do. While we made 2 lamps, you can add as many lamps as you would like to your network in any shape and size! Additionally, you could modify the code to add features beyond single colors, such as rainbow, gradients, flashing lights… whatever inspires you!