Most forms of modern artificial intelligence, which is still “weak AI,” work by identifying patterns they find in huge sets of data inputs and outputs. For example, a cat recognition AI might see that a picture contains pixels with attributes similar to the pictures of cats it was trained on, but unlike the non-cat pictures. It doesn’t actually “see” a cat at all — at least not in the way that we do. The beauty of this approach is that it works with anything quantifiable as a data set. Shawn Hymel proved this by building an AI-equipped toaster that can make the perfect toast by sniffing the bread.
As with any other application of neural network-based machine learning, the key here was training the AI with the right data. One could conceive of many different parameters that might indicate the “doneness” of toast. Maybe you’d simply base it on time — but that’s how the toaster’s built-in mechanism works and every toast aficionado knows that toasting time can vary. Instead, you might want to look at the surface of the toast using some kind of imaging sensor. That seems like a good idea, but it would be difficult to get an image sensor inside of a hot toaster without risking damage. The solution here ended up being to smell the toast and that required a synthetic nose.
Many sensors on the market can monitor the chemical composition of air or detect particulates based on physical size. In this case, it turns out that ammonia provides a good indication of when food starts to burn. Gas sensors that can detect ammonia concentration levels are readily available and affordable. Ammonia concentration is the key datum that this AI relies on to determine the toast doneness. Hymel just needed to collect raw data to train his ML model.
The primary piece of hardware, in addition to the gas sensor, is a Seeed Studio Wio Terminal. That compares a powerful Microchip ATSAMD51 microcontroller, a 2.4” LCD, Bluetooth and WiFi connectivity, along with a handful of sensors and other components that weren’t needed for this project. Hymel collected the data by simply toasting many pieces of bread. Each piece of toast, whether undercooked or overcooked, provides valuable data. What is important is noting the ammonia concentration at the point that each ejected from the toaster and rating the doneness. That gives the AI a dataset with many doneness levels and their corresponding ammonia concentrations.
The trained model runs on the minal and all Hymel has to do is ask the AI to target a level of doneness. The AI will then run the toaster until it detects ammonia concentration that it knows it has seen around the moment the toast reaches that doneness. The cool thing about this is that, unlike timed operation, it doesn’t matter what temperature the toast starts at. Hymel can put a frozen piece of bread or a warm piece of bread in the toaster and it will pop out perfectly toasted.