7 Dec 2024, Sat

Our Final Curtain Call.

KUWTP Ep. 30 | 7th December 2024 | Making and Tinkering Exhibition Day 2

All good things come to an end. Thank you for keeping up with us, the patrollers, for the past 30 episodes! We are truly grateful to have been given the opportunity to take up CY2003 Making and Tinkering during our special semester, and it truly gave us the ride of our lives! Reflecting on the many ups and downs we faced during our project, we can say with certainty that we have grown and matured from amateur arduino rookies who barely knew what an arduino was, lest even know how to code an arduino, to beginner coders who now possess a sizeable amount coding knowledge and being able to code our very own website as well as program the arduino. We also gained valuable skills in 3D modelling software using Fusion360, one that would definitely be useful in this day and age where 3D printers are starting to play a significant role in our lives.

As we reach the end of Day 2 of the Making and Tinkering Exhibition, we also bid our final goodbye to Making and Tinkering! Signing out, Paw Patrol. Cheers!

6 Dec 2024, Fri

Best Idea Prize!

KUWTP Ep. 29 | 6th December 2024 | Making and Tinkering Exhibition Day 1

Don’t play play hor, we quite zai one. Today, we presented our project to the many distinguished judges for an entire day during the first day of the Making and Tinkering Exhibition! We reported to SPMS as early as 8.30am to start setting up and preparing for the long day ahead. There were many fruitful discussions with the judges, where we uncovered more areas of improvement or development for our project, which we are immensely grateful for! For example, we had not considered the scenario that the dog does not finish the dispensed amount of food, and thus would still be lacking in calorie intake. This highlights the need for a feedback loop, where we take into account whether the dog has finished its food from the previous meal, and how it would affect the amount of food dispensed for its next meal. Another potential problem brought up was the scenario of pet owners feeding their dogs snacks throughout the day. These extra treats contain a significant amount of calories but yet is not factored in when we are calculating the amount of dry food to be dispensed. A solution to this would once again be an avenue for feedback to the algorithm, where owners are given an option to indicate how much extra calories has been consumed by the dog in the form of treats, and from there the new mass dispensed would be smaller.

Overall, we had enjoyable discussions and shared laughter with the judges. To the judges, thank you for making time in your busy schedules to visit our booth! Furthermore, we reaped the benefits of our past 6 months of hard work when our group was awarded the “Best Idea” prize! We would like to take this opportunity to thank everyone (lab staff, friends and family etc.) who has supported us in one way or another through this arduous journey.

On a side-note, we would also like to apologise to the MnT lab for potentially attracting rats to the lab. Enjoy the video below of the rat-attacked food packs, where the rat created a hole through the packet and ate a substantial amount of food!

4 Dec 2024, Wed

MnT-ing During Finals.

KUWTP Ep. 28 | 29th November 2024 | Attempting to fix the turbine

Finals season or my final season? In the midst of our finals, we decided to squeeze some time and head to the MnT lab to fix the problem of our food dispenser getting jammed!

During the presentation, a major issue we faced was that food dispenser’s turbine was made of rubber and too soft. This caused the dog kibble to get stuck between the blades of the turbine and the sides of the container. A solution to this would be to purchase a motor with stronger rotating power, however there wasn’t sufficient time for us to purchase a motor. Hence, we decided to innovate and instead make modifications to our turbine.

The first modification we tried was to reinforce the turbine blades with corrugated board, making it firmer and thus less receptive to bending. However, this did not work and the blades were still as soft and bendy. The second modification we tried was to add pieces of cardboard between each blade, analogous to jamming a board to prevent the blades from bending. This method proved to be more fruitful, and instances of the dog food getting stuck reduced but was still prominent.

Overall, our modification was only semi-successful and we believe the only way to truly to eradicate the problem would be to get a motor with stronger rotating power!

Enjoy the clip below of our food dispenser in action ◡̈

16 Nov 2024, Sat

A MnT Capstone!

KUWTP Ep. 27 | 15th November 2024 | Presentation D-Day

Light at the end of the tunnel. After 13 long weeks, we have finally concluded our project! It was a bittersweet moment as we were glad to finally be done with the project but sad as that means we could no longer heeheehaha in the MnT lab. We definitely picked up alot of valuable skills we otherwise would not have during this 6 month long project from May to November, and we are very grateful to the lab TAs for always being there to support us and troubleshoot our problems together (we apologise for stressing y’all out and taking some years off your life!).

You can check out our presentation slides under the “Development” page.

Fret not, we will be back once again for a final MnT showcase from 6/12 – 7/12. Do continue to stay tuned to see if we make anymore modifications to our prototype after receiving feedback from today’s presentation. Till next time!

16 Nov 2024, Sat

The End Is Near.

KUWTP Ep. 26 | 14th November 2024 | Finalising our prototype – food dispenser + website

Where’d All the Time Go? In the blink of an eye, we were in Week 13 of the academic year and T-1 day away from our presentation for this project! We have been radio silent for the past month as we were juggling our never-ending number of midterms and MnT, but still always managed to squeeze time out to dedicate to MnT. To provide a short refresher, our prototype consists of 4 main components – impedance analyser, weighing scale, food dispenser and lastly a website to link all 3 up. The first 2 components have been finalised and what was left to do was designing and 3D printing the parts for our food dispenser as we innovated our prototype from a cereal dispenser and when installing a motor onto the dispenser, we needed to 3D print parts such as a shaft to attach the motor to, as well as parts for the weighing scale. On the software side of things, we needed to finalise the code to send data wirelessly via bluetooth between our ESP32 module and mobile phone. A goal of our project was to ensure user friendliness, which is achieved here as we make it easy for pet owners to dispense the food through a tap of a button on the phone. We also needed to finalise the formula to calculate a dog’s body fat percentage and update our website code.

The day started with a bang as configuring the bluetooth connectivity between the ESP32 module and our mobile phone went smoothly, and we were able to communicate to the ESP32 module through the phone. We streamlined the user interface such that there were only 3 functions – calibrate, tare and measure. The tare function is integrated into the calibrate function, but we added a separate tare function to call as we considered that pet owners would want to put their pet’s food bowl on the scale to collect the dispensed food and thus require a taring function.

Next, we designed parts of the weighing scale on Fusion360 and sent them to print! We went through multiple iterations of the designs to ensure the screw holes we created were accurate and the dimensions of the components of our 3D printed parts for the weighing scale in the food dispenser were precise.

Lastly, we worked on the derivation for the formula to calculate dog body fat percentage using impedance values. However, before we dive into the equation for a dog, we must first understand the derivation for a human. The human body can be represented as a simple circuit with a resistor representing the effective resistance of TBW in series with a capacitor representing cell membranes, and its shape is taken to be cylindrical.

Hence, we get a rough equation to relate fat free mass (FFM) to impedance where FFM = CH²/Z, where C is a constant. To find appropriate fitting factors, the study surveyed 32 volunteers who provided their height, age, and gender. Now, we can move on to finding the formula for a dog.

Similar to the derivation for humans, dogs’ body are modelled as a cylindrical object, thus obtaining a general formulas of ρL² / Z, where ρ is the specific resistivity of extracellular or intracellular water, since total body water is the sum of extracellular or intracellular water as mentioned previously. Calculated TBW value is then converted to FFM using an hydration fraction of 0.732 for healthy animals. From the study, the obtained values of ρ are 444.8 ohm cm and 1477.8 ohm cm for extracellular and intracellular water respectively.

To test the validity of the proposed equation, we assume the impedance of Odie to be 102 ohms, that of a healthy dog. From his recent vet check-up in June, his weight is 21.5kg with a body condition score of ⅗. Using the following equation, BF = 0.84 + 8.36(BCS), the percentage obtained is 25.92%. There is only a slight difference of 0.28%, thus showing the equation is valid. The second equation is obtained from another study done in Thailand on 340 dogs where they derived the equation using a linear regression model of BCS against body fat percentage of a dog. We also tested the formula on Asta, with an assumed impedance of 102 ohms, body weight of 4.4kg and length of 36cm. The body fat percentage obtained from the equations is 24.77%, also very similar to 25.92%.

We also updated the code of our website to include more features, such as an informational section and a kibble nutrition section. See the below video for a quick demonstration on how to use our website!

Refer to the following documents for our revised code!

food dispenser – food dispenser code
weighing scale – weighing scale code
website – website code

1 Oct 2024, Tue

Got Slow Down Or Not?!?

KUWTP Ep. 25 | 1st October 2024 | Coding our servo motor + Pet food code

Skibidi Toilet Mad Lit. In lieu of how time flies and we are now halfway into Semester 1, we use some Gen Alpha slangs in a bid to remain young and relevant in pop culture. Anyways! We are finally back after a 1 month hiatus due to midterms. After a such a long break from MnT, we gaslit ourselves and forgot how to piece our 3D printed parts together HAHAHAHA but we got back to the MnT grind quickly.

Today we focussed on coding our servo motor and generating the code that takes into account a dog’s body composition and nutritional value of a specific kibble before recommending the suggested mass of kibble to be fed and dispensing it automatically. We are pleased to announced we successfully completed both in a day which is a massive achievement. Regarding the servo motor code, we struggled with getting the code to work for our continuous servo motor. In literature, the command servo.write(90) stops the motor from running while values from 0 to 90 controls the speed of the servo motor with 0 being the fastest rotation. However, while running the code, we realised that this was in fact not calibrated for our servo motor as a servo.write(90) causes our servo motor to turn at a slow rate while servo.write(0) causes our servo motor to stop turning. To troubleshoot this, we simply generated a simple code on arduino to manually cross-check the value of the angle in servo.write(angle) and its corresponding speed.

This code allows us to key in integer values between 0 and 180 and quickly check its corresponding rotation speed. A few minutes of experimenting (Fig. 1) with different values allowed us to determine that for counter clockwise rotation, an angle of 103 corresponds to fastest revolution rate, an angle of 96 corresponds to the slowest possible revolution rate while angle of 95 returns to motor to the neutral position and stops the rotation.

After troubleshooting our servo.write() parameters, we updated our code and tested it out again. To our delight, the code now works perfectly A quick run through of our code – it enables the user to input 3 commands (tare, calibrate and dispense). The tare function offsets the current weight on the weighing scale and sets it to 0. This is crucial in taring the pet food bowl. The calibrate function ensures that the weighing scale is properly initialized. We calibrated the scale against a 100g known mass (Fig. 2) as the mass of pet food to be dispensed is approximately 100g hence the mass used for calibration should be close to the target mass to ensure accuracy and precision of the weighing scale. The dispense function allows the user to key in the desired mass of kibble to be dispensed, after which it is automatically dispensed and stops when the right amount has been dispensed. To minimise the probability of more food being dispensed, we programmed the motor to slow down drastically when approaching the target value at different increments. In total, the speed of the servo motor slows down 3 times, when the difference between desired and actual mass is between 50 and 20, between 20 and 10, and less than 1o.

After celebrating the success of our servo motor, we also brainstormed and finalized on how we will be integrating our pet weighing scale and food dispenser together. The conclusion would be to purchase a plywood and some metal structures to create a contraption where the food dispenser and weighing scale are back to back (Fig. 3). We will also be adding a feature to the weighing scale, where it will look like a dog bed so dogs will be more willing to stand on the scale.

We have also attached a video below featuring the success of our servo motor for you to celebrate our success with us, as well as our servo motor and pet food code ◡̈

Arduino Continuous Servo Motor Code: arduino servo motor code

Pet Food Code: pet food code

24 Aug 2024, Sat

Print Print Print.

KUWTP Ep. 24 | 23rd August 2024 | Fine-tuning our 3D prints

Am I becoming a filament? Our Electrician turned Autodesk Fusion360 wizard helped adjust our 3D models accordingly for the top plate of the weighing scale and the servo motor shaft. We got to printing it on Friday since the servo motor shaft would take a longer time and we decided to leave it to print over the weekend. The top plate required a shorter print time hence it was ready by late afternoon. To our delight, the new edits worked and it fits perfectly onto the load cell like peanut butter and jelly!

We hope to have another positive update on Monday after the new shaft is printed! As for today, we end off week 2 bussin-ly ◡̈

22 Aug 2024, Thu

Love Note From Arduino!

KUWTP Ep. 23 | 21st August 2024 | Assembling the pet food dispenser

See how our motor turns continuously? It is very mindful, very demure, very cutesy. Hopefully you have been doom-scrolling enough tiktok and are updated on the current trend where actions are described by Gen Zs as mindful, demure and cutesy! We unboxed our brand new Arduino R4 Wifi microcontroller today and were delighted by the cute graphics displayed on the microcontroller (see middle picture for the heart displayed on the board!). Truly a random piece of information but we are easily impressed people #justagirl. Our main goal for today was to fix up our pet food dispenser and test out our newest gadget – the continuous servo motor.

While assembling our parts, we realised that the shaft printed out was of the incorrect dimensions and thus did not fit onto the blade of our servo motor. The off measurements of the 3D-printed shaft was a steep obstacle as the blades of the servo motor require a M1 screw (an extremely thin screw), and even the slightest mm off would result in us being unable to align the holes on the shaft to those on the blade of our servo motor. We are currently in the midst of editing the 3D model on Autodesk Fusion360 so stay updated to see our new prints (we are also in the process of revamping and improving on our other previously 3D parts!). Another upgrade we will be adding to our pet food dispenser would be to add a funnel-like component below the rubber turbine which slows the rate of food dispensed to reduce the occurrence of too much food being dispensed – accounting for the delay between weighing scale and stopping of motor.

After the semi-successful assembly, we whipped out our MacBooks (or laptop for the non-subscribers of the bussin’ apple ecosystem, NOT SPONSORED sadly) and got to coding! Okay, backtrack slightly as we actually had to google and figure out the connections for our servo motor to Arduino. We are truly indebted to the great power of the internet as it has provided us with ample guidance throughout this project. Referring to this blog posted on MakerGuides, we chose the most basic connection for the servo motor just to get it running. What we learnt is that the 3 wires out from the servo motor correspond to GND, 5V and Control and are assigned as black, red and white respectively. As the name suggests and intuitively, GND and 5V are power pins and Control is a signal input pin.

While coding the motor, we encountered a problem – the code to stop the motor did not work. Most forums (and even ChatGPT) advised the stop code to be “myservo.write(90)” which would supposedly return the servo motor to the neutral position and thus stop it. However, a deep dive into an thread on the Arduino forum taught us that this command would work on most servo motors, but not a continuous servo motor. This is because a continuous servo motor has no feedback mechanism within it and does not know its angular position. When the code “myservo.write(90)” is given, it rotates towards position 90 but has no means of knowing when the position has been reached so it continues to rotate. However, a work around it would be to code “myservo.detach()” instead, where we basically stop the servo signal completely thus stopping the motor immediately. The next step to take in coding would be to figure out how to control the speed of rotation. We aim to code the motor such that as the weighing scale approaches a reading close to the ideal mass of pet food, it rotates at a slower speed to allow the mass of food dispensed to be more accurate as smaller portions would be dispensed. Check out the videos below to see our (demure, mindful and cutesy) servo motor in action!

20 Aug 2024, Tue

WOW! My Mom Must Be Proud Of Me!

KUWTP Ep. 22 | 20th August 2024 | 3D Printing + Coding + Assembling our second weighing scale

Working hard or hardly working. A very fruitful day in the lab where we finally managed to coordinate our timetables and squeeze out some time in the afternoon to head down to the lab. We hogged made use of 5 3D printers before heading for lunch, 3D printing our 3 parts belonging to the pet food dispenser, and 2 parts belonging to the weighing scale. For our previous weighing scale, it was a simpler mechanism where the load cell only requires a holder to attach it to a board, and by placing pressure on the load cell, it would create a strain and produce a reading. However with our new load cell, which is of a different mechanism, we require a special set-up to purposefully create a strain at the centre of the load cell, as per our last post. A slight boo boo we made was we forgot to double check the dimensions of our print and hence accidentally printed the dimensions meant for a 20kg load cell, not our 5kg load cell. To our relief, the base of the weighing scale still fits the load cell. However, the top plate would need some editing to perfect the dimensions. While tinkering with the top plate, we also decided to maybe incorporate a bowl into the top plate. With that being said, the filament used in lab although it is PLA and supposedly food safe given its biodegradability and non-toxic composition, we have some hesitations in using it to contain food directly as it may not be good for the dog to eat out of this bowl, hence we would require a covering over this bowl that is certified food safe.

After an hour or so, we checked back on our prints after lunch and were delighted to see some prints were completed! However, we did have to re-print one of the components of the pet food dispenser as it did not stick to the base of the 3D printer and became a disaster. We managed to assemble the weighing scale and to our delight it works well with no calibration issues. The coding for this weighing scale will differ from the previous weighing scale in a sense where we are thinking of having it read the mass continuously instead of only when prompted.

As for the update to our ESP8266-01S wifi module, we have yet to troubleshoot this problem HAHAHAHA. If all fails, we are considering buying an Arduino Uno R4 with in-built Wifi!

20 Aug 2024, Tue

Error 404.

KUWTP Ep. 21 | 19th August 2024 | Coding the ESP8266-01S with Arduino + Arrival of our cereal dispenser

A fatal esptool.py error occurred: Failed to connect to ESP8266: Timed out waiting for packet header. An odd caption but read on to understand more! (it is basically the error message we kept getting when trying to connect the ESP8266-01S and Arduino) Today marks the start of the second week of the semester, and we were off to a great start as our 2 cereal dispensers arrived in time for our MnT lab session tomorrow! These 2 cereal dispensers house what is considerably the most crucial part of our pet food dispenser – the turbine. This little rubber turbine will be attach to our continuous servo motor and used to dispense pet food. We are considering a few ways to control the rubber turbine and make it stop after it has dispensed a set mass of food. First would be through time, where we measure the average mass of food dispensed per second and use this rate to dispense a specified mass of food. Another would be to install magnets on each turn of the rubber turbine and use a hall sensor to detect when to stop the motor – however this is admittedly more tedious and advanced, hence we are unlikely to go down this route. Lastly, we are thinking of measuring the mass of food dispensed from each turn and use this to then specify the number of turns to dispense a specified mass of food. For the design of the pet food dispenser, we will be making adjustments accordingly to our servo motor but would be roughly following this design published by punkgeek on Thingiverse.

During our MnT lab session tomorrow, we also aim to make our second weighing scale! This time round, we will be using a 4-wire 5kg load cell as the mass of food measured is lesser and thus using a 50kg load cell will not be appropriate. Tapping on resources readily available online, we will be following the trusty instructions of Indrek and build our weighing scale. Our idea is to have this weighing scale right below the rubber turbine, and both the motor and weighing scale will be connected to an arduino that is programmed to stop the motor when the goal mass of food has been dispensed. Some key points from his instructions would be to use a multimeter and identify the opposite ends of the Wheatstone Bridge, where one pair will be the power wires and the other would be measurement wires. The resistance between the opposite ends should read to be approximately 1k ohms.

As for our ESP8266-01S, we are still unable to troubleshoot and find out why the wifi module refuses to connect to Arduino. Everytime we try to upload a blank sketch to the module to test it, we get an error reading back stating that Arduino is unable to connect to the wifi module. We have tried multiple connections but to no avail – truly leaving us bamboozled! However, as women in stem we REFUSE to give up and thus we will continue to troubleshoot this module tomorrow. We simply will not let this wifi module GASLIGHT us into thinking we can’t do it. After a deep dive on google, many people supposedly have had a problem with this wifi module and were not able to get it to work either. Our current suspicion is that the wires we are using are loose and has connectivity issues.