10. Mechanical Design, Machine Design
THIS WEEK CHECKLIST:
- [ ] Design a machine that includes mechanism + actuation + automation
- [ ] Build the mechanical parts and operate it manually.
- [ ] Document the group project
- [ ] Actuate and automate your machine.
- [ ] Document the group project
Since this time will collaborate between Hong Kong Lab (Lydia, Patrick, German and Queenie) and Vietnam Lab (Mai) because we all are remote students in Fablab Taipei.
Since we are remote students, we have several Zoom meetings. After the discussion, we have decided to make a machine for cats' playing game as their instinctive hunting behaviours for attraction their attention and maintaining enough exercises to stay cats' healthy.
Step 1: Design Ideas & Schedule
Stage of Development for Machine Concepts
From the beginning, our 5 groupmates, German, Mai, Queenie, Patrick and I have thought and searched many different types of machines those fit for the design about cats including the suggestion from other FabLabs as follows:
- An Automated Cat Laser Pointer toy
- Some Great Machine Ideas about Habitats for cats from a Fab Academy Student in 2020
- Suggestion from Ted - Fab Taipei during our Group Discussion: Laser Box from a Fab Academy Student in 2019
- Suggestion from Adrian - Fab MCU during Global Open Time: Lazer Chazer
- Always Stay Connected to your Pet
- Pan and Tilt Control for an ESP32-CAM with a mobile phone touch interface to control and view the video stream.
After our group discussion, we have decided to make a machine for cats by:
- using ESP32-CAM as a Micro-controller
- ESP32-CAM include a web camera (OV2640) for activating the laser pinter when cat is near to the camera and monitoring the cat playing situation
- using SG90 as a servo motor to control laser pointer movement
- using Laser Diode Module for Arduino as a laser pointer for playing with cats
- since ESP32-CAM include Wi-Fi networks, so that we could able to remote control camera, laser pointer, servo control by website automatically
Studying and Working Habits
In Hong Kong, we have long studying and working hours for most of the people. We always spend less time at home than at school or in our working place. At the same time, we would like to see what either our child or the elderly do or base on the reason of safety precautions at home.
Therefore, installation of remote camera at home is very common in Hong Kong. Since many people would treat our pets such as many different kinds of cats like our children, we would like to provide any game as remote exercise for the cats even we cannot accompany with them at home.
Characteristics for the Cats
Most of the cats like the movement of laser pointers because they Hunt little dots as signs of life instinctively.
The cat plays only for a short while if the toy will not move automatically.
We must design a machine with moving object to arouse the cats' attention and play continuously.
We have grouped altogether again and discussed more details via zoom meeting to complete the following steps.
Generate the first idea of using HTML to control and display the GUI. For the GUI, it is good to have Draw circle automatically and Turn on/ off laser pointer. Here is the draft.
Here is the draft of our project (Draw by German). Basically, it is a design of two servos could be assembled on Tripod-head with two-degree of freedom.
This is the connector as a trial for connecting with ESP32-CAM and all the output devices, such as, 2 servos and laser pointer.
Step 2: Hardwares Prototype (German)
Here are the essential hardware for our project we needed.
After installing all the hardware on the connection board and try all components is work. It times to narrow down the size of the connection board.
Since the case space is not enough, so I need to use plastic cutter to cut down into 1/3 board.
We used ESP-32 CAM as microcontroller. Also, it controls servo motor to move around and provide the power of the laser pointer.
ESP32 Pinout Reference
As you can see the legend of blue is Port Pin of input and output.
Feature : controling laser pointer to draw a circle
Below is the html code and display appearance in browser.
It is the feature that is used for start up the drawing circle feature.
Please be remined that there is a onlick="drawCircleFunction".
In the ino file, the below code is used to handle message B.
If message "B" is found, it will turn on laser pointer by set low into pin12.
It will then start up the run circle function. It is used to draw a circle by using laser pointer.
After circle function is completed, setting high into pin 12 in order to turn off laser pointer.
There are three functions used to draw circle.
The first function is Circle().
It is used to divied the circle into four parts.
They are zone 1, 2, 3 and 4.
It will continue to draw zone by zone.
However, later , I have found that there is no needed to divide circles into four parts.
It is because sin and cos function will correctly calculate netgative value for zone 2-4.
In partOfCircle function.
By using radius, sin and cos function, it will calculate the accurate x and y coordination.
In convert2moter function.
Since the moter vibrating degree is only between 60 degree to 120 degree. I need to convert the x,y coordination into suitable moter degree.
Finally, the program will loop for totally 360 times that is 360 degress. therefore a whole drawing circle is complete.
For each point, x and y value will be set into pin 2 and 4 for displaying laser point on the floor.
Video making (Queenie)
It shows the process of machine design, making and testing in Real Situation (playing with cat).