Fig.
For my final project, I wanted to make my version of Tamagotchi that looks like my dog.
You can view the detailed proposal of this project from Week1 page.
Fig. schematic
For the PCB design, I began by writing down the list of components I would need in my device, and placed them in the Schematic page of the Fusion Eagle.
My main components are 3 buttons, 2 reactive LED pins to display pet states, a JSP connector for my lipo battery, a connector for the speaker, a slider switch, and all the resistors.
Fig. Interations of the PCB Design
When I was routing PCD design, I have designed so that the PCB board will look like the silhouette my dog, so that the hardware casing can easily look like my dog as well.
Even without having any casing, the PCD needed to look like my dog.
Fig. Milling process
Milling process. It cut very fine and smooth. I am happy. I placed my initial onto the board as well (big smile).
Fig. Soldered
All the components are soldered and looking pretty.
Fig. Isometric view of my casing design
Here is the 3D file of my casing design. I was able to design it to be small and compact, just abou 1.5"x 2" x .7" in size.
Fig. 1H Initial prototype
Here is the first 3D printed prototype of the casing fitting well with my initial device components I have put together.
Fig.Resin print
After the successful fitting of the initial casing prototype, I've printed the casing with Formlabs SLA printer in clear, since I wanted the LED lights
to display the electronic components inside and to let the LED to blink through the translucent casing.
The hardest part with the SLA printer is remocing the support. There is a setting to make the support pointers to have smaller diameters of the tips,
but I did not have time to change around the settings in detail. The other thing to keep in mind printing clear resin is that they turn opaic upon curing.
Fig.
So, after the resint prints have turend opaic, I have painted the surfaces with clear nail polish and baked them further under UV light.
One proud decision I made here is to leave the "ears" of the casing where the LED lights go underneath so that the surfaces remain translucent
and emit+diffuse the light without actually showing the LED components!
Fig.
The casing perfectly fits with my PCB components!
Fig.
The next step is making the silicon molds for the tiny buttons. I have never made molds this tiny.
The image above on the left demonstrates how the casted silicon part will fit on top of the tactile buttons.
The image on the left show the mold templates that are creating the negative space to pour the silicon.
Fig. 3D modeling of the mold
The figure above shows the template parts to be 3D printed for the mold making.
Fig.
The parts are 3D printed on the prusa 3D printers with the 0.4mm extruder thickness.
Fig.
I mixed the two parts silicon rubber mixture with 1:1 ratio in a tiny cup for my tiny buttons.
Fig.
The view of my silicon templates, the casted button molds, and resin printed button extensions on the left.
On the right shows how the casted silicon molds fit on top of the buttons. The top casing will then slide in on top of it. It casted pretty successfully on a first try.
Fig.
Fig.
When I printed the first version of the case, I have initially given up putting a lipo battery in since I was having some issues with connecting a battery.
The image above is the new casing desing which made the top casing design to be mush more minimal and simple with added storage space to fit the lipo battery in the bottom.
(I have designed my battery to wire to VIN pin that is located in the bottom of the Xiao board, did not solder it, then soldered all the other pins. It was irreversible although I haved fixed this matter by operating a surgery.)
New casing for the updated Design
Fig.
After I produced another version of the device that properly connects to a lipo battery with a new casing, now I am left with two versions of cute tamagotchi devices.
Fig.
Later, I realized that my first device that was missing the slider switch and a battery, and operated a surgery where I directly connected the switch and the battery, and soldered the one side of the switch into VCC, and the battery into GND.
THE CODE
Fig.
Fig.
Fig.
For the code, instead of trying to code in a relatively complex tamagotchi game or just straight up copying existing libraries,
I decided to approach it simply in a manageable scale. I wanted an each button press to activate different animations, different LED light pattern sequences,
and to play songs. The images above are screenshots of different animation scenes. The images are then converted into char type code to paste in Arduino.
The demo of the device running the animations with the button press. The sound it muted here.
The code below demonstrates for instance how a single image for a single button sequence woud look like whant it is converted into char.
const uint8_t button1Image1[] PROGMEM = {
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x7f, 0x80, 0x00, 0x01, 0xe0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x3f, 0xff, 0x80, 0x00, 0x01, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x03, 0xff, 0xc1, 0xc0, 0x00, 0x01, 0xbf, 0xfc, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x07, 0xe0, 0x00, 0xc0, 0x00, 0x01, 0x81, 0xff, 0xc0, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x0f, 0x00, 0x00, 0xe0, 0x00, 0x01, 0x80, 0x0f, 0xc0, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x0e, 0x00, 0x00, 0xe0, 0x00, 0x03, 0x80, 0x00, 0xc0, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x0e, 0x00, 0x00, 0x60, 0x00, 0x03, 0x00, 0x00, 0xc0, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x7f, 0xff, 0xff, 0x00, 0x00, 0xc0, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x7f, 0xff, 0xff, 0x00, 0x00, 0xc0, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x03, 0x00, 0x60, 0x00, 0x00, 0x07, 0x00, 0xc0, 0xc0, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x03, 0x00, 0xe0, 0x00, 0x00, 0x00, 0x01, 0xe0, 0xc0, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x03, 0x81, 0xf0, 0x00, 0x00, 0x00, 0x03, 0xe1, 0xc0, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x01, 0x83, 0xf0, 0x00, 0x00, 0x00, 0x03, 0xf1, 0xc0, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x01, 0xc3, 0xb8, 0x00, 0x00, 0x00, 0x03, 0x31, 0x80, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0xc7, 0x38, 0x3f, 0x00, 0x1f, 0xf7, 0x3b, 0x80, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0xef, 0x1f, 0xff, 0x80, 0x7f, 0xfe, 0x1b, 0x80, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x6e, 0x1f, 0xe3, 0xc0, 0x78, 0x3e, 0x1f, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x7c, 0x0f, 0x01, 0xe0, 0xe0, 0x0e, 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x78, 0x1c, 0x00, 0xe0, 0xe0, 0x07, 0x0e, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x30, 0x1c, 0x00, 0x70, 0xc0, 0x07, 0x0e, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x00, 0x70, 0xc0, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x01, 0x80, 0x00, 0x00, 0x18, 0x00, 0x30, 0xc0, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x07, 0xc0, 0x00, 0x00, 0x18, 0x00, 0x70, 0xc0, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x0f, 0xe0, 0x00, 0x00, 0x18, 0x00, 0x70, 0xc0, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x1c, 0xf0, 0x3c, 0x00, 0x18, 0x00, 0x60, 0xc0, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x1c, 0x70, 0x7e, 0x00, 0x18, 0x00, 0x60, 0xc0, 0x07, 0x00, 0x00, 0x1e, 0x00, 0x00, 0x00,
0x00, 0x18, 0x38, 0xfe, 0x00, 0x18, 0x00, 0xe0, 0xc0, 0x0e, 0x00, 0x00, 0x3f, 0x00, 0x00, 0x00,
0x00, 0x18, 0x1d, 0xc7, 0x00, 0x1f, 0xff, 0xe0, 0xff, 0xfe, 0x00, 0x00, 0x73, 0x00, 0x00, 0x00,
0x00, 0x18, 0x0f, 0x87, 0x00, 0x1f, 0xff, 0xc0, 0xff, 0xff, 0x00, 0x00, 0xe3, 0x0f, 0x00, 0x00,
0x00, 0x18, 0x0f, 0x83, 0x00, 0x1c, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0xc3, 0x7f, 0x80, 0x00,
0x00, 0x1c, 0x06, 0x03, 0x00, 0x18, 0x00, 0x00, 0x00, 0x03, 0x00, 0x01, 0xc3, 0xf9, 0x80, 0x00,
0x00, 0x1c, 0x06, 0x03, 0x00, 0x1c, 0x00, 0x00, 0x00, 0x03, 0x00, 0x01, 0x83, 0xc1, 0x80, 0x00,
0x00, 0x0e, 0x00, 0x03, 0x00, 0x1c, 0x00, 0x00, 0x0f, 0x03, 0x00, 0x01, 0x87, 0x81, 0x80, 0x00,
0x00, 0x07, 0x00, 0x03, 0x00, 0x0c, 0xf0, 0x00, 0x3f, 0xe7, 0x00, 0x01, 0x86, 0x01, 0x80, 0x00,
0x00, 0x07, 0x80, 0x07, 0x00, 0x0f, 0xff, 0xff, 0xfd, 0xff, 0x00, 0x01, 0x80, 0x01, 0x80, 0x00,
0x00, 0x03, 0xc0, 0x0e, 0x00, 0x0f, 0xbf, 0xff, 0xf0, 0x3e, 0x00, 0x01, 0x80, 0x03, 0x80, 0x00,
0x00, 0x01, 0xc0, 0x1e, 0x00, 0x1e, 0x00, 0x70, 0x70, 0x1e, 0x00, 0x01, 0x80, 0x07, 0x00, 0x00,
0x00, 0x00, 0xe0, 0x3c, 0x00, 0x1c, 0x00, 0x38, 0xe0, 0x0f, 0x00, 0x01, 0x80, 0x0f, 0x00, 0x00,
0x00, 0x00, 0xe0, 0x78, 0x00, 0x38, 0x00, 0x1f, 0xe0, 0x07, 0x00, 0x01, 0xc0, 0x7e, 0x00, 0x00,
0x00, 0x00, 0x71, 0xe0, 0x00, 0x38, 0x00, 0x1f, 0xc0, 0x03, 0x00, 0x00, 0xc1, 0xf8, 0x00, 0x00,
0x00, 0x00, 0x3f, 0xc0, 0x00, 0x30, 0x00, 0x07, 0x00, 0x03, 0x80, 0x00, 0xc7, 0xe0, 0x00, 0x00,
0x00, 0x00, 0x3f, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 0x01, 0x80, 0x00, 0xdf, 0x00, 0x00, 0x00,
0x00, 0x00, 0x1c, 0x00, 0x00, 0x70, 0x00, 0x00, 0x00, 0x01, 0xc0, 0x00, 0xfc, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0x01, 0xc0, 0x00, 0xf0, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0x00, 0xc0, 0x00, 0xe0, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0x00, 0xe0, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0x00, 0xe0, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0x00, 0xe0, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0x00, 0xe0, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0x00, 0xc0, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x7e, 0x00, 0x00, 0x00, 0x01, 0xc0, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x7f, 0xff, 0xf8, 0x00, 0x1f, 0xc0, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x07, 0xff, 0xff, 0xff, 0xff, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1f, 0xff, 0xf0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, };
Unfortunetly, I lost the full code I used to run my device. I kept messing around with my code until it no longer worked and looked nothing like my original code and I have not saved it. Once I re-write my program, I will upload it here.
Fig.
The view of the devices during the final showcase
Fig.
Overall, I am very with how the final project turned out.
Making a product where all the small components are carefully designed and thought out to fit well together while functional was much more challenging than I thought.
As future steps, I want to make them to communicate with blutooth and explore more interactive aspects of the devices. I will post any further updates as they come along.
Through the process, I really learned to integrate various skills and methods we explored throughout the semester into one project, and now I am ending the course with a different perspective
of looking at everything around me and how they are made. As Neil has mentioned on the final review day, I truely feel that the class has just begun and now I am off to explore and build more things
with the fundamental skillsets and knowledge I gained with the course.