Haunted Carbó!







This project is about a cat that has been trapped in a pumpkin and suffered a Halloween enchantment. Every time it's body is petted he goes crazy and his eyes lit up with many colors while his head and tail move from side to side!
For this project, we have applied the programming knowledge we have acquired so far in the UATEA subject, such as the use of RGB LEDs, servomotors, and sensors. In the pictures next to the prototype you can find additional information like the electrical connections diagram and the flow diagram. On both pictures there are rectangles where you can put your mouse on top and more information will appear.
Downloads
Supplies




















.jpg)
Electronic parts
- Arduino One
- Resistors (x6)
- Cable (x 19)
- Tin
- RGB Led (x2)
- Capacitive sensor
- Servo motor (x2)
- Battery
- Heat-shrink tube
Materials
- Cat: head and tail
- Plastic Pumpkin Basket
- Black spiderweb
- Wood block
- Super-glue
- Silicone
- Black paint
Tools
- Welder
- Scissors
- Drill
- Silicone gun
- Small paintbrush
Remove the Handle of the Plastic Pumpkin

Remove the handle of the plastic pumpkin with some scissors, but don't throw it out since we will need it later on.
Remove the Eyes

Remove the eyes of the cat with some scissors and hollow it through until the other side by twisting the scissors untill it goes all the way.
The Holes of the Handles Match With the Head and Tail Holders

Check that the holes of the handles match with the head and tail holders. If they are too small, make the hole larger with a drill.
Drill 2 Holes for the Eyes


Mark where the holes of the eyes touch the pumpkin and drill them so that the wires that will light the eyes up can go through.
Tip: start with a smaller drill bit to make the hole and go larger after. This a reminder that 4 wires have to go through!
Wire the Eyes

Weld the leds that we are going to use for the eyes to the correspondent cables and put the heat-shrink tubes on each "leg" of the LED to avoid contact between them.
Tip: color code all of the cables so that the one that represents the red "leg" of the led is a red cable and like so for the green one and the blue one. This way it will be easier to remember which one is wich.
Glue the Eyes



Once they have the cables, put them trough the holes in the head you did on step 3 and glue them with silicone. Be careful not to put the silicone in front of the eye or it won't look good.
Wood Support Structure



Make a wooden base as a support structure so that in the following steps, you can place the servomotors at the height of the head and tail holders. To do this, the height and distance between the two elements must be measured.
Glue the Servomotors to the Base

Glue the servomotors to the top of the base, so that it meets the extremities holders.
Glue the Cat to the Servos


After attaching the servos to the base, it's time to superglue the cat parts to the servo motors, so that they can rotate. If the glue is not strong enough or it doesn't work for some reason you can screw it.
Connections Checking

Before we continue, we must check that all the wires are well soldered to the leds and the servos are working correctly with our setup. For this, we will connect them to the Arduino board, which contains all the programming.
Soldering Wires

After the quality check is done, we can move on with soldering the wires and resistors to the PCB board. Reminder that it has to include the wires for the leds, the servos and the sensor.
Tip: There is no need to put everything so close together, the more space you have to work, the easier it will be!
Glue the Capacitive Sensor

The capacitive sensor will be glued with silicone in the center of the pumpkin's handle that we saved up on the first step.
Arduino Connections

Connect everything to the Arduino and put it inside the pumpkin, it is optional to glue it down or not. Again, check that everything is working fine. Do not forget to connect the battery to the Arduino or it won't power up, leave it on an accessible place so that you can turn it on and off whenever you feel like it.
Glue the Handle Pumpkin
Glue the handle of the pumpkin to its inner walls, so that the capacitive sensor is in the center of the pumpkin. This is not mandatory since it can stay upright by it's own and it is always useful to be able to take it out in case of a problem.
Little Details Matter

If you are a perfectionist it is recommended to paint the cables that go from the head to the inside of the pumpkin black so that they don't stand out as much.
Tip: If you use nail polish it works as good as with paint and the brush is small enough to fit trough the gap!
Spiderweb

Once we have everything inside the pumpkin and ready to work, we cover it with a spider's web so that the electronic elements are not visible.
In Conclusion...
This project has allowed us to deepen the knowledge acquired so far in the UATEA subject, such as using servomotors, RGB LEDs, and sensors, in our case the capacitive sensor.
We made a separate code for each element, so one of the big challenges of our project was to put them together so that we finally had a single code and that the RGB LEDs and the servos would work in parallel every time the capacitive sensor was touched. To do this, we had to reformulate the codes so that they didn't work with delays() and worked with millis(), so we created different routines for each action, such as changing the colors of the RGB LEDs and the rotations of the servos.
For a future project, we believe that it is necessary to initially find out how to put together different actions that work at the same time, in order to avoid possible problems when putting them together. On the other hand, we consider it essential that the workspace is more spacious that the tight pumpkin gap because making the connections between the components in such a small space limited us when we were working.