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.