Sad Cat Project

by Mihir Leel in Circuits > Arduino

236 Views, 1 Favorites, 0 Comments

Sad Cat Project

IMG-1224.jpg
IMG-1228.jpg

This is a sad cat project designed to make a sad cat turn into a happy cat :D

*MADE FOR ARDUINO SOFTWARE ONLY*

Concept of it:

  • The cat comes to this machine in pursuit of happiness
  • The cat comes close enough that the machine senses it and plays sounds it likes
  • The cat then hopefully presses near the middle of the big button attached to the machine
  • If all goes well, then lasers start going off from on the servo and allow cat to have fun and cure its sadness


Flowchart for those who want a better overview of what the code will be doing is here.


Here's a video that shows this project in ACTION!


For each step in this instructable, think of each picture as the one specific step for that step, ex. step 1: base, picture 2 means what you need to do second to create the base.


My experience before making this project

My initial design looked like this, but the issue quickly arises that I do not have enough Arduino pins hence I dropped the idea of using LEDs, LED matrix and Joystick and instead chose to use only servos, lasers, ultrasonic sensor, buzzers and a button. Once I chose to delete the extra bits, I created a circuit diagram which looks like this. After making the diagram I tested on TinkerCad and everything worked (just took a lot of time of TinkerCad to start up my program) so I started to finally organize myself and start building/getting components.

Supplies

0931.png
87.png

Base:

  • 2 boxes, relevant size, but one has to be a bit bigger than the other (if possible, get boxes which are already in some sort of good looking pattern and has relevant size)
  • some sort of decorating paper (lots needed if boxes don't have pre existing pattern
  • some sort of platform for lasers to rest on when put on servo (optional, you can just stick on laser to servo)

Button:

  • cardboard
  • some sort of base for button, I use Styrofoam cups, but it can be anything that can act as a support
  • some sort of surface for cat to put paw onto, I use newly bought mop heads

Arduino:

  • Arduino (obviously)
  • Lots and lots of wires and wire extenders
  • 2 buzzers or speakers
  • 1 ultrasonic sensor
  • 1 button
  • 4 lasers or 4 red LEDs if you do not have lasers
  • 2 servos

Recommended tools:

  • ruler
  • glue gun
  • scissors
  • plier

The code will also attached for you to copy and put into the Arduino software. It should be pretty straightforward as I commented every line and its nothing too out of the ordinary.

The Base

1.jpg
2.jpg
3.jpg
4.jpg
5.jpg
6.png
7.png
8.jpg
9.jpg
IMG_20220102_204859290.jpg
10.jpg
11.jpg
12.jpg
13.jpg
14.jpg
15.jpg
16.jpg
17.jpg
18.png
19.png
20.png

1) Grab your 2 boxes and make sure they are close to relative size just like mine

2) Using the larger box (my bottom box), cut open the bottom of the box by removing the flaps via the safety knife, this is where the Arduino will be placed, also I recommend gluing or taping your top flaps together already as this will allow composure for smaller box to rest on later on

3-5) Now that you have the flaps cut, you should grab your buzzer and ultrasonic sensor and take measurements of them onto the front of your box (front as in one of the sides with the most area available), don't worry much about how much about the ratio of the distances, just make sure it goes as follows: Buzzer-Ultrasonic-Buzzer

**DO NOT THROW AWAY ANY FLAPS, THEY COME IN VERY USEFUL WHEN BUILDING BUTTON**

6-7) Now you cut open the measurements you took using the safety knife and you can insert your buzzer/ultrasonic sensor and it should be able to stand even without any support and it should be able to fit into the holes, but don't do anything else with your buzzer/ultrasonic sensor, make sure it's good measurement and leave it at that for now

8-9) Now on one side (side with small area compared to the larger area sides), Recommended to use left side of box, use some sort of circular object to outline and make a circle, this circle will be used to allow the button's wires to flow into the box and connect to the Arduino, once circle outline created, proceed to cut the circle out using your safety knife

10) Now we need to cut open the bottom flaps of your SECOND smaller box, this is needed to allow boxes to connect and wires to flow through and you need to connect the top flaps of the smaller box together as the lasers need a smooth and sturdy surface to rest on

11-12) Now since we will have 2 boxes and the smaller box is flapless and will have lasers on it alongside connecting atop the larger box, the boxes will need to allocate a medium sized space to allow wires to flow through both and connect to the Arduino, so now we make a medium sized square measurement on top of BOTH boxes and cut the squares using the safety knife

13-14) This are pictures of how the interiors of the boxes should look like at this point, picture 13 is of the smaller box and picture 14 is of the larger box

15) Now you should glue the boxes together, keep it close to mine in terms of distance between ends to keep it to look neat


Now comes the fun part!

16-18) Now you can customize your boxes, I use decorating paper and cover all sides with it,

tip: when using some sort of customizing paper, when there are holes ex. the ultrasonic sensor, first cover entire side with the paper as usual and then just use your hand and poke holes at where the ultrasonic and buzzer are and cut or hide any extra paper due to the holes

19) Now that your base is all ready, you can add in your ultrasonic sensor and buzzers, you can glue the buzzers on using the glue gun, just make sure the glue only goes onto the black surface of the buzzer and connects right onto the large box, for ultrasonic sensor, it's a different situation

20-21) For the ultrasonic sensor, place it from inside your large box and instead of gluing it on directly to the box, tape it on first by putting tape on each side of the ultrasonic sensor and then use your glue gun to glue the tape onto the box, this makes sure the ultrasonic sensor does not get damaged and continues to allow it to stay sturdy and not move around


Now your base should be ready and sturdy for further use :D

The Button

1.jpg
2.jpg
3.jpg
IMG-1221.jpg
4.jpg
5.jpg
6.jpg
IMG_20211223_205947817.jpg
IMG_20211223_210110430.jpg
IMG_20211228_004444704.jpg
IMG_20211231_011130232.jpg
IMG_20211231_011139551.jpg
IMG_20220106_100847016.jpg
IMG_20220106_104230837.jpg
IMG_20220106_104251219.jpg

So now that we have our base created, we will now make the button for it. This is also where you should use the already cut-out flaps you have from earlier.

 

1) Grab one of the larger flaps you have and make a hole of 0.5 cm x 0.5 cm, this hole will hold your button in place

2-4) Feel free to try and place your button inside the hole to make sure it fits, ensure that just a little part of the legs are showing at the bottom and once comfortable, glue on a flap with equal measurement of the flap that your button is on by gluing the second flap only to the sides of the first flap, in another words, sandwich the button in between the flaps

At this point, when you put your hand on the flaps, a sound should go off which means the button works and you are good to continue :)

Tip: If the button is only pressing with high amounts of hand pressure, use pliers to pinch the sandwich even further which will allow the button to be pressed when you place your hand on the sandwich you created

5-6) Now you should be able to add in the wires towards the button's bottom, so add them and I recommend gluing them on as without glue they easily come off, this part is very tricky and takes time, so just be patient and it will be fine :)

Also don't worry about glue messing up circuitry, many of my wiring had glue afflicted and they all work just fine :)

7) Now we make a supporting base for the button, so grab your plastic cups and glue them onto a piece of cardboard the size of your sandwich,

Note: It looks like I use only 4 cups but in reality I had 5 just I decided to add in the 5th one after debating a bit and forgot to take a picture of it (look at picture 7 if wanting to understand the positioning of the 5th cup)

8) Go ahead and glue the supporting base to your sandwich now and your button shouldn't have any problems with working at this point and the wiring should still be intact

9) Since our wiring is long, we can tape parts of it to the sandwich we created and also glue it on also if needed

10-12) Now to make the button look nicer, you can glue on some sort of fluffy decoration to make the cat be attracted to the button, I used a mop head for mine, also feel free to glue on some connector wires onto the wires connected to your button to try and test the button

13) Now you need to attach on extra connector wires onto your already glued wires, this is mandatory as these extra wires will connect the button to the base/Arduino

14-15) Finally we add some sort of decoration to cover up lots of the wires so that the cat doesn't try to eat the wires, you shouldn't put decorations on all of the wires as you still need to connect wires to the base/Arduino

tip: just use your decorative paper from before to cover up the wires

 

And now your button should be done, working, wired up and ready for use :D

The Lasers

1.jpg
2.jpg
3.jpg
4.jpg
5.jpg
6.jpg
7.jpg
8.jpg
IMG-1223.jpg

Now we can work on making what cats like a lot; the LASERS!

 

1) Grab one servo and cut out a large rectangular cardboard and glue it on the top of the servo, make sure the cardboard will rotate the way you want it to as servos turn counter-clockwise as otherwise you might need to configure the code or re-glue the cardboard on

2) Glue on two lasers to the sides of the cardboard with its legs facing upwards, feel free to slant them if you wish

3) Repeat step 1-2 on your second servo

4-5) Now attach connector wires to all legs of one of your servos/sets of lasers and glue sets of the wires together, ex. glue the wires of one of the lasers together and second laser's wires together separately, make the wires very long as they will connect to the bottom of the base where the Arduino will reside

6) Repeat steps 4-5 for your second servo

7-9) Now number your servos and record where the wires of each servo/laser needs to connect to, ex. where does the blue wire of laser 1 connect to... this is mandatory as otherwise it is very difficult to connect your wires later on (picture #9 is a example of how you should record your wiring information)


Now if everything was done right, your lasers/servos should be ready for use and you should have a sheet which tells where each wire will connect to, next we can finally assemble all these components together :D

Assembling Altogether/Final Touches

IMG_20220115_110705137.jpg
IMG_20220115_112220557.jpg
IMG_20220115_112454528.jpg
IMG_20220115_132537950.jpg
IMG_20220115_132528320.jpg
Guide to connect wires to Arduino.png
IMG_20220116_043950343.jpg
IMG_20220116_043934338.jpg
IMG_20220116_043941259.jpg
IMG_20220116_050858208.jpg
IMG-1224.jpg
IMG-1225.jpg
IMG-1226.jpg
IMG-1227.jpg
IMG-1228.jpg

Now we can finally connect everything together to make this project complete!

 

1) Attach connector wires to your buzzers/speakers and ultrasonic sensor now, you shouldn't need to glue the wires but you can if needed

2-3) Glue your button to your base by putting glue on the bottom of the hole that was designated for your button at your base and putting glue on the bottom of the decorative paper's end you wrapped your button wire in, this is why I said make sure to not let the decorative paper cover the whole wiring of the button earlier, you can put as much glue as you want as it can be easily removed and won't damage the wiring itself

4) now turn your base and put in the two laser/servos you created and put the wiring through the holes you cut earlier when making the bases

tip: you should add one servo/lasers at a time and configure it's wiring before moving on the second

5-6) Now find a object where you can place your breadboard/Arduino onto, and you should have all wires of each component available

As for how to wire the circuit, use the picture #6 or the circuit diagram as a guide on where to connect each wire alongside using your notes (Although my picture's wiring makes it look like I changed it compared to the TinkerCad, you can trust me that it's exactly the same in terms of logic and where each wire connects)

(I couldn't provide a good picture of my final wiring as taking a picture of all wires and Arduino was difficult due to the Arduino being at the bottom of the base/the bottom box)

*MAKE SURE TO COPY EACH WIRING'S LOCATION IN TERMS OF PIN NUMBER AND WHERE IT CONNECTS ON THE BREADBOARD*

Look at Picture #6's full image here: /proxy/?url=https://content.instructables.com/ORIG/FU7/8E9V/KYLK3XUU/FU78E9VKYLK3XUU.png?auto=webp&width=1600&height=900&fit=bounds&md=7e130aa15c9bbe3136d5869ba1aba1c7

6.5) (No picture attached for this step) After wiring, attach the USB wire you use to upload from Arduino program to the Arduino you placed under the base and upload the code into the Arduino, you should just keep it attached after uploading as otherwise it's a hassle to turn ON the machine again, feel free to test the program now

At this point your machine should be working just like the concept explains, if not relook at notes, picture #6 or your components to decipher what's wrong

7-9) Now you flip your base and Arduino slowly and carefully back to normal position and ensure that no wires have fallen out alongside that all components are still intact, glued and sturdy as previously, after checking everything, you can now glue on the servos diagonally (or in any way you desire) to the top of the base by putting glue on the perimeter of the servo and putting on lines of glue on the wiring of the lasers/servos and attaching it to the base and that should make your lasers/servos sturdy, neat and still working

10) Cover as much of the wiring as you can of the lasers/servos, I recommend using the same decorative paper and glue you used from before as that will fit in very nicely, but make sure that the decorative paper does not stop the servos/lasers from rotating

 11-15) Finally feel free to add a cardboard base at the bottom of the whole machine as this will allow you to move around the project, also this is how my finished project looks like


Now you should feel happy as you have finally finished this long project. Hope your cat enjoys playing with this project and this helps cures their sadness!