Open Project – The Kitty Caller

Percy and Zaggy

The Kitty Caller (Collar)

By Jared Ireland, 2022

Concept

  • Wearable harness/collar for a cat that uses sensors and sound output to aid in playtime with their visually impaired friend.

Objective

  • I recently adopted a kitten, named Zaggy, who is nearly blind due to an eye infection he contracted when he was young. He is quite an energetic little guy and he loves to play with his big brother, Percy. Unfortunately his visual impairment makes it difficult for him to track his target when Percy is quiet and still – because there is no audio feedback for Zaggy to locate him. In order to level the playing field, I came up with the idea to design a collar/harness for Percy to wear that would use sound to help Zaggy find him when Percy is in stealth mode.

Discussing the 4 points of wearability

Comfort

  • Since this is a cat wearable, and cats are particular and habitual, I had to consider different variables for possible discomfort.
  • Being covered in fur, there are certain fabrics and techniques that would not be suitable for a cat wearable:
    • Fabrics with a loose weave, like wool, can catch fur and cause irritation
    • Textures like Corduroy and tweed basically stick to fur and can pull it in the wrong direction
    • Fabrics with a high static-cling tendency, like velvet and velour, are also bad because they will stick to fur and can cause irritation from the sound of static shocks. (also best to avoid static electricity when dealing with electrical components)

Durability

  • Durability is a big concern since these cats like to tussle. I will have to ensure that components are secure and hidden.
  • I made the 3D printed case with just enough room inside to fit only the necessary components, that way there is less risk of things breaking because of internal movement. I ensured that the tolerances were as tight as possible so that everything was form-fitted.
  • Since I was using an IR remote to activate it, I had to include a hole on the top of the casing to make sure that the line of sight was maintained, which does provide an opening for fur and debris to collect on the inside. To compensate for that, I created a shield cone that creates better angles for the IR sensor as well as limits the amount of internal exposure.

Wearability

  • Cat wearables can easily be uncomfortable for the wearer if the garment has any bulky components, hard parts, too much contact with the fur, and poorly positioned components.
  • The wearability ended up suffering a little due to the size of the components at the end. Percy’s neck ended up being too small in diameter so the case kinda had to balance in place.
    • To solve this I would redesign the bottom of the case to be concaved at the same diameter as his neck so that it fits better.
  • The magnetic clasp would allow the collar to be easily donned and doffed, which is especially important because cats don’t like to sit still for very long and if Percy tries to get it off his neck, I wouldn’t want him to be stuck or end up breaking it.

Aesthetics

  • I designed the case to be simple but sleek, with recesses for the bolts and an opening for the speaker to sit flush.
  • The CPX lights are able to shine through the middle part of the case because I reduced the thickness of the material around the lights to be transparent. It looks really cool when the lights turn on because the case looks fully opaque otherwise.

Process

Approach

  • My concept is something that I have been thinking about for some time, so I’ve had a vision in my head about how to execute it. I knew I wanted to 3D print a casing for the microcontroller and sensors and attach it to a collar, but I first needed to get a sense of what exists already, and what components I would need to accomplish my goals.
  • For the case, I planned on making it in 2 parts (top and bottom) with built in cavities to drop in a nut and bolt to hold them together.
  • Once I had an idea of the necessary components, I drew up a simple sketch depicting Percy in stealth mode and conceptualized how the hardware would come together.kitty-caller-concept-sketch

Research

  • I started my process by conducting research into wearables for cats. I made some interesting discoveries about certain factors that impact the wearer experience of cats from a publication from 3 authors at Opengate University (UK). The 3 biggest impacts on comfort they identified were placement, size and fit. The devices they used were 3 different off-the-shelf gps tracker collars, and the best one was discretely positioned on the back of the neck and didn’t allow for the gps to rotate around the neck or collar.
  • After some research into wearables for cats, I looked into what sensors I could use. Initially I planned on executing the concept with a trinket because they are much smaller, but it would have required more components because it doesn’t have a built-in accelerometer, lights or an IR sensor.
  • Instead, I just went with the CPX so that all I would need is a speaker, battery and magnetic clasp. I found the components I needed at Creatron, so once I received my order I got started modelling the components in Rhino.

Model

  • I had already created a quick model of the CPX in Rhino for a previous project, but I knew that it wasn’t going to be accurate enough for 3D printing a case with tight tolerances. I scanned the CPX on my printer, that way I knew that the scale and perspective were accurate for modelling.
  • With all of the premade components modelled, I just had to design the case around them – which required a lot of attention to positioning the sensors and microcontroller so that it was as compact as possible, while still having enough room to fit the wiring and being durable enough to withstand a literal cat fight.
  • Once I had the rough positions in mind, I modelled a simple base to fit the components and did a test print to make sure the tolerances were accurate. I also wanted to test out a new 3D printing technique I just learned about where you pause the print at a certain layer to drop in a metal component before continuing the print – that way I can have fully enclosed hardware which provides a more secure interfacing for the bolt.
  • My test print went well and outlined what alterations needed to be made to the design, although something went wrong with the Gcode I added in to pause the print at layer 35; it only stopped for a moment before restarting again, so I didn’t have enough time to drop the nuts in before it resumed. Luckily, I found a fix to the issue on a forum thread and was set to try it out on the next print.

    Final 3D Model for Kitty Caller Casing
    Final 3D Model for Kitty Caller Casing
  • After making any final changes to the case, and resolving the issue with the pause function, I successfully printed the base with the nuts securely trapped inside.
    M4 Nuts in 3D print
    M4 Nuts in 3D print

    Test Print and Final Base
    Test Print and Final Base

Code

  • I thought the code was going to be easy because nothing was supposed to be new – I had already made similar programs for each of the functions I planned so I had a pretty solid idea of what I needed to do to execute it in Makecode. Or so I thought…
  • What was supposed to be a simple feature that allowed for me to activate the code using an IR remote turned into a wild goose chase of discovery and debugging that ended up with a half working code that didn’t even have all of the features I planned.
  • What I discovered is that you can’t use an IR remote to send a signal to the CPX with the features provided in Makecode. This shouldn’t have been much of a problem because I was able to find tutorials for doing it using CircuitPython and I wasn’t afraid of venturing away from Makecode (though I don’t have any experience coding in Python specifically). Turns out it isn’t as easy as I thought and I ended up having to trouble shoot bugs at every step.
  • The hard part isn’t receiving the signal – as long as the CPX’s IR receiver is on it is collecting signals coming in – the challenge was not having the ability to view the live serial monitor in Makecode. So I had to convert to circuitPy and download the Mu editor because it has an REPL terminal.
  • After setting up my CPX with circuitPy and opening up a new doc in the Mu editor, I could get the CPX to receive the IR signal from my remote and view it in the REPL by using some live coding. Basically what I needed to do is ask the CPX to receive an IR signal and record the pulses it receives. Then, I could take those pulses and use a command to deconstruct the pulses into an array of the pulse lengths. With that array, I could then copy it into another program that decodes the pulse array into an identifiable code so that when my CPX receives those exact string of values, it will fulfil an IF function.

    Live Coding / terminal Functions Used to Decode IR Signal
    Live Coding / terminal Functions Used to Decode IR Signal
  • Sounds easy… right? Well, that worked to an extent but it meant that I had to do the whole process for each button I wanted to use, which was tedious to say the least. Furthermore, there are apparently plenty of IR signals bouncing around my room that kept disrupting the code because it couldn’t process a short array of pulses without breaking the program. Stray signals aside, the code would also break from receiving pulses that it can’t decode properly, which ended up happening every few buttons that I pressed on the remote. I was able to add a condition to the IF statement that calls the decoding function which tells the program to only attempt to decode the signal if it has between 20 and 100 pulses, which seemed to help a bit because now the code wouldn’t break from a stray single-pulse from nowhere.

    CircuitPython Code
    CircuitPython Code
  • With the code working (occasionally) I added some functions that would play a sound and turn on the lights if it receives a certain signal from my remote. I was even able to download a couple of brief sound clips to the board so that I could play the sound of a cat meow. Unfortunately, I discovered that using an external speaker without a speaker driver is very limited and even though I could play the sound bites from the internal speaker, once I connected it to the external one it wouldn’t play anything at all… Super frustrating, but it wasn’t a deal breaker because I just added a little melody by playing tones which worked just fine on the external speaker.

    CircuitPython Code Serial Monitor
    CircuitPython Code Serial Monitor

Final Project Images

20220421_151547

Parts List

  • CPX
  • 8 ohm PCB-mounted Speaker
  • Magnetic Clasp
  • IR Remote
  • 3D Printed Case
  • Wire + conductive thread
  • Lanyard (for collar)

Circuit Diagramkitty-caller-circuit-diagram

Reflections & Next Steps

  • In hindsight, taking on the challenge of converting from Makecode to CircuitPy was too ambitious for the time constraints, and I should have just stuck with what I could do in Makecode and counted on using someone else’s CPX in class to send the IR signal. I definitely learned a lot from that process, and I really liked getting to break away from Makecode to a real coding terminal because I felt like the Makecode interface restricted my ability to code effectively (though I know you can use the built-in javascript terminal).
  • I wish I could have done another iteration on the 3D printed case because I would have made it a bit more refined and stylish, but also more comfortable for Percy to wear.
  • I don’t plan on finalizing this design after the semester ends, but I do want to use some of the skills and techniques I learned along to way to create other designs that have built-in electronics.

Resources & Related Works

Leave a Reply

Your email address will not be published. Required fields are marked *